build/umi.5081e737.js

141273 lines
5.5 MiB
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ };
/******/
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded CSS chunks
/******/ var installedCssChunks = {
/******/ 21: 0
/******/ }
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ 21: 0
/******/ };
/******/
/******/
/******/
/******/ // script path function
/******/ function jsonpScriptSrc(chunkId) {
/******/ return __webpack_require__.p + "" + ({"0":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~571f4253","1":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~af741bd6","2":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~ec7b5f6b","3":"vendors~layouts__SimpleLayouts~p__Competitions__Detail~p__metting__information__detail~p__metting__o~178abcb8","4":"p__metting__information__detail~p__metting__organization~p__metting__track","5":"vendors~layouts__index~p__Competitions__Entered__Assembly__TeamDateil~p__Competitions__Index","6":"vendors~p__Competitions__Entered~p__Competitions__Entered__Assembly__TeamDateil~p__Competitions__Index","8":"layouts__SimpleLayouts","9":"layouts__index","10":"p__Competitions__Detail","11":"p__Competitions__Entered","12":"p__Competitions__Entered__Assembly__TeamDateil","13":"p__Competitions__Index","14":"p__Competitions__Update","15":"p__metting__banner","16":"p__metting__home","17":"p__metting__information","18":"p__metting__information__detail","19":"p__metting__organization","20":"p__metting__track","22":"vendors~monaco-editor","23":"vendors~p__Competitions__Update"}[chunkId]||chunkId) + "." + {"0":"83f401cc","1":"9aac69c4","2":"60b46e3e","3":"2845a433","4":"9baad107","5":"4d98b8e7","6":"5a6e1448","7":"5d14cdb3","8":"b9915c4a","9":"23972aa4","10":"4771074d","11":"d61d6016","12":"bf5fc15c","13":"3f1d100e","14":"922421aa","15":"e2634be1","16":"5d4df36b","17":"e49571cd","18":"a08d558e","19":"de137232","20":"b045af64","22":"61923039","23":"7a827459","24":"97d25b5f","25":"104e44fd","26":"503de7ed","27":"1a3bc7c7","28":"943cc97a","29":"ced3058a","30":"68211da4","31":"50d3aabc","32":"a24c1207","33":"d1265227","34":"c9a118f7","35":"1bfe2dd7","36":"ae4ab8cb","37":"677d55ee","38":"af45cc50","39":"b85a605a","40":"aebd8ce5","41":"f6f6840d","42":"175a4c11","43":"7cdda08a","44":"08b4031f","45":"397115c8","46":"b673e63f","47":"3600c6a5","48":"d1f24edf","49":"d560ebf5","50":"e31b4cd9","51":"c178c1b5","52":"d04fcbd7","53":"1d23b9df","54":"be8dbc89","55":"60853033","56":"10955429","57":"2bd0c3a7","58":"3a115454","59":"d672ee7a","60":"bc984e39","61":"4bce22df","62":"85f60d91","63":"fdc8f2e1","64":"6256f2ac","65":"6f8b888b","66":"4dfce51c","67":"cb8e8499","68":"b0fe1b4d","69":"ff71a626","70":"ffd82168","71":"bb4f487c","72":"811fa516","73":"51a0cc5a","74":"30bf2410","75":"e6343d6c","76":"fb8c2f41","77":"3c15cc88","78":"da1449d6","79":"889f6e69","80":"f8dfbb68","81":"20860e11","82":"10a2cced","83":"d7681b11","84":"2b7a8ebb","85":"bfd535b6","86":"9f5667e5"}[chunkId] + ".async.js"
/******/ }
/******/
/******/ // 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;
/******/ }
/******/
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
/******/ var promises = [];
/******/
/******/
/******/ // mini-css-extract-plugin CSS loading
/******/ var cssChunks = {"0":1,"1":1,"2":1,"3":1,"4":1,"5":1,"6":1,"8":1,"9":1,"10":1,"11":1,"12":1,"13":1,"14":1,"15":1,"16":1,"17":1,"18":1,"19":1,"20":1,"22":1,"23":1};
/******/ if(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);
/******/ else if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {
/******/ promises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {
/******/ var href = "" + ({"0":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~571f4253","1":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~af741bd6","2":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~ec7b5f6b","3":"vendors~layouts__SimpleLayouts~p__Competitions__Detail~p__metting__information__detail~p__metting__o~178abcb8","4":"p__metting__information__detail~p__metting__organization~p__metting__track","5":"vendors~layouts__index~p__Competitions__Entered__Assembly__TeamDateil~p__Competitions__Index","6":"vendors~p__Competitions__Entered~p__Competitions__Entered__Assembly__TeamDateil~p__Competitions__Index","8":"layouts__SimpleLayouts","9":"layouts__index","10":"p__Competitions__Detail","11":"p__Competitions__Entered","12":"p__Competitions__Entered__Assembly__TeamDateil","13":"p__Competitions__Index","14":"p__Competitions__Update","15":"p__metting__banner","16":"p__metting__home","17":"p__metting__information","18":"p__metting__information__detail","19":"p__metting__organization","20":"p__metting__track","22":"vendors~monaco-editor","23":"vendors~p__Competitions__Update"}[chunkId]||chunkId) + "." + {"0":"f6170cac","1":"1d972763","2":"b353f8d2","3":"c140c04e","4":"a1bb3bbf","5":"747ef8d8","6":"511a8faf","7":"31d6cfe0","8":"da01e4c6","9":"e0ccd94e","10":"457f5449","11":"37b8810c","12":"7e90791c","13":"afba6266","14":"d9eeb85a","15":"1ba80596","16":"13d66392","17":"f94af77c","18":"7a74b177","19":"a2cbc9ef","20":"5eec5747","22":"d82723f9","23":"03519cbf","24":"31d6cfe0","25":"31d6cfe0","26":"31d6cfe0","27":"31d6cfe0","28":"31d6cfe0","29":"31d6cfe0","30":"31d6cfe0","31":"31d6cfe0","32":"31d6cfe0","33":"31d6cfe0","34":"31d6cfe0","35":"31d6cfe0","36":"31d6cfe0","37":"31d6cfe0","38":"31d6cfe0","39":"31d6cfe0","40":"31d6cfe0","41":"31d6cfe0","42":"31d6cfe0","43":"31d6cfe0","44":"31d6cfe0","45":"31d6cfe0","46":"31d6cfe0","47":"31d6cfe0","48":"31d6cfe0","49":"31d6cfe0","50":"31d6cfe0","51":"31d6cfe0","52":"31d6cfe0","53":"31d6cfe0","54":"31d6cfe0","55":"31d6cfe0","56":"31d6cfe0","57":"31d6cfe0","58":"31d6cfe0","59":"31d6cfe0","60":"31d6cfe0","61":"31d6cfe0","62":"31d6cfe0","63":"31d6cfe0","64":"31d6cfe0","65":"31d6cfe0","66":"31d6cfe0","67":"31d6cfe0","68":"31d6cfe0","69":"31d6cfe0","70":"31d6cfe0","71":"31d6cfe0","72":"31d6cfe0","73":"31d6cfe0","74":"31d6cfe0","75":"31d6cfe0","76":"31d6cfe0","77":"31d6cfe0","78":"31d6cfe0","79":"31d6cfe0","80":"31d6cfe0","81":"31d6cfe0","82":"31d6cfe0","83":"31d6cfe0","84":"31d6cfe0","85":"31d6cfe0","86":"31d6cfe0"}[chunkId] + ".chunk.css";
/******/ var fullhref = __webpack_require__.p + href;
/******/ var existingLinkTags = document.getElementsByTagName("link");
/******/ for(var i = 0; i < existingLinkTags.length; i++) {
/******/ var tag = existingLinkTags[i];
/******/ var dataHref = tag.getAttribute("data-href") || tag.getAttribute("href");
/******/ if(tag.rel === "stylesheet" && (dataHref === href || dataHref === fullhref)) return resolve();
/******/ }
/******/ var existingStyleTags = document.getElementsByTagName("style");
/******/ for(var i = 0; i < existingStyleTags.length; i++) {
/******/ var tag = existingStyleTags[i];
/******/ var dataHref = tag.getAttribute("data-href");
/******/ if(dataHref === href || dataHref === fullhref) return resolve();
/******/ }
/******/ var linkTag = document.createElement("link");
/******/ linkTag.rel = "stylesheet";
/******/ linkTag.type = "text/css";
/******/ linkTag.onload = resolve;
/******/ linkTag.onerror = function(event) {
/******/ var request = event && event.target && event.target.src || fullhref;
/******/ var err = new Error("Loading CSS chunk " + chunkId + " failed.\n(" + request + ")");
/******/ err.code = "CSS_CHUNK_LOAD_FAILED";
/******/ err.request = request;
/******/ delete installedCssChunks[chunkId]
/******/ linkTag.parentNode.removeChild(linkTag)
/******/ reject(err);
/******/ };
/******/ linkTag.href = fullhref;
/******/
/******/ var head = document.getElementsByTagName("head")[0];
/******/ head.appendChild(linkTag);
/******/ }).then(function() {
/******/ installedCssChunks[chunkId] = 0;
/******/ }));
/******/ }
/******/
/******/ // JSONP chunk loading for javascript
/******/
/******/ var installedChunkData = installedChunks[chunkId];
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunkData) {
/******/ promises.push(installedChunkData[2]);
/******/ } else {
/******/ // setup Promise in chunk cache
/******/ var promise = new Promise(function(resolve, reject) {
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ });
/******/ promises.push(installedChunkData[2] = promise);
/******/
/******/ // start chunk loading
/******/ var script = document.createElement('script');
/******/ var onScriptComplete;
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120;
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = jsonpScriptSrc(chunkId);
/******/
/******/ // create error before stack unwound to get useful stacktrace later
/******/ var error = new Error();
/******/ onScriptComplete = function (event) {
/******/ // avoid mem leaks in IE.
/******/ script.onerror = script.onload = null;
/******/ clearTimeout(timeout);
/******/ var chunk = installedChunks[chunkId];
/******/ if(chunk !== 0) {
/******/ if(chunk) {
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ var realSrc = event && event.target && event.target.src;
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
/******/ error.name = 'ChunkLoadError';
/******/ error.type = errorType;
/******/ error.request = realSrc;
/******/ chunk[1](error);
/******/ }
/******/ installedChunks[chunkId] = undefined;
/******/ }
/******/ };
/******/ var timeout = setTimeout(function(){
/******/ onScriptComplete({ type: 'timeout', target: script });
/******/ }, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ document.head.appendChild(script);
/******/ }
/******/ }
/******/ return Promise.all(promises);
/******/ };
/******/
/******/ // 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 = "/";
/******/
/******/ // on error function for async loading
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = 0);
/******/ })
/************************************************************************/
/******/ ({
/***/ "++zV":
/*!************************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.reflect.define-metadata.js ***!
\************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toMetadataKey = ReflectMetadataModule.toKey;
var ordinaryDefineOwnMetadata = ReflectMetadataModule.set;
// `Reflect.defineMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
defineMetadata: function defineMetadata(metadataKey, metadataValue, target /* , targetKey */) {
var targetKey = arguments.length < 4 ? undefined : toMetadataKey(arguments[3]);
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), targetKey);
}
});
/***/ }),
/***/ "+0iv":
/*!***********************************************!*\
!*** ./node_modules/is-plain-object/index.js ***!
\***********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*!
* is-plain-object <https://github.com/jonschlinkert/is-plain-object>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
var isObject = __webpack_require__(/*! isobject */ "qDJ8");
function isObjectObject(o) {
return isObject(o) === true
&& Object.prototype.toString.call(o) === '[object Object]';
}
module.exports = function isPlainObject(o) {
var ctor,prot;
if (isObjectObject(o) === false) return false;
// If has modified constructor
ctor = o.constructor;
if (typeof ctor !== 'function') return false;
// If has modified prototype
prot = ctor.prototype;
if (isObjectObject(prot) === false) return false;
// If constructor does not have an Object-specific method
if (prot.hasOwnProperty('isPrototypeOf') === false) {
return false;
}
// Most likely a plain Object
return true;
};
/***/ }),
/***/ "+2oP":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.array.slice.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var isArray = __webpack_require__(/*! ../internals/is-array */ "6LWA");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "hBjN");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "Hd5f");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice');
var USES_TO_LENGTH = arrayMethodUsesToLength('slice', { ACCESSORS: true, 0: 0, 1: 2 });
var SPECIES = wellKnownSymbol('species');
var nativeSlice = [].slice;
var max = Math.max;
// `Array.prototype.slice` method
// https://tc39.github.io/ecma262/#sec-array.prototype.slice
// fallback for not array-like ES3 strings and DOM objects
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
slice: function slice(start, end) {
var O = toIndexedObject(this);
var length = toLength(O.length);
var k = toAbsoluteIndex(start, length);
var fin = toAbsoluteIndex(end === undefined ? length : end, length);
// inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible
var Constructor, result, n;
if (isArray(O)) {
Constructor = O.constructor;
// cross-realm fallback
if (typeof Constructor == 'function' && (Constructor === Array || isArray(Constructor.prototype))) {
Constructor = undefined;
} else if (isObject(Constructor)) {
Constructor = Constructor[SPECIES];
if (Constructor === null) Constructor = undefined;
}
if (Constructor === Array || Constructor === undefined) {
return nativeSlice.call(O, k, fin);
}
}
result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
result.length = n;
return result;
}
});
/***/ }),
/***/ "+Gva":
/*!**********************************************************!*\
!*** ./node_modules/antd/es/locale/zh_CN.js + 4 modules ***!
\**********************************************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/zh_CN.js because of ./node_modules/rc-pagination/es/Pagination.js */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/zh_CN.js
var zh_CN = __webpack_require__("N2Kk");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// CONCATENATED MODULE: ./node_modules/rc-picker/es/locale/zh_CN.js
var locale = {
locale: 'zh_CN',
today: '今天',
now: '此刻',
backToToday: '返回今天',
ok: '确定',
timeSelect: '选择时间',
dateSelect: '选择日期',
weekSelect: '选择周',
clear: '清除',
month: '月',
year: '年',
previousMonth: '上个月 (翻页上键)',
nextMonth: '下个月 (翻页下键)',
monthSelect: '选择月份',
yearSelect: '选择年份',
decadeSelect: '选择年代',
yearFormat: 'YYYY年',
dayFormat: 'D日',
dateFormat: 'YYYY年M月D日',
dateTimeFormat: 'YYYY年M月D日 HH时mm分ss秒',
previousYear: '上一年 (Control键加左方向键)',
nextYear: '下一年 (Control键加右方向键)',
previousDecade: '上一年代',
nextDecade: '下一年代',
previousCentury: '上一世纪',
nextCentury: '下一世纪'
};
/* harmony default export */ var locale_zh_CN = (locale);
// CONCATENATED MODULE: ./node_modules/antd/es/time-picker/locale/zh_CN.js
var zh_CN_locale = {
placeholder: '请选择时间',
rangePlaceholder: ['开始时间', '结束时间']
};
/* harmony default export */ var time_picker_locale_zh_CN = (zh_CN_locale);
// CONCATENATED MODULE: ./node_modules/antd/es/date-picker/locale/zh_CN.js
// 统一合并为完整的 Locale
var locale_zh_CN_locale = {
lang: extends_default()({
placeholder: '请选择日期',
yearPlaceholder: '请选择年份',
quarterPlaceholder: '请选择季度',
monthPlaceholder: '请选择月份',
weekPlaceholder: '请选择周',
rangePlaceholder: ['开始日期', '结束日期'],
rangeYearPlaceholder: ['开始年份', '结束年份'],
rangeMonthPlaceholder: ['开始月份', '结束月份'],
rangeWeekPlaceholder: ['开始周', '结束周']
}, locale_zh_CN),
timePickerLocale: extends_default()({}, time_picker_locale_zh_CN)
}; // should add whitespace between char in Button
locale_zh_CN_locale.lang.ok = '确 定'; // All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_zh_CN = (locale_zh_CN_locale);
// CONCATENATED MODULE: ./node_modules/antd/es/calendar/locale/zh_CN.js
/* harmony default export */ var calendar_locale_zh_CN = (date_picker_locale_zh_CN);
// CONCATENATED MODULE: ./node_modules/antd/es/locale/zh_CN.js
/* eslint-disable no-template-curly-in-string */
var typeTemplate = '${label}不是一个有效的${type}';
var localeValues = {
locale: 'zh-cn',
Pagination: zh_CN["a" /* default */],
DatePicker: date_picker_locale_zh_CN,
TimePicker: time_picker_locale_zh_CN,
Calendar: calendar_locale_zh_CN,
// locales for all comoponents
global: {
placeholder: '请选择'
},
Table: {
filterTitle: '筛选',
filterConfirm: '确定',
filterReset: '重置',
filterEmptyText: '无筛选项',
selectAll: '全选当页',
selectInvert: '反选当页',
selectionAll: '全选所有',
sortTitle: '排序',
expand: '展开行',
collapse: '关闭行',
triggerDesc: '点击降序',
triggerAsc: '点击升序',
cancelSort: '取消排序'
},
Modal: {
okText: '确定',
cancelText: '取消',
justOkText: '知道了'
},
Popconfirm: {
cancelText: '取消',
okText: '确定'
},
Transfer: {
searchPlaceholder: '请输入搜索内容',
itemUnit: '项',
itemsUnit: '项',
remove: '删除',
selectCurrent: '全选当页',
removeCurrent: '删除当页',
selectAll: '全选所有',
removeAll: '删除全部',
selectInvert: '反选当页'
},
Upload: {
uploading: '文件上传中',
removeFile: '删除文件',
uploadError: '上传错误',
previewFile: '预览文件',
downloadFile: '下载文件'
},
Empty: {
description: '暂无数据'
},
Icon: {
icon: '图标'
},
Text: {
edit: '编辑',
copy: '复制',
copied: '复制成功',
expand: '展开'
},
PageHeader: {
back: '返回'
},
Form: {
optional: '(可选)',
defaultValidateMessages: {
"default": '字段验证错误${label}',
required: '请输入${label}',
"enum": '${label}必须是其中一个[${enum}]',
whitespace: '${label}不能为空字符',
date: {
format: '${label}日期格式无效',
parse: '${label}不能转换为日期',
invalid: '${label}是一个无效日期'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
"boolean": typeTemplate,
integer: typeTemplate,
"float": typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label}须为${len}个字符',
min: '${label}最少${min}个字符',
max: '${label}最多${max}个字符',
range: '${label}须在${min}-${max}字符之间'
},
number: {
len: '${label}必须等于${len}',
min: '${label}最小值为${min}',
max: '${label}最大值为${max}',
range: '${label}须在${min}-${max}之间'
},
array: {
len: '须为${len}个${label}',
min: '最少${min}个${label}',
max: '最多${max}个${label}',
range: '${label}数量须在${min}-${max}之间'
},
pattern: {
mismatch: '${label}与模式不匹配${pattern}'
}
}
}
};
/* harmony default export */ var es_locale_zh_CN = __webpack_exports__["default"] = (localeValues);
/***/ }),
/***/ "+L6B":
/*!****************************************************!*\
!*** ./node_modules/antd/es/button/style/index.js ***!
\****************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "qCM6");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/***/ }),
/***/ "+M1K":
/*!***************************************************************!*\
!*** ./node_modules/core-js/internals/to-positive-integer.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
module.exports = function (it) {
var result = toInteger(it);
if (result < 0) throw RangeError("The argument can't be less than 0");
return result;
};
/***/ }),
/***/ "+P9B":
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/CloseOutlined.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _CloseOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/CloseOutlined */ "+xQR"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CloseOutlined = function CloseOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _CloseOutlined.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(CloseOutlined);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "+kx5":
/*!********************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
\********************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
/***/ }),
/***/ "+qE3":
/*!***************************************!*\
!*** ./node_modules/events/events.js ***!
\***************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var R = typeof Reflect === 'object' ? Reflect : null
var ReflectApply = R && typeof R.apply === 'function'
? R.apply
: function ReflectApply(target, receiver, args) {
return Function.prototype.apply.call(target, receiver, args);
}
var ReflectOwnKeys
if (R && typeof R.ownKeys === 'function') {
ReflectOwnKeys = R.ownKeys
} else if (Object.getOwnPropertySymbols) {
ReflectOwnKeys = function ReflectOwnKeys(target) {
return Object.getOwnPropertyNames(target)
.concat(Object.getOwnPropertySymbols(target));
};
} else {
ReflectOwnKeys = function ReflectOwnKeys(target) {
return Object.getOwnPropertyNames(target);
};
}
function ProcessEmitWarning(warning) {
if (console && console.warn) console.warn(warning);
}
var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {
return value !== value;
}
function EventEmitter() {
EventEmitter.init.call(this);
}
module.exports = EventEmitter;
module.exports.once = once;
// Backwards-compat with node 0.10.x
EventEmitter.EventEmitter = EventEmitter;
EventEmitter.prototype._events = undefined;
EventEmitter.prototype._eventsCount = 0;
EventEmitter.prototype._maxListeners = undefined;
// By default EventEmitters will print a warning if more than 10 listeners are
// added to it. This is a useful default which helps finding memory leaks.
var defaultMaxListeners = 10;
function checkListener(listener) {
if (typeof listener !== 'function') {
throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener);
}
}
Object.defineProperty(EventEmitter, 'defaultMaxListeners', {
enumerable: true,
get: function() {
return defaultMaxListeners;
},
set: function(arg) {
if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {
throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.');
}
defaultMaxListeners = arg;
}
});
EventEmitter.init = function() {
if (this._events === undefined ||
this._events === Object.getPrototypeOf(this)._events) {
this._events = Object.create(null);
this._eventsCount = 0;
}
this._maxListeners = this._maxListeners || undefined;
};
// Obviously not all Emitters should be limited to 10. This function allows
// that to be increased. Set to zero for unlimited.
EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {
if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {
throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.');
}
this._maxListeners = n;
return this;
};
function _getMaxListeners(that) {
if (that._maxListeners === undefined)
return EventEmitter.defaultMaxListeners;
return that._maxListeners;
}
EventEmitter.prototype.getMaxListeners = function getMaxListeners() {
return _getMaxListeners(this);
};
EventEmitter.prototype.emit = function emit(type) {
var args = [];
for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);
var doError = (type === 'error');
var events = this._events;
if (events !== undefined)
doError = (doError && events.error === undefined);
else if (!doError)
return false;
// If there is no 'error' event listener then throw.
if (doError) {
var er;
if (args.length > 0)
er = args[0];
if (er instanceof Error) {
// Note: The comments on the `throw` lines are intentional, they show
// up in Node's output if this results in an unhandled exception.
throw er; // Unhandled 'error' event
}
// At least give some kind of context to the user
var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));
err.context = er;
throw err; // Unhandled 'error' event
}
var handler = events[type];
if (handler === undefined)
return false;
if (typeof handler === 'function') {
ReflectApply(handler, this, args);
} else {
var len = handler.length;
var listeners = arrayClone(handler, len);
for (var i = 0; i < len; ++i)
ReflectApply(listeners[i], this, args);
}
return true;
};
function _addListener(target, type, listener, prepend) {
var m;
var events;
var existing;
checkListener(listener);
events = target._events;
if (events === undefined) {
events = target._events = Object.create(null);
target._eventsCount = 0;
} else {
// To avoid recursion in the case that type === "newListener"! Before
// adding it to the listeners, first emit "newListener".
if (events.newListener !== undefined) {
target.emit('newListener', type,
listener.listener ? listener.listener : listener);
// Re-assign `events` because a newListener handler could have caused the
// this._events to be assigned to a new object
events = target._events;
}
existing = events[type];
}
if (existing === undefined) {
// Optimize the case of one listener. Don't need the extra array object.
existing = events[type] = listener;
++target._eventsCount;
} else {
if (typeof existing === 'function') {
// Adding the second element, need to change to array.
existing = events[type] =
prepend ? [listener, existing] : [existing, listener];
// If we've already got an array, just append.
} else if (prepend) {
existing.unshift(listener);
} else {
existing.push(listener);
}
// Check for listener leak
m = _getMaxListeners(target);
if (m > 0 && existing.length > m && !existing.warned) {
existing.warned = true;
// No error code for this since it is a Warning
// eslint-disable-next-line no-restricted-syntax
var w = new Error('Possible EventEmitter memory leak detected. ' +
existing.length + ' ' + String(type) + ' listeners ' +
'added. Use emitter.setMaxListeners() to ' +
'increase limit');
w.name = 'MaxListenersExceededWarning';
w.emitter = target;
w.type = type;
w.count = existing.length;
ProcessEmitWarning(w);
}
}
return target;
}
EventEmitter.prototype.addListener = function addListener(type, listener) {
return _addListener(this, type, listener, false);
};
EventEmitter.prototype.on = EventEmitter.prototype.addListener;
EventEmitter.prototype.prependListener =
function prependListener(type, listener) {
return _addListener(this, type, listener, true);
};
function onceWrapper() {
if (!this.fired) {
this.target.removeListener(this.type, this.wrapFn);
this.fired = true;
if (arguments.length === 0)
return this.listener.call(this.target);
return this.listener.apply(this.target, arguments);
}
}
function _onceWrap(target, type, listener) {
var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };
var wrapped = onceWrapper.bind(state);
wrapped.listener = listener;
state.wrapFn = wrapped;
return wrapped;
}
EventEmitter.prototype.once = function once(type, listener) {
checkListener(listener);
this.on(type, _onceWrap(this, type, listener));
return this;
};
EventEmitter.prototype.prependOnceListener =
function prependOnceListener(type, listener) {
checkListener(listener);
this.prependListener(type, _onceWrap(this, type, listener));
return this;
};
// Emits a 'removeListener' event if and only if the listener was removed.
EventEmitter.prototype.removeListener =
function removeListener(type, listener) {
var list, events, position, i, originalListener;
checkListener(listener);
events = this._events;
if (events === undefined)
return this;
list = events[type];
if (list === undefined)
return this;
if (list === listener || list.listener === listener) {
if (--this._eventsCount === 0)
this._events = Object.create(null);
else {
delete events[type];
if (events.removeListener)
this.emit('removeListener', type, list.listener || listener);
}
} else if (typeof list !== 'function') {
position = -1;
for (i = list.length - 1; i >= 0; i--) {
if (list[i] === listener || list[i].listener === listener) {
originalListener = list[i].listener;
position = i;
break;
}
}
if (position < 0)
return this;
if (position === 0)
list.shift();
else {
spliceOne(list, position);
}
if (list.length === 1)
events[type] = list[0];
if (events.removeListener !== undefined)
this.emit('removeListener', type, originalListener || listener);
}
return this;
};
EventEmitter.prototype.off = EventEmitter.prototype.removeListener;
EventEmitter.prototype.removeAllListeners =
function removeAllListeners(type) {
var listeners, events, i;
events = this._events;
if (events === undefined)
return this;
// not listening for removeListener, no need to emit
if (events.removeListener === undefined) {
if (arguments.length === 0) {
this._events = Object.create(null);
this._eventsCount = 0;
} else if (events[type] !== undefined) {
if (--this._eventsCount === 0)
this._events = Object.create(null);
else
delete events[type];
}
return this;
}
// emit removeListener for all listeners on all events
if (arguments.length === 0) {
var keys = Object.keys(events);
var key;
for (i = 0; i < keys.length; ++i) {
key = keys[i];
if (key === 'removeListener') continue;
this.removeAllListeners(key);
}
this.removeAllListeners('removeListener');
this._events = Object.create(null);
this._eventsCount = 0;
return this;
}
listeners = events[type];
if (typeof listeners === 'function') {
this.removeListener(type, listeners);
} else if (listeners !== undefined) {
// LIFO order
for (i = listeners.length - 1; i >= 0; i--) {
this.removeListener(type, listeners[i]);
}
}
return this;
};
function _listeners(target, type, unwrap) {
var events = target._events;
if (events === undefined)
return [];
var evlistener = events[type];
if (evlistener === undefined)
return [];
if (typeof evlistener === 'function')
return unwrap ? [evlistener.listener || evlistener] : [evlistener];
return unwrap ?
unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);
}
EventEmitter.prototype.listeners = function listeners(type) {
return _listeners(this, type, true);
};
EventEmitter.prototype.rawListeners = function rawListeners(type) {
return _listeners(this, type, false);
};
EventEmitter.listenerCount = function(emitter, type) {
if (typeof emitter.listenerCount === 'function') {
return emitter.listenerCount(type);
} else {
return listenerCount.call(emitter, type);
}
};
EventEmitter.prototype.listenerCount = listenerCount;
function listenerCount(type) {
var events = this._events;
if (events !== undefined) {
var evlistener = events[type];
if (typeof evlistener === 'function') {
return 1;
} else if (evlistener !== undefined) {
return evlistener.length;
}
}
return 0;
}
EventEmitter.prototype.eventNames = function eventNames() {
return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];
};
function arrayClone(arr, n) {
var copy = new Array(n);
for (var i = 0; i < n; ++i)
copy[i] = arr[i];
return copy;
}
function spliceOne(list, index) {
for (; index + 1 < list.length; index++)
list[index] = list[index + 1];
list.pop();
}
function unwrapListeners(arr) {
var ret = new Array(arr.length);
for (var i = 0; i < ret.length; ++i) {
ret[i] = arr[i].listener || arr[i];
}
return ret;
}
function once(emitter, name) {
return new Promise(function (resolve, reject) {
function errorListener(err) {
emitter.removeListener(name, resolver);
reject(err);
}
function resolver() {
if (typeof emitter.removeListener === 'function') {
emitter.removeListener('error', errorListener);
}
resolve([].slice.call(arguments));
};
eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });
if (name !== 'error') {
addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });
}
});
}
function addErrorHandlerIfEventEmitter(emitter, handler, flags) {
if (typeof emitter.on === 'function') {
eventTargetAgnosticAddListener(emitter, 'error', handler, flags);
}
}
function eventTargetAgnosticAddListener(emitter, name, listener, flags) {
if (typeof emitter.on === 'function') {
if (flags.once) {
emitter.once(name, listener);
} else {
emitter.on(name, listener);
}
} else if (typeof emitter.addEventListener === 'function') {
// EventTarget does not have `error` event semantics like Node
// EventEmitters, we do not listen for `error` events here.
emitter.addEventListener(name, function wrapListener(arg) {
// IE does not have builtin `{ once: true }` support so we
// have to do it manually.
if (flags.once) {
emitter.removeEventListener(name, wrapListener);
}
listener(arg);
});
} else {
throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter);
}
}
/***/ }),
/***/ "+wdc":
/*!****************************************************************!*\
!*** ./node_modules/scheduler/cjs/scheduler.production.min.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v0.18.0
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
Object.defineProperty(exports,"__esModule",{value:!0});var f,g,h,k,l;
if("undefined"===typeof window||"function"!==typeof MessageChannel){var p=null,q=null,t=function(){if(null!==p)try{var a=exports.unstable_now();p(!0,a);p=null}catch(b){throw setTimeout(t,0),b;}},u=Date.now();exports.unstable_now=function(){return Date.now()-u};f=function(a){null!==p?setTimeout(f,0,a):(p=a,setTimeout(t,0))};g=function(a,b){q=setTimeout(a,b)};h=function(){clearTimeout(q)};k=function(){return!1};l=exports.unstable_forceFrameRate=function(){}}else{var w=window.performance,x=window.Date,
y=window.setTimeout,z=window.clearTimeout;if("undefined"!==typeof console){var A=window.cancelAnimationFrame;"function"!==typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills");"function"!==typeof A&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"===
typeof w&&"function"===typeof w.now)exports.unstable_now=function(){return w.now()};else{var B=x.now();exports.unstable_now=function(){return x.now()-B}}var C=!1,D=null,E=-1,F=5,G=0;k=function(){return exports.unstable_now()>=G};l=function(){};exports.unstable_forceFrameRate=function(a){0>a||125<a?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):F=0<a?Math.floor(1E3/a):5};var H=new MessageChannel,I=H.port2;H.port1.onmessage=
function(){if(null!==D){var a=exports.unstable_now();G=a+F;try{D(!0,a)?I.postMessage(null):(C=!1,D=null)}catch(b){throw I.postMessage(null),b;}}else C=!1};f=function(a){D=a;C||(C=!0,I.postMessage(null))};g=function(a,b){E=y(function(){a(exports.unstable_now())},b)};h=function(){z(E);E=-1}}function J(a,b){var c=a.length;a.push(b);a:for(;;){var d=Math.floor((c-1)/2),e=a[d];if(void 0!==e&&0<K(e,b))a[d]=b,a[c]=e,c=d;else break a}}function L(a){a=a[0];return void 0===a?null:a}
function M(a){var b=a[0];if(void 0!==b){var c=a.pop();if(c!==b){a[0]=c;a:for(var d=0,e=a.length;d<e;){var m=2*(d+1)-1,n=a[m],v=m+1,r=a[v];if(void 0!==n&&0>K(n,c))void 0!==r&&0>K(r,n)?(a[d]=r,a[v]=c,d=v):(a[d]=n,a[m]=c,d=m);else if(void 0!==r&&0>K(r,c))a[d]=r,a[v]=c,d=v;else break a}}return b}return null}function K(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}var N=[],O=[],P=1,Q=null,R=3,S=!1,T=!1,U=!1;
function V(a){for(var b=L(O);null!==b;){if(null===b.callback)M(O);else if(b.startTime<=a)M(O),b.sortIndex=b.expirationTime,J(N,b);else break;b=L(O)}}function W(a){U=!1;V(a);if(!T)if(null!==L(N))T=!0,f(X);else{var b=L(O);null!==b&&g(W,b.startTime-a)}}
function X(a,b){T=!1;U&&(U=!1,h());S=!0;var c=R;try{V(b);for(Q=L(N);null!==Q&&(!(Q.expirationTime>b)||a&&!k());){var d=Q.callback;if(null!==d){Q.callback=null;R=Q.priorityLevel;var e=d(Q.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?Q.callback=e:Q===L(N)&&M(N);V(b)}else M(N);Q=L(N)}if(null!==Q)var m=!0;else{var n=L(O);null!==n&&g(W,n.startTime-b);m=!1}return m}finally{Q=null,R=c,S=!1}}
function Y(a){switch(a){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1E4;default:return 5E3}}var Z=l;exports.unstable_ImmediatePriority=1;exports.unstable_UserBlockingPriority=2;exports.unstable_NormalPriority=3;exports.unstable_IdlePriority=5;exports.unstable_LowPriority=4;exports.unstable_runWithPriority=function(a,b){switch(a){case 1:case 2:case 3:case 4:case 5:break;default:a=3}var c=R;R=a;try{return b()}finally{R=c}};
exports.unstable_next=function(a){switch(R){case 1:case 2:case 3:var b=3;break;default:b=R}var c=R;R=b;try{return a()}finally{R=c}};
exports.unstable_scheduleCallback=function(a,b,c){var d=exports.unstable_now();if("object"===typeof c&&null!==c){var e=c.delay;e="number"===typeof e&&0<e?d+e:d;c="number"===typeof c.timeout?c.timeout:Y(a)}else c=Y(a),e=d;c=e+c;a={id:P++,callback:b,priorityLevel:a,startTime:e,expirationTime:c,sortIndex:-1};e>d?(a.sortIndex=e,J(O,a),null===L(N)&&a===L(O)&&(U?h():U=!0,g(W,e-d))):(a.sortIndex=c,J(N,a),T||S||(T=!0,f(X)));return a};exports.unstable_cancelCallback=function(a){a.callback=null};
exports.unstable_wrapCallback=function(a){var b=R;return function(){var c=R;R=b;try{return a.apply(this,arguments)}finally{R=c}}};exports.unstable_getCurrentPriorityLevel=function(){return R};exports.unstable_shouldYield=function(){var a=exports.unstable_now();V(a);var b=L(N);return b!==Q&&null!==Q&&null!==b&&null!==b.callback&&b.startTime<=a&&b.expirationTime<Q.expirationTime||k()};exports.unstable_requestPaint=Z;exports.unstable_continueExecution=function(){T||S||(T=!0,f(X))};
exports.unstable_pauseExecution=function(){};exports.unstable_getFirstCallbackNode=function(){return L(N)};exports.unstable_Profiling=null;
/***/ }),
/***/ "+xQR":
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/CloseOutlined.js ***!
\*********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var CloseOutlined = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z" } }] }, "name": "close", "theme": "outlined" };
exports.default = CloseOutlined;
/***/ }),
/***/ "+ywr":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.uint32-array.js ***!
\*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj");
// `Uint32Array` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Uint32', function (init) {
return function Uint32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "/5zm":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.cosh.js ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "jrUv");
var nativeCosh = Math.cosh;
var abs = Math.abs;
var E = Math.E;
// `Math.cosh` method
// https://tc39.github.io/ecma262/#sec-math.cosh
$({ target: 'Math', stat: true, forced: !nativeCosh || nativeCosh(710) === Infinity }, {
cosh: function cosh(x) {
var t = expm1(abs(x) - 1) + 1;
return (t + 1 / (t * E * E)) * (E / 2);
}
});
/***/ }),
/***/ "/9aa":
/*!*****************************************!*\
!*** ./node_modules/lodash/isSymbol.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ "NykK"),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ "ExA7");
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && baseGetTag(value) == symbolTag);
}
module.exports = isSymbol;
/***/ }),
/***/ "/EoS":
/*!******************************************!*\
!*** ./src/styles/iconfont/iconfont.css ***!
\******************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "/GqU":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/to-indexed-object.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// toObject with fallback for non-array-like ES3 strings
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "RK3t");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
module.exports = function (it) {
return IndexedObject(requireObjectCoercible(it));
};
/***/ }),
/***/ "/MKj":
/*!***********************************************************!*\
!*** ./node_modules/react-redux/es/index.js + 24 modules ***!
\***********************************************************/
/*! exports provided: Provider, connectAdvanced, ReactReduxContext, connect, useDispatch, createDispatchHook, useSelector, createSelectorHook, useStore, createStoreHook, shallowEqual, batch */
/*! exports used: Provider, ReactReduxContext, connect */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/node_modules/react-is/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ components_Provider; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ ReactReduxContext; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ connect_connect; });
// UNUSED EXPORTS: connectAdvanced, useDispatch, createDispatchHook, useSelector, createSelectorHook, useStore, createStoreHook, shallowEqual, batch
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Context.js
var ReactReduxContext = /*#__PURE__*/react_default.a.createContext(null);
if (false) {}
/* harmony default export */ var components_Context = (ReactReduxContext);
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/batch.js
// Default to a dummy "batch" implementation that just runs the callback
function defaultNoopBatch(callback) {
callback();
}
var batch_batch = defaultNoopBatch; // Allow injecting another batching function later
var setBatch = function setBatch(newBatch) {
return batch_batch = newBatch;
}; // Supply a getter just to skip dealing with ESM bindings
var getBatch = function getBatch() {
return batch_batch;
};
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/Subscription.js
// encapsulates the subscription logic for connecting a component to the redux store, as
// well as nesting subscriptions of descendant components, so that we can ensure the
// ancestor components re-render before descendants
function createListenerCollection() {
var batch = getBatch();
var first = null;
var last = null;
return {
clear: function clear() {
first = null;
last = null;
},
notify: function notify() {
batch(function () {
var listener = first;
while (listener) {
listener.callback();
listener = listener.next;
}
});
},
get: function get() {
var listeners = [];
var listener = first;
while (listener) {
listeners.push(listener);
listener = listener.next;
}
return listeners;
},
subscribe: function subscribe(callback) {
var isSubscribed = true;
var listener = last = {
callback: callback,
next: null,
prev: last
};
if (listener.prev) {
listener.prev.next = listener;
} else {
first = listener;
}
return function unsubscribe() {
if (!isSubscribed || first === null) return;
isSubscribed = false;
if (listener.next) {
listener.next.prev = listener.prev;
} else {
last = listener.prev;
}
if (listener.prev) {
listener.prev.next = listener.next;
} else {
first = listener.next;
}
};
}
};
}
var nullListeners = {
notify: function notify() {},
get: function get() {
return [];
}
};
function createSubscription(store, parentSub) {
var unsubscribe;
var listeners = nullListeners;
function addNestedSub(listener) {
trySubscribe();
return listeners.subscribe(listener);
}
function notifyNestedSubs() {
listeners.notify();
}
function handleChangeWrapper() {
if (subscription.onStateChange) {
subscription.onStateChange();
}
}
function isSubscribed() {
return Boolean(unsubscribe);
}
function trySubscribe() {
if (!unsubscribe) {
unsubscribe = parentSub ? parentSub.addNestedSub(handleChangeWrapper) : store.subscribe(handleChangeWrapper);
listeners = createListenerCollection();
}
}
function tryUnsubscribe() {
if (unsubscribe) {
unsubscribe();
unsubscribe = undefined;
listeners.clear();
listeners = nullListeners;
}
}
var subscription = {
addNestedSub: addNestedSub,
notifyNestedSubs: notifyNestedSubs,
handleChangeWrapper: handleChangeWrapper,
isSubscribed: isSubscribed,
trySubscribe: trySubscribe,
tryUnsubscribe: tryUnsubscribe,
getListeners: function getListeners() {
return listeners;
}
};
return subscription;
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js
// React currently throws a warning when using useLayoutEffect on the server.
// To get around it, we can conditionally useEffect on the server (no-op) and
// useLayoutEffect in the browser. We need useLayoutEffect to ensure the store
// subscription callback always has the selector from the latest render commit
// available, otherwise a store update may happen between render and the effect,
// which may cause missed updates; we also must ensure the store subscription
// is created synchronously, otherwise a store update may occur before the
// subscription is created and an inconsistent state may be observed
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? react["useLayoutEffect"] : react["useEffect"];
// CONCATENATED MODULE: ./node_modules/react-redux/es/components/Provider.js
function Provider(_ref) {
var store = _ref.store,
context = _ref.context,
children = _ref.children;
var contextValue = Object(react["useMemo"])(function () {
var subscription = createSubscription(store);
return {
store: store,
subscription: subscription
};
}, [store]);
var previousState = Object(react["useMemo"])(function () {
return store.getState();
}, [store]);
useIsomorphicLayoutEffect(function () {
var subscription = contextValue.subscription;
subscription.onStateChange = subscription.notifyNestedSubs;
subscription.trySubscribe();
if (previousState !== store.getState()) {
subscription.notifyNestedSubs();
}
return function () {
subscription.tryUnsubscribe();
subscription.onStateChange = null;
};
}, [contextValue, previousState]);
var Context = context || ReactReduxContext;
return /*#__PURE__*/react_default.a.createElement(Context.Provider, {
value: contextValue
}, children);
}
if (false) {}
/* harmony default export */ var components_Provider = (Provider);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("wx14");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
var objectWithoutPropertiesLoose = __webpack_require__("zLVn");
// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
var hoist_non_react_statics_cjs = __webpack_require__("2mql");
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
// EXTERNAL MODULE: ./node_modules/react-redux/node_modules/react-is/index.js
var react_is = __webpack_require__("0vxD");
// CONCATENATED MODULE: ./node_modules/react-redux/es/components/connectAdvanced.js
var _excluded = ["getDisplayName", "methodName", "renderCountProp", "shouldHandleStateChanges", "storeKey", "withRef", "forwardRef", "context"],
_excluded2 = ["reactReduxForwardedRef"];
// Define some constant arrays just to avoid re-creating these
var EMPTY_ARRAY = [];
var NO_SUBSCRIPTION_ARRAY = [null, null];
var stringifyComponent = function stringifyComponent(Comp) {
try {
return JSON.stringify(Comp);
} catch (err) {
return String(Comp);
}
};
function storeStateUpdatesReducer(state, action) {
var updateCount = state[1];
return [action.payload, updateCount + 1];
}
function useIsomorphicLayoutEffectWithArgs(effectFunc, effectArgs, dependencies) {
useIsomorphicLayoutEffect(function () {
return effectFunc.apply(void 0, effectArgs);
}, dependencies);
}
function captureWrapperProps(lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs) {
// We want to capture the wrapper props and child props we used for later comparisons
lastWrapperProps.current = wrapperProps;
lastChildProps.current = actualChildProps;
renderIsScheduled.current = false; // If the render was from a store update, clear out that reference and cascade the subscriber update
if (childPropsFromStoreUpdate.current) {
childPropsFromStoreUpdate.current = null;
notifyNestedSubs();
}
}
function subscribeUpdates(shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch) {
// If we're not subscribed to the store, nothing to do here
if (!shouldHandleStateChanges) return; // Capture values for checking if and when this component unmounts
var didUnsubscribe = false;
var lastThrownError = null; // We'll run this callback every time a store subscription update propagates to this component
var checkForUpdates = function checkForUpdates() {
if (didUnsubscribe) {
// Don't run stale listeners.
// Redux doesn't guarantee unsubscriptions happen until next dispatch.
return;
}
var latestStoreState = store.getState();
var newChildProps, error;
try {
// Actually run the selector with the most recent store state and wrapper props
// to determine what the child props should be
newChildProps = childPropsSelector(latestStoreState, lastWrapperProps.current);
} catch (e) {
error = e;
lastThrownError = e;
}
if (!error) {
lastThrownError = null;
} // If the child props haven't changed, nothing to do here - cascade the subscription update
if (newChildProps === lastChildProps.current) {
if (!renderIsScheduled.current) {
notifyNestedSubs();
}
} else {
// Save references to the new child props. Note that we track the "child props from store update"
// as a ref instead of a useState/useReducer because we need a way to determine if that value has
// been processed. If this went into useState/useReducer, we couldn't clear out the value without
// forcing another re-render, which we don't want.
lastChildProps.current = newChildProps;
childPropsFromStoreUpdate.current = newChildProps;
renderIsScheduled.current = true; // If the child props _did_ change (or we caught an error), this wrapper component needs to re-render
forceComponentUpdateDispatch({
type: 'STORE_UPDATED',
payload: {
error: error
}
});
}
}; // Actually subscribe to the nearest connected ancestor (or store)
subscription.onStateChange = checkForUpdates;
subscription.trySubscribe(); // Pull data from the store after first render in case the store has
// changed since we began.
checkForUpdates();
var unsubscribeWrapper = function unsubscribeWrapper() {
didUnsubscribe = true;
subscription.tryUnsubscribe();
subscription.onStateChange = null;
if (lastThrownError) {
// It's possible that we caught an error due to a bad mapState function, but the
// parent re-rendered without this component and we're about to unmount.
// This shouldn't happen as long as we do top-down subscriptions correctly, but
// if we ever do those wrong, this throw will surface the error in our tests.
// In that case, throw the error from here so it doesn't get lost.
throw lastThrownError;
}
};
return unsubscribeWrapper;
}
var initStateUpdates = function initStateUpdates() {
return [null, 0];
};
function connectAdvanced(
/*
selectorFactory is a func that is responsible for returning the selector function used to
compute new props from state, props, and dispatch. For example:
export default connectAdvanced((dispatch, options) => (state, props) => ({
thing: state.things[props.thingId],
saveThing: fields => dispatch(actionCreators.saveThing(props.thingId, fields)),
}))(YourComponent)
Access to dispatch is provided to the factory so selectorFactories can bind actionCreators
outside of their selector as an optimization. Options passed to connectAdvanced are passed to
the selectorFactory, along with displayName and WrappedComponent, as the second argument.
Note that selectorFactory is responsible for all caching/memoization of inbound and outbound
props. Do not use connectAdvanced directly without memoizing results between calls to your
selector, otherwise the Connect component will re-render on every state or props change.
*/
selectorFactory, // options object:
_ref) {
if (_ref === void 0) {
_ref = {};
}
var _ref2 = _ref,
_ref2$getDisplayName = _ref2.getDisplayName,
getDisplayName = _ref2$getDisplayName === void 0 ? function (name) {
return "ConnectAdvanced(" + name + ")";
} : _ref2$getDisplayName,
_ref2$methodName = _ref2.methodName,
methodName = _ref2$methodName === void 0 ? 'connectAdvanced' : _ref2$methodName,
_ref2$renderCountProp = _ref2.renderCountProp,
renderCountProp = _ref2$renderCountProp === void 0 ? undefined : _ref2$renderCountProp,
_ref2$shouldHandleSta = _ref2.shouldHandleStateChanges,
shouldHandleStateChanges = _ref2$shouldHandleSta === void 0 ? true : _ref2$shouldHandleSta,
_ref2$storeKey = _ref2.storeKey,
storeKey = _ref2$storeKey === void 0 ? 'store' : _ref2$storeKey,
_ref2$withRef = _ref2.withRef,
withRef = _ref2$withRef === void 0 ? false : _ref2$withRef,
_ref2$forwardRef = _ref2.forwardRef,
forwardRef = _ref2$forwardRef === void 0 ? false : _ref2$forwardRef,
_ref2$context = _ref2.context,
context = _ref2$context === void 0 ? ReactReduxContext : _ref2$context,
connectOptions = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref2, _excluded);
if (false) { var customStoreWarningMessage; }
var Context = context;
return function wrapWithConnect(WrappedComponent) {
if (false) {}
var wrappedComponentName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
var displayName = getDisplayName(wrappedComponentName);
var selectorFactoryOptions = Object(esm_extends["a" /* default */])({}, connectOptions, {
getDisplayName: getDisplayName,
methodName: methodName,
renderCountProp: renderCountProp,
shouldHandleStateChanges: shouldHandleStateChanges,
storeKey: storeKey,
displayName: displayName,
wrappedComponentName: wrappedComponentName,
WrappedComponent: WrappedComponent
});
var pure = connectOptions.pure;
function createChildSelector(store) {
return selectorFactory(store.dispatch, selectorFactoryOptions);
} // If we aren't running in "pure" mode, we don't want to memoize values.
// To avoid conditionally calling hooks, we fall back to a tiny wrapper
// that just executes the given callback immediately.
var usePureOnlyMemo = pure ? react["useMemo"] : function (callback) {
return callback();
};
function ConnectFunction(props) {
var _useMemo = Object(react["useMemo"])(function () {
// Distinguish between actual "data" props that were passed to the wrapper component,
// and values needed to control behavior (forwarded refs, alternate context instances).
// To maintain the wrapperProps object reference, memoize this destructuring.
var reactReduxForwardedRef = props.reactReduxForwardedRef,
wrapperProps = Object(objectWithoutPropertiesLoose["a" /* default */])(props, _excluded2);
return [props.context, reactReduxForwardedRef, wrapperProps];
}, [props]),
propsContext = _useMemo[0],
reactReduxForwardedRef = _useMemo[1],
wrapperProps = _useMemo[2];
var ContextToUse = Object(react["useMemo"])(function () {
// Users may optionally pass in a custom context instance to use instead of our ReactReduxContext.
// Memoize the check that determines which context instance we should use.
return propsContext && propsContext.Consumer && Object(react_is["isContextConsumer"])( /*#__PURE__*/react_default.a.createElement(propsContext.Consumer, null)) ? propsContext : Context;
}, [propsContext, Context]); // Retrieve the store and ancestor subscription via context, if available
var contextValue = Object(react["useContext"])(ContextToUse); // The store _must_ exist as either a prop or in context.
// We'll check to see if it _looks_ like a Redux store first.
// This allows us to pass through a `store` prop that is just a plain value.
var didStoreComeFromProps = Boolean(props.store) && Boolean(props.store.getState) && Boolean(props.store.dispatch);
var didStoreComeFromContext = Boolean(contextValue) && Boolean(contextValue.store);
if (false) {} // Based on the previous check, one of these must be true
var store = didStoreComeFromProps ? props.store : contextValue.store;
var childPropsSelector = Object(react["useMemo"])(function () {
// The child props selector needs the store reference as an input.
// Re-create this selector whenever the store changes.
return createChildSelector(store);
}, [store]);
var _useMemo2 = Object(react["useMemo"])(function () {
if (!shouldHandleStateChanges) return NO_SUBSCRIPTION_ARRAY; // This Subscription's source should match where store came from: props vs. context. A component
// connected to the store via props shouldn't use subscription from context, or vice versa.
// This Subscription's source should match where store came from: props vs. context. A component
// connected to the store via props shouldn't use subscription from context, or vice versa.
var subscription = createSubscription(store, didStoreComeFromProps ? null : contextValue.subscription); // `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in
// the middle of the notification loop, where `subscription` will then be null. This can
// probably be avoided if Subscription's listeners logic is changed to not call listeners
// that have been unsubscribed in the middle of the notification loop.
// `notifyNestedSubs` is duplicated to handle the case where the component is unmounted in
// the middle of the notification loop, where `subscription` will then be null. This can
// probably be avoided if Subscription's listeners logic is changed to not call listeners
// that have been unsubscribed in the middle of the notification loop.
var notifyNestedSubs = subscription.notifyNestedSubs.bind(subscription);
return [subscription, notifyNestedSubs];
}, [store, didStoreComeFromProps, contextValue]),
subscription = _useMemo2[0],
notifyNestedSubs = _useMemo2[1]; // Determine what {store, subscription} value should be put into nested context, if necessary,
// and memoize that value to avoid unnecessary context updates.
var overriddenContextValue = Object(react["useMemo"])(function () {
if (didStoreComeFromProps) {
// This component is directly subscribed to a store from props.
// We don't want descendants reading from this store - pass down whatever
// the existing context value is from the nearest connected ancestor.
return contextValue;
} // Otherwise, put this component's subscription instance into context, so that
// connected descendants won't update until after this component is done
return Object(esm_extends["a" /* default */])({}, contextValue, {
subscription: subscription
});
}, [didStoreComeFromProps, contextValue, subscription]); // We need to force this wrapper component to re-render whenever a Redux store update
// causes a change to the calculated child component props (or we caught an error in mapState)
var _useReducer = Object(react["useReducer"])(storeStateUpdatesReducer, EMPTY_ARRAY, initStateUpdates),
_useReducer$ = _useReducer[0],
previousStateUpdateResult = _useReducer$[0],
forceComponentUpdateDispatch = _useReducer[1]; // Propagate any mapState/mapDispatch errors upwards
if (previousStateUpdateResult && previousStateUpdateResult.error) {
throw previousStateUpdateResult.error;
} // Set up refs to coordinate values between the subscription effect and the render logic
var lastChildProps = Object(react["useRef"])();
var lastWrapperProps = Object(react["useRef"])(wrapperProps);
var childPropsFromStoreUpdate = Object(react["useRef"])();
var renderIsScheduled = Object(react["useRef"])(false);
var actualChildProps = usePureOnlyMemo(function () {
// Tricky logic here:
// - This render may have been triggered by a Redux store update that produced new child props
// - However, we may have gotten new wrapper props after that
// If we have new child props, and the same wrapper props, we know we should use the new child props as-is.
// But, if we have new wrapper props, those might change the child props, so we have to recalculate things.
// So, we'll use the child props from store update only if the wrapper props are the same as last time.
if (childPropsFromStoreUpdate.current && wrapperProps === lastWrapperProps.current) {
return childPropsFromStoreUpdate.current;
} // TODO We're reading the store directly in render() here. Bad idea?
// This will likely cause Bad Things (TM) to happen in Concurrent Mode.
// Note that we do this because on renders _not_ caused by store updates, we need the latest store state
// to determine what the child props should be.
return childPropsSelector(store.getState(), wrapperProps);
}, [store, previousStateUpdateResult, wrapperProps]); // We need this to execute synchronously every time we re-render. However, React warns
// about useLayoutEffect in SSR, so we try to detect environment and fall back to
// just useEffect instead to avoid the warning, since neither will run anyway.
useIsomorphicLayoutEffectWithArgs(captureWrapperProps, [lastWrapperProps, lastChildProps, renderIsScheduled, wrapperProps, actualChildProps, childPropsFromStoreUpdate, notifyNestedSubs]); // Our re-subscribe logic only runs when the store/subscription setup changes
useIsomorphicLayoutEffectWithArgs(subscribeUpdates, [shouldHandleStateChanges, store, subscription, childPropsSelector, lastWrapperProps, lastChildProps, renderIsScheduled, childPropsFromStoreUpdate, notifyNestedSubs, forceComponentUpdateDispatch], [store, subscription, childPropsSelector]); // Now that all that's done, we can finally try to actually render the child component.
// We memoize the elements for the rendered child component as an optimization.
var renderedWrappedComponent = Object(react["useMemo"])(function () {
return /*#__PURE__*/react_default.a.createElement(WrappedComponent, Object(esm_extends["a" /* default */])({}, actualChildProps, {
ref: reactReduxForwardedRef
}));
}, [reactReduxForwardedRef, WrappedComponent, actualChildProps]); // If React sees the exact same element reference as last time, it bails out of re-rendering
// that child, same as if it was wrapped in React.memo() or returned false from shouldComponentUpdate.
var renderedChild = Object(react["useMemo"])(function () {
if (shouldHandleStateChanges) {
// If this component is subscribed to store updates, we need to pass its own
// subscription instance down to our descendants. That means rendering the same
// Context instance, and putting a different value into the context.
return /*#__PURE__*/react_default.a.createElement(ContextToUse.Provider, {
value: overriddenContextValue
}, renderedWrappedComponent);
}
return renderedWrappedComponent;
}, [ContextToUse, renderedWrappedComponent, overriddenContextValue]);
return renderedChild;
} // If we're in "pure" mode, ensure our wrapper component only re-renders when incoming props have changed.
var Connect = pure ? react_default.a.memo(ConnectFunction) : ConnectFunction;
Connect.WrappedComponent = WrappedComponent;
Connect.displayName = ConnectFunction.displayName = displayName;
if (forwardRef) {
var forwarded = react_default.a.forwardRef(function forwardConnectRef(props, ref) {
return /*#__PURE__*/react_default.a.createElement(Connect, Object(esm_extends["a" /* default */])({}, props, {
reactReduxForwardedRef: ref
}));
});
forwarded.displayName = displayName;
forwarded.WrappedComponent = WrappedComponent;
return hoist_non_react_statics_cjs_default()(forwarded, WrappedComponent);
}
return hoist_non_react_statics_cjs_default()(Connect, WrappedComponent);
};
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/shallowEqual.js
function is(x, y) {
if (x === y) {
return x !== 0 || y !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
function shallowEqual(objA, objB) {
if (is(objA, objB)) return true;
if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) return false;
for (var i = 0; i < keysA.length; i++) {
if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {
return false;
}
}
return true;
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/bindActionCreators.js
function bindActionCreators(actionCreators, dispatch) {
var boundActionCreators = {};
var _loop = function _loop(key) {
var actionCreator = actionCreators[key];
if (typeof actionCreator === 'function') {
boundActionCreators[key] = function () {
return dispatch(actionCreator.apply(void 0, arguments));
};
}
};
for (var key in actionCreators) {
_loop(key);
}
return boundActionCreators;
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/isPlainObject.js
/**
* @param {any} obj The object to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*/
function isPlainObject(obj) {
if (typeof obj !== 'object' || obj === null) return false;
var proto = Object.getPrototypeOf(obj);
if (proto === null) return true;
var baseProto = proto;
while (Object.getPrototypeOf(baseProto) !== null) {
baseProto = Object.getPrototypeOf(baseProto);
}
return proto === baseProto;
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/warning.js
/**
* Prints a warning in the console if it exists.
*
* @param {String} message The warning message.
* @returns {void}
*/
function warning(message) {
/* eslint-disable no-console */
if (typeof console !== 'undefined' && typeof console.error === 'function') {
console.error(message);
}
/* eslint-enable no-console */
try {
// This error was thrown as a convenience so that if you enable
// "break on all exceptions" in your console,
// it would pause the execution at this line.
throw new Error(message);
/* eslint-disable no-empty */
} catch (e) {}
/* eslint-enable no-empty */
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/verifyPlainObject.js
function verifyPlainObject(value, displayName, methodName) {
if (!isPlainObject(value)) {
warning(methodName + "() in " + displayName + " must return a plain object. Instead received " + value + ".");
}
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/wrapMapToProps.js
function wrapMapToPropsConstant(getConstant) {
return function initConstantSelector(dispatch, options) {
var constant = getConstant(dispatch, options);
function constantSelector() {
return constant;
}
constantSelector.dependsOnOwnProps = false;
return constantSelector;
};
} // dependsOnOwnProps is used by createMapToPropsProxy to determine whether to pass props as args
// to the mapToProps function being wrapped. It is also used by makePurePropsSelector to determine
// whether mapToProps needs to be invoked when props have changed.
//
// A length of one signals that mapToProps does not depend on props from the parent component.
// A length of zero is assumed to mean mapToProps is getting args via arguments or ...args and
// therefore not reporting its length accurately..
function getDependsOnOwnProps(mapToProps) {
return mapToProps.dependsOnOwnProps !== null && mapToProps.dependsOnOwnProps !== undefined ? Boolean(mapToProps.dependsOnOwnProps) : mapToProps.length !== 1;
} // Used by whenMapStateToPropsIsFunction and whenMapDispatchToPropsIsFunction,
// this function wraps mapToProps in a proxy function which does several things:
//
// * Detects whether the mapToProps function being called depends on props, which
// is used by selectorFactory to decide if it should reinvoke on props changes.
//
// * On first call, handles mapToProps if returns another function, and treats that
// new function as the true mapToProps for subsequent calls.
//
// * On first call, verifies the first result is a plain object, in order to warn
// the developer that their mapToProps function is not returning a valid result.
//
function wrapMapToPropsFunc(mapToProps, methodName) {
return function initProxySelector(dispatch, _ref) {
var displayName = _ref.displayName;
var proxy = function mapToPropsProxy(stateOrDispatch, ownProps) {
return proxy.dependsOnOwnProps ? proxy.mapToProps(stateOrDispatch, ownProps) : proxy.mapToProps(stateOrDispatch);
}; // allow detectFactoryAndVerify to get ownProps
proxy.dependsOnOwnProps = true;
proxy.mapToProps = function detectFactoryAndVerify(stateOrDispatch, ownProps) {
proxy.mapToProps = mapToProps;
proxy.dependsOnOwnProps = getDependsOnOwnProps(mapToProps);
var props = proxy(stateOrDispatch, ownProps);
if (typeof props === 'function') {
proxy.mapToProps = props;
proxy.dependsOnOwnProps = getDependsOnOwnProps(props);
props = proxy(stateOrDispatch, ownProps);
}
if (false) {}
return props;
};
return proxy;
};
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapDispatchToProps.js
function whenMapDispatchToPropsIsFunction(mapDispatchToProps) {
return typeof mapDispatchToProps === 'function' ? wrapMapToPropsFunc(mapDispatchToProps, 'mapDispatchToProps') : undefined;
}
function whenMapDispatchToPropsIsMissing(mapDispatchToProps) {
return !mapDispatchToProps ? wrapMapToPropsConstant(function (dispatch) {
return {
dispatch: dispatch
};
}) : undefined;
}
function whenMapDispatchToPropsIsObject(mapDispatchToProps) {
return mapDispatchToProps && typeof mapDispatchToProps === 'object' ? wrapMapToPropsConstant(function (dispatch) {
return bindActionCreators(mapDispatchToProps, dispatch);
}) : undefined;
}
/* harmony default export */ var connect_mapDispatchToProps = ([whenMapDispatchToPropsIsFunction, whenMapDispatchToPropsIsMissing, whenMapDispatchToPropsIsObject]);
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mapStateToProps.js
function whenMapStateToPropsIsFunction(mapStateToProps) {
return typeof mapStateToProps === 'function' ? wrapMapToPropsFunc(mapStateToProps, 'mapStateToProps') : undefined;
}
function whenMapStateToPropsIsMissing(mapStateToProps) {
return !mapStateToProps ? wrapMapToPropsConstant(function () {
return {};
}) : undefined;
}
/* harmony default export */ var connect_mapStateToProps = ([whenMapStateToPropsIsFunction, whenMapStateToPropsIsMissing]);
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/mergeProps.js
function defaultMergeProps(stateProps, dispatchProps, ownProps) {
return Object(esm_extends["a" /* default */])({}, ownProps, stateProps, dispatchProps);
}
function wrapMergePropsFunc(mergeProps) {
return function initMergePropsProxy(dispatch, _ref) {
var displayName = _ref.displayName,
pure = _ref.pure,
areMergedPropsEqual = _ref.areMergedPropsEqual;
var hasRunOnce = false;
var mergedProps;
return function mergePropsProxy(stateProps, dispatchProps, ownProps) {
var nextMergedProps = mergeProps(stateProps, dispatchProps, ownProps);
if (hasRunOnce) {
if (!pure || !areMergedPropsEqual(nextMergedProps, mergedProps)) mergedProps = nextMergedProps;
} else {
hasRunOnce = true;
mergedProps = nextMergedProps;
if (false) {}
}
return mergedProps;
};
};
}
function whenMergePropsIsFunction(mergeProps) {
return typeof mergeProps === 'function' ? wrapMergePropsFunc(mergeProps) : undefined;
}
function whenMergePropsIsOmitted(mergeProps) {
return !mergeProps ? function () {
return defaultMergeProps;
} : undefined;
}
/* harmony default export */ var connect_mergeProps = ([whenMergePropsIsFunction, whenMergePropsIsOmitted]);
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/verifySubselectors.js
function verify(selector, methodName, displayName) {
if (!selector) {
throw new Error("Unexpected value for " + methodName + " in " + displayName + ".");
} else if (methodName === 'mapStateToProps' || methodName === 'mapDispatchToProps') {
if (!Object.prototype.hasOwnProperty.call(selector, 'dependsOnOwnProps')) {
warning("The selector for " + methodName + " of " + displayName + " did not specify a value for dependsOnOwnProps.");
}
}
}
function verifySubselectors(mapStateToProps, mapDispatchToProps, mergeProps, displayName) {
verify(mapStateToProps, 'mapStateToProps', displayName);
verify(mapDispatchToProps, 'mapDispatchToProps', displayName);
verify(mergeProps, 'mergeProps', displayName);
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/selectorFactory.js
var selectorFactory_excluded = ["initMapStateToProps", "initMapDispatchToProps", "initMergeProps"];
function impureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch) {
return function impureFinalPropsSelector(state, ownProps) {
return mergeProps(mapStateToProps(state, ownProps), mapDispatchToProps(dispatch, ownProps), ownProps);
};
}
function pureFinalPropsSelectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, _ref) {
var areStatesEqual = _ref.areStatesEqual,
areOwnPropsEqual = _ref.areOwnPropsEqual,
areStatePropsEqual = _ref.areStatePropsEqual;
var hasRunAtLeastOnce = false;
var state;
var ownProps;
var stateProps;
var dispatchProps;
var mergedProps;
function handleFirstCall(firstState, firstOwnProps) {
state = firstState;
ownProps = firstOwnProps;
stateProps = mapStateToProps(state, ownProps);
dispatchProps = mapDispatchToProps(dispatch, ownProps);
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
hasRunAtLeastOnce = true;
return mergedProps;
}
function handleNewPropsAndNewState() {
stateProps = mapStateToProps(state, ownProps);
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
return mergedProps;
}
function handleNewProps() {
if (mapStateToProps.dependsOnOwnProps) stateProps = mapStateToProps(state, ownProps);
if (mapDispatchToProps.dependsOnOwnProps) dispatchProps = mapDispatchToProps(dispatch, ownProps);
mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
return mergedProps;
}
function handleNewState() {
var nextStateProps = mapStateToProps(state, ownProps);
var statePropsChanged = !areStatePropsEqual(nextStateProps, stateProps);
stateProps = nextStateProps;
if (statePropsChanged) mergedProps = mergeProps(stateProps, dispatchProps, ownProps);
return mergedProps;
}
function handleSubsequentCalls(nextState, nextOwnProps) {
var propsChanged = !areOwnPropsEqual(nextOwnProps, ownProps);
var stateChanged = !areStatesEqual(nextState, state, nextOwnProps, ownProps);
state = nextState;
ownProps = nextOwnProps;
if (propsChanged && stateChanged) return handleNewPropsAndNewState();
if (propsChanged) return handleNewProps();
if (stateChanged) return handleNewState();
return mergedProps;
}
return function pureFinalPropsSelector(nextState, nextOwnProps) {
return hasRunAtLeastOnce ? handleSubsequentCalls(nextState, nextOwnProps) : handleFirstCall(nextState, nextOwnProps);
};
} // TODO: Add more comments
// If pure is true, the selector returned by selectorFactory will memoize its results,
// allowing connectAdvanced's shouldComponentUpdate to return false if final
// props have not changed. If false, the selector will always return a new
// object and shouldComponentUpdate will always return true.
function finalPropsSelectorFactory(dispatch, _ref2) {
var initMapStateToProps = _ref2.initMapStateToProps,
initMapDispatchToProps = _ref2.initMapDispatchToProps,
initMergeProps = _ref2.initMergeProps,
options = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref2, selectorFactory_excluded);
var mapStateToProps = initMapStateToProps(dispatch, options);
var mapDispatchToProps = initMapDispatchToProps(dispatch, options);
var mergeProps = initMergeProps(dispatch, options);
if (false) {}
var selectorFactory = options.pure ? pureFinalPropsSelectorFactory : impureFinalPropsSelectorFactory;
return selectorFactory(mapStateToProps, mapDispatchToProps, mergeProps, dispatch, options);
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/connect/connect.js
var connect_excluded = ["pure", "areStatesEqual", "areOwnPropsEqual", "areStatePropsEqual", "areMergedPropsEqual"];
/*
connect is a facade over connectAdvanced. It turns its args into a compatible
selectorFactory, which has the signature:
(dispatch, options) => (nextState, nextOwnProps) => nextFinalProps
connect passes its args to connectAdvanced as options, which will in turn pass them to
selectorFactory each time a Connect component instance is instantiated or hot reloaded.
selectorFactory returns a final props selector from its mapStateToProps,
mapStateToPropsFactories, mapDispatchToProps, mapDispatchToPropsFactories, mergeProps,
mergePropsFactories, and pure args.
The resulting final props selector is called by the Connect component instance whenever
it receives new props or store state.
*/
function match(arg, factories, name) {
for (var i = factories.length - 1; i >= 0; i--) {
var result = factories[i](arg);
if (result) return result;
}
return function (dispatch, options) {
throw new Error("Invalid value of type " + typeof arg + " for " + name + " argument when connecting component " + options.wrappedComponentName + ".");
};
}
function strictEqual(a, b) {
return a === b;
} // createConnect with default args builds the 'official' connect behavior. Calling it with
// different options opens up some testing and extensibility scenarios
function createConnect(_temp) {
var _ref = _temp === void 0 ? {} : _temp,
_ref$connectHOC = _ref.connectHOC,
connectHOC = _ref$connectHOC === void 0 ? connectAdvanced : _ref$connectHOC,
_ref$mapStateToPropsF = _ref.mapStateToPropsFactories,
mapStateToPropsFactories = _ref$mapStateToPropsF === void 0 ? connect_mapStateToProps : _ref$mapStateToPropsF,
_ref$mapDispatchToPro = _ref.mapDispatchToPropsFactories,
mapDispatchToPropsFactories = _ref$mapDispatchToPro === void 0 ? connect_mapDispatchToProps : _ref$mapDispatchToPro,
_ref$mergePropsFactor = _ref.mergePropsFactories,
mergePropsFactories = _ref$mergePropsFactor === void 0 ? connect_mergeProps : _ref$mergePropsFactor,
_ref$selectorFactory = _ref.selectorFactory,
selectorFactory = _ref$selectorFactory === void 0 ? finalPropsSelectorFactory : _ref$selectorFactory;
return function connect(mapStateToProps, mapDispatchToProps, mergeProps, _ref2) {
if (_ref2 === void 0) {
_ref2 = {};
}
var _ref3 = _ref2,
_ref3$pure = _ref3.pure,
pure = _ref3$pure === void 0 ? true : _ref3$pure,
_ref3$areStatesEqual = _ref3.areStatesEqual,
areStatesEqual = _ref3$areStatesEqual === void 0 ? strictEqual : _ref3$areStatesEqual,
_ref3$areOwnPropsEqua = _ref3.areOwnPropsEqual,
areOwnPropsEqual = _ref3$areOwnPropsEqua === void 0 ? shallowEqual : _ref3$areOwnPropsEqua,
_ref3$areStatePropsEq = _ref3.areStatePropsEqual,
areStatePropsEqual = _ref3$areStatePropsEq === void 0 ? shallowEqual : _ref3$areStatePropsEq,
_ref3$areMergedPropsE = _ref3.areMergedPropsEqual,
areMergedPropsEqual = _ref3$areMergedPropsE === void 0 ? shallowEqual : _ref3$areMergedPropsE,
extraOptions = Object(objectWithoutPropertiesLoose["a" /* default */])(_ref3, connect_excluded);
var initMapStateToProps = match(mapStateToProps, mapStateToPropsFactories, 'mapStateToProps');
var initMapDispatchToProps = match(mapDispatchToProps, mapDispatchToPropsFactories, 'mapDispatchToProps');
var initMergeProps = match(mergeProps, mergePropsFactories, 'mergeProps');
return connectHOC(selectorFactory, Object(esm_extends["a" /* default */])({
// used in error messages
methodName: 'connect',
// used to compute Connect's displayName from the wrapped component's displayName.
getDisplayName: function getDisplayName(name) {
return "Connect(" + name + ")";
},
// if mapStateToProps is falsy, the Connect component doesn't subscribe to store state changes
shouldHandleStateChanges: Boolean(mapStateToProps),
// passed through to selectorFactory
initMapStateToProps: initMapStateToProps,
initMapDispatchToProps: initMapDispatchToProps,
initMergeProps: initMergeProps,
pure: pure,
areStatesEqual: areStatesEqual,
areOwnPropsEqual: areOwnPropsEqual,
areStatePropsEqual: areStatePropsEqual,
areMergedPropsEqual: areMergedPropsEqual
}, extraOptions));
};
}
/* harmony default export */ var connect_connect = (/*#__PURE__*/createConnect());
// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useReduxContext.js
/**
* A hook to access the value of the `ReactReduxContext`. This is a low-level
* hook that you should usually not need to call directly.
*
* @returns {any} the value of the `ReactReduxContext`
*
* @example
*
* import React from 'react'
* import { useReduxContext } from 'react-redux'
*
* export const CounterComponent = ({ value }) => {
* const { store } = useReduxContext()
* return <div>{store.getState()}</div>
* }
*/
function useReduxContext_useReduxContext() {
var contextValue = Object(react["useContext"])(ReactReduxContext);
if (false) {}
return contextValue;
}
// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useStore.js
/**
* Hook factory, which creates a `useStore` hook bound to a given context.
*
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
* @returns {Function} A `useStore` hook bound to the specified context.
*/
function createStoreHook(context) {
if (context === void 0) {
context = ReactReduxContext;
}
var useReduxContext = context === ReactReduxContext ? useReduxContext_useReduxContext : function () {
return Object(react["useContext"])(context);
};
return function useStore() {
var _useReduxContext = useReduxContext(),
store = _useReduxContext.store;
return store;
};
}
/**
* A hook to access the redux store.
*
* @returns {any} the redux store
*
* @example
*
* import React from 'react'
* import { useStore } from 'react-redux'
*
* export const ExampleComponent = () => {
* const store = useStore()
* return <div>{store.getState()}</div>
* }
*/
var useStore_useStore = /*#__PURE__*/createStoreHook();
// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useDispatch.js
/**
* Hook factory, which creates a `useDispatch` hook bound to a given context.
*
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
* @returns {Function} A `useDispatch` hook bound to the specified context.
*/
function createDispatchHook(context) {
if (context === void 0) {
context = ReactReduxContext;
}
var useStore = context === ReactReduxContext ? useStore_useStore : createStoreHook(context);
return function useDispatch() {
var store = useStore();
return store.dispatch;
};
}
/**
* A hook to access the redux `dispatch` function.
*
* @returns {any|function} redux store's `dispatch` function
*
* @example
*
* import React, { useCallback } from 'react'
* import { useDispatch } from 'react-redux'
*
* export const CounterComponent = ({ value }) => {
* const dispatch = useDispatch()
* const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])
* return (
* <div>
* <span>{value}</span>
* <button onClick={increaseCounter}>Increase counter</button>
* </div>
* )
* }
*/
var useDispatch = /*#__PURE__*/createDispatchHook();
// CONCATENATED MODULE: ./node_modules/react-redux/es/hooks/useSelector.js
var refEquality = function refEquality(a, b) {
return a === b;
};
function useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub) {
var _useReducer = Object(react["useReducer"])(function (s) {
return s + 1;
}, 0),
forceRender = _useReducer[1];
var subscription = Object(react["useMemo"])(function () {
return createSubscription(store, contextSub);
}, [store, contextSub]);
var latestSubscriptionCallbackError = Object(react["useRef"])();
var latestSelector = Object(react["useRef"])();
var latestStoreState = Object(react["useRef"])();
var latestSelectedState = Object(react["useRef"])();
var storeState = store.getState();
var selectedState;
try {
if (selector !== latestSelector.current || storeState !== latestStoreState.current || latestSubscriptionCallbackError.current) {
var newSelectedState = selector(storeState); // ensure latest selected state is reused so that a custom equality function can result in identical references
if (latestSelectedState.current === undefined || !equalityFn(newSelectedState, latestSelectedState.current)) {
selectedState = newSelectedState;
} else {
selectedState = latestSelectedState.current;
}
} else {
selectedState = latestSelectedState.current;
}
} catch (err) {
if (latestSubscriptionCallbackError.current) {
err.message += "\nThe error may be correlated with this previous error:\n" + latestSubscriptionCallbackError.current.stack + "\n\n";
}
throw err;
}
useIsomorphicLayoutEffect(function () {
latestSelector.current = selector;
latestStoreState.current = storeState;
latestSelectedState.current = selectedState;
latestSubscriptionCallbackError.current = undefined;
});
useIsomorphicLayoutEffect(function () {
function checkForUpdates() {
try {
var newStoreState = store.getState(); // Avoid calling selector multiple times if the store's state has not changed
if (newStoreState === latestStoreState.current) {
return;
}
var _newSelectedState = latestSelector.current(newStoreState);
if (equalityFn(_newSelectedState, latestSelectedState.current)) {
return;
}
latestSelectedState.current = _newSelectedState;
latestStoreState.current = newStoreState;
} catch (err) {
// we ignore all errors here, since when the component
// is re-rendered, the selectors are called again, and
// will throw again, if neither props nor store state
// changed
latestSubscriptionCallbackError.current = err;
}
forceRender();
}
subscription.onStateChange = checkForUpdates;
subscription.trySubscribe();
checkForUpdates();
return function () {
return subscription.tryUnsubscribe();
};
}, [store, subscription]);
return selectedState;
}
/**
* Hook factory, which creates a `useSelector` hook bound to a given context.
*
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
* @returns {Function} A `useSelector` hook bound to the specified context.
*/
function createSelectorHook(context) {
if (context === void 0) {
context = ReactReduxContext;
}
var useReduxContext = context === ReactReduxContext ? useReduxContext_useReduxContext : function () {
return Object(react["useContext"])(context);
};
return function useSelector(selector, equalityFn) {
if (equalityFn === void 0) {
equalityFn = refEquality;
}
if (false) {}
var _useReduxContext = useReduxContext(),
store = _useReduxContext.store,
contextSub = _useReduxContext.subscription;
var selectedState = useSelectorWithStoreAndSubscription(selector, equalityFn, store, contextSub);
Object(react["useDebugValue"])(selectedState);
return selectedState;
};
}
/**
* A hook to access the redux store's state. This hook takes a selector function
* as an argument. The selector is called with the store state.
*
* This hook takes an optional equality comparison function as the second parameter
* that allows you to customize the way the selected state is compared to determine
* whether the component needs to be re-rendered.
*
* @param {Function} selector the selector function
* @param {Function=} equalityFn the function that will be used to determine equality
*
* @returns {any} the selected state
*
* @example
*
* import React from 'react'
* import { useSelector } from 'react-redux'
*
* export const CounterComponent = () => {
* const counter = useSelector(state => state.counter)
* return <div>{counter}</div>
* }
*/
var useSelector_useSelector = /*#__PURE__*/createSelectorHook();
// CONCATENATED MODULE: ./node_modules/react-redux/es/exports.js
// EXTERNAL MODULE: ./node_modules/react-dom/index.js
var react_dom = __webpack_require__("i8i4");
// CONCATENATED MODULE: ./node_modules/react-redux/es/utils/reactBatchedUpdates.js
/* eslint-disable import/no-unresolved */
// CONCATENATED MODULE: ./node_modules/react-redux/es/index.js
// Enable batched updates in our subscriptions for use
// with standard React renderers (ReactDOM, React Native)
setBatch(react_dom["unstable_batchedUpdates"]);
/***/ }),
/***/ "/MOW":
/*!***********************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/CloseCircleFilled.js ***!
\***********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _CloseCircleFilled = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/CloseCircleFilled */ "UF9F"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CloseCircleFilled = function CloseCircleFilled(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _CloseCircleFilled.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(CloseCircleFilled);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "/Yfv":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.int8-array.js ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj");
// `Int8Array` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Int8', function (init) {
return function Int8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "/b8u":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/use-symbol-as-uid.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "STAE");
module.exports = NATIVE_SYMBOL
// eslint-disable-next-line no-undef
&& !Symbol.sham
// eslint-disable-next-line no-undef
&& typeof Symbol.iterator == 'symbol';
/***/ }),
/***/ "/byt":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/dom-iterables.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
// iterable DOM collections
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
module.exports = {
CSSRuleList: 0,
CSSStyleDeclaration: 0,
CSSValueList: 0,
ClientRectList: 0,
DOMRectList: 0,
DOMStringList: 0,
DOMTokenList: 1,
DataTransferItemList: 0,
FileList: 0,
HTMLAllCollection: 0,
HTMLCollection: 0,
HTMLFormElement: 0,
HTMLSelectElement: 0,
MediaList: 0,
MimeTypeArray: 0,
NamedNodeMap: 0,
NodeList: 1,
PaintRequestList: 0,
Plugin: 0,
PluginArray: 0,
SVGLengthList: 0,
SVGNumberList: 0,
SVGPathSegList: 0,
SVGPointList: 0,
SVGStringList: 0,
SVGTransformList: 0,
SourceBufferList: 0,
StyleSheetList: 0,
TextTrackCueList: 0,
TextTrackList: 0,
TouchList: 0
};
/***/ }),
/***/ "/ccO":
/*!************************************************************************************!*\
!*** ./node_modules/@umijs/preset-built-in/node_modules/use-subscription/index.js ***!
\************************************************************************************/
/*! no static exports found */
/*! exports used: useSubscription */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(/*! ./cjs/use-subscription.production.min.js */ "nDJS");
} else {}
/***/ }),
/***/ "/kpp":
/*!******************************************!*\
!*** ./node_modules/antd/es/grid/col.js ***!
\******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "lSNA");
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "pVnL");
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! classnames */ "TSYQ");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _RowContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RowContext */ "o/2+");
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "H84U");
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
function parseFlex(flex) {
if (typeof flex === 'number') {
return "".concat(flex, " ").concat(flex, " auto");
}
if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
return "0 0 ".concat(flex);
}
return flex;
}
var Col = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["forwardRef"](function (props, ref) {
var renderCol = function renderCol(_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls,
direction = _ref.direction;
var customizePrefixCls = props.prefixCls,
span = props.span,
order = props.order,
offset = props.offset,
push = props.push,
pull = props.pull,
className = props.className,
children = props.children,
flex = props.flex,
style = props.style,
others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]);
var prefixCls = getPrefixCls('col', customizePrefixCls);
var sizeClassObj = {};
['xs', 'sm', 'md', 'lg', 'xl', 'xxl'].forEach(function (size) {
var _extends2;
var sizeProps = {};
var propSize = props[size];
if (typeof propSize === 'number') {
sizeProps.span = propSize;
} else if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2___default()(propSize) === 'object') {
sizeProps = propSize || {};
}
delete others[size];
sizeClassObj = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, sizeClassObj), (_extends2 = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-").concat(sizeProps.span), sizeProps.span !== undefined), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-order-").concat(sizeProps.order), sizeProps.order || sizeProps.order === 0), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-offset-").concat(sizeProps.offset), sizeProps.offset || sizeProps.offset === 0), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-push-").concat(sizeProps.push), sizeProps.push || sizeProps.push === 0), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-").concat(size, "-pull-").concat(sizeProps.pull), sizeProps.pull || sizeProps.pull === 0), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_extends2, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _extends2));
});
var classes = classnames__WEBPACK_IMPORTED_MODULE_4___default()(prefixCls, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-").concat(span), span !== undefined), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-order-").concat(order), order), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-offset-").concat(offset), offset), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-push-").concat(push), push), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()(_classNames, "".concat(prefixCls, "-pull-").concat(pull), pull), _classNames), className, sizeClassObj);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_RowContext__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"].Consumer, null, function (_ref2) {
var gutter = _ref2.gutter;
var mergedStyle = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, style);
if (gutter) {
mergedStyle = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, gutter[0] > 0 ? {
paddingLeft: gutter[0] / 2,
paddingRight: gutter[0] / 2
} : {}), gutter[1] > 0 ? {
paddingTop: gutter[1] / 2,
paddingBottom: gutter[1] / 2
} : {}), mergedStyle);
}
if (flex) {
mergedStyle.flex = parseFlex(flex);
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"]("div", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, others, {
style: mergedStyle,
className: classes,
ref: ref
}), children);
});
};
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigConsumer */ "a"], null, renderCol);
});
Col.displayName = 'Col';
/* harmony default export */ __webpack_exports__["a"] = (Col);
/***/ }),
/***/ "/qSt":
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/components/IconBase.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "QILm"));
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var _utils = __webpack_require__(/*! ../utils */ "vmBS");
var _excluded = ["icon", "className", "onClick", "style", "primaryColor", "secondaryColor"];
var twoToneColorPalette = {
primaryColor: '#333',
secondaryColor: '#E6E6E6',
calculated: false
};
function setTwoToneColors(_ref) {
var primaryColor = _ref.primaryColor,
secondaryColor = _ref.secondaryColor;
twoToneColorPalette.primaryColor = primaryColor;
twoToneColorPalette.secondaryColor = secondaryColor || (0, _utils.getSecondaryColor)(primaryColor);
twoToneColorPalette.calculated = !!secondaryColor;
}
function getTwoToneColors() {
return (0, _objectSpread2.default)({}, twoToneColorPalette);
}
var IconBase = function IconBase(props) {
var icon = props.icon,
className = props.className,
onClick = props.onClick,
style = props.style,
primaryColor = props.primaryColor,
secondaryColor = props.secondaryColor,
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
var colors = twoToneColorPalette;
if (primaryColor) {
colors = {
primaryColor: primaryColor,
secondaryColor: secondaryColor || (0, _utils.getSecondaryColor)(primaryColor)
};
}
(0, _utils.useInsertStyles)();
(0, _utils.warning)((0, _utils.isIconDefinition)(icon), "icon should be icon definiton, but got ".concat(icon));
if (!(0, _utils.isIconDefinition)(icon)) {
return null;
}
var target = icon;
if (target && typeof target.icon === 'function') {
target = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, target), {}, {
icon: target.icon(colors.primaryColor, colors.secondaryColor)
});
}
return (0, _utils.generate)(target.icon, "svg-".concat(target.name), (0, _objectSpread2.default)({
className: className,
onClick: onClick,
style: style,
'data-icon': target.name,
width: '1em',
height: '1em',
fill: 'currentColor',
'aria-hidden': 'true'
}, restProps));
};
IconBase.displayName = 'IconReact';
IconBase.getTwoToneColors = getTwoToneColors;
IconBase.setTwoToneColors = setTwoToneColors;
var _default = exports.default = IconBase;
/***/ }),
/***/ "/qmn":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/internals/native-promise-constructor.js ***!
\**********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
module.exports = global.Promise;
/***/ }),
/***/ "/xke":
/*!**********************************************************!*\
!*** ./node_modules/antd/es/notification/style/index.js ***!
\**********************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "rSSe");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/***/ }),
/***/ 0:
/*!******************************************!*\
!*** multi ./src/.umi-production/umi.ts ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(/*! D:\projects\competitions\forgeplus-react\src\.umi-production\umi.ts */"tB8F");
/***/ }),
/***/ "02UQ":
/*!*********************************************************!*\
!*** ./src/models/classrooms/graduation.ts + 1 modules ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/graduation.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function graduation_getTasksDetail(_x) {
return _getTasksDetail.apply(this, arguments);
}
function _getTasksDetail() {
_getTasksDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/graduation_tasks/".concat(params.categoryId, ".json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getTasksDetail.apply(this, arguments);
}
function graduation_getTasksListDetail(_x2) {
return _getTasksListDetail.apply(this, arguments);
}
function _getTasksListDetail() {
_getTasksListDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/graduation_tasks/".concat(params.categoryId, "/tasks_list.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getTasksListDetail.apply(this, arguments);
}
function graduation_getTopisDetail(_x3) {
return _getTopisDetail.apply(this, arguments);
}
function _getTopisDetail() {
_getTopisDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, "/show_detail.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getTopisDetail.apply(this, arguments);
}
function graduation_getTopisDetailList(_x4) {
return _getTopisDetailList.apply(this, arguments);
}
function _getTopisDetailList() {
_getTopisDetailList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, ".json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getTopisDetailList.apply(this, arguments);
}
function graduation_refuseTopic(_x5) {
return _refuseTopic.apply(this, arguments);
}
function _refuseTopic() {
_refuseTopic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, "/refuse_student_topic.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _refuseTopic.apply(this, arguments);
}
function graduation_agreeTopic(_x6) {
return _agreeTopic.apply(this, arguments);
}
function _agreeTopic() {
_agreeTopic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, "/accept_student_topic.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _agreeTopic.apply(this, arguments);
}
function graduation_getReplyList(_x7) {
return _getReplyList.apply(this, arguments);
}
function _getReplyList() {
_getReplyList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/show_comment.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getReplyList.apply(this, arguments);
}
function graduation_createReply(_x8) {
return _createReply.apply(this, arguments);
}
function _createReply() {
_createReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/users/reply_message.json", {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _createReply.apply(this, arguments);
}
function graduation_replyLike(_x9) {
return _replyLike.apply(this, arguments);
}
function _replyLike() {
_replyLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/like.json", {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _replyLike.apply(this, arguments);
}
function graduation_replyUnLike(_x10) {
return _replyUnLike.apply(this, arguments);
}
function _replyUnLike() {
_replyUnLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/unlike.json", {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _replyUnLike.apply(this, arguments);
}
function graduation_deleteReply(_x11) {
return _deleteReply.apply(this, arguments);
}
function _deleteReply() {
_deleteReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(fetch["a" /* default */])("/api/commons/delete.json", {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _deleteReply.apply(this, arguments);
}
function graduation_addTopicDefaultData(_x12) {
return _addTopicDefaultData.apply(this, arguments);
}
function _addTopicDefaultData() {
_addTopicDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/new.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _addTopicDefaultData.apply(this, arguments);
}
function graduation_editTopicDefaultData(_x13) {
return _editTopicDefaultData.apply(this, arguments);
}
function _editTopicDefaultData() {
_editTopicDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId, "/edit.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _editTopicDefaultData.apply(this, arguments);
}
function graduation_addTopic(_x14) {
return _addTopic.apply(this, arguments);
}
function _addTopic() {
_addTopic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _addTopic.apply(this, arguments);
}
function graduation_editTopic(_x15) {
return _editTopic.apply(this, arguments);
}
function _editTopic() {
_editTopic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_topics/").concat(params.categoryId), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _editTopic.apply(this, arguments);
}
function graduation_addTasks(_x16) {
return _addTasks.apply(this, arguments);
}
function _addTasks() {
_addTasks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_tasks"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _addTasks.apply(this, arguments);
}
function graduation_editTasks(_x17) {
return _editTasks.apply(this, arguments);
}
function _editTasks() {
_editTasks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(fetch["a" /* default */])("/api/graduation_tasks/".concat(params.categoryId, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _editTasks.apply(this, arguments);
}
function graduation_editTasksDefaultData(_x18) {
return _editTasksDefaultData.apply(this, arguments);
}
function _editTasksDefaultData() {
_editTasksDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(fetch["a" /* default */])("/api/graduation_tasks/".concat(params.categoryId, "/edit.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _editTasksDefaultData.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/classrooms/graduation.ts
function graduation_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ graduation_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var GraduationModel = {
namespace: 'graduation',
state: {
name: '毕业设计',
loading: true,
// 题库
actionTabs: {},
detailList: {},
detailTaskList: {},
replyList: {},
detail: {},
addTopicData: {},
editTopicData: {},
editTasksData: {}
},
effects: {
// 选题列表
getTopisDetailList: function getTopisDetailList(_ref, _ref2) {
var payload = _ref.payload,
callback = _ref.callback;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(graduation_getTopisDetailList, payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
detailList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getTasksListDetail: function getTasksListDetail(_ref3, _ref4) {
var payload = _ref3.payload,
callback = _ref3.callback;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee2() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(graduation_getTasksListDetail, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
detailTaskList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context2.abrupt("return", response);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
// 选题详情
getTopisDetail: function getTopisDetail(_ref5, _ref6) {
var payload = _ref5.payload,
callback = _ref5.callback;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee3() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(graduation_getTopisDetail, payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
detail: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
// 任务详情
getTasksDetail: function getTasksDetail(_ref7, _ref8) {
var payload = _ref7.payload,
callback = _ref7.callback;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee4() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(graduation_getTasksDetail, payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
tasksDetail: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
// 拒绝
refuseTopic: function refuseTopic(_ref9, _ref10) {
var payload = _ref9.payload,
callback = _ref9.callback;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee5() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(graduation_refuseTopic, payload);
case 2:
response = _context5.sent;
return _context5.abrupt("return", response);
case 4:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
agreeTopic: function agreeTopic(_ref11, _ref12) {
var payload = _ref11.payload,
callback = _ref11.callback;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee6() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(graduation_agreeTopic, payload);
case 2:
response = _context6.sent;
return _context6.abrupt("return", response);
case 4:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
// 讨论回复列表
getReplyList: function getReplyList(_ref13, _ref14) {
var payload = _ref13.payload,
callback = _ref13.callback;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee7() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(graduation_getReplyList, payload);
case 2:
response = _context7.sent;
_context7.next = 5;
return put({
type: 'save',
payload: {
replyList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
// 讨论创建回复
createReply: function createReply(_ref15, _ref16) {
var payload = _ref15.payload,
callback = _ref15.callback;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee8() {
return graduation_regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(graduation_createReply, payload);
case 2:
return _context8.abrupt("return", _context8.sent);
case 3:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
// 讨论回复点赞
replyLike: function replyLike(_ref17, _ref18) {
var payload = _ref17.payload,
callback = _ref17.callback;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee9() {
return graduation_regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(graduation_replyLike, payload);
case 2:
return _context9.abrupt("return", _context9.sent);
case 3:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
// 讨论回复取消点赞
replyUnLike: function replyUnLike(_ref19, _ref20) {
var payload = _ref19.payload,
callback = _ref19.callback;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee10() {
return graduation_regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(graduation_replyUnLike, payload);
case 2:
return _context10.abrupt("return", _context10.sent);
case 3:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
// 讨论回复删除
deleteReply: function deleteReply(_ref21, _ref22) {
var payload = _ref21.payload,
callback = _ref21.callback;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee11() {
return graduation_regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(graduation_deleteReply, payload);
case 2:
return _context11.abrupt("return", _context11.sent);
case 3:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
// 新建默认数据
addTopicDefaultData: function addTopicDefaultData(_ref23, _ref24) {
var payload = _ref23.payload,
callback = _ref23.callback;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee12() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(graduation_addTopicDefaultData, payload);
case 2:
response = _context12.sent;
_context12.next = 5;
return put({
type: 'save',
payload: {
addTopicData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
// 编辑默认数据
editTopicDefaultData: function editTopicDefaultData(_ref25, _ref26) {
var payload = _ref25.payload,
callback = _ref25.callback;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee13() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(graduation_editTopicDefaultData, payload);
case 2:
response = _context13.sent;
_context13.next = 5;
return put({
type: 'save',
payload: {
editTopicData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context13.abrupt("return", response);
case 6:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
editTasksDefaultData: function editTasksDefaultData(_ref27, _ref28) {
var payload = _ref27.payload,
callback = _ref27.callback;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee14() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(graduation_editTasksDefaultData, payload);
case 2:
response = _context14.sent;
_context14.next = 5;
return put({
type: 'save',
payload: {
editTasksData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context14.abrupt("return", response);
case 6:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
// 新增毕设选题
addTopic: function addTopic(_ref29, _ref30) {
var payload = _ref29.payload,
callback = _ref29.callback;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee15() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(graduation_addTopic, payload);
case 2:
response = _context15.sent;
return _context15.abrupt("return", response);
case 4:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
// 编辑毕设选题
editTopic: function editTopic(_ref31, _ref32) {
var payload = _ref31.payload,
callback = _ref31.callback;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee16() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(graduation_editTopic, payload);
case 2:
response = _context16.sent;
return _context16.abrupt("return", response);
case 4:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
// 新增毕设任务
addTasks: function addTasks(_ref33, _ref34) {
var payload = _ref33.payload,
callback = _ref33.callback;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee17() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return call(graduation_addTasks, payload);
case 2:
response = _context17.sent;
return _context17.abrupt("return", response);
case 4:
case "end":
return _context17.stop();
}
}, _callee17);
})();
},
// 编辑毕设任务
editTasks: function editTasks(_ref35, _ref36) {
var payload = _ref35.payload,
callback = _ref35.callback;
var call = _ref36.call,
put = _ref36.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee18() {
var response;
return graduation_regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context18.next = 2;
return call(graduation_editTasks, payload);
case 2:
response = _context18.sent;
return _context18.abrupt("return", response);
case 4:
case "end":
return _context18.stop();
}
}, _callee18);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref37, _ref38) {
var payload = _ref37.payload;
var call = _ref38.call,
put = _ref38.put;
return /*#__PURE__*/graduation_regeneratorRuntime().mark(function _callee19() {
return graduation_regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
_context19.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context19.stop();
}
}, _callee19);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref39) {
var dispatch = _ref39.dispatch,
history = _ref39.history;
}
}
};
/* harmony default export */ var graduation = __webpack_exports__["a"] = (GraduationModel);
/***/ }),
/***/ "03hy":
/*!******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/components/twoTonePrimaryColor.js ***!
\******************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getTwoToneColor = getTwoToneColor;
exports.setTwoToneColor = setTwoToneColor;
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "J4zp"));
var _IconBase = _interopRequireDefault(__webpack_require__(/*! ./IconBase */ "/qSt"));
var _utils = __webpack_require__(/*! ../utils */ "vmBS");
function setTwoToneColor(twoToneColor) {
var _normalizeTwoToneColo = (0, _utils.normalizeTwoToneColors)(twoToneColor),
_normalizeTwoToneColo2 = (0, _slicedToArray2.default)(_normalizeTwoToneColo, 2),
primaryColor = _normalizeTwoToneColo2[0],
secondaryColor = _normalizeTwoToneColo2[1];
return _IconBase.default.setTwoToneColors({
primaryColor: primaryColor,
secondaryColor: secondaryColor
});
}
function getTwoToneColor() {
var colors = _IconBase.default.getTwoToneColors();
if (!colors.calculated) {
return colors.primaryColor;
}
return [colors.primaryColor, colors.secondaryColor];
}
/***/ }),
/***/ "07d7":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.to-string.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "AO7/");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var toString = __webpack_require__(/*! ../internals/object-to-string */ "sEFX");
// `Object.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
if (!TO_STRING_TAG_SUPPORT) {
redefine(Object.prototype, 'toString', toString, { unsafe: true });
}
/***/ }),
/***/ "0Ake":
/*!***************************************************!*\
!*** ./node_modules/set-function-length/index.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "AM7I");
var define = __webpack_require__(/*! define-data-property */ "eZIG");
var hasDescriptors = __webpack_require__(/*! has-property-descriptors */ "ZLCw")();
var gOPD = __webpack_require__(/*! gopd */ "Kqna");
var $TypeError = __webpack_require__(/*! es-errors/type */ "DSU0");
var $floor = GetIntrinsic('%Math.floor%');
/** @type {import('.')} */
module.exports = function setFunctionLength(fn, length) {
if (typeof fn !== 'function') {
throw new $TypeError('`fn` is not a function');
}
if (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {
throw new $TypeError('`length` must be a positive 32-bit integer');
}
var loose = arguments.length > 2 && !!arguments[2];
var functionLengthIsConfigurable = true;
var functionLengthIsWritable = true;
if ('length' in fn && gOPD) {
var desc = gOPD(fn, 'length');
if (desc && !desc.configurable) {
functionLengthIsConfigurable = false;
}
if (desc && !desc.writable) {
functionLengthIsWritable = false;
}
}
if (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {
if (hasDescriptors) {
define(/** @type {Parameters<define>[0]} */ (fn), 'length', length, true, true);
} else {
define(/** @type {Parameters<define>[0]} */ (fn), 'length', length);
}
}
return fn;
};
/***/ }),
/***/ "0BK2":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/hidden-keys.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ "0BeC":
/*!*********************************************************!*\
!*** ./src/models/classrooms/attachment.ts + 1 modules ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/attachment.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
// 公告上移
function attachment_allAttachment(_x) {
return _allAttachment.apply(this, arguments);
}
// 公告下移
function _allAttachment() {
_allAttachment = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/files/public_with_course_and_project", {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _allAttachment.apply(this, arguments);
}
function attachment_mineAttachment(_x2) {
return _mineAttachment.apply(this, arguments);
}
// 导入资源
function _mineAttachment() {
_mineAttachment = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/files/mine_with_course_and_project.json", {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _mineAttachment.apply(this, arguments);
}
function attachment_fileImport(_x3) {
return _fileImport.apply(this, arguments);
}
function _fileImport() {
_fileImport = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/files/import.json", {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _fileImport.apply(this, arguments);
}
function attachment_getDetail(_x4) {
return _getDetail.apply(this, arguments);
}
function _getDetail() {
_getDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/files/".concat(params.id, ".json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getDetail.apply(this, arguments);
}
function updateFiles(_x5) {
return _updateFiles.apply(this, arguments);
}
function _updateFiles() {
_updateFiles = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
var id;
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
id = params.id;
delete params.id;
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/files/".concat(id, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 3:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _updateFiles.apply(this, arguments);
}
function attachment_updateVisits(_x6) {
return _updateVisits.apply(this, arguments);
}
function _updateVisits() {
_updateVisits = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/files/".concat(params.id, "/update_visits.json"), {
method: 'post'
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _updateVisits.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/classrooms/attachment.ts
function attachment_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ attachment_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var AnnouncementModel = {
namespace: 'attachment',
state: {
name: '资源',
loading: true,
detail: {},
// 题库
actionTabs: {}
},
effects: {
// 全部资源
allAttachment: function allAttachment(_ref, _ref2) {
var payload = _ref.payload,
callback = _ref.callback;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee() {
var response;
return attachment_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(attachment_allAttachment, payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
allList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
// 我的资源
mineAttachment: function mineAttachment(_ref3, _ref4) {
var payload = _ref3.payload,
callback = _ref3.callback;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee2() {
var response;
return attachment_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(attachment_mineAttachment, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
mineList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context2.abrupt("return", response);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
// 导入资源
fileImport: function fileImport(_ref5, _ref6) {
var payload = _ref5.payload,
callback = _ref5.callback;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee3() {
var response;
return attachment_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(attachment_fileImport, payload);
case 2:
response = _context3.sent;
return _context3.abrupt("return", response);
case 4:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
// 资源详情
getDetail: function getDetail(_ref7, _ref8) {
var payload = _ref7.payload,
callback = _ref7.callback;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee4() {
var response;
return attachment_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(attachment_getDetail, payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
detail: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
updateVisits: function updateVisits(_ref9, _ref10) {
var payload = _ref9.payload,
callback = _ref9.callback;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee5() {
var response;
return attachment_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(attachment_updateVisits, payload);
case 2:
response = _context5.sent;
return _context5.abrupt("return", response);
case 4:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/attachment_regeneratorRuntime().mark(function _callee6() {
return attachment_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context6.stop();
}
}, _callee6);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref13) {
var dispatch = _ref13.dispatch,
history = _ref13.history;
}
}
};
/* harmony default export */ var attachment = __webpack_exports__["a"] = (AnnouncementModel);
/***/ }),
/***/ "0Dky":
/*!*************************************************!*\
!*** ./node_modules/core-js/internals/fails.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return !!exec();
} catch (error) {
return true;
}
};
/***/ }),
/***/ "0G8d":
/*!***************************************************************!*\
!*** ./node_modules/@ant-design/icons/CheckCircleOutlined.js ***!
\***************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _CheckCircleOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/CheckCircleOutlined */ "qJkI"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _CheckCircleOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "0GbY":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/get-built-in.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var path = __webpack_require__(/*! ../internals/path */ "Qo9l");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var aFunction = function (variable) {
return typeof variable == 'function' ? variable : undefined;
};
module.exports = function (namespace, method) {
return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])
: path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];
};
/***/ }),
/***/ "0JQy":
/*!************************************************!*\
!*** ./node_modules/lodash/_unicodeToArray.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f',
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
rsComboSymbolsRange = '\\u20d0-\\u20ff',
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
rsVarRange = '\\ufe0e\\ufe0f';
/** Used to compose unicode capture groups. */
var rsAstral = '[' + rsAstralRange + ']',
rsCombo = '[' + rsComboRange + ']',
rsFitz = '\\ud83c[\\udffb-\\udfff]',
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
rsNonAstral = '[^' + rsAstralRange + ']',
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
rsZWJ = '\\u200d';
/** Used to compose unicode regexes. */
var reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
rsSeq = rsOptVar + reOptMod + rsOptJoin,
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
/**
* Converts a Unicode `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function unicodeToArray(string) {
return string.match(reUnicode) || [];
}
module.exports = unicodeToArray;
/***/ }),
/***/ "0Owb":
/*!*************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js ***!
\*************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
/***/ }),
/***/ "0TkE":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.find.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $find = __webpack_require__(/*! ../internals/array-iteration */ "tycR").find;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.find` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.find
exportTypedArrayMethod('find', function find(predicate /* , thisArg */) {
return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/***/ "0ZTe":
/*!*************************************************!*\
!*** ./node_modules/lodash/_createCaseFirst.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var castSlice = __webpack_require__(/*! ./_castSlice */ "wy8a"),
hasUnicode = __webpack_require__(/*! ./_hasUnicode */ "quyA"),
stringToArray = __webpack_require__(/*! ./_stringToArray */ "Em2t"),
toString = __webpack_require__(/*! ./toString */ "dt0z");
/**
* Creates a function like `_.lowerFirst`.
*
* @private
* @param {string} methodName The name of the `String` case method to use.
* @returns {Function} Returns the new case function.
*/
function createCaseFirst(methodName) {
return function(string) {
string = toString(string);
var strSymbols = hasUnicode(string)
? stringToArray(string)
: undefined;
var chr = strSymbols
? strSymbols[0]
: string.charAt(0);
var trailing = strSymbols
? castSlice(strSymbols, 1).join('')
: string.slice(1);
return chr[methodName]() + trailing;
};
}
module.exports = createCaseFirst;
/***/ }),
/***/ "0eef":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/internals/object-property-is-enumerable.js ***!
\*************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// Nashorn ~ JDK8 bug
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
// `Object.prototype.propertyIsEnumerable` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
var descriptor = getOwnPropertyDescriptor(this, V);
return !!descriptor && descriptor.enumerable;
} : nativePropertyIsEnumerable;
/***/ }),
/***/ "0jNN":
/*!**************************************!*\
!*** ./node_modules/qs/lib/utils.js ***!
\**************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var formats = __webpack_require__(/*! ./formats */ "sxOR");
var has = Object.prototype.hasOwnProperty;
var isArray = Array.isArray;
var hexTable = (function () {
var array = [];
for (var i = 0; i < 256; ++i) {
array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
}
return array;
}());
var compactQueue = function compactQueue(queue) {
while (queue.length > 1) {
var item = queue.pop();
var obj = item.obj[item.prop];
if (isArray(obj)) {
var compacted = [];
for (var j = 0; j < obj.length; ++j) {
if (typeof obj[j] !== 'undefined') {
compacted.push(obj[j]);
}
}
item.obj[item.prop] = compacted;
}
}
};
var arrayToObject = function arrayToObject(source, options) {
var obj = options && options.plainObjects ? Object.create(null) : {};
for (var i = 0; i < source.length; ++i) {
if (typeof source[i] !== 'undefined') {
obj[i] = source[i];
}
}
return obj;
};
var merge = function merge(target, source, options) {
/* eslint no-param-reassign: 0 */
if (!source) {
return target;
}
if (typeof source !== 'object') {
if (isArray(target)) {
target.push(source);
} else if (target && typeof target === 'object') {
if ((options && (options.plainObjects || options.allowPrototypes)) || !has.call(Object.prototype, source)) {
target[source] = true;
}
} else {
return [target, source];
}
return target;
}
if (!target || typeof target !== 'object') {
return [target].concat(source);
}
var mergeTarget = target;
if (isArray(target) && !isArray(source)) {
mergeTarget = arrayToObject(target, options);
}
if (isArray(target) && isArray(source)) {
source.forEach(function (item, i) {
if (has.call(target, i)) {
var targetItem = target[i];
if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
target[i] = merge(targetItem, item, options);
} else {
target.push(item);
}
} else {
target[i] = item;
}
});
return target;
}
return Object.keys(source).reduce(function (acc, key) {
var value = source[key];
if (has.call(acc, key)) {
acc[key] = merge(acc[key], value, options);
} else {
acc[key] = value;
}
return acc;
}, mergeTarget);
};
var assign = function assignSingleSource(target, source) {
return Object.keys(source).reduce(function (acc, key) {
acc[key] = source[key];
return acc;
}, target);
};
var decode = function (str, decoder, charset) {
var strWithoutPlus = str.replace(/\+/g, ' ');
if (charset === 'iso-8859-1') {
// unescape never throws, no try...catch needed:
return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
}
// utf-8
try {
return decodeURIComponent(strWithoutPlus);
} catch (e) {
return strWithoutPlus;
}
};
var limit = 1024;
/* eslint operator-linebreak: [2, "before"] */
var encode = function encode(str, defaultEncoder, charset, kind, format) {
// This code was originally written by Brian White (mscdex) for the io.js core querystring library.
// It has been adapted here for stricter adherence to RFC 3986
if (str.length === 0) {
return str;
}
var string = str;
if (typeof str === 'symbol') {
string = Symbol.prototype.toString.call(str);
} else if (typeof str !== 'string') {
string = String(str);
}
if (charset === 'iso-8859-1') {
return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
});
}
var out = '';
for (var j = 0; j < string.length; j += limit) {
var segment = string.length >= limit ? string.slice(j, j + limit) : string;
var arr = [];
for (var i = 0; i < segment.length; ++i) {
var c = segment.charCodeAt(i);
if (
c === 0x2D // -
|| c === 0x2E // .
|| c === 0x5F // _
|| c === 0x7E // ~
|| (c >= 0x30 && c <= 0x39) // 0-9
|| (c >= 0x41 && c <= 0x5A) // a-z
|| (c >= 0x61 && c <= 0x7A) // A-Z
|| (format === formats.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
) {
arr[arr.length] = segment.charAt(i);
continue;
}
if (c < 0x80) {
arr[arr.length] = hexTable[c];
continue;
}
if (c < 0x800) {
arr[arr.length] = hexTable[0xC0 | (c >> 6)]
+ hexTable[0x80 | (c & 0x3F)];
continue;
}
if (c < 0xD800 || c >= 0xE000) {
arr[arr.length] = hexTable[0xE0 | (c >> 12)]
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
+ hexTable[0x80 | (c & 0x3F)];
continue;
}
i += 1;
c = 0x10000 + (((c & 0x3FF) << 10) | (segment.charCodeAt(i) & 0x3FF));
arr[arr.length] = hexTable[0xF0 | (c >> 18)]
+ hexTable[0x80 | ((c >> 12) & 0x3F)]
+ hexTable[0x80 | ((c >> 6) & 0x3F)]
+ hexTable[0x80 | (c & 0x3F)];
}
out += arr.join('');
}
return out;
};
var compact = function compact(value) {
var queue = [{ obj: { o: value }, prop: 'o' }];
var refs = [];
for (var i = 0; i < queue.length; ++i) {
var item = queue[i];
var obj = item.obj[item.prop];
var keys = Object.keys(obj);
for (var j = 0; j < keys.length; ++j) {
var key = keys[j];
var val = obj[key];
if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
queue.push({ obj: obj, prop: key });
refs.push(val);
}
}
}
compactQueue(queue);
return value;
};
var isRegExp = function isRegExp(obj) {
return Object.prototype.toString.call(obj) === '[object RegExp]';
};
var isBuffer = function isBuffer(obj) {
if (!obj || typeof obj !== 'object') {
return false;
}
return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
};
var combine = function combine(a, b) {
return [].concat(a, b);
};
var maybeMap = function maybeMap(val, fn) {
if (isArray(val)) {
var mapped = [];
for (var i = 0; i < val.length; i += 1) {
mapped.push(fn(val[i]));
}
return mapped;
}
return fn(val);
};
module.exports = {
arrayToObject: arrayToObject,
assign: assign,
combine: combine,
compact: compact,
decode: decode,
encode: encode,
isBuffer: isBuffer,
isRegExp: isRegExp,
maybeMap: maybeMap,
merge: merge
};
/***/ }),
/***/ "0n0R":
/*!*************************************************!*\
!*** ./node_modules/antd/es/_util/reactNode.js ***!
\*************************************************/
/*! exports provided: isValidElement, replaceElement, cloneElement */
/*! exports used: cloneElement, isValidElement, replaceElement */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isValidElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return replaceElement; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return cloneElement; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var isValidElement = react__WEBPACK_IMPORTED_MODULE_0__["isValidElement"];
function replaceElement(element, replacement, props) {
if (!isValidElement(element)) return replacement;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["cloneElement"](element, typeof props === 'function' ? props() : props);
}
function cloneElement(element, props) {
return replaceElement(element, element, props);
}
/***/ }),
/***/ "0oug":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.iterator.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.iterator` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.iterator
defineWellKnownSymbol('iterator');
/***/ }),
/***/ "0q/z":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.find.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.find` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
find: function find(callbackfn /* , thisArg */) {
var map = anObject(this);
var iterator = getMapIterator(map);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
return iterate(iterator, function (key, value) {
if (boundFunction(value, key, map)) return iterate.stop(value);
}, undefined, true, true).result;
}
});
/***/ }),
/***/ "0rvr":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/internals/object-set-prototype-of.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "O741");
// `Object.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
// Works with __proto__ only. Old v8 can't work with null proto objects.
/* eslint-disable no-proto */
module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {
var CORRECT_SETTER = false;
var test = {};
var setter;
try {
setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
setter.call(test, []);
CORRECT_SETTER = test instanceof Array;
} catch (error) { /* empty */ }
return function setPrototypeOf(O, proto) {
anObject(O);
aPossiblePrototype(proto);
if (CORRECT_SETTER) setter.call(O, proto);
else O.__proto__ = proto;
return O;
};
}() : undefined);
/***/ }),
/***/ "0vxD":
/*!*****************************************************************!*\
!*** ./node_modules/react-redux/node_modules/react-is/index.js ***!
\*****************************************************************/
/*! no static exports found */
/*! exports used: isContextConsumer */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(/*! ./cjs/react-is.production.min.js */ "DUzY");
} else {}
/***/ }),
/***/ 1:
/*!*******************************************!*\
!*** ./locale-data/complete.js (ignored) ***!
\*******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ "14J3":
/*!*************************************************!*\
!*** ./node_modules/antd/es/row/style/index.js ***!
\*************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _grid_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../grid/style */ "1GLa");
// style dependencies
// deps-lint-skip: grid
/***/ }),
/***/ "14Sl":
/*!******************************************************************************!*\
!*** ./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js ***!
\******************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: Remove from `core-js@4` since it's moved to entry points
__webpack_require__(/*! ../modules/es.regexp.exec */ "rB9j");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "kmMV");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var SPECIES = wellKnownSymbol('species');
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
// #replace needs built-in support for named groups.
// #match works fine because it just return the exec results, even if it has
// a "grops" property.
var re = /./;
re.exec = function () {
var result = [];
result.groups = { a: '7' };
return result;
};
return ''.replace(re, '$<a>') !== '7';
});
// IE <= 11 replaces $0 with the whole match, as if it was $&
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
var REPLACE_KEEPS_$0 = (function () {
return 'a'.replace(/./, '$0') === '$0';
})();
var REPLACE = wellKnownSymbol('replace');
// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
if (/./[REPLACE]) {
return /./[REPLACE]('a', '$0') === '';
}
return false;
})();
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
var re = /(?:)/;
var originalExec = re.exec;
re.exec = function () { return originalExec.apply(this, arguments); };
var result = 'ab'.split(re);
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
});
module.exports = function (KEY, length, exec, sham) {
var SYMBOL = wellKnownSymbol(KEY);
var DELEGATES_TO_SYMBOL = !fails(function () {
// String methods call symbol-named RegEp methods
var O = {};
O[SYMBOL] = function () { return 7; };
return ''[KEY](O) != 7;
});
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
// Symbol-named RegExp methods call .exec
var execCalled = false;
var re = /a/;
if (KEY === 'split') {
// We can't use real regex here since it causes deoptimization
// and serious performance degradation in V8
// https://github.com/zloirock/core-js/issues/306
re = {};
// RegExp[@@split] doesn't call the regex's exec method, but first creates
// a new one. We need to return the patched regex when creating the new one.
re.constructor = {};
re.constructor[SPECIES] = function () { return re; };
re.flags = '';
re[SYMBOL] = /./[SYMBOL];
}
re.exec = function () { execCalled = true; return null; };
re[SYMBOL]('');
return !execCalled;
});
if (
!DELEGATES_TO_SYMBOL ||
!DELEGATES_TO_EXEC ||
(KEY === 'replace' && !(
REPLACE_SUPPORTS_NAMED_GROUPS &&
REPLACE_KEEPS_$0 &&
!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
)) ||
(KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)
) {
var nativeRegExpMethod = /./[SYMBOL];
var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
if (regexp.exec === regexpExec) {
if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
// The native String method already delegates to @@method (this
// polyfilled function), leasing to infinite recursion.
// We avoid it by directly calling the native @@method method.
return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };
}
return { done: true, value: nativeMethod.call(str, regexp, arg2) };
}
return { done: false };
}, {
REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,
REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE
});
var stringMethod = methods[0];
var regexMethod = methods[1];
redefine(String.prototype, KEY, stringMethod);
redefine(RegExp.prototype, SYMBOL, length == 2
// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
? function (string, arg) { return regexMethod.call(string, this, arg); }
// 21.2.5.6 RegExp.prototype[@@match](string)
// 21.2.5.9 RegExp.prototype[@@search](string)
: function (string) { return regexMethod.call(string, this); }
);
}
if (sham) createNonEnumerableProperty(RegExp.prototype[SYMBOL], 'sham', true);
};
/***/ }),
/***/ "16Al":
/*!*************************************************************!*\
!*** ./node_modules/prop-types/factoryWithThrowingShims.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var ReactPropTypesSecret = __webpack_require__(/*! ./lib/ReactPropTypesSecret */ "WbBG");
function emptyFunction() {}
function emptyFunctionWithReset() {}
emptyFunctionWithReset.resetWarningCache = emptyFunction;
module.exports = function() {
function shim(props, propName, componentName, location, propFullName, secret) {
if (secret === ReactPropTypesSecret) {
// It is still safe when called from React.
return;
}
var err = new Error(
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
'Use PropTypes.checkPropTypes() to call them. ' +
'Read more at http://fb.me/use-check-prop-types'
);
err.name = 'Invariant Violation';
throw err;
};
shim.isRequired = shim;
function getShim() {
return shim;
};
// Important!
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
var ReactPropTypes = {
array: shim,
bigint: shim,
bool: shim,
func: shim,
number: shim,
object: shim,
string: shim,
symbol: shim,
any: shim,
arrayOf: getShim,
element: shim,
elementType: shim,
instanceOf: getShim,
node: shim,
objectOf: getShim,
oneOf: getShim,
oneOfType: getShim,
shape: getShim,
exact: getShim,
checkPropTypes: emptyFunctionWithReset,
resetWarningCache: emptyFunction
};
ReactPropTypes.PropTypes = ReactPropTypes;
return ReactPropTypes;
};
/***/ }),
/***/ "17x9":
/*!******************************************!*\
!*** ./node_modules/prop-types/index.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
if (false) { var throwOnDirectAccess, ReactIs; } else {
// By explicitly using `prop-types` you are opting into new production behavior.
// http://fb.me/prop-types-in-prod
module.exports = __webpack_require__(/*! ./factoryWithThrowingShims */ "16Al")();
}
/***/ }),
/***/ "1E5z":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/set-to-string-tag.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
module.exports = function (it, TAG, STATIC) {
if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });
}
};
/***/ }),
/***/ "1GLa":
/*!**************************************************!*\
!*** ./node_modules/antd/es/grid/style/index.js ***!
\**************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "FIfw");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/***/ }),
/***/ "1OyB":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
\*******************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
/***/ }),
/***/ "1WJl":
/*!********************************************************************************!*\
!*** ./node_modules/@umijs/plugin-model/node_modules/fast-deep-equal/index.js ***!
\********************************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// do not edit .js files directly - edit src/index.jst
module.exports = function equal(a, b) {
if (a === b) return true;
if (a && b && typeof a == 'object' && typeof b == 'object') {
if (a.constructor !== b.constructor) return false;
var length, i, keys;
if (Array.isArray(a)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (!equal(a[i], b[i])) return false;
return true;
}
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
keys = Object.keys(a);
length = keys.length;
if (length !== Object.keys(b).length) return false;
for (i = length; i-- !== 0;)
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
for (i = length; i-- !== 0;) {
var key = keys[i];
if (!equal(a[key], b[key])) return false;
}
return true;
}
// true if both NaN, false otherwise
return a!==a && b!==b;
};
/***/ }),
/***/ "1Y/n":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/array-reduce.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "RK3t");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
// `Array.prototype.{ reduce, reduceRight }` methods implementation
var createMethod = function (IS_RIGHT) {
return function (that, callbackfn, argumentsLength, memo) {
aFunction(callbackfn);
var O = toObject(that);
var self = IndexedObject(O);
var length = toLength(O.length);
var index = IS_RIGHT ? length - 1 : 0;
var i = IS_RIGHT ? -1 : 1;
if (argumentsLength < 2) while (true) {
if (index in self) {
memo = self[index];
index += i;
break;
}
index += i;
if (IS_RIGHT ? index < 0 : length <= index) {
throw TypeError('Reduce of empty array with no initial value');
}
}
for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
memo = callbackfn(memo, self[index], index, O);
}
return memo;
};
};
module.exports = {
// `Array.prototype.reduce` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
left: createMethod(false),
// `Array.prototype.reduceRight` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
right: createMethod(true)
};
/***/ }),
/***/ "1cmj":
/*!***********************************************************!*\
!*** ./src/models/shixuns/practiceSetting.ts + 1 modules ***!
\***********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/pages/Competitions/Detail/SubmitResult.tsx */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/practiceSetting.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
//获取test数据
function practiceSetting_getTestData(_x) {
return _getTestData.apply(this, arguments);
}
//获取页面通用数据
function _getTestData() {
_getTestData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/shixuns/new.json", {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getTestData.apply(this, arguments);
}
function practiceSetting_getCommonData(_x2) {
return _getCommonData.apply(this, arguments);
}
function _getCommonData() {
_getCommonData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/shixuns/".concat(params.id, "/required_status.json"), {
method: 'Get',
params: {}
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getCommonData.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/shixuns/practiceSetting.ts
function practiceSetting_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ practiceSetting_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var PracticeSettingModel = {
namespace: 'practiceSetting',
state: {
data: {},
is_published: true,
updateIndex: 1,
//渲染题目发状态
id: '',
//实践项目的Id
questionName: '',
base_info_warning: false,
//基本信息警告
challenges_warning: false,
//任务关卡警告
repository_warning: false,
//代码仓库警告
mirror_warning: false,
//实验环境警告
service_warning: false,
selectQuestionParams: {},
newQuestion: null,
//新建任务关卡数据
user_name: '',
user_image_url: '',
title: '',
windows_vnc: true,
//window vnc数据集
isExistComplete: false,
sideBar: {
tabsActive: '',
//tabs激活
selectPath: "",
confirmLeave: false
}
},
effects: {
setParams: function setParams(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee() {
return practiceSetting_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return put({
type: 'save',
payload: Object(objectSpread2["a" /* default */])({}, payload)
});
case 2:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getTestData: function getTestData(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee2() {
var response;
return practiceSetting_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(practiceSetting_getTestData, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
data: response
}
});
case 5:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
setUpdateIndex: function setUpdateIndex(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee3() {
return practiceSetting_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return put({
type: 'save',
payload: {
updateIndex: Math.random()
}
});
case 2:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
getCommonData: function getCommonData(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee4() {
var response;
return practiceSetting_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(practiceSetting_getCommonData, payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: Object(objectSpread2["a" /* default */])({}, response.data)
});
case 5:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
setSideBarTabs: function setSideBarTabs(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/practiceSetting_regeneratorRuntime().mark(function _callee5() {
return practiceSetting_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return put({
type: 'sideBar',
payload: Object(objectSpread2["a" /* default */])({}, payload)
});
case 2:
case "end":
return _context5.stop();
}
}, _callee5);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
},
sideBar: function sideBar(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), {}, {
sideBar: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state.sideBar), action.payload)
});
}
},
subscriptions: {
setup: function setup(_ref11) {
var dispatch = _ref11.dispatch,
history = _ref11.history;
}
}
};
/* harmony default export */ var practiceSetting = __webpack_exports__["a"] = (PracticeSettingModel);
/***/ }),
/***/ "1dYe":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.for-each.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "tycR").forEach;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.forEach` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.foreach
exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) {
$forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/***/ "1kQv":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.from.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var from = __webpack_require__(/*! ../internals/collection-from */ "qY7S");
// `Set.from` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.from
$({ target: 'Set', stat: true }, {
from: from
});
/***/ }),
/***/ "1t3B":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.prevent-extensions.js ***!
\***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "uy83");
// `Reflect.preventExtensions` method
// https://tc39.github.io/ecma262/#sec-reflect.preventextensions
$({ target: 'Reflect', stat: true, sham: !FREEZING }, {
preventExtensions: function preventExtensions(target) {
anObject(target);
try {
var objectPreventExtensions = getBuiltIn('Object', 'preventExtensions');
if (objectPreventExtensions) objectPreventExtensions(target);
return true;
} catch (error) {
return false;
}
}
});
/***/ }),
/***/ "1vsH":
/*!****************************************!*\
!*** ./src/utils/util.tsx + 6 modules ***!
\****************************************/
/*! exports provided: ZimuSort, RomanNumber, StatusTags, formatHomeWorkStatusToName, HomeWorkListStatus, HomeWorkDetailStatus, StatusGraduationProjectTags, ExerciseStatus, PollsStatus, StatusClassroomsTags, exerciseTips, WorkStatus, CommonWorkStatus, timego, timeformat, toTimeFormat, validateLength, handleValidatorNickName, handleValidatorName, getHiddenName, getBase64, setmiyah, getCookie, setCookie, delCookie, downLoadLink, getBlob, saveAs, download, downLoadFileIframe, downLoadFile, setUrlQuery, isPc, isChrome, isChromeOrFirefox, formatMoney, openNewWindow, formatTextMiddleIntercept, HalfPastOne, DayHalfPastOne, isEmpty, rangeNumber, middleEllipsis, formatRate, isUnOrNull, getUrlToken, getMessagesUrl, checkLocalOrPublicIp, startExercise, educationList, messageInfo, base64ToBlob, downloadFile, trackEvent, trackEventCustom, onPreviewImage, getCategoryName, bindPhone, copyTextFuc, getJsonFromUrl, arrTrans, setDocumentTitle, checkIsClientExam */
/*! exports used: bindPhone, checkIsClientExam, delCookie, downLoadFile, downLoadFileIframe, downLoadLink, downloadFile, getBase64, getCookie, getHiddenName, handleValidatorName, isPc, openNewWindow, setCookie, setDocumentTitle, setUrlQuery, setmiyah, trackEvent */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/exercise.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/authority.ts because of ./src/pages/Competitions/Detail/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts because of ./src/components/HomeModal/Advertisement.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js because of ./src/pages/Competitions/components/ClaModal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/style/index.js because of ./node_modules/antd/es/table/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/index.js because of ./src/components/User/PopLoginRegister/components/LoginPanel/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/col/style/index.js because of ./src/components/User/PopLoginRegister/components/LoginPanel/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/index.js because of ./src/components/User/PopLoginRegister/PopLogin.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js because of ./src/pages/Competitions/Index/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js because of ./src/pages/Competitions/Detail/components/WorkSubmit/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js because of ./src/pages/Competitions/Detail/components/WorkSubmit/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/md5/md5.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "k", function() { return /* binding */ handleValidatorName; });
__webpack_require__.d(__webpack_exports__, "j", function() { return /* binding */ getHiddenName; });
__webpack_require__.d(__webpack_exports__, "h", function() { return /* binding */ getBase64; });
__webpack_require__.d(__webpack_exports__, "q", function() { return /* binding */ setmiyah; });
__webpack_require__.d(__webpack_exports__, "i", function() { return /* binding */ getCookie; });
__webpack_require__.d(__webpack_exports__, "n", function() { return /* binding */ setCookie; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ delCookie; });
__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ downLoadLink; });
__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ downLoadFileIframe; });
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ downLoadFile; });
__webpack_require__.d(__webpack_exports__, "p", function() { return /* binding */ setUrlQuery; });
__webpack_require__.d(__webpack_exports__, "l", function() { return /* binding */ isPc; });
__webpack_require__.d(__webpack_exports__, "m", function() { return /* binding */ openNewWindow; });
__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ downloadFile; });
__webpack_require__.d(__webpack_exports__, "r", function() { return /* binding */ util_trackEvent; });
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ util_bindPhone; });
__webpack_require__.d(__webpack_exports__, "o", function() { return /* binding */ setDocumentTitle; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ checkIsClientExam; });
// UNUSED EXPORTS: ZimuSort, RomanNumber, StatusTags, formatHomeWorkStatusToName, HomeWorkListStatus, HomeWorkDetailStatus, StatusGraduationProjectTags, ExerciseStatus, PollsStatus, StatusClassroomsTags, exerciseTips, WorkStatus, CommonWorkStatus, timego, timeformat, toTimeFormat, validateLength, handleValidatorNickName, getBlob, saveAs, download, isChrome, isChromeOrFirefox, formatMoney, formatTextMiddleIntercept, HalfPastOne, DayHalfPastOne, isEmpty, rangeNumber, middleEllipsis, formatRate, isUnOrNull, getUrlToken, getMessagesUrl, checkLocalOrPublicIp, startExercise, educationList, messageInfo, base64ToBlob, trackEventCustom, onPreviewImage, getCategoryName, copyTextFuc, getJsonFromUrl, arrTrans
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("oBTY");
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js
var style = __webpack_require__("miYZ");
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
var message = __webpack_require__("tsqr");
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/style/index.js
var checkbox_style = __webpack_require__("sRBo");
// EXTERNAL MODULE: ./node_modules/antd/es/checkbox/index.js + 2 modules
var es_checkbox = __webpack_require__("kaz8");
// EXTERNAL MODULE: ./node_modules/antd/es/row/style/index.js
var row_style = __webpack_require__("14J3");
// EXTERNAL MODULE: ./node_modules/antd/es/row/index.js
var row = __webpack_require__("BMrR");
// EXTERNAL MODULE: ./node_modules/antd/es/col/style/index.js
var col_style = __webpack_require__("jCWc");
// EXTERNAL MODULE: ./node_modules/antd/es/col/index.js
var col = __webpack_require__("kPKH");
// EXTERNAL MODULE: ./node_modules/antd/es/modal/style/index.js
var modal_style = __webpack_require__("2qtc");
// EXTERNAL MODULE: ./node_modules/antd/es/modal/index.js + 14 modules
var es_modal = __webpack_require__("kLXV");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("jrin");
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// EXTERNAL MODULE: ./src/utils/authority.ts
var authority = __webpack_require__("xKgJ");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
var arrayWithHoles = __webpack_require__("+kx5");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__("Y9hK");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("Qw5x");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
var nonIterableRest = __webpack_require__("u6e6");
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toArray.js
function _toArray(arr) {
return Object(arrayWithHoles["a" /* default */])(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || Object(nonIterableRest["a" /* default */])();
}
// CONCATENATED MODULE: ./src/utils/validate.ts
var isValidIP = function isValidIP(ip) {
var reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;
return reg.test(ip);
};
var isValidIPPrefix = function isValidIPPrefix(ip) {
var reg = /^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.$/;
return reg.test(ip);
};
// CONCATENATED MODULE: ./src/components/Exercise/ip.tsx
var ip_findLocalIp = function findLocalIp(data) {
return new Promise(function (resolve, reject) {
window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
if (typeof window.RTCPeerConnection == 'undefined') return reject('WebRTC not supported by browser');
var pc = new RTCPeerConnection();
var ips = [];
pc.createDataChannel("");
pc.createOffer().then(function (offer) {
return pc.setLocalDescription(offer);
}).catch(function (err) {
return reject(err);
});
pc.onicecandidate = function (event) {
console.log("event:", event);
var ipArr = [];
if (!event || !event.candidate) {
// All ICE candidates have been sent.
console.log("ips", ips);
if (ips.length == 0 || !isValidIP(ips[0])) {
var modal = es_modal["a" /* default */].info({
title: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "1"
}, "\u63D0\u793A"), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", {
className: "iconfont icon-yiguanbi1 current c-grey-c",
onClick: function onClick() {
return modal.destroy();
}
}))),
icon: null,
width: 500,
className: "custom-modal-divider",
content: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, "\u5F53\u524D\u8003\u8BD5\u5DF2\u542F\u7528\u9650\u5236\u8003\u8BD5\u8BBF\u95EEIP\uFF08\u9650\u5236\u516C\u5171IP+\u5185\u7F51IP\uFF09\u3002", (data.ip_limit === 'inner' || data.ip_bind) && /*#__PURE__*/react_default.a.createElement(react_default.a.Fragment, null, /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, "\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"), /*#__PURE__*/react_default.a.createElement("br", null), /*#__PURE__*/react_default.a.createElement("a", {
href: "https://www.educoder.net/forums/4478",
target: "_blank"
}, "\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?"))))
});
return reject('WebRTC disabled or restricted by browser');
}
var realIp = ips.filter(function (item) {
return isValidIP(item);
});
return resolve(realIp.join(''));
}
var parts = event.candidate.candidate.split(' ');
var _parts = _toArray(parts),
base = _parts[0],
componentId = _parts[1],
protocol = _parts[2],
priority = _parts[3],
ip = _parts[4],
port = _parts[5],
type = _parts[7],
attr = _parts.slice(8);
var component = ['rtp', 'rtpc'];
console.log("event:", event);
if (!ips.some(function (e) {
return e == ip;
})) ips.push(ip);
console.log(" candidate: " + base.split(':')[1]);
console.log(" component: " + component[componentId - 1]);
console.log(" protocol: " + protocol);
console.log(" priority: " + priority);
console.log(" ip: " + ip);
console.log(" port: " + port);
console.log(" type: " + type);
if (attr.length) {
console.log("attributes: ");
for (var i = 0; i < attr.length; i += 2) console.log("> " + attr[i] + ": " + attr[i + 1]);
}
};
});
};
// EXTERNAL MODULE: ./src/service/exercise.ts
var exercise = __webpack_require__("V0Rq");
// CONCATENATED MODULE: ./src/utils/fullscreen.ts
function requestFullScreen(element) {
try {
if (element.mozRequestFullScreen) {
element.mozRequestFullScreen();
} else if (element.webkitRequestFullScreen) {
element.webkitRequestFullScreen();
}
} catch (e) {
console.log(e, ":e");
}
}
function exitFull() {
if (window.top.document.webkitExitFullscreen) {
window.top.document.webkitExitFullscreen();
} else if (document.exitFullscreen) {
window.top.document.exitFullscreen();
} else if (document.msExitFullscreen) {
window.top.document.msExitFullscreen();
} else if (document.mozCancelFullScreen) {
window.top.document.mozCancelFullScreen();
}
}
// esliint disabled
var fullscreenChange = function fullscreenChange() {
//['fullscreenchange','msfullscreenchange','webkitfullscreenchange', 'mozfullscreenchange']
if (document.webkitExitFullscreen) {
// document.webkitExitFullscreen()
return 'webkitfullscreenchange';
} else if (document.exitFullscreen) {
// document.exitFullscreen()
return 'fullscreenchange';
} else if (document.msExitFullscreen) {
// document.msExitFullscreen()
return 'msfullscreenchange';
} else if (document.mozCancelFullScreen) {
// document.mozCancelFullScreen()
return 'mozfullscreenchange';
}
};
//判断是否全屏
function IsFull() {
var fullscreenElement = window.top.document.fullscreenElement || window.top.document.mozFullscreenElement || window.top.document.webkitFullscreenElement;
var fullscreenEnabled = document.fullscreenEnabled || document.mozFullscreenEnabled || document.webkitFullscreenEnabled;
if (fullscreenElement == null) {
return false;
} else {
return true;
}
}
// document.addEventListener("mozfullscreenchange", function (event) {
// console.log("mozfullscreenchange ", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("webkitfullscreenchange", function (event) {
// console.log("webkitfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// document.addEventListener("msfullscreenchange", function (event) {
// console.log("msfullscreenchange", event);
// if (IsFull()) {
// console.log('进入全屏')
// $("#closescreen").show();
// $("#openscreen").hide();
// } else {
// console.log('退出全屏')
// $("#closescreen").hide();
// $("#openscreen").show();
// }
// });
// CONCATENATED MODULE: ./src/utils/contentType.ts
var contentType = {
"load": "text/html",
"123": "application/vndlotus-1-2-3",
"3ds": "image/x-3ds",
"3g2": "video/3gpp",
"3ga": "video/3gpp",
"3gp": "video/3gpp",
"3gpp": "video/3gpp",
"602": "application/x-t602",
"669": "audio/x-mod",
"7z": "application/x-7z-compressed",
"a": "application/x-archive",
"aac": "audio/mp4",
"abw": "application/x-abiword",
"abwcrashed": "application/x-abiword",
"abwgz": "application/x-abiword",
"ac3": "audio/ac3",
"ace": "application/x-ace",
"adb": "text/x-adasrc",
"ads": "text/x-adasrc",
"afm": "application/x-font-afm",
"ag": "image/x-applix-graphics",
"ai": "application/illustrator",
"aif": "audio/x-aiff",
"aifc": "audio/x-aiff",
"aiff": "audio/x-aiff",
"al": "application/x-perl",
"alz": "application/x-alz",
"amr": "audio/amr",
"ani": "application/x-navi-animation",
"anim[1-9j]": "video/x-anim",
"anx": "application/annodex",
"ape": "audio/x-ape",
"arj": "application/x-arj",
"arw": "image/x-sony-arw",
"as": "application/x-applix-spreadsheet",
"asc": "text/plain",
"asf": "video/x-ms-asf",
"asp": "application/x-asp",
"ass": "text/x-ssa",
"asx": "audio/x-ms-asx",
"atom": "application/atom+xml",
"au": "audio/basic",
"avi": "video/x-msvideo",
"aw": "application/x-applix-word",
"awb": "audio/amr-wb",
"awk": "application/x-awk",
"axa": "audio/annodex",
"axv": "video/annodex",
"bak": "application/x-trash",
"bcpio": "application/x-bcpio",
"bdf": "application/x-font-bdf",
"bib": "text/x-bibtex",
"bin": "application/octet-stream",
"blend": "application/x-blender",
"blender": "application/x-blender",
"bmp": "image/bmp",
"bz": "application/x-bzip",
"bz2": "application/x-bzip",
"c": "text/x-csrc",
"c++": "text/x-c++src",
"cab": "application/vndms-cab-compressed",
"cb7": "application/x-cb7",
"cbr": "application/x-cbr",
"cbt": "application/x-cbt",
"cbz": "application/x-cbz",
"cc": "text/x-c++src",
"cdf": "application/x-netcdf",
"cdr": "application/vndcorel-draw",
"cer": "application/x-x509-ca-cert",
"cert": "application/x-x509-ca-cert",
"cgm": "image/cgm",
"chm": "application/x-chm",
"chrt": "application/x-kchart",
"class": "application/x-java",
"cls": "text/x-tex",
"cmake": "text/x-cmake",
"cpio": "application/x-cpio",
"cpiogz": "application/x-cpio-compressed",
"cpp": "text/x-c++src",
"cr2": "image/x-canon-cr2",
"crt": "application/x-x509-ca-cert",
"crw": "image/x-canon-crw",
"cs": "text/x-csharp",
"csh": "application/x-csh",
"css": "text/css",
"cssl": "text/css",
"csv": "text/csv",
"cue": "application/x-cue",
"cur": "image/x-win-bitmap",
"cxx": "text/x-c++src",
"d": "text/x-dsrc",
"dar": "application/x-dar",
"dbf": "application/x-dbf",
"dc": "application/x-dc-rom",
"dcl": "text/x-dcl",
"dcm": "application/dicom",
"dcr": "image/x-kodak-dcr",
"dds": "image/x-dds",
"deb": "application/x-deb",
"der": "application/x-x509-ca-cert",
"desktop": "application/x-desktop",
"dia": "application/x-dia-diagram",
"diff": "text/x-patch",
"divx": "video/x-msvideo",
"djv": "image/vnddjvu",
"djvu": "image/vnddjvu",
"dng": "image/x-adobe-dng",
"doc": "application/msword",
"docbook": "application/docbook+xml",
"docm": "application/vndopenxmlformats-officedocumentwordprocessingmldocument",
"docx": "application/vndopenxmlformats-officedocumentwordprocessingmldocument",
"dot": "text/vndgraphviz",
"dsl": "text/x-dsl",
"dtd": "application/xml-dtd",
"dtx": "text/x-tex",
"dv": "video/dv",
"dvi": "application/x-dvi",
"dvibz2": "application/x-bzdvi",
"dvigz": "application/x-gzdvi",
"dwg": "image/vnddwg",
"dxf": "image/vnddxf",
"e": "text/x-eiffel",
"egon": "application/x-egon",
"eif": "text/x-eiffel",
"el": "text/x-emacs-lisp",
"emf": "image/x-emf",
"emp": "application/vndemusic-emusic_package",
"ent": "application/xml-external-parsed-entity",
"eps": "image/x-eps",
"epsbz2": "image/x-bzeps",
"epsgz": "image/x-gzeps",
"epsf": "image/x-eps",
"epsfbz2": "image/x-bzeps",
"epsfgz": "image/x-gzeps",
"epsi": "image/x-eps",
"epsibz2": "image/x-bzeps",
"epsigz": "image/x-gzeps",
"epub": "application/epub+zip",
"erl": "text/x-erlang",
"es": "application/ecmascript",
"etheme": "application/x-e-theme",
"etx": "text/x-setext",
"exe": "application/x-ms-dos-executable",
"exr": "image/x-exr",
"ez": "application/andrew-inset",
"f": "text/x-fortran",
"f90": "text/x-fortran",
"f95": "text/x-fortran",
"fb2": "application/x-fictionbook+xml",
"fig": "image/x-xfig",
"fits": "image/fits",
"fl": "application/x-fluid",
"flac": "audio/x-flac",
"flc": "video/x-flic",
"fli": "video/x-flic",
"flv": "video/x-flv",
"flw": "application/x-kivio",
"fo": "text/x-xslfo",
"for": "text/x-fortran",
"g3": "image/fax-g3",
"gb": "application/x-gameboy-rom",
"gba": "application/x-gba-rom",
"gcrd": "text/directory",
"ged": "application/x-gedcom",
"gedcom": "application/x-gedcom",
"gen": "application/x-genesis-rom",
"gf": "application/x-tex-gf",
"gg": "application/x-sms-rom",
"gif": "image/gif",
"glade": "application/x-glade",
"gmo": "application/x-gettext-translation",
"gnc": "application/x-gnucash",
"gnd": "application/gnunet-directory",
"gnucash": "application/x-gnucash",
"gnumeric": "application/x-gnumeric",
"gnuplot": "application/x-gnuplot",
"gp": "application/x-gnuplot",
"gpg": "application/pgp-encrypted",
"gplt": "application/x-gnuplot",
"gra": "application/x-graphite",
"gsf": "application/x-font-type1",
"gsm": "audio/x-gsm",
"gtar": "application/x-tar",
"gv": "text/vndgraphviz",
"gvp": "text/x-google-video-pointer",
"gz": "application/x-gzip",
"h": "text/x-chdr",
"h++": "text/x-c++hdr",
"hdf": "application/x-hdf",
"hh": "text/x-c++hdr",
"hp": "text/x-c++hdr",
"hpgl": "application/vndhp-hpgl",
"hpp": "text/x-c++hdr",
"hs": "text/x-haskell",
"htm": "text/html",
"html": "text/html",
"hwp": "application/x-hwp",
"hwt": "application/x-hwt",
"hxx": "text/x-c++hdr",
"ica": "application/x-ica",
"icb": "image/x-tga",
"icns": "image/x-icns",
"ico": "image/vndmicrosofticon",
"ics": "text/calendar",
"idl": "text/x-idl",
"ief": "image/ief",
"iff": "image/x-iff",
"ilbm": "image/x-ilbm",
"ime": "text/x-imelody",
"imy": "text/x-imelody",
"ins": "text/x-tex",
"iptables": "text/x-iptables",
"iso": "application/x-cd-image",
"iso9660": "application/x-cd-image",
"it": "audio/x-it",
"j2k": "image/jp2",
"jad": "text/vndsunj2meapp-descriptor",
"jar": "application/x-java-archive",
"java": "text/x-java",
"jng": "image/x-jng",
"jnlp": "application/x-java-jnlp-file",
"jp2": "image/jp2",
"jpc": "image/jp2",
"jpe": "image/jpeg",
"jpeg": "image/jpeg",
"jpf": "image/jp2",
"jpg": "image/jpeg",
"jpr": "application/x-jbuilder-project",
"jpx": "image/jp2",
"js": "application/javascript",
"json": "application/json",
"jsonp": "application/jsonp",
"k25": "image/x-kodak-k25",
"kar": "audio/midi",
"karbon": "application/x-karbon",
"kdc": "image/x-kodak-kdc",
"kdelnk": "application/x-desktop",
"kexi": "application/x-kexiproject-sqlite3",
"kexic": "application/x-kexi-connectiondata",
"kexis": "application/x-kexiproject-shortcut",
"kfo": "application/x-kformula",
"kil": "application/x-killustrator",
"kino": "application/smil",
"kml": "application/vndgoogle-earthkml+xml",
"kmz": "application/vndgoogle-earthkmz",
"kon": "application/x-kontour",
"kpm": "application/x-kpovmodeler",
"kpr": "application/x-kpresenter",
"kpt": "application/x-kpresenter",
"kra": "application/x-krita",
"ksp": "application/x-kspread",
"kud": "application/x-kugar",
"kwd": "application/x-kword",
"kwt": "application/x-kword",
"la": "application/x-shared-library-la",
"latex": "text/x-tex",
"ldif": "text/x-ldif",
"lha": "application/x-lha",
"lhs": "text/x-literate-haskell",
"lhz": "application/x-lhz",
"log": "text/x-log",
"ltx": "text/x-tex",
"lua": "text/x-lua",
"lwo": "image/x-lwo",
"lwob": "image/x-lwo",
"lws": "image/x-lws",
"ly": "text/x-lilypond",
"lyx": "application/x-lyx",
"lz": "application/x-lzip",
"lzh": "application/x-lha",
"lzma": "application/x-lzma",
"lzo": "application/x-lzop",
"m": "text/x-matlab",
"m15": "audio/x-mod",
"m2t": "video/mpeg",
"m3u": "audio/x-mpegurl",
"m3u8": "audio/x-mpegurl",
"m4": "application/x-m4",
"m4a": "audio/mp4",
"m4b": "audio/x-m4b",
"m4v": "video/mp4",
"mab": "application/x-markaby",
"man": "application/x-troff-man",
"mbox": "application/mbox",
"md": "application/x-genesis-rom",
"mdb": "application/vndms-access",
"mdi": "image/vndms-modi",
"me": "text/x-troff-me",
"med": "audio/x-mod",
"metalink": "application/metalink+xml",
"mgp": "application/x-magicpoint",
"mid": "audio/midi",
"midi": "audio/midi",
"mif": "application/x-mif",
"minipsf": "audio/x-minipsf",
"mka": "audio/x-matroska",
"mkv": "video/x-matroska",
"ml": "text/x-ocaml",
"mli": "text/x-ocaml",
"mm": "text/x-troff-mm",
"mmf": "application/x-smaf",
"mml": "text/mathml",
"mng": "video/x-mng",
"mo": "application/x-gettext-translation",
"mo3": "audio/x-mo3",
"moc": "text/x-moc",
"mod": "audio/x-mod",
"mof": "text/x-mof",
"moov": "video/quicktime",
"mov": "video/quicktime",
"movie": "video/x-sgi-movie",
"mp+": "audio/x-musepack",
"mp2": "video/mpeg",
"mp3": "audio/mpeg",
"mp4": "video/mp4",
"mpc": "audio/x-musepack",
"mpe": "video/mpeg",
"mpeg": "video/mpeg",
"mpg": "video/mpeg",
"mpga": "audio/mpeg",
"mpp": "audio/x-musepack",
"mrl": "text/x-mrml",
"mrml": "text/x-mrml",
"mrw": "image/x-minolta-mrw",
"ms": "text/x-troff-ms",
"msi": "application/x-msi",
"msod": "image/x-msod",
"msx": "application/x-msx-rom",
"mtm": "audio/x-mod",
"mup": "text/x-mup",
"mxf": "application/mxf",
"n64": "application/x-n64-rom",
"nb": "application/mathematica",
"nc": "application/x-netcdf",
"nds": "application/x-nintendo-ds-rom",
"nef": "image/x-nikon-nef",
"nes": "application/x-nes-rom",
"nfo": "text/x-nfo",
"not": "text/x-mup",
"nsc": "application/x-netshow-channel",
"nsv": "video/x-nsv",
"o": "application/x-object",
"obj": "application/x-tgif",
"ocl": "text/x-ocl",
"oda": "application/oda",
"odb": "application/vndoasisopendocumentdatabase",
"odc": "application/vndoasisopendocumentchart",
"odf": "application/vndoasisopendocumentformula",
"odg": "application/vndoasisopendocumentgraphics",
"odi": "application/vndoasisopendocumentimage",
"odm": "application/vndoasisopendocumenttext-master",
"odp": "application/vndoasisopendocumentpresentation",
"ods": "application/vndoasisopendocumentspreadsheet",
"odt": "application/vndoasisopendocumenttext",
"oga": "audio/ogg",
"ogg": "video/x-theora+ogg",
"ogm": "video/x-ogm+ogg",
"ogv": "video/ogg",
"ogx": "application/ogg",
"old": "application/x-trash",
"oleo": "application/x-oleo",
"opml": "text/x-opml+xml",
"ora": "image/openraster",
"orf": "image/x-olympus-orf",
"otc": "application/vndoasisopendocumentchart-template",
"otf": "application/x-font-otf",
"otg": "application/vndoasisopendocumentgraphics-template",
"oth": "application/vndoasisopendocumenttext-web",
"otp": "application/vndoasisopendocumentpresentation-template",
"ots": "application/vndoasisopendocumentspreadsheet-template",
"ott": "application/vndoasisopendocumenttext-template",
"owl": "application/rdf+xml",
"oxt": "application/vndopenofficeorgextension",
"p": "text/x-pascal",
"p10": "application/pkcs10",
"p12": "application/x-pkcs12",
"p7b": "application/x-pkcs7-certificates",
"p7s": "application/pkcs7-signature",
"pack": "application/x-java-pack200",
"pak": "application/x-pak",
"par2": "application/x-par2",
"pas": "text/x-pascal",
"patch": "text/x-patch",
"pbm": "image/x-portable-bitmap",
"pcd": "image/x-photo-cd",
"pcf": "application/x-cisco-vpn-settings",
"pcfgz": "application/x-font-pcf",
"pcfz": "application/x-font-pcf",
"pcl": "application/vndhp-pcl",
"pcx": "image/x-pcx",
"pdb": "chemical/x-pdb",
"pdc": "application/x-aportisdoc",
"pdf": "application/pdf",
"pdfbz2": "application/x-bzpdf",
"pdfgz": "application/x-gzpdf",
"pef": "image/x-pentax-pef",
"pem": "application/x-x509-ca-cert",
"perl": "application/x-perl",
"pfa": "application/x-font-type1",
"pfb": "application/x-font-type1",
"pfx": "application/x-pkcs12",
"pgm": "image/x-portable-graymap",
"pgn": "application/x-chess-pgn",
"pgp": "application/pgp-encrypted",
"php": "application/x-php",
"php3": "application/x-php",
"php4": "application/x-php",
"pict": "image/x-pict",
"pict1": "image/x-pict",
"pict2": "image/x-pict",
"pickle": "application/python-pickle",
"pk": "application/x-tex-pk",
"pkipath": "application/pkix-pkipath",
"pkr": "application/pgp-keys",
"pl": "application/x-perl",
"pla": "audio/x-iriver-pla",
"pln": "application/x-planperfect",
"pls": "audio/x-scpls",
"pm": "application/x-perl",
"png": "image/png",
"pnm": "image/x-portable-anymap",
"pntg": "image/x-macpaint",
"po": "text/x-gettext-translation",
"por": "application/x-spss-por",
"pot": "text/x-gettext-translation-template",
"ppm": "image/x-portable-pixmap",
"pps": "application/vndms-powerpoint",
"ppt": "application/vndms-powerpoint",
"pptm": "application/vndopenxmlformats-officedocumentpresentationmlpresentation",
"pptx": "application/vndopenxmlformats-officedocumentpresentationmlpresentation",
"ppz": "application/vndms-powerpoint",
"prc": "application/x-palm-database",
"ps": "application/postscript",
"psbz2": "application/x-bzpostscript",
"psgz": "application/x-gzpostscript",
"psd": "image/vndadobephotoshop",
"psf": "audio/x-psf",
"psfgz": "application/x-gz-font-linux-psf",
"psflib": "audio/x-psflib",
"psid": "audio/prssid",
"psw": "application/x-pocket-word",
"pw": "application/x-pw",
"py": "text/x-python",
"pyc": "application/x-python-bytecode",
"pyo": "application/x-python-bytecode",
"qif": "image/x-quicktime",
"qt": "video/quicktime",
"qtif": "image/x-quicktime",
"qtl": "application/x-quicktime-media-link",
"qtvr": "video/quicktime",
"ra": "audio/vndrn-realaudio",
"raf": "image/x-fuji-raf",
"ram": "application/ram",
"rar": "application/x-rar",
"ras": "image/x-cmu-raster",
"raw": "image/x-panasonic-raw",
"rax": "audio/vndrn-realaudio",
"rb": "application/x-ruby",
"rdf": "application/rdf+xml",
"rdfs": "application/rdf+xml",
"reg": "text/x-ms-regedit",
"rej": "application/x-reject",
"rgb": "image/x-rgb",
"rle": "image/rle",
"rm": "application/vndrn-realmedia",
"rmj": "application/vndrn-realmedia",
"rmm": "application/vndrn-realmedia",
"rms": "application/vndrn-realmedia",
"rmvb": "application/vndrn-realmedia",
"rmx": "application/vndrn-realmedia",
"roff": "text/troff",
"rp": "image/vndrn-realpix",
"rpm": "application/x-rpm",
"rss": "application/rss+xml",
"rt": "text/vndrn-realtext",
"rtf": "application/rtf",
"rtx": "text/richtext",
"rv": "video/vndrn-realvideo",
"rvx": "video/vndrn-realvideo",
"s3m": "audio/x-s3m",
"sam": "application/x-amipro",
"sami": "application/x-sami",
"sav": "application/x-spss-sav",
"scm": "text/x-scheme",
"sda": "application/vndstardivisiondraw",
"sdc": "application/vndstardivisioncalc",
"sdd": "application/vndstardivisionimpress",
"sdp": "application/sdp",
"sds": "application/vndstardivisionchart",
"sdw": "application/vndstardivisionwriter",
"sgf": "application/x-go-sgf",
"sgi": "image/x-sgi",
"sgl": "application/vndstardivisionwriter",
"sgm": "text/sgml",
"sgml": "text/sgml",
"sh": "application/x-shellscript",
"shar": "application/x-shar",
"shn": "application/x-shorten",
"siag": "application/x-siag",
"sid": "audio/prssid",
"sik": "application/x-trash",
"sis": "application/vndsymbianinstall",
"sisx": "x-epoc/x-sisx-app",
"sit": "application/x-stuffit",
"siv": "application/sieve",
"sk": "image/x-skencil",
"sk1": "image/x-skencil",
"skr": "application/pgp-keys",
"slk": "text/spreadsheet",
"smaf": "application/x-smaf",
"smc": "application/x-snes-rom",
"smd": "application/vndstardivisionmail",
"smf": "application/vndstardivisionmath",
"smi": "application/x-sami",
"smil": "application/smil",
"sml": "application/smil",
"sms": "application/x-sms-rom",
"snd": "audio/basic",
"so": "application/x-sharedlib",
"spc": "application/x-pkcs7-certificates",
"spd": "application/x-font-speedo",
"spec": "text/x-rpm-spec",
"spl": "application/x-shockwave-flash",
"spx": "audio/x-speex",
"sql": "text/x-sql",
"sr2": "image/x-sony-sr2",
"src": "application/x-wais-source",
"srf": "image/x-sony-srf",
"srt": "application/x-subrip",
"ssa": "text/x-ssa",
"stc": "application/vndsunxmlcalctemplate",
"std": "application/vndsunxmldrawtemplate",
"sti": "application/vndsunxmlimpresstemplate",
"stm": "audio/x-stm",
"stw": "application/vndsunxmlwritertemplate",
"sty": "text/x-tex",
"sub": "text/x-subviewer",
"sun": "image/x-sun-raster",
"sv4cpio": "application/x-sv4cpio",
"sv4crc": "application/x-sv4crc",
"svg": "image/svg+xml",
"svgz": "image/svg+xml-compressed",
"swf": "application/x-shockwave-flash",
"sxc": "application/vndsunxmlcalc",
"sxd": "application/vndsunxmldraw",
"sxg": "application/vndsunxmlwriterglobal",
"sxi": "application/vndsunxmlimpress",
"sxm": "application/vndsunxmlmath",
"sxw": "application/vndsunxmlwriter",
"sylk": "text/spreadsheet",
"t": "text/troff",
"t2t": "text/x-txt2tags",
"tar": "application/x-tar",
"tarbz": "application/x-bzip-compressed-tar",
"tarbz2": "application/x-bzip-compressed-tar",
"targz": "application/x-compressed-tar",
"tarlzma": "application/x-lzma-compressed-tar",
"tarlzo": "application/x-tzo",
"tarxz": "application/x-xz-compressed-tar",
"tarz": "application/x-tarz",
"tbz": "application/x-bzip-compressed-tar",
"tbz2": "application/x-bzip-compressed-tar",
"tcl": "text/x-tcl",
"tex": "text/x-tex",
"texi": "text/x-texinfo",
"texinfo": "text/x-texinfo",
"tga": "image/x-tga",
"tgz": "application/x-compressed-tar",
"theme": "application/x-theme",
"themepack": "application/x-windows-themepack",
"tif": "image/tiff",
"tiff": "image/tiff",
"tk": "text/x-tcl",
"tlz": "application/x-lzma-compressed-tar",
"tnef": "application/vndms-tnef",
"tnf": "application/vndms-tnef",
"toc": "application/x-cdrdao-toc",
"torrent": "application/x-bittorrent",
"tpic": "image/x-tga",
"tr": "text/troff",
"ts": "application/x-linguist",
"tsv": "text/tab-separated-values",
"tta": "audio/x-tta",
"ttc": "application/x-font-ttf",
"ttf": "application/x-font-ttf",
"ttx": "application/x-font-ttx",
"txt": "text/plain",
"txz": "application/x-xz-compressed-tar",
"tzo": "application/x-tzo",
"ufraw": "application/x-ufraw",
"ui": "application/x-designer",
"uil": "text/x-uil",
"ult": "audio/x-mod",
"uni": "audio/x-mod",
"uri": "text/x-uri",
"url": "text/x-uri",
"ustar": "application/x-ustar",
"vala": "text/x-vala",
"vapi": "text/x-vala",
"vcf": "text/directory",
"vcs": "text/calendar",
"vct": "text/directory",
"vda": "image/x-tga",
"vhd": "text/x-vhdl",
"vhdl": "text/x-vhdl",
"viv": "video/vivo",
"vivo": "video/vivo",
"vlc": "audio/x-mpegurl",
"vob": "video/mpeg",
"voc": "audio/x-voc",
"vor": "application/vndstardivisionwriter",
"vst": "image/x-tga",
"wav": "audio/x-wav",
"wax": "audio/x-ms-asx",
"wb1": "application/x-quattropro",
"wb2": "application/x-quattropro",
"wb3": "application/x-quattropro",
"wbmp": "image/vndwapwbmp",
"wcm": "application/vndms-works",
"wdb": "application/vndms-works",
"webm": "video/webm",
"wk1": "application/vndlotus-1-2-3",
"wk3": "application/vndlotus-1-2-3",
"wk4": "application/vndlotus-1-2-3",
"wks": "application/vndms-works",
"wma": "audio/x-ms-wma",
"wmf": "image/x-wmf",
"wml": "text/vndwapwml",
"wmls": "text/vndwapwmlscript",
"wmv": "video/x-ms-wmv",
"wmx": "audio/x-ms-asx",
"wp": "application/vndwordperfect",
"wp4": "application/vndwordperfect",
"wp5": "application/vndwordperfect",
"wp6": "application/vndwordperfect",
"wpd": "application/vndwordperfect",
"wpg": "application/x-wpg",
"wpl": "application/vndms-wpl",
"wpp": "application/vndwordperfect",
"wps": "application/vndms-works",
"wri": "application/x-mswrite",
"wrl": "model/vrml",
"wv": "audio/x-wavpack",
"wvc": "audio/x-wavpack-correction",
"wvp": "audio/x-wavpack",
"wvx": "audio/x-ms-asx",
"x3f": "image/x-sigma-x3f",
"xac": "application/x-gnucash",
"xbel": "application/x-xbel",
"xbl": "application/xml",
"xbm": "image/x-xbitmap",
"xcf": "image/x-xcf",
"xcfbz2": "image/x-compressed-xcf",
"xcfgz": "image/x-compressed-xcf",
"xhtml": "application/xhtml+xml",
"xi": "audio/x-xi",
"xla": "application/vndms-excel",
"xlc": "application/vndms-excel",
"xld": "application/vndms-excel",
"xlf": "application/x-xliff",
"xliff": "application/x-xliff",
"xll": "application/vndms-excel",
"xlm": "application/vndms-excel",
"xls": "application/vndms-excel",
"xlsm": "application/vndopenxmlformats-officedocumentspreadsheetmlsheet",
"xlsx": "application/vndopenxmlformats-officedocumentspreadsheetmlsheet",
"xlt": "application/vndms-excel",
"xlw": "application/vndms-excel",
"xm": "audio/x-xm",
"xmf": "audio/x-xmf",
"xmi": "text/x-xmi",
"xml": "application/xml",
"xpm": "image/x-xpixmap",
"xps": "application/vndms-xpsdocument",
"xsl": "application/xml",
"xslfo": "text/x-xslfo",
"xslt": "application/xml",
"xspf": "application/xspf+xml",
"xul": "application/vndmozillaxul+xml",
"xwd": "image/x-xwindowdump",
"xyz": "chemical/x-pdb",
"xz": "application/x-xz",
"w2p": "application/w2p",
"z": "application/x-compress",
"zabw": "application/x-abiword",
"zip": "application/zip"
};
// EXTERNAL MODULE: ./node_modules/md5/md5.js
var md5 = __webpack_require__("aCH8");
var md5_default = /*#__PURE__*/__webpack_require__.n(md5);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__("m3rI");
// CONCATENATED MODULE: ./src/components/mediator.js
function Mediator(obj) {
var channels = {};
var mediator = {
channels: channels,
subscribe: function subscribe(channel, cb) {
if (!channels[channel]) {
channels[channel] = [];
}
channels[channel].push(cb);
return this.unsubscribe.bind(null, channel, cb);
},
unsubscribe: function unsubscribe(channel, cb) {
var rs = channels[channel];
var index = -1;
if (rs) {
for (var i = 0; i < rs.length; i++) {
if (rs[i].name === cb.name) {
index = i;
break;
}
}
if (index >= 0) {
channels[channel].splice(index, 1);
return true;
}
}
return false;
},
publish: function publish(channel) {
if (!channels[channel]) {
return false;
}
var args = Array.prototype.slice.call(arguments, 1);
channels[channel].forEach(function (subscription) {
subscription.apply(null, args);
});
return this;
}
};
return obj ? Object.assign(obj, mediator) : mediator;
}
var mediator = new Mediator();
/* harmony default export */ var components_mediator = (mediator);
// CONCATENATED MODULE: ./src/utils/util.tsx
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
;
var ZimuSort = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
var RomanNumber = ["I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", "XIII", "XIV", "XV", "XVI", "XVII", "XVIII", "XIX", "XX"];
/**
*@所有实训tags集合生成
*status为数组 status=["提交中","补交中"]
*/
var util_StatusTags = function StatusTags(props) {
var tags = {
已截止: {
class: 'tag-style bg-pink ml10'
},
提交中: {
class: 'tag-style bg-blue ml10'
},
进行中: {
class: 'tag-style bg-blue ml10'
},
未发布: {
class: 'tag-style bgB8B8B8 ml10'
},
补交中: {
class: 'tag-style bg-blue ml10'
}
};
return props.data && props.data.map(function (v, k) {
return /*#__PURE__*/react_default.a.createElement("span", {
key: k,
className: tags[v] && tags[v]['class']
}, v);
});
};
/**
*@教学课堂-作业列表状态名字
*status为 number
*/
var util_formatHomeWorkStatusToName = function formatHomeWorkStatusToName(status) {
var mapping = Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, -1, "重做中"), 0, "未开启"), 1, "未通关"), 2, "按时通关");
return mapping[status] || "迟交通关";
};
/**
*@教学课堂-作业列表状态
*status为 number
*/
var util_HomeWorkListStatus = function HomeWorkListStatus(props) {
var _wStatus$props$status, _wStatus$props$status2;
var wStatus = Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, -1, {
name: '重做中',
class: 'c-orange'
}), 0, {
name: '未开启',
class: 'c-black'
}), 1, {
name: '未通关',
class: 'c-red'
}), 2, {
name: '按时通关',
class: 'c-green'
}), 3, {
name: '迟交通关',
class: 'c-orange'
});
return /*#__PURE__*/react_default.a.createElement("span", {
className: wStatus === null || wStatus === void 0 ? void 0 : (_wStatus$props$status = wStatus[props.status]) === null || _wStatus$props$status === void 0 ? void 0 : _wStatus$props$status['class']
}, wStatus === null || wStatus === void 0 ? void 0 : (_wStatus$props$status2 = wStatus[props.status]) === null || _wStatus$props$status2 === void 0 ? void 0 : _wStatus$props$status2['name']);
};
/**
*@教学课堂-作业心情状态
*status为 number
*/
var util_HomeWorkDetailStatus = function HomeWorkDetailStatus(props) {
var _wStatus$props$status3, _wStatus$props$status4;
var wStatus = Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, -1, {
name: '重做中',
class: 'c-orange',
color: '#999999'
}), 0, {
name: '未开启',
class: 'c-black',
color: '#999999'
}), 1, {
name: '未通关',
class: 'c-red',
color: '#d4443d'
}), 2, {
name: '按时通关',
class: 'c-green',
color: '#57be40'
}), 3, {
name: '迟交通关',
class: 'c-orange',
color: '#f09143'
});
return /*#__PURE__*/react_default.a.createElement("span", {
style: {
marginLeft: '10px',
color: '#fff',
background: wStatus === null || wStatus === void 0 ? void 0 : (_wStatus$props$status3 = wStatus[props.status]) === null || _wStatus$props$status3 === void 0 ? void 0 : _wStatus$props$status3['color'],
borderRadius: '20px',
width: "65px",
height: '18px',
justifyContent: 'center',
display: 'inline-flex',
lineHeight: '18px'
}
}, wStatus === null || wStatus === void 0 ? void 0 : (_wStatus$props$status4 = wStatus[props.status]) === null || _wStatus$props$status4 === void 0 ? void 0 : _wStatus$props$status4['name']);
};
/**
*@教学课堂-毕设选题tags集合生成
*status为数组 status=["提交中","补交中"]
*/
var util_StatusGraduationProjectTags = function StatusGraduationProjectTags(props) {
var status = props.status;
var tags = {
0: {
class: 'tag-style bg-blue ml10',
name: '待选中'
},
1: {
class: 'tag-style bg-blue ml10',
name: '待确认'
},
2: {
class: 'tag-style bg-pink ml10',
name: '已确认'
}
};
try {
return /*#__PURE__*/react_default.a.createElement("span", {
className: tags[status]['class']
}, tags[status]['name']);
} catch (e) {
console.log('utils.StatusGraduationProjectTags', props.status);
}
};
var ExerciseStatus = {
1: "未发布",
2: "考试中",
3: "已截止",
4: "已结束",
99: "模拟考试中"
};
var PollsStatus = {
1: "未发布",
2: "提交中",
3: "已截止",
4: "已结束"
};
/**
*@教学课堂tags集合生成
*status为数组 status=["提交中","补交中"]
*任务状态数组: 未发布、提交中、评阅中、补交中、未开启补交等
*/
var util_StatusClassroomsTags = function StatusClassroomsTags(props) {
var tags = {
模拟考试中: {
class: 'tag-style bg-light-pink ml10'
},
已开启防作弊: {
class: 'tag-style-fzb ml10 iconfont icon-fangzuobi'
},
公开: {
class: 'tag-style bg-blue ml10'
},
已开启补交: {
class: 'tag-style bg-green ml10'
},
未开启补交: {
class: 'tag-style bg-pink ml10soft'
},
未发布: {
class: 'tag-style bgB8B8B8 ml10soft'
},
未开始: {
class: 'tag-style bg-c5d6ff ml10soft'
},
匿名作品: {
class: 'tag-style bg-cyan ml10'
},
已选择: {
class: 'tag-style bg-grey-ede ml10'
},
已结束: {
class: 'tag-style bg-grey-ede ml10soft'
},
提交中: {
class: 'tag-style bg-blue ml10soft'
},
进行中: {
class: 'tag-style bg-blue ml10soft'
},
匿评中: {
class: 'tag-style bg-blue ml10'
},
申诉中: {
class: 'tag-style bg-blue ml10'
},
考试中: {
class: 'tag-style bg-light-blue ml10'
},
补交中: {
class: 'tag-style bg-blue ml10soft'
},
评阅中: {
class: 'tag-style bg-blue ml10'
},
待选中: {
class: 'tag-style bg-blue ml10'
},
交叉评阅中: {
class: 'tag-style bg-light-orange ml10'
},
已开启交叉评阅: {
class: 'tag-style bg-lightblue-purple ml10'
},
待确认: {
class: 'tag-style bg-lightblue-purple ml10'
},
待处理: {
class: 'tag-style bg-lightblue-purple ml10'
},
私有: {
class: 'tag-style bg-lightblue-purple ml10'
},
未提交: {
class: 'tag-style bg-lightblue-purple ml10'
},
已确认: {
class: 'tag-style bg-light-pink ml10'
},
已发布: {
class: 'tag-style bg-light-blue ml10'
},
已截止: {
class: 'tag-style bg-light-pink ml10soft'
},
开发课程: {
class: 'tag-style bg-orange ml10'
},
已开播: {
class: 'tag-style-border border-green c-green ml10'
},
未开播: {
class: 'tag-style-border border-light-black ml10'
},
// 样式需要调整 作业列表
按时通关: {
class: 'tag-style-border border-light-black ml10'
},
迟交通关: {
class: 'tag-style-border border-light-black ml10'
},
未通关: {
class: 'tag-style-border border-light-black ml10'
},
未开启: {
class: 'tag-style-border border-light-black ml10'
}
};
var temporaryTags = {
未发布: {
class: 'tag-style bg-C6CED6 ml10soft'
},
未开始: {
class: 'tag-style bg-C1E2FF ml10soft'
},
进行中: {
class: 'tag-style bg-1890FF ml10soft'
},
已截止: {
class: 'tag-style bg-E53333 ml10soft'
},
提交中: {
class: 'tag-style bg-1890FF ml10soft'
},
补交中: {
class: 'tag-style bg-44D7B6 ml10soft'
}
};
if (props.temporary) {
tags = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, tags), temporaryTags);
}
var arr = [];
if (props.is_random) {
arr.push( /*#__PURE__*/react_default.a.createElement("span", {
className: "tag-style bg-blue ml10"
}, "\u968F\u673A"));
}
try {
props.status && props.status.map(function (v, k) {
arr.push( /*#__PURE__*/react_default.a.createElement("span", {
style: (props === null || props === void 0 ? void 0 : props.style) || [],
key: k,
className: tags[v] && tags[v]['class']
}, v));
});
} catch (e) {
console.log('utils.status.tag:', e, props.status);
}
return arr;
};
var util_exerciseTips = function exerciseTips(v) {
if (v === 1) {
return /*#__PURE__*/react_default.a.createElement("span", {
style: {
backgroundColor: '#B8B8B8'
},
className: "tag-style ml5"
}, "\u672A\u5F00\u59CB");
}
if (v === 2) {
return /*#__PURE__*/react_default.a.createElement("span", {
style: {
backgroundColor: '#007AFF'
},
className: "tag-style ml5"
}, "\u8003\u8BD5\u4E2D");
}
if (v === 3) {
return /*#__PURE__*/react_default.a.createElement("span", {
style: {
backgroundColor: '#FC2D6B'
},
className: "tag-style ml5"
}, "\u5DF2\u7ED3\u675F");
}
};
/**
*@教学课堂 实训作业状态
*status值为number status=0
*任务状态数组: 未发布、提交中、评阅中、补交中、未开启补交等
*/
// "work_status": 2, //-1:重做中、 0:未提交、1:未通关2:按时通关3:迟交通关
var util_WorkStatus = function WorkStatus(props) {
var _wStatus$props$status5, _wStatus$props$status6;
var wStatus = Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])(Object(defineProperty["a" /* default */])({}, -1, {
name: '重做中',
class: 'c-orange'
}), 0, {
name: '未提交',
class: 'c-black'
}), 1, {
name: '未通关',
class: 'c-red'
}), 2, {
name: '按时通关',
class: 'c-green'
}), 3, {
name: '迟交通关',
class: 'c-orange'
});
return /*#__PURE__*/react_default.a.createElement("span", {
className: (_wStatus$props$status5 = wStatus[props.status]) === null || _wStatus$props$status5 === void 0 ? void 0 : _wStatus$props$status5['class']
}, (_wStatus$props$status6 = wStatus[props.status]) === null || _wStatus$props$status6 === void 0 ? void 0 : _wStatus$props$status6['name']);
};
/**
*@教学课堂 普通/分组作业状态
*status值为number status=0
*任务状态数组: 未发布、提交中、评阅中、补交中、未开启补交等
*/
// "work_status": 2, //-1:重做中、 0:未提交、1:未通关2:按时通关3:迟交通关
var util_CommonWorkStatus = function CommonWorkStatus(props) {
var _wStatus$props$status7, _wStatus$props$status8;
var wStatus = {
0: {
name: '未提交',
class: 'c-black'
},
1: {
name: '按时提交',
class: 'c-green'
},
2: {
name: '延时提交',
class: 'c-red'
}
};
return /*#__PURE__*/react_default.a.createElement("span", {
className: (_wStatus$props$status7 = wStatus[props.status]) === null || _wStatus$props$status7 === void 0 ? void 0 : _wStatus$props$status7['class']
}, (_wStatus$props$status8 = wStatus[props.status]) === null || _wStatus$props$status8 === void 0 ? void 0 : _wStatus$props$status8['name']);
};
var timego = function timego(dateTimeStamp) {
dateTimeStamp = new Date(dateTimeStamp).getTime();
var minute = 1000 * 60;
var hour = minute * 60;
var day = hour * 24;
var result = '';
var now = new Date().getTime();
var diffValue = now - dateTimeStamp;
// console.log("diffValue:",now,dateTimeStamp,diffValue)
if (diffValue < 0) {
console.log('时间不对劲,服务器创建时间与当前时间不同步');
return result = '刚刚';
}
var dayC = parseInt(diffValue / day, 10);
var hourC = parseInt(diffValue / hour, 10);
var minC = parseInt(diffValue / minute, 10);
if (dayC > 30) {
result = '' + timeformat(dateTimeStamp, 'yyyy-MM-dd');
} else if (dayC > 1) {
result = '' + dayC + '天前';
} else if (dayC == 1) {
result = '昨天';
} else if (hourC >= 1) {
result = '' + hourC + '小时前';
} else if (minC >= 5) {
result = '' + minC + '分钟前';
} else result = '刚刚';
return result;
};
/**
* 格式化时间
* @param date Date 时间
* @param format 格式化 "yyyy-MM-dd HH:mm:ss www"=format
* @returns {string} 格式化后字符串
*/
var timeformat = function timeformat(date, format) {
if (typeof date == 'string') {
if (date.indexOf('T') >= 0) {
date = date.replace('T', ' ');
}
date = new Date(Date.parse(date.replace(/-/g, '/')));
}
date = new Date(date);
var o = {
'M+': date.getMonth() + 1,
'd+': date.getDate(),
'h+': date.getHours(),
'm+': date.getMinutes(),
's+': date.getSeconds(),
'q+': Math.floor((date.getMonth() + 3) / 3),
S: date.getMilliseconds()
};
var w = [['日', '一', '二', '三', '四', '五', '六'], ['周日', '周一', '周二', '周三', '周四', '周五', '周六'], ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']];
if (/(y+)/.test(format)) {
format = format.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length));
}
if (/(w+)/.test(format)) {
format = format.replace(RegExp.$1, w[RegExp.$1.length - 1][date.getDay()]);
}
for (var k in o) {
if (new RegExp('(' + k + ')').test(format)) {
format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ('00' + o[k]).substr(('' + o[k]).length));
}
}
return format;
};
/**
* @时间转换
* @传值为时间 单位s
* @返回值 1分40秒
* @列子 toTimeFormat(100) 返回 1分40秒
*/
var toTimeFormat = function toTimeFormat(time) {
if (!time || time < 0) return '0秒';
console.log("time:", time);
var minute = 60;
var hour = minute * 60;
var day = hour * 24;
var dayC = time / day;
var hourC = time / hour;
var minC = time / minute;
var senC = time % 60;
if (dayC >= 1) {
return parseInt(dayC.toString()) + '天' + Math.floor(hourC % 24) + '时' + Math.floor(minC % 60) + "分" + Math.floor(time % 60) + '秒';
} else if (hourC > 1) {
return parseInt(hourC.toString()) + '时' + Math.floor(minC % 60) + "分" + Math.floor(time % 60) + '秒';
} else if (minC >= 1) {
return parseInt(minC.toString()) + "分" + Math.floor(time % 60) + '秒';
} else {
return Math.ceil(time) + '秒';
}
};
/**
* @校验字符串长度
*/
var validateLength = function validateLength() {
var str = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
var len = 0;
if (str) {
len = str.length;
for (var i = 0; i < len; i++) {
var charCode = str.charCodeAt(i);
if (charCode >= 0xD800 && charCode <= 0xDBFF) {
len--;
i++;
}
}
}
return len <= length;
};
var handleValidatorNickName = function handleValidatorNickName(rule, value, callback) {
if (value) {
var iconRule1 = /[`~!@#$%^&*()\-+=<>?:"{}|,.\/;'\\[\]·~@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im;
// 判断是否含有emoji表情
var iconRule2 = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig;
// 如果为true字符串含有emoji表情 false不含
var iconRule2s = iconRule2.test(value);
// 如果为true字符串含有特殊符号 false不
var iconRule1s = iconRule1.test(value);
if (iconRule2s === true || iconRule1s === true) {
callback('2-20位中英文、数字及下划线');
} else if (value.length < 2) {
callback('2-20位中英文、数字及下划线');
} else if (value.length >= 21) {
callback('2-20位中英文、数字及下划线');
}
}
callback();
};
var handleValidatorName = function handleValidatorName(rule, value, callback) {
if (value) {
var iconRule1 = /[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]·~@#¥%……&()——\-+={}|《》?:“”【】、;‘’,。、]/im;
// 判断是否含有emoji表情
var iconRule2 = /[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF][\u200D|\uFE0F]|[\uD83C|\uD83D|\uD83E][\uDC00-\uDFFF]|[0-9|*|#]\uFE0F\u20E3|[0-9|#]\u20E3|[\u203C-\u3299]\uFE0F\u200D|[\u203C-\u3299]\uFE0F|[\u2122-\u2B55]|\u303D|[\A9|\AE]\u3030|\uA9|\uAE|\u3030/ig;
// 如果为true字符串含有emoji表情 false不含
var iconRule2s = iconRule2.test(value);
// 如果为true字符串含有特殊符号 false不
var iconRule1s = iconRule1.test(value);
if (iconRule2s === true || iconRule1s === true) {
callback('2-10位中英文、数字');
} else if (value.length < 2) {
callback('2-10位中英文、数字');
} else if (value.length >= 11) {
callback('2-10位中英文、数字');
}
}
callback();
};
var getHiddenName = function getHiddenName(name) {
if (!name) return '';
var len = name.length - 1;
var str = "";
for (var i = 0; i < len; i++) {
str += "*";
}
var newName = name.substr(0, 1) + str;
return newName;
};
var getBase64 = function getBase64(img, callback) {
var reader = new FileReader();
reader.addEventListener('load', function () {
return callback(reader.result);
});
reader.readAsDataURL(img);
};
function setmiyah(logins) {
var opens = "79e33abd4b6588941ab7622aed1e67e8";
return md5_default()(opens + logins);
}
var getCookie = function getCookie(key) {
var arr,
reg = RegExp('(^| )' + key + '=([^;]+)(;|$)');
if (arr = document.cookie.match(reg))
//["username=liuwei;", "", "liuwei", ";"]
return decodeURIComponent(arr[2]);else return null;
};
// 设置cookie
function setCookie(cname, cvalue, exdays) {
// exdays = exdays || 30;
var d = new Date();
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
var expires = "expires=" + d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires + ";path=/;";
}
var delCookie = function delCookie(name) {
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;";
};
function downLoadLink(title, url) {
var link = document.createElement('a');
document.body.appendChild(link);
link.href = url;
if (title) {
link.title = title;
link.download = title;
}
//兼容火狐浏览器
var evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
}
/**
* 获取 blob
* @param {String} url 目标文件地址
* @return {Promise}
*/
function getBlob(url) {
return new Promise(function (resolve) {
var xhr = new window.XMLHttpRequest();
xhr.open('GET', url, true);
xhr.withCredentials = true;
xhr.responseType = 'blob';
xhr.onload = function () {
if (xhr.status === 200) {
resolve(xhr.response);
}
};
xhr.send();
});
}
/**
* 保存
* @param {Blob} blob
* @param {String} filename 想要保存的文件名称
*/
function saveAs(blob, filename) {
if (window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveBlob(blob, filename);
} else {
var link = document.createElement('a');
var body = document.querySelector('body');
link.href = window.URL.createObjectURL(blob);
link.download = filename;
// fix Firefox
link.style.display = 'none';
body.appendChild(link);
link.click();
body.removeChild(link);
window.URL.revokeObjectURL(link.href);
}
}
/**
* 下载
* @param {String} url 目标文件地址
* @param {String} filename 想要保存的文件名称
*/
function download(url, filename) {
// if(url?.indexOf("aliyuncs.com") > -1){
// downLoadLink(filename,url)
// }else{
getBlob(url).then(function (blob) {
saveAs(blob, filename);
});
// }
}
function downLoadFileIframe(title, url) {
return new Promise(function (resolve, reject) {
var downloadFileUrl = url;
var elemIF = document.createElement("iframe");
var time;
document.body.appendChild(elemIF);
elemIF.src = downloadFileUrl;
elemIF.style.display = "none";
elemIF.addEventListener("load", function () {
setTimeout(function () {
document.body.removeChild(elemIF);
}, 1000);
}, true);
time = setInterval(function () {
if (getCookie("fileDownload")) {
delCookie("fileDownload");
clearInterval(time);
resolve();
}
}, 1000);
});
}
function downLoadFile(title, url) {
downLoadLink(title, url);
}
/**
*@url参数拼接
*options为对象 {search=1,page:2} to search=1&page=2
*/
var setUrlQuery = function setUrlQuery(options) {
var url = options.url,
query = options.query;
if (!url) return '';
if (query) {
var queryArr = [];
var _loop = function _loop(_key) {
if (query.hasOwnProperty(_key) && !isUnOrNull(query[_key])) {
if (typeof query[_key] === "object") {
query[_key].map(function (v) {
queryArr.push("".concat(_key, "[]=").concat(v));
});
} else {
queryArr.push("".concat(_key, "=").concat(query[_key]));
}
}
};
for (var _key in query) {
_loop(_key);
}
if (url.indexOf('?') !== -1) {
url = "".concat(url, "&").concat(queryArr.join('&'));
} else {
url = "".concat(url, "?").concat(queryArr.join('&'));
}
console.log('url1111', url);
}
return url;
};
function isPc() {
var userAgentInfo = navigator.userAgent;
var Agents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
var flag = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
function isChrome() {
var userAgentInfo = navigator.userAgent;
var Agents = ['Chrome'];
return Agents.some(function (item) {
return userAgentInfo.indexOf(item) > -1 ? true : false;
});
}
function isChromeOrFirefox() {
var userAgentInfo = navigator.userAgent;
var Agents = ['Chrome', 'Firefox'];
return Agents.some(function (item) {
return userAgentInfo.indexOf(item) > -1 ? true : false;
});
}
var formatMoney = function formatMoney() {
var _value$toString;
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
return value === null || value === void 0 ? void 0 : (_value$toString = value.toString()) === null || _value$toString === void 0 ? void 0 : _value$toString.replace(/\B(?=(\d{3})+(?!\d))/g, ',');
};
var openNewWindow = function openNewWindow(url) {
var link = document.createElement('a');
link.target = "_blank";
document.body.appendChild(link);
link.href = url;
var evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
};
var formatTextMiddleIntercept = function formatTextMiddleIntercept() {
var text = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
if (text.length <= 6) {
return text;
}
return "".concat(text.substring(0, 3), "...").concat(text.substring(text.length - 3, text.length));
};
var HalfPastOne = function HalfPastOne() {
var hours = new Date().getHours();
var minute = new Date().getMinutes();
if (minute >= 30) {
hours++;
minute = "00";
} else {
minute = "30";
}
return hours + ':' + minute;
};
var DayHalfPastOne = function DayHalfPastOne() {
var reg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '-';
var hours = new Date().getHours();
var minute = new Date().getMinutes();
if (minute >= 30) {
hours++;
minute = "00";
} else {
minute = "30";
}
return new Date().toLocaleDateString().replace(/\//g, reg) + ' ' + hours + ':' + minute;
};
var Type = /*#__PURE__*/function (Type) {
Type["Number"] = "Number";
Type["String"] = "String";
Type["Boolean"] = "Boolean";
Type["Object"] = "Object";
Type["Array"] = "Array";
Type["Function"] = "Function";
return Type;
}(Type || {});
var util_type = function type(obj) {
var type = Object.prototype.toString.call(obj);
return type.substring(8, type.length - 1);
};
var isEmpty = function isEmpty(obj) {
if (util_type(obj) === Type.Array) {
return obj.length === 0;
}
if (util_type(obj) === Type.Object) {
return Object.keys(obj).length === 0;
}
return !obj;
};
var rangeNumber = function rangeNumber(start, end) {
var result = [];
for (var i = start; i < end; i++) {
result.push(i);
}
return result;
};
var middleEllipsis = function middleEllipsis(text) {
var len = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12;
var firstStart = len / 2 - 2;
var endStart = len / 2 + 3;
if (text.length > len) {
return text.substr(0, firstStart) + '...' + text.substr(endStart, len);
} else {
return text;
}
};
var formatRate = function formatRate(rate) {
if (rate > 4.5) {
return 5;
} else if (rate > 4 && rate <= 4.5) {
return 4.5;
} else if (rate > 3.5 && rate <= 4) {
return 4;
} else if (rate > 3 && rate <= 3.5) {
return 3.5;
} else if (rate > 2.5 && rate <= 3) {
return 3;
} else if (rate > 2 && rate <= 2.5) {
return 2.5;
} else if (rate > 1.5 && rate <= 2) {
return 2;
} else if (rate > 1 && rate <= 1.5) {
return 1.5;
} else if (rate > 0.5 && rate <= 1) {
return 1;
} else if (rate > 0 && rate <= 0.5) {
return 0.5;
} else {
return 0;
}
};
var isUnOrNull = function isUnOrNull(val) {
return val === undefined || val === null;
};
//获取?号后面的数据
function getUrlToken(name, str) {
var reg = new RegExp("(^|&)".concat(name, "=([^&]*)(&|$)"), "i");
var r = str.substr(1).match(reg);
if (r != null) return decodeURIComponent(r[2]);
return null;
}
var util_getMessagesUrl = function getMessagesUrl(item) {
switch (item.container_type) {
case "ApplyUserAuthentication":
if (item.tiding_type === "Apply") {
if (item.auth_type === 1) {
//系统管理页面
return window.open("/admins/identity_authentications");
}
if (item.auth_type === 2) {
//系统管理页面
return window.open("/admins/professional_authentications");
}
}
if (item.tiding_type === "System") {
// 账号管理页-认证信息
return window.open("/account/certification");
}
return;
case "CancelUserAuthentication":
// 账号管理页-认证信息
return window.open("/account/certification");
case "CancelUserProCertification":
// 账号管理页-认证信息
return window.open("/account/certification");
case "ApplyAddDepartment":
if (item.tiding_type === "Apply") {
//部门审批
return window.open("/admins/department_applies");
}
if (item.tiding_type === "System") {
// 账号管理页/account/profile
return window.open("/account/profile");
}
return;
case "ApplyAddSchools":
if (item.tiding_type === "Apply") {
// 单位审批
return window.open("/admins/unit_applies");
}
if (item.tiding_type === "System") {
// 账号管理页
return window.open("/account/profile");
}
return;
case "ApplyAction":
switch (item.parent_container_type) {
case "ApplyShixun":
if (item.tiding_type === "Apply") {
return window.open("/admins/shixun_authorizations");
}
if (item.tiding_type === "System") {
// 实训详情页 :identifier = identifier
return window.open("/shixuns/".concat(item.identifier, "/challenges"));
}
case "ApplySubject":
if (item.tiding_type === "Apply") {
// 实训课程发布
return window.open("/admins/subject_authorizations");
}
if (item.tiding_type === "System") {
// 课程汇总详情页 :parent_container_id = parent_container_id
return window.open("/paths/".concat(item.parent_container_id));
}
case "TrialAuthorization":
if (item.tiding_type === "Apply") {
// 试用授权页面
return window.open("/managements/trial_authorization");
}
if (item.tiding_type === "System") {
// 账号管理页
return window.open("/account/profile");
}
}
return;
case 'JoinCourse':
// 课堂详情页 :id =
return window.open("/classrooms/".concat(item.belong_container_id, "/teachers"));
case 'StudentJoinCourse':
// 课堂详情页 :id = container_id
if (item.tiding_type === 'Apply') {
return window.open("/classrooms/".concat(item.belong_container_id, "/teachers"));
}
if (item.tiding_type === 'System') {
//教学案例详情 :id = container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/students"));
}
case 'DealCourse':
// 课堂详情页 :id = container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/"));
case 'TeacherJoinCourse':
// 课堂详情页 :id = container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/"));
case 'Course':
// 课堂详情页 :id = container_id
if (item.tiding_type === "Delete") {
return;
}
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/"));
case 'ArchiveCourse':
// 课堂详情页 :id = container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/"));
case "Shixun":
return window.open("/shixuns/".concat(item.identifier, "/challenges"));
case "Subject":
// 课程汇总详情页 :id = container_id
return window.open("/paths/".concat(item.container_id));
case "JournalsForMessage":
switch (item.parent_container_type) {
case "Principal":
// 反馈页 :id = parent_container_id
// 不用跳了
return '';
case "HomeworkCommon":
//学生作业页 homework = parent_container_id
if (item.homework_type === "normal") {
//普通作业
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/question"));
}
if (item.homework_type === "group") {
//分组作业
return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/question"));
}
if (item.homework_type === "practice") {
//实训作业
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=1"));
}
return "";
case "GraduationTopic":
// 毕业目标页 parent_container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_topics/").concat(item.parent_container_id, "/detail"));
case "StudentWorksScore":
//学生作业页
if (item.homework_type === "normal") {
//普通作业
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/question"));
}
if (item.homework_type === "group") {
//分组作业
return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/question"));
}
if (item.homework_type === "practice") {
//实训作业
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=1"));
}
return "";
}
case "Memo":
// 交流问答页 :id = parent_container_id
return window.open("/forums/".concat(item.parent_container_id));
case "Message":
// 交流问答页 :id = parent_container_id
return window.open("/forums/");
case "Watcher":
// 用户个人中心页 :id = item.trigger_user.login
return window.open("/users/".concat(item.trigger_user.login, "/classrooms"));
case "PraiseTread":
// 这块太复杂 不好处理
return '';
case "Grade":
//个人中心页 :id = item.trigger_user.login
// return window.open(`/users/${userInfo()?.login}/classrooms`;
return "";
case "JoinProject":
//项目详情-申请加入项目审核页 :id = container_id
return window.open(env["a" /* default */].FORGE + item.project_url);
// return window.open(`/projects/${item.container_id}`)
case 'ReporterJoinProject':
//项目详情页 :id = container_id
return window.open(env["a" /* default */].FORGE + item.project_url);
// return window.open(`/projects/${item.container_id}`)
case 'DealProject':
//项目详情页 :id = container_id
return window.open(env["a" /* default */].FORGE + item.project_url);
// return window.open(`/projects/${item.container_id}`)
case 'ManagerJoinProject':
//项目详情页 :id = container_id
return window.open(env["a" /* default */].FORGE + item.project_url);
// return window.open(`/projects/${item.container_id}`)
case "Poll":
switch (item.parent_container_type) {
case "CommitPoll":
// 课堂id belong_container_id
//课堂-学生已提交问卷列表 :id = container_id
return window.open("\t/classrooms/".concat(item.belong_container_id, "/poll/").concat(item.container_id, "/detail"));
default:
// 课堂-问卷列表 :id = container_id
return window.open("\t/classrooms/".concat(item.belong_container_id, "/poll/").concat(item.container_id, "/detail"));
}
case "Exercise":
switch (item.parent_container_type) {
case "CommitExercise":
// 课堂-学生试卷详情 :id = container_id :user_id = trigger_user.id
return window.open("\t/classrooms/".concat(item.belong_container_id, "/exercise/").concat(item.container_id, "/detail?tab=0"));
//记得跳评阅页面
case "ExerciseScore":
// 课堂-学生试卷详情 :id = container_id :user_id = trigger_user.id
return window.open("\t/classrooms/".concat(item.belong_container_id, "/exercise/").concat(item.container_id, "/detail?tab=0"));
//记得跳评阅页面
default:
// 课堂-试卷列表详情 :id = container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/exercise/").concat(item.container_id, "/detail?tab=0"));
}
case 'StudentGraduationTopic':
//课堂-毕业选题详情 :id = parent_container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_topics/").concat(item.parent_container_id, "/detail"));
case 'DealStudentTopicSelect':
//课堂-毕业选题详情 :id = parent_container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_topics/").concat(item.parent_container_id, "/detail"));
case 'GraduationTask':
//课堂-毕业任务页 :id = container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_tasks/").concat(item.container_id));
case "GraduationWork":
//课堂-毕业xx页 :id = container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_tasks/").concat(item.container_id));
case "GraduationWorkScore":
// 课堂-毕业xx页 :id = parent_container_id
return window.open("/classrooms/".concat(item.belong_container_id, "/graduation_tasks/").concat(item.parent_container_id));
case "HomeworkCommon":
switch (item.parent_container_type) {
case "AnonymousCommentFail":
// 课堂-作业列表 homework = container_id
if (item.homework_type === "normal") {
//普通作业
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/detail"));
}
if (item.homework_type === "group") {
//分组作业
return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/detail"));
}
if (item.homework_type === "practice") {
//实训作业
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=0"));
}
case "HomeworkPublish":
if (item.homework_type === "normal") {
//普通作业
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/detail"));
}
if (item.homework_type === "group") {
//分组作业
return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/detail"));
}
if (item.homework_type === "practice") {
//实训作业
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=0"));
}
case "AnonymousAppeal":
if (item.homework_type === "normal") {
//普通作业
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/detail"));
}
if (item.homework_type === "group") {
//分组作业
return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/detail"));
}
if (item.homework_type === "practice") {
//实训作业
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=0"));
}
default:
// 课堂-作业列表 homework = container_id
if (item.homework_type === "normal") {
//普通作业
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/detail"));
}
if (item.homework_type === "group") {
//分组作业
return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/detail"));
}
if (item.homework_type === "practice") {
//实训作业
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail?tabs=0"));
}
}
case "StudentWork":
//课堂-作业 :id = container_id
if (item.homework_type === "normal") {
//普通作业
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/review/").concat(item.container_id));
}
if (item.homework_type === "group") {
//分组作业/classrooms/1208/group_homework/22373/1219130/appraise
return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/review/").concat(item.container_id));
}
if (item.homework_type === "practice") {
//实训作业
return window.open("/classrooms/".concat(item.belong_container_id, "/shixun_homework/").concat(item.parent_container_id, "/detail"));
}
case "StudentWorksScore":
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.trigger_user.id, "/review/").concat(item.parent_container_id));
case "StudentWorksScoresAppeal":
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.trigger_user.id, "/review/").concat(item.parent_container_id));
case "ChallengeWorkScore":
return '';
case "SendMessage":
// /managements/mirror_repository
// return window.open(`/managements/mirror_repository`)
return window.open("".concat(env["a" /* default */].API_SERVER, "/admins/mirror_repositories"));
case "Journal":
//项目Issue页 :id = parent_container_id
return window.open("/issues/".concat(item.parent_container_id));
case "Issue":
//项目Issue页 :id = container_id
return window.open("/issues/".concat(item.container_id));
case "PullRequest":
// 项目pull request页 :id = parent_container_id
return window.open(env["a" /* default */].FORGE + item.project_url);
// return window.open(`/projects/${item.parent_container_id}/pull_requests`)
case "Department":
//账号管理页
return window.open("/account/profile");
case "Library":
if (item.tiding_type === 'Apply') {
// /managements/library_applies
return window.open("/admins/library_applies");
}
if (item.tiding_type === 'System') {
//教学案例详情 :id = container_id
return window.open("/moop_cases/".concat(item.container_id));
}
case "ProjectPackage":
if (item.tiding_type === "Destroyed") {
return;
}
if (item.tiding_type === "Destroyed_end") {
return;
} else {
if (item.tiding_type === 'Apply') {
///managements/project_package_applies
return window.open("/admins/project_package_applies");
}
// if(item.tiding_type === 'System'){
//众包详情 :id = container_id
return window.open("/crowdsourcing/".concat(item.container_id));
// }
}
case "Discuss":
if (item.parent_container_type === 'Hack' && item.extra) {
return window.open("/myproblems/".concat(item.extra, "/comment"));
} else {
return window.open("/shixuns/".concat(item.identifier, "/shixun_discuss"));
}
case "Video":
if (item.tiding_type === "Apply") {
return window.open("/admins/video_applies");
} else if (item.tiding_type === "System") {
var _userInfo;
return window.open("/users/".concat((_userInfo = Object(authority["f" /* userInfo */])()) === null || _userInfo === void 0 ? void 0 : _userInfo.login, "/videos"));
}
return '';
case "PublicCourseStart":
return window.open("/classrooms/".concat(item.container_id, "/informs"));
case "SubjectStartCourse":
return window.open("/paths/".concat(item.container_id));
case "ResubmitStudentWork":
if (item.homework_type === "normal") {
//普通作业
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id, "/").concat(item.container_id, "/appraise"));
}
if (item.homework_type === "group") {
//分组作业
return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id, "/").concat(item.container_id, "/appraise"));
}
case "AdjustScore":
//belong_container_id course的id
if (item.homework_type === "normal") {
//普通作业
return window.open("/classrooms/".concat(item.belong_container_id, "/common_homework/").concat(item.parent_container_id));
}
if (item.homework_type === "group") {
//分组作业
return window.open("/classrooms/".concat(item.belong_container_id, "/group_homework/").concat(item.parent_container_id));
}
case 'LiveLink':
return window.open("/classrooms/".concat(item.belong_container_id, "/course_videos?open=live"));
case 'Hack':
if (item.extra && item.parent_container_type !== 'HackDelete') {
return window.open("/problems/".concat(item.extra, "/edit"));
}
default:
return;
}
};
var util_checkLocalOrPublicIp = function checkLocalOrPublicIp(v) {
var ip, modal;
return new Promise( /*#__PURE__*/function () {
var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
var res;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!(v.ip_limit !== 'no' || v.ip_bind)) {
_context.next = 4;
break;
}
_context.next = 3;
return ip_findLocalIp({
ip_limit: v === null || v === void 0 ? void 0 : v.ip_limit,
ip_bind: v === null || v === void 0 ? void 0 : v.ip_bind
});
case 3:
ip = _context.sent;
case 4:
_context.next = 6;
return Object(exercise["d" /* checkIp */])({
id: v.exerciseId,
ip: ip
});
case 6:
res = _context.sent;
if (res.status === 0) {
resolve(res);
} else {
reject(res);
}
if (!v.errmsgHide) {
_context.next = 10;
break;
}
return _context.abrupt("return", true);
case 10:
if (!(res.status === -1)) {
_context.next = 15;
break;
}
modal = es_modal["a" /* default */].info({
title: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "1"
}, "\u63D0\u793A"), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", {
className: "iconfont icon-yiguanbi1 current c-grey-c",
onClick: function onClick() {
return modal.destroy();
}
}))),
icon: null,
className: "custom-modal-divider",
content: /*#__PURE__*/react_default.a.createElement("div", {
className: "font16 p20"
}, "\u60A8\u7684IP\u4E0D\u5728\u8003\u8BD5\u5141\u8BB8\u7684\u8303\u56F4\u5185\uFF01"),
okText: "我知道了"
});
return _context.abrupt("return", false);
case 15:
if (!(res.status === -2)) {
_context.next = 18;
break;
}
modal = es_modal["a" /* default */].info({
title: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "1"
}, "\u63D0\u793A"), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", {
className: "iconfont icon-yiguanbi1 current c-grey-c",
onClick: function onClick() {
return modal.destroy();
}
}))),
icon: null,
className: "custom-modal-divider",
content: /*#__PURE__*/react_default.a.createElement("div", {
className: "font16 p20"
}, "\u60A8\u5DF2\u7ED1\u5B9A\u5F53\u524D\u8003\u8BD5IP\u5730\u5740\uFF1A", /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, res.ip), "\u8BF7\u4F7F\u7528\u8BE5IP\u5730\u5740\u8FDB\u5165\u8003\u8BD5\u3002"),
okText: "我知道了"
});
return _context.abrupt("return", false);
case 18:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x, _x2) {
return _ref.apply(this, arguments);
};
}());
};
var startExercise = /*#__PURE__*/function () {
var _ref2 = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(v) {
var modal;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
if (!(location.pathname.indexOf("/classrooms/4RW9CYHY") > -1 && !isPc())) {
_context2.next = 3;
break;
}
es_modal["a" /* default */].info({
content: "请使用电脑参加考试!"
});
return _context2.abrupt("return");
case 3:
if (!(v.ip_limit !== 'no' || v.ip_bind)) {
_context2.next = 9;
break;
}
_context2.next = 6;
return util_checkLocalOrPublicIp(v);
case 6:
if (isChrome()) {
_context2.next = 9;
break;
}
es_modal["a" /* default */].info({
icon: null,
okText: "确定",
width: 500,
content: /*#__PURE__*/react_default.a.createElement("div", {
className: "font16"
}, "\u672C\u6B21\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A\u8BBE\u7F6E\uFF0C\u4EC5\u652F\u6301", /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, "\u8C37\u6B4C"), "\u3002", /*#__PURE__*/react_default.a.createElement("br", null), "\u8BF7\u4F7F\u7528", /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, "\u8C37\u6B4C"), "\u6D4F\u89C8\u5668\u5F00\u59CB\u8003\u8BD5\u3002")
});
return _context2.abrupt("return");
case 9:
;
if (!(v.open_camera || v.screen_open || v.ip_limit !== 'no' || v.ip_bind || v.identity_verify)) {
_context2.next = 17;
break;
}
if (isChromeOrFirefox()) {
_context2.next = 14;
break;
}
es_modal["a" /* default */].info({
icon: null,
okText: "确定",
width: 500,
content: /*#__PURE__*/react_default.a.createElement("div", {
className: "font16"
}, "\u672C\u6B21\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A\u8BBE\u7F6E\uFF0C\u4EC5\u652F\u6301", /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, "\u8C37\u6B4C"), "\u3001", /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, "\u706B\u72D0"), "\u6D4F\u89C8\u5668\u3002", /*#__PURE__*/react_default.a.createElement("br", null), "\u8BF7\u4F7F\u7528", /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, "\u8C37\u6B4C"), "\u3001", /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, "\u706B\u72D0"), "\u6D4F\u89C8\u5668\u5F00\u59CB\u8003\u8BD5\u3002")
});
return _context2.abrupt("return", false);
case 14:
modal = es_modal["a" /* default */].info({
title: /*#__PURE__*/react_default.a.createElement(row["a" /* default */], null, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "1"
}, "\u8003\u8BD5\u8BF4\u660E"), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", {
className: "iconfont icon-yiguanbi1 current c-grey-c",
onClick: function onClick() {
return modal.destroy();
}
}))),
width: 700,
icon: null,
className: "custom-modal-divider",
content: /*#__PURE__*/react_default.a.createElement("div", {
className: "font16 p20"
}, v.identity_verify && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], {
align: "middle",
justify: "start",
className: "mt20"
}, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "45px"
}, /*#__PURE__*/react_default.a.createElement("span", {
className: "iconfont icon-kaiqishexiangtou c-blue mr20 font24"
})), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "1"
}, "\u8FDB\u5165\u8003\u8BD5\u524D\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u9700\u91C7\u96C6\u7167\u7247\u8BA4\u8BC1\uFF0C\u8BA4\u8BC1\u901A\u8FC7\u5E76\u5F00\u542F\u624B\u673A\u5F55\u5236\u624D\u53EF\u4EE5\u8FDB\u5165\u8003\u8BD5\u3002", !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement("a", {
target: "_blank",
href: "https://www.educoder.net/forums/4459"
}, "\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934\uFF1F"))), v.open_camera && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], {
align: "middle",
justify: "start",
className: "mt20"
}, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, /*#__PURE__*/react_default.a.createElement("span", {
className: "iconfont icon-kaiqishexiangtou c-blue mr20 font24"
})), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], null, "\u8FDB\u5165\u8003\u8BD5\u540E\uFF0C\u8BF7\u5141\u8BB8\u6444\u50CF\u5934\u6388\u6743\uFF0C\u6388\u6743\u540E\u6253\u5F00\u6444\u50CF\u5934\u65B9\u53EF\u4F5C\u7B54\uFF01", !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement("a", {
target: "_blank",
href: "https://www.educoder.net/forums/4459"
}, "\u65E0\u6CD5\u8C03\u7528\u6444\u50CF\u5934\uFF1F"))), v.screen_open && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], {
justify: "start",
className: "mt20"
}, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "24px",
className: "mr20"
}, /*#__PURE__*/react_default.a.createElement("span", {
className: "iconfont icon-kaiqifangqieping c-blue font24"
})), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "1"
}, "\u5F53\u524D\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u5207\u5C4F\uFF0C\u5207\u5C4F\u8D85\u8FC7", v.screen_num, "\u6B21\u5C06\u5F3A\u5236\u4EA4\u5377\u3002\uFF08\u9000\u51FA\u5168\u5C4F\u5C06\u5224\u5B9A\u4E3A\u5207\u5C4F\u4E00\u6B21\uFF0C\u8003\u8BD5\u8FC7\u7A0B\u4E2D\u8BF7\u52FF\u9000\u51FA\u5168\u5C4F\uFF09", !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement("a", {
target: "_blank",
href: "https://www.educoder.net/forums/4460"
}, "\u6D4F\u89C8\u5668\u65E0\u6CD5\u81EA\u52A8\u5168\u5C4F\uFF1F"))), (v.inner_ip !== '' || v.public_ip !== '') && v.ip_limit !== 'no' && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], {
justify: "start",
className: "mt20"
}, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "24px",
className: "mr20"
}, /*#__PURE__*/react_default.a.createElement("span", {
className: "iconfont icon-IP c-blue font24"
})), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "1"
}, "\u5F53\u524D\u8003\u8BD5\u5DF2\u5F00\u542FIP\u8303\u56F4\u9650\u5B9A\u3002IP\u5730\u5740\u4E0D\u5728\u8303\u56F4\u5185\u4E0D\u53EF\u53C2\u52A0\u8003\u8BD5\u3002", /*#__PURE__*/react_default.a.createElement("br", null), !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement(react_default.a.Fragment, null, /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, "\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"), /*#__PURE__*/react_default.a.createElement("br", null), /*#__PURE__*/react_default.a.createElement("a", {
href: "https://www.educoder.net/forums/4478",
target: "_blank"
}, "\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?")))), v.ip_bind && /*#__PURE__*/react_default.a.createElement(row["a" /* default */], {
justify: "start",
className: "mt20"
}, /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "24px",
className: "mr20"
}, /*#__PURE__*/react_default.a.createElement("span", {
className: "iconfont icon-IPbangding c-blue font24"
})), /*#__PURE__*/react_default.a.createElement(col["a" /* default */], {
flex: "1"
}, "\u5F53\u524D\u8003\u8BD5\u5DF2\u542F\u7528\u8003\u8BD5\u671F\u95F4IP\u7ED1\u5B9A\u3002\u5F53\u60A8\u5F00\u59CB\u8003\u8BD5\u540E\uFF0C\u5C06\u81EA\u52A8\u7ED1\u5B9AIP\uFF0C\u8003\u8BD5\u671F\u95F4\u53EA\u5141\u8BB8\u4F7F\u7528\u552F\u4E00\u7684IP\u8FDB\u5165\u8003\u8BD5\u3002\u5982\u9047\u7279\u6B8A\u60C5\u51B5\uFF0C\u53EF\u5411\u8001\u5E08\u7533\u8BF7\u89E3\u9664IP\u7ED1\u5B9A\u3002", /*#__PURE__*/react_default.a.createElement("br", null), !checkIsClientExam() && /*#__PURE__*/react_default.a.createElement(react_default.a.Fragment, null, /*#__PURE__*/react_default.a.createElement("span", {
className: "c-red"
}, "\uFF08\u53EA\u5141\u8BB8\u5728Chrome\u8C37\u6B4C\u6D4F\u89C8\u5668\u4F5C\u7B54\uFF0C\u5E76\u4E14\u9700\u8981\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6\uFF09"), /*#__PURE__*/react_default.a.createElement("br", null), /*#__PURE__*/react_default.a.createElement("a", {
href: "https://www.educoder.net/forums/4478",
target: "_blank"
}, "\u5982\u4F55\u5B89\u88C5WebRTC Leak Prevent\u63D2\u4EF6?")))), /*#__PURE__*/react_default.a.createElement("p", {
className: "ml40 mt40"
}, /*#__PURE__*/react_default.a.createElement(es_checkbox["a" /* default */], {
onChange: function onChange(e) {
return modal.update({
okButtonProps: {
disabled: !e.target.checked
}
});
}
}, "\u6211\u5DF2\u9605\u8BFB"))),
onOk: function onOk() {
requestFullScreen(document.body);
if (v.identity_verify && v.current_status === 2) {
var _userInfo2;
v.history.push("/classrooms/".concat(v.coursesId, "/exercise/").concat(v.exerciseId, "/users/").concat((_userInfo2 = Object(authority["f" /* userInfo */])()) === null || _userInfo2 === void 0 ? void 0 : _userInfo2.login, "/check"));
} else {
var _userInfo3;
v.history.push("/classrooms/".concat(v.coursesId, "/exercise/").concat(v.exerciseId, "/users/").concat((_userInfo3 = Object(authority["f" /* userInfo */])()) === null || _userInfo3 === void 0 ? void 0 : _userInfo3.login));
}
},
okText: "进入考试",
okButtonProps: {
disabled: true
}
});
_context2.next = 18;
break;
case 17:
if (v.identity_verify && v.current_status === 2) {
v.history.push("/classrooms/".concat(v.coursesId, "/exercise/").concat(v.exerciseId, "/users/").concat(v.login, "/check"));
} else {
v.history.push("/classrooms/".concat(v.coursesId, "/exercise/").concat(v.exerciseId, "/users/").concat(v.login));
}
case 18:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function startExercise(_x3) {
return _ref2.apply(this, arguments);
};
}();
var educationList = [{
name: "博士研究生",
id: 8
}, {
name: "硕士研究生",
id: 7
}, {
name: "本科",
id: 6
}, {
name: "大专",
id: 5
}, {
name: "中专",
id: 4
}, {
name: "高中",
id: 3
}, {
name: "初中",
id: 2
}, {
name: "小学",
id: 1
}, {
name: "其他",
id: 9
}];
var util_messageInfo = function messageInfo(status, date) {
var info = {
1: '当前实践项目暂未发布,请联系本课堂教师。',
2: '当前实践项目不存在,请联系本课堂教师。',
3: '当前实践项目面向指定单位开放,请联系本课堂教师。',
4: "\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u5C06\u4E8E".concat(date, "\u53D1\u5E03\uFF0C\u8BF7\u7B49\u5F85\u3002")
};
var s = info[status];
message["b" /* default */].warn(s);
};
var util_base64ToBlob = function base64ToBlob(code, filename) {
var _filename$split, _filename$split2;
// const parts = code.split(';base64,');
// const contentType = parts[0].split(':')[1];
var raw = window.atob(code);
var rawLength = raw.length;
var uInt8Array = new Uint8Array(rawLength);
for (var i = 0; i < rawLength; ++i) {
uInt8Array[i] = raw.charCodeAt(i);
}
console.log("type:", contentType[(_filename$split = filename.split(".")) === null || _filename$split === void 0 ? void 0 : _filename$split[1]] || 'application/octet-stream');
return new Blob([uInt8Array], {
type: contentType[(_filename$split2 = filename.split(".")) === null || _filename$split2 === void 0 ? void 0 : _filename$split2[1]] || 'application/octet-stream'
});
};
var downloadFile = function downloadFile(fileName, content, filename) {
var blob = util_base64ToBlob(content, filename); // new Blob([content]);
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob, fileName);
} else {
var link = document.createElement('a');
link.href = window.URL.createObjectURL(blob);
link.download = fileName;
//此写法兼容可火狐浏览器
document.body.appendChild(link);
var evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
}
};
var util_trackEvent = function trackEvent(arr) {
if (!!arr.length) {
try {
var _window, _userInfo4;
window._czc.push(['_trackEvent'].concat(Object(toConsumableArray["a" /* default */])(arr)));
(_window = window) === null || _window === void 0 ? void 0 : _window.gtag('event', arr[1], {
'event_category': arr[0],
'event_label': arr[2] || '',
'value': arr[3] || "",
"user_id": ((_userInfo4 = Object(authority["f" /* userInfo */])()) === null || _userInfo4 === void 0 ? void 0 : _userInfo4.login) || ""
});
} catch (e) {
console.log("trackEvent:err:", e);
}
}
};
var util_trackEventCustom = function trackEventCustom(arr) {
if (!!arr.length) {
try {
window._czc.push(['_setCustomVar'].concat(Object(toConsumableArray["a" /* default */])(arr)));
} catch (e) {
console.log("trackEvent:err:", e);
}
}
};
//图片预览
var util_onPreviewImage = function onPreviewImage(e) {
var parentIndexOf = function parentIndexOf(node, parent) {
if (node.localName === parent) {
return node;
}
for (var i = 0, n = node; n = n.parentNode; i++) {
if (n.localName === parent) {
return n;
}
if (n == document.documentElement) {
return false;
} //找不到目标父节点,防止死循环
}
};
var t = e.target;
var dom = parentIndexOf(t, 'a');
if (dom === null || dom === void 0 ? void 0 : dom.href) return;
if (t.tagName.toUpperCase() === 'IMG') {
var url = t.src || t.getAttribute('src');
if (url && url.indexOf('/images/avatars/User') === -1) {
e.stopPropagation();
e.preventDefault();
components_mediator.publish('preview-image', url);
}
}
};
// 课堂获取目录名
var getCategoryName = function getCategoryName(data, categoryId) {
if (data) {
var _data$filter, _res$second_category, _res$second_category$, _res$second_category$2;
var res = data === null || data === void 0 ? void 0 : (_data$filter = data.filter(function (item) {
return item.type === location.pathname.split("/")[3];
})) === null || _data$filter === void 0 ? void 0 : _data$filter[0];
if (categoryId) return res === null || res === void 0 ? void 0 : (_res$second_category = res.second_category) === null || _res$second_category === void 0 ? void 0 : (_res$second_category$ = _res$second_category.filter(function (item) {
return item.category_id == categoryId;
})) === null || _res$second_category$ === void 0 ? void 0 : (_res$second_category$2 = _res$second_category$[0]) === null || _res$second_category$2 === void 0 ? void 0 : _res$second_category$2["category_name"];else return res === null || res === void 0 ? void 0 : res["name"];
}
return null;
};
// 绑定手机号码
var util_bindPhone = function bindPhone(obj) {
var modal = es_modal["a" /* default */].confirm({
title: "完善手机号码",
content: "开启挑战前,请先绑定手机号码",
okText: "立即绑定",
cancelText: "取消",
onOk: function onOk() {
location.href = '/account/secure';
},
onCancel: function onCancel() {
modal.destroy();
(obj === null || obj === void 0 ? void 0 : obj.onCancel) && obj.onCancel();
}
});
};
//复制文字,支持window换行
var util_copyTextFuc = function copyTextFuc() {
var v = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
var hide = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var input = document.createElement('textarea');
input.value = v;
document.body.appendChild(input);
input.select();
document.execCommand('Copy');
if (!hide) {
message["b" /* default */].success('复制成功');
}
document.body.removeChild(input);
};
//获取URl参数
var getJsonFromUrl = function getJsonFromUrl(url) {
if (!url) url = window.location.search;
var query = url.substr(1);
var result = {};
query.split('&').forEach(function (part) {
var item = part.split('=');
result[item[0]] = decodeURIComponent(item[1]);
});
return result;
};
// 一维数组转换为二维数组
var arrTrans = function arrTrans(num, arr) {
if (!arr) return null;
var iconsArr = [];
arr.forEach(function (item, index) {
var page = Math.floor(index / num);
if (!iconsArr[page]) {
iconsArr[page] = [];
}
iconsArr[page].push(item);
});
return iconsArr;
};
// 设置网页标题
var setDocumentTitle = function setDocumentTitle(title) {
if (checkIsClientExam()) {
document.title = "头歌考试系统";
} else {
document.title = title || "forge";
}
};
// 检查是否C/S考试系统端
var checkIsClientExam = function checkIsClientExam() {
var _window2, _window2$localStorage;
return (_window2 = window) === null || _window2 === void 0 ? void 0 : (_window2$localStorage = _window2.localStorage) === null || _window2$localStorage === void 0 ? void 0 : _window2$localStorage.isClientExam;
};
/***/ }),
/***/ "1wcP":
/*!*****************************************************!*\
!*** ./node_modules/antd/es/modal/style/index.less ***!
\*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ 2:
/*!********************************!*\
!*** ./util.inspect (ignored) ***!
\********************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ "2/Rp":
/*!**********************************************!*\
!*** ./node_modules/antd/es/button/index.js ***!
\**********************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button */ "zvFY");
/* harmony default export */ __webpack_exports__["a"] = (_button__WEBPACK_IMPORTED_MODULE_0__[/* default */ "b"]);
/***/ }),
/***/ "22qN":
/*!*********************************!*\
!*** ./src/styles/markdown.css ***!
\*********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "25BE":
/*!********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
\********************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
/***/ }),
/***/ "25bX":
/*!******************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.is-extensible.js ***!
\******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var objectIsExtensible = Object.isExtensible;
// `Reflect.isExtensible` method
// https://tc39.github.io/ecma262/#sec-reflect.isextensible
$({ target: 'Reflect', stat: true }, {
isExtensible: function isExtensible(target) {
anObject(target);
return objectIsExtensible ? objectIsExtensible(target) : true;
}
});
/***/ }),
/***/ "27RR":
/*!********************************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js ***!
\********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "Vu81");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "hBjN");
// `Object.getOwnPropertyDescriptors` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
var O = toIndexedObject(object);
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
var keys = ownKeys(O);
var result = {};
var index = 0;
var key, descriptor;
while (keys.length > index) {
descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
if (descriptor !== undefined) createProperty(result, key, descriptor);
}
return result;
}
});
/***/ }),
/***/ "2A+d":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.string.raw.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
// `String.raw` method
// https://tc39.github.io/ecma262/#sec-string.raw
$({ target: 'String', stat: true }, {
raw: function raw(template) {
var rawTemplate = toIndexedObject(template.raw);
var literalSegments = toLength(rawTemplate.length);
var argumentsLength = arguments.length;
var elements = [];
var i = 0;
while (literalSegments > i) {
elements.push(String(rawTemplate[i++]));
if (i < argumentsLength) elements.push(String(arguments[i]));
} return elements.join('');
}
});
/***/ }),
/***/ "2B1R":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/es.array.map.js ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $map = __webpack_require__(/*! ../internals/array-iteration */ "tycR").map;
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "Hd5f");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
// FF49- issue
var USES_TO_LENGTH = arrayMethodUsesToLength('map');
// `Array.prototype.map` method
// https://tc39.github.io/ecma262/#sec-array.prototype.map
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
map: function map(callbackfn /* , thisArg */) {
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "2GS6":
/*!**********************************************************!*\
!*** ./node_modules/rc-util/es/createChainedFunction.js ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createChainedFunction; });
/**
* Safe chained function
*
* Will only create a new function if needed,
* otherwise will pass back existing functions or null.
*
* @returns {function|null}
*/
function createChainedFunction() {
var args = [].slice.call(arguments, 0);
if (args.length === 1) {
return args[0];
}
return function chainedFunction() {
for (var i = 0; i < args.length; i++) {
if (args[i] && args[i].apply) {
args[i].apply(this, arguments);
}
}
};
}
/***/ }),
/***/ "2W6z":
/*!*****************************************!*\
!*** ./node_modules/warning/warning.js ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var __DEV__ = "production" !== 'production';
var warning = function() {};
if (__DEV__) {
var printWarning = function printWarning(format, args) {
var len = arguments.length;
args = new Array(len > 1 ? len - 1 : 0);
for (var key = 1; key < len; key++) {
args[key - 1] = arguments[key];
}
var argIndex = 0;
var message = 'Warning: ' +
format.replace(/%s/g, function() {
return args[argIndex++];
});
if (typeof console !== 'undefined') {
console.error(message);
}
try {
// --- Welcome to debugging React ---
// This error was thrown as a convenience so that you can use this stack
// to find the callsite that caused this warning to fire.
throw new Error(message);
} catch (x) {}
}
warning = function(condition, format, args) {
var len = arguments.length;
args = new Array(len > 2 ? len - 2 : 0);
for (var key = 2; key < len; key++) {
args[key - 2] = arguments[key];
}
if (format === undefined) {
throw new Error(
'`warning(condition, format, ...args)` requires a warning ' +
'message argument'
);
}
if (!condition) {
printWarning.apply(null, [format].concat(args));
}
};
}
module.exports = warning;
/***/ }),
/***/ "2j6C":
/*!***************************************************!*\
!*** ./node_modules/minimalistic-assert/index.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = assert;
function assert(val, msg) {
if (!val)
throw new Error(msg || 'Assertion failed');
}
assert.equal = function assertEqual(l, r, msg) {
if (l != r)
throw new Error(msg || ('Assertion failed: ' + l + ' != ' + r));
};
/***/ }),
/***/ "2mql":
/*!**********************************************************************************!*\
!*** ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
\**********************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var reactIs = __webpack_require__(/*! react-is */ "TOwV");
/**
* Copyright 2015, Yahoo! Inc.
* Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
*/
var REACT_STATICS = {
childContextTypes: true,
contextType: true,
contextTypes: true,
defaultProps: true,
displayName: true,
getDefaultProps: true,
getDerivedStateFromError: true,
getDerivedStateFromProps: true,
mixins: true,
propTypes: true,
type: true
};
var KNOWN_STATICS = {
name: true,
length: true,
prototype: true,
caller: true,
callee: true,
arguments: true,
arity: true
};
var FORWARD_REF_STATICS = {
'$$typeof': true,
render: true,
defaultProps: true,
displayName: true,
propTypes: true
};
var MEMO_STATICS = {
'$$typeof': true,
compare: true,
defaultProps: true,
displayName: true,
propTypes: true,
type: true
};
var TYPE_STATICS = {};
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
function getStatics(component) {
// React v16.11 and below
if (reactIs.isMemo(component)) {
return MEMO_STATICS;
} // React v16.12 and above
return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;
}
var defineProperty = Object.defineProperty;
var getOwnPropertyNames = Object.getOwnPropertyNames;
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
var getPrototypeOf = Object.getPrototypeOf;
var objectPrototype = Object.prototype;
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
if (typeof sourceComponent !== 'string') {
// don't hoist over string (html) components
if (objectPrototype) {
var inheritedComponent = getPrototypeOf(sourceComponent);
if (inheritedComponent && inheritedComponent !== objectPrototype) {
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
}
}
var keys = getOwnPropertyNames(sourceComponent);
if (getOwnPropertySymbols) {
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
}
var targetStatics = getStatics(targetComponent);
var sourceStatics = getStatics(sourceComponent);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
try {
// Avoid failures from read-only properties
defineProperty(targetComponent, key, descriptor);
} catch (e) {}
}
}
}
return targetComponent;
}
module.exports = hoistNonReactStatics;
/***/ }),
/***/ "2oRo":
/*!**************************************************!*\
!*** ./node_modules/core-js/internals/global.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var check = function (it) {
return it && it.Math == Math && it;
};
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
module.exports =
// eslint-disable-next-line no-undef
check(typeof globalThis == 'object' && globalThis) ||
check(typeof window == 'object' && window) ||
check(typeof self == 'object' && self) ||
check(typeof global == 'object' && global) ||
// eslint-disable-next-line no-new-func
Function('return this')();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "2qtc":
/*!***************************************************!*\
!*** ./node_modules/antd/es/modal/style/index.js ***!
\***************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "1wcP");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "+L6B");
// style dependencies
/***/ }),
/***/ "2tOg":
/*!****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.array.last-item.js ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
// `Array.prototype.lastIndex` accessor
// https://github.com/keithamus/proposal-array-last
if (DESCRIPTORS && !('lastItem' in [])) {
defineProperty(Array.prototype, 'lastItem', {
configurable: true,
get: function lastItem() {
var O = toObject(this);
var len = toLength(O.length);
return len == 0 ? undefined : O[len - 1];
},
set: function lastItem(value) {
var O = toObject(this);
var len = toLength(O.length);
return O[len == 0 ? 0 : len - 1] = value;
}
});
addToUnscopables('lastItem');
}
/***/ }),
/***/ 3:
/*!******************************!*\
!*** min-document (ignored) ***!
\******************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/* (ignored) */
/***/ }),
/***/ "33Wh":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/object-keys.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "yoRg");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "eDl+");
// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
module.exports = Object.keys || function keys(O) {
return internalObjectKeys(O, enumBugKeys);
};
/***/ }),
/***/ "33yf":
/*!***********************************************!*\
!*** ./node_modules/path-browserify/index.js ***!
\***********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,
// backported and transplited with Babel, with backwards-compat fixes
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// resolves . and .. elements in a path array with directory names there
// must be no slashes, empty elements, or device names (c:\) in the array
// (so also no leading and trailing slashes - it does not distinguish
// relative and absolute paths)
function normalizeArray(parts, allowAboveRoot) {
// if the path tries to go above the root, `up` ends up > 0
var up = 0;
for (var i = parts.length - 1; i >= 0; i--) {
var last = parts[i];
if (last === '.') {
parts.splice(i, 1);
} else if (last === '..') {
parts.splice(i, 1);
up++;
} else if (up) {
parts.splice(i, 1);
up--;
}
}
// if the path is allowed to go above the root, restore leading ..s
if (allowAboveRoot) {
for (; up--; up) {
parts.unshift('..');
}
}
return parts;
}
// path.resolve([from ...], to)
// posix version
exports.resolve = function() {
var resolvedPath = '',
resolvedAbsolute = false;
for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {
var path = (i >= 0) ? arguments[i] : process.cwd();
// Skip empty and invalid entries
if (typeof path !== 'string') {
throw new TypeError('Arguments to path.resolve must be strings');
} else if (!path) {
continue;
}
resolvedPath = path + '/' + resolvedPath;
resolvedAbsolute = path.charAt(0) === '/';
}
// At this point the path should be resolved to a full absolute path, but
// handle relative paths to be safe (might happen when process.cwd() fails)
// Normalize the path
resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {
return !!p;
}), !resolvedAbsolute).join('/');
return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';
};
// path.normalize(path)
// posix version
exports.normalize = function(path) {
var isAbsolute = exports.isAbsolute(path),
trailingSlash = substr(path, -1) === '/';
// Normalize the path
path = normalizeArray(filter(path.split('/'), function(p) {
return !!p;
}), !isAbsolute).join('/');
if (!path && !isAbsolute) {
path = '.';
}
if (path && trailingSlash) {
path += '/';
}
return (isAbsolute ? '/' : '') + path;
};
// posix version
exports.isAbsolute = function(path) {
return path.charAt(0) === '/';
};
// posix version
exports.join = function() {
var paths = Array.prototype.slice.call(arguments, 0);
return exports.normalize(filter(paths, function(p, index) {
if (typeof p !== 'string') {
throw new TypeError('Arguments to path.join must be strings');
}
return p;
}).join('/'));
};
// path.relative(from, to)
// posix version
exports.relative = function(from, to) {
from = exports.resolve(from).substr(1);
to = exports.resolve(to).substr(1);
function trim(arr) {
var start = 0;
for (; start < arr.length; start++) {
if (arr[start] !== '') break;
}
var end = arr.length - 1;
for (; end >= 0; end--) {
if (arr[end] !== '') break;
}
if (start > end) return [];
return arr.slice(start, end - start + 1);
}
var fromParts = trim(from.split('/'));
var toParts = trim(to.split('/'));
var length = Math.min(fromParts.length, toParts.length);
var samePartsLength = length;
for (var i = 0; i < length; i++) {
if (fromParts[i] !== toParts[i]) {
samePartsLength = i;
break;
}
}
var outputParts = [];
for (var i = samePartsLength; i < fromParts.length; i++) {
outputParts.push('..');
}
outputParts = outputParts.concat(toParts.slice(samePartsLength));
return outputParts.join('/');
};
exports.sep = '/';
exports.delimiter = ':';
exports.dirname = function (path) {
if (typeof path !== 'string') path = path + '';
if (path.length === 0) return '.';
var code = path.charCodeAt(0);
var hasRoot = code === 47 /*/*/;
var end = -1;
var matchedSlash = true;
for (var i = path.length - 1; i >= 1; --i) {
code = path.charCodeAt(i);
if (code === 47 /*/*/) {
if (!matchedSlash) {
end = i;
break;
}
} else {
// We saw the first non-path separator
matchedSlash = false;
}
}
if (end === -1) return hasRoot ? '/' : '.';
if (hasRoot && end === 1) {
// return '//';
// Backwards-compat fix:
return '/';
}
return path.slice(0, end);
};
function basename(path) {
if (typeof path !== 'string') path = path + '';
var start = 0;
var end = -1;
var matchedSlash = true;
var i;
for (i = path.length - 1; i >= 0; --i) {
if (path.charCodeAt(i) === 47 /*/*/) {
// If we reached a path separator that was not part of a set of path
// separators at the end of the string, stop now
if (!matchedSlash) {
start = i + 1;
break;
}
} else if (end === -1) {
// We saw the first non-path separator, mark this as the end of our
// path component
matchedSlash = false;
end = i + 1;
}
}
if (end === -1) return '';
return path.slice(start, end);
}
// Uses a mixed approach for backwards-compatibility, as ext behavior changed
// in new Node.js versions, so only basename() above is backported here
exports.basename = function (path, ext) {
var f = basename(path);
if (ext && f.substr(-1 * ext.length) === ext) {
f = f.substr(0, f.length - ext.length);
}
return f;
};
exports.extname = function (path) {
if (typeof path !== 'string') path = path + '';
var startDot = -1;
var startPart = 0;
var end = -1;
var matchedSlash = true;
// Track the state of characters (if any) we see before our first dot and
// after any path separator we find
var preDotState = 0;
for (var i = path.length - 1; i >= 0; --i) {
var code = path.charCodeAt(i);
if (code === 47 /*/*/) {
// If we reached a path separator that was not part of a set of path
// separators at the end of the string, stop now
if (!matchedSlash) {
startPart = i + 1;
break;
}
continue;
}
if (end === -1) {
// We saw the first non-path separator, mark this as the end of our
// extension
matchedSlash = false;
end = i + 1;
}
if (code === 46 /*.*/) {
// If this is our first dot, mark it as the start of our extension
if (startDot === -1)
startDot = i;
else if (preDotState !== 1)
preDotState = 1;
} else if (startDot !== -1) {
// We saw a non-dot and non-path separator before our dot, so we should
// have a good chance at having a non-empty extension
preDotState = -1;
}
}
if (startDot === -1 || end === -1 ||
// We saw a non-dot character immediately before the dot
preDotState === 0 ||
// The (right-most) trimmed path component is exactly '..'
preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {
return '';
}
return path.slice(startDot, end);
};
function filter (xs, f) {
if (xs.filter) return xs.filter(f);
var res = [];
for (var i = 0; i < xs.length; i++) {
if (f(xs[i], i, xs)) res.push(xs[i]);
}
return res;
}
// String.prototype.substr - negative index don't work in IE8
var substr = 'ab'.substr(-1) === 'b'
? function (str, start, len) { return str.substr(start, len) }
: function (str, start, len) {
if (start < 0) start = str.length + start;
return str.substr(start, len);
}
;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../node-libs-browser/mock/process.js */ "Q2Ig")))
/***/ }),
/***/ "3I1R":
/*!****************************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.has-instance.js ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.hasInstance` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.hasinstance
defineWellKnownSymbol('hasInstance');
/***/ }),
/***/ "3JnH":
/*!*****************************************!*\
!*** ./node_modules/es-errors/range.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @type {import('./range')} */
module.exports = RangeError;
/***/ }),
/***/ "3KgV":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.object.freeze.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "uy83");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var onFreeze = __webpack_require__(/*! ../internals/internal-metadata */ "8YOa").onFreeze;
var nativeFreeze = Object.freeze;
var FAILS_ON_PRIMITIVES = fails(function () { nativeFreeze(1); });
// `Object.freeze` method
// https://tc39.github.io/ecma262/#sec-object.freeze
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
freeze: function freeze(it) {
return nativeFreeze && isObject(it) ? nativeFreeze(onFreeze(it)) : it;
}
});
/***/ }),
/***/ "3Mug":
/*!***************************************************!*\
!*** ./node_modules/rc-util/lib/Dom/canUseDom.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = canUseDom;
function canUseDom() {
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
}
/***/ }),
/***/ "3Nzz":
/*!*************************************************************!*\
!*** ./node_modules/antd/es/config-provider/SizeContext.js ***!
\*************************************************************/
/*! exports provided: SizeContextProvider, default */
/*! exports used: SizeContextProvider, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return SizeContextProvider; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var SizeContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createContext"](undefined);
var SizeContextProvider = function SizeContextProvider(_ref) {
var children = _ref.children,
size = _ref.size;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SizeContext.Consumer, null, function (originSize) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__["createElement"](SizeContext.Provider, {
value: size || originSize
}, children);
});
};
/* harmony default export */ __webpack_exports__["b"] = (SizeContext);
/***/ }),
/***/ "3bBZ":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/modules/web.dom-collections.iterator.js ***!
\**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "/byt");
var ArrayIteratorMethods = __webpack_require__(/*! ../modules/es.array.iterator */ "4mDm");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var ITERATOR = wellKnownSymbol('iterator');
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var ArrayValues = ArrayIteratorMethods.values;
for (var COLLECTION_NAME in DOMIterables) {
var Collection = global[COLLECTION_NAME];
var CollectionPrototype = Collection && Collection.prototype;
if (CollectionPrototype) {
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
} catch (error) {
CollectionPrototype[ITERATOR] = ArrayValues;
}
if (!CollectionPrototype[TO_STRING_TAG]) {
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
}
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
} catch (error) {
CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
}
}
}
}
/***/ }),
/***/ "3blH":
/*!******************************************!*\
!*** ./src/models/competitions/index.ts ***!
\******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_competitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/competitions */ "hJwl");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var CompetitionsModel = {
namespace: 'competitions',
state: {
name: '',
loading: true,
listParams: {
page: 1,
//第一页开始
per_page: 20,
category: ""
},
competitions: [],
hongshanInfos: [],
count: ''
},
effects: {
// 获取页面数据
getList: function getList(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var listParams, response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
listParams = payload;
_context.next = 3;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getCompetitionsList */ "x"], payload);
case 3:
response = _context.sent;
_context.next = 6;
return put({
type: "save",
payload: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
listParams: listParams
}, response)
});
case 6:
return _context.abrupt("return", response);
case 7:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getWorkSubmitUpdateRes: function getWorkSubmitUpdateRes(_ref3, _ref4) {
var payload = _ref3.payload,
callback = _ref3.callback;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getWorkSubmitUpdateRes */ "J"], payload);
case 2:
response = _context2.sent;
return _context2.abrupt("return", response);
case 4:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
//提交学生数据
addApplytojoincourse: function addApplytojoincourse(_ref5, _ref6) {
var payload = _ref5.payload,
callback = _ref5.callback;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* addApplytojoincourse */ "t"], payload);
case 2:
response = _context3.sent;
return _context3.abrupt("return", response);
case 4:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
//报名
competitionTeams: function competitionTeams(_ref7, _ref8) {
var payload = _ref7.payload,
callback = _ref7.callback;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var response;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* competitionTeams */ "u"], payload);
case 2:
response = _context4.sent;
return _context4.abrupt("return", response);
case 4:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
//获取限制
getStaff: function getStaff(_ref9, _ref10) {
var payload = _ref9.payload,
callback = _ref9.callback;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var response;
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getStaff */ "D"], payload);
case 2:
response = _context5.sent;
return _context5.abrupt("return", response);
case 4:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
//获取头部信息
getHeader: function getHeader(_ref11, _ref12) {
var payload = _ref11.payload,
callback = _ref11.callback;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var response;
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getHeader */ "A"], payload);
case 2:
response = _context6.sent;
return _context6.abrupt("return", response);
case 4:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
//获取竞赛底部item信息
getItem: function getItem(_ref13, _ref14) {
var payload = _ref13.payload,
callback = _ref13.callback;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var response;
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getItem */ "B"], payload);
case 2:
response = _context7.sent;
return _context7.abrupt("return", response);
case 4:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
getHSCompetitionInfo: function getHSCompetitionInfo(_ref15, _ref16) {
var payload = _ref15.payload,
callback = _ref15.callback;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
var response;
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getHSCompetitionInfo */ "z"], payload);
case 2:
response = _context8.sent;
_context8.next = 5;
return put({
type: "save",
payload: {
hongshanInfos: response.data
}
});
case 5:
return _context8.abrupt("return", response);
case 6:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
//修改item updateMdContent
updateMdContent: function updateMdContent(_ref17, _ref18) {
var payload = _ref17.payload,
callback = _ref17.callback;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
var response;
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* updateMdContent */ "L"], payload);
case 2:
response = _context9.sent;
return _context9.abrupt("return", response);
case 4:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
//获取战队列表
getTeamList: function getTeamList(_ref19, _ref20) {
var payload = _ref19.payload,
callback = _ref19.callback;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
var response;
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getTeamList */ "H"], payload);
case 2:
response = _context10.sent;
return _context10.abrupt("return", response);
case 4:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
//获取战队头像 Edit
getTeamDetail: function getTeamDetail(_ref21, _ref22) {
var payload = _ref21.payload,
callback = _ref21.callback;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
var response;
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getTeamDetail */ "G"], payload);
case 2:
response = _context11.sent;
return _context11.abrupt("return", response);
case 4:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
//修改战队信息
UpTeam: function UpTeam(_ref23, _ref24) {
var payload = _ref23.payload,
callback = _ref23.callback;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
var response;
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* UpTeam */ "s"], payload);
case 2:
response = _context12.sent;
return _context12.abrupt("return", response);
case 4:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
//删除战队
DeleteTeam: function DeleteTeam(_ref25, _ref26) {
var payload = _ref25.payload,
callback = _ref25.callback;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
var response;
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* DeleteTeam */ "f"], payload);
case 2:
response = _context13.sent;
return _context13.abrupt("return", response);
case 4:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
//退出战队 ExitTeam
ExitTeam: function ExitTeam(_ref27, _ref28) {
var payload = _ref27.payload,
callback = _ref27.callback;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
var response;
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* ExitTeam */ "h"], payload);
case 2:
response = _context14.sent;
return _context14.abrupt("return", response);
case 4:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
//新增战队 AddTeam
AddTeam: function AddTeam(_ref29, _ref30) {
var payload = _ref29.payload,
callback = _ref29.callback;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
var response;
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* AddTeam */ "b"], payload);
case 2:
response = _context15.sent;
return _context15.abrupt("return", response);
case 4:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
//加入战队 JoinTeam
JoinTeam: function JoinTeam(_ref31, _ref32) {
var payload = _ref31.payload,
callback = _ref31.callback;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
var response;
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* JoinTeam */ "j"], payload);
case 2:
response = _context16.sent;
return _context16.abrupt("return", response);
case 4:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
// 签署CLA协议
SignCLA: function SignCLA(_ref33, _ref34) {
var payload = _ref33.payload,
callback = _ref33.callback;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
var response;
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* SignCLA */ "p"], payload);
case 2:
response = _context17.sent;
return _context17.abrupt("return", response);
case 4:
case "end":
return _context17.stop();
}
}, _callee17);
})();
},
// 获取kylin竞赛ID
GetKylinId: function GetKylinId(_ref35, _ref36) {
var payload = _ref35.payload,
callback = _ref35.callback;
var call = _ref36.call,
put = _ref36.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
var response;
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context18.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* GetKylinId */ "i"], payload);
case 2:
response = _context18.sent;
return _context18.abrupt("return", response);
case 4:
case "end":
return _context18.stop();
}
}, _callee18);
})();
},
//查找老师 getTeacher
getTeacher: function getTeacher(_ref37, _ref38) {
var payload = _ref37.payload,
callback = _ref37.callback;
var call = _ref38.call,
put = _ref38.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
var response;
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
_context19.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getTeacher */ "F"], payload);
case 2:
response = _context19.sent;
return _context19.abrupt("return", response);
case 4:
case "end":
return _context19.stop();
}
}, _callee19);
})();
},
//查找学生 getStudents
getStudents: function getStudents(_ref39, _ref40) {
var payload = _ref39.payload,
callback = _ref39.callback;
var call = _ref40.call,
put = _ref40.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
var response;
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
_context20.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getStudents */ "E"], payload);
case 2:
response = _context20.sent;
return _context20.abrupt("return", response);
case 4:
case "end":
return _context20.stop();
}
}, _callee20);
})();
},
//提交战队成员 SubmitTeam
SubmitTeam: function SubmitTeam(_ref41, _ref42) {
var payload = _ref41.payload,
callback = _ref41.callback;
var call = _ref42.call,
put = _ref42.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
var response;
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
_context21.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* SubmitTeam */ "q"], payload);
case 2:
response = _context21.sent;
return _context21.abrupt("return", response);
case 4:
case "end":
return _context21.stop();
}
}, _callee21);
})();
},
//领取代金劵 Reward
Reward: function Reward(_ref43, _ref44) {
var payload = _ref43.payload,
callback = _ref43.callback;
var call = _ref44.call,
put = _ref44.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
var response;
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
_context22.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Reward */ "o"], payload);
case 2:
response = _context22.sent;
return _context22.abrupt("return", response);
case 4:
case "end":
return _context22.stop();
}
}, _callee22);
})();
},
//获取排行榜头部 ChartRules
ChartRules: function ChartRules(_ref45, _ref46) {
var payload = _ref45.payload,
callback = _ref45.callback;
var call = _ref46.call,
put = _ref46.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
var response;
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
_context23.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* ChartRules */ "d"], payload);
case 2:
response = _context23.sent;
return _context23.abrupt("return", response);
case 4:
case "end":
return _context23.stop();
}
}, _callee23);
})();
},
//获取战队信息 Charts
Charts: function Charts(_ref47, _ref48) {
var payload = _ref47.payload,
callback = _ref47.callback;
var call = _ref48.call,
put = _ref48.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
var response;
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
_context24.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Charts */ "e"], payload);
case 2:
response = _context24.sent;
return _context24.abrupt("return", response);
case 4:
case "end":
return _context24.stop();
}
}, _callee24);
})();
},
//获取战队信息 TabResults
TabResults: function TabResults(_ref49, _ref50) {
var payload = _ref49.payload,
callback = _ref49.callback;
var call = _ref50.call,
put = _ref50.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
var response;
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
_context25.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* TabResults */ "r"], payload);
case 2:
response = _context25.sent;
return _context25.abrupt("return", response);
case 4:
case "end":
return _context25.stop();
}
}, _callee25);
})();
},
//获取战队信息 Results
Results: function Results(_ref51, _ref52) {
var payload = _ref51.payload,
callback = _ref51.callback;
var call = _ref52.call,
put = _ref52.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
var response;
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
_context26.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Results */ "n"], payload);
case 2:
response = _context26.sent;
return _context26.abrupt("return", response);
case 4:
case "end":
return _context26.stop();
}
}, _callee26);
})();
},
//获取获奖证书 Prize
Prize: function Prize(_ref53, _ref54) {
var payload = _ref53.payload,
callback = _ref53.callback;
var call = _ref54.call,
put = _ref54.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
var response;
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
_context27.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Prize */ "l"], payload);
case 2:
response = _context27.sent;
return _context27.abrupt("return", response);
case 4:
case "end":
return _context27.stop();
}
}, _callee27);
})();
},
//获取用户信息 Accounts
Accounts: function Accounts(_ref55, _ref56) {
var payload = _ref55.payload,
callback = _ref55.callback;
var call = _ref56.call,
put = _ref56.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
var response;
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
_context28.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Accounts */ "a"], payload);
case 2:
response = _context28.sent;
return _context28.abrupt("return", response);
case 4:
case "end":
return _context28.stop();
}
}, _callee28);
})();
},
//获取验证码 getVerification
getVerification: function getVerification(_ref57, _ref58) {
var payload = _ref57.payload,
callback = _ref57.callback;
var call = _ref58.call,
put = _ref58.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
var response;
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
_context29.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getVerification */ "I"], payload);
case 2:
response = _context29.sent;
return _context29.abrupt("return", response);
case 4:
case "end":
return _context29.stop();
}
}, _callee29);
})();
},
//绑定手机
PhoneBind: function PhoneBind(_ref59, _ref60) {
var payload = _ref59.payload,
callback = _ref59.callback;
var call = _ref60.call,
put = _ref60.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
var response;
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
_context30.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* PhoneBind */ "k"], payload);
case 2:
response = _context30.sent;
return _context30.abrupt("return", response);
case 4:
case "end":
return _context30.stop();
}
}, _callee30);
})();
},
//绑定邮箱
EmailBind: function EmailBind(_ref61, _ref62) {
var payload = _ref61.payload,
callback = _ref61.callback;
var call = _ref62.call,
put = _ref62.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
var response;
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
_context31.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* EmailBind */ "g"], payload);
case 2:
response = _context31.sent;
return _context31.abrupt("return", response);
case 4:
case "end":
return _context31.stop();
}
}, _callee31);
})();
},
//撤销认证 Authentication, Professional
Authentication: function Authentication(_ref63, _ref64) {
var payload = _ref63.payload,
callback = _ref63.callback;
var call = _ref64.call,
put = _ref64.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
var response;
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
_context32.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Authentication */ "c"], payload);
case 2:
response = _context32.sent;
return _context32.abrupt("return", response);
case 4:
case "end":
return _context32.stop();
}
}, _callee32);
})();
},
Professional: function Professional(_ref65, _ref66) {
var payload = _ref65.payload,
callback = _ref65.callback;
var call = _ref66.call,
put = _ref66.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() {
var response;
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
_context33.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* Professional */ "m"], payload);
case 2:
response = _context33.sent;
return _context33.abrupt("return", response);
case 4:
case "end":
return _context33.stop();
}
}, _callee33);
})();
},
//提交银行卡信息
setleader: function setleader(_ref67, _ref68) {
var payload = _ref67.payload,
callback = _ref67.callback;
var call = _ref68.call,
put = _ref68.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() {
var response;
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
_context34.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* setleader */ "K"], payload);
case 2:
response = _context34.sent;
return _context34.abrupt("return", response);
case 4:
case "end":
return _context34.stop();
}
}, _callee34);
})();
},
//获取实训 getShixun
getShixun: function getShixun(_ref69, _ref70) {
var payload = _ref69.payload,
callback = _ref69.callback;
var call = _ref70.call,
put = _ref70.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() {
var response;
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
_context35.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getShixun */ "C"], payload);
case 2:
response = _context35.sent;
return _context35.abrupt("return", response);
case 4:
case "end":
return _context35.stop();
}
}, _callee35);
})();
},
//获取课堂 getCourse
getCourse: function getCourse(_ref71, _ref72) {
var payload = _ref71.payload,
callback = _ref71.callback;
var call = _ref72.call,
put = _ref72.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee36() {
var response;
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
_context36.next = 2;
return call(_service_competitions__WEBPACK_IMPORTED_MODULE_1__[/* getCourse */ "y"], payload);
case 2:
response = _context36.sent;
return _context36.abrupt("return", response);
case 4:
case "end":
return _context36.stop();
}
}, _callee36);
})();
}
},
reducers: {
save: function save(state, action) {
// console.log("reducers:",state,action)
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref73) {
var dispatch = _ref73.dispatch,
history = _ref73.history;
// console.log("subscriptions:", dispatch, history)
return history.listen(function (_ref74) {
var pathname = _ref74.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (CompetitionsModel);
/***/ }),
/***/ "3cYt":
/*!************************************************!*\
!*** ./node_modules/lodash/_basePropertyOf.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/**
* The base implementation of `_.propertyOf` without support for deep paths.
*
* @private
* @param {Object} object The object to query.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyOf(object) {
return function(key) {
return object == null ? undefined : object[key];
};
}
module.exports = basePropertyOf;
/***/ }),
/***/ "3tO9":
/*!**************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/objectSpread2.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineProperty = __webpack_require__(/*! ./defineProperty.js */ "lSNA");
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function (r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
defineProperty(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "3uUd":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.filter.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.filter` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
filter: function filter(callbackfn /* , thisArg */) {
var set = anObject(this);
var iterator = getSetIterator(set);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
var newSet = new (speciesConstructor(set, getBuiltIn('Set')))();
var adder = aFunction(newSet.add);
iterate(iterator, function (value) {
if (boundFunction(value, value, set)) adder.call(newSet, value);
}, undefined, false, true);
return newSet;
}
});
/***/ }),
/***/ "49+q":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.add-all.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var collectionAddAll = __webpack_require__(/*! ../internals/collection-add-all */ "fXLg");
// `Set.prototype.addAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
addAll: function addAll(/* ...elements */) {
return collectionAddAll.apply(this, arguments);
}
});
/***/ }),
/***/ "49sm":
/*!***************************************!*\
!*** ./node_modules/isarray/index.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
/***/ }),
/***/ "4Brf":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.description.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// `Symbol.prototype.description` getter
// https://tc39.github.io/ecma262/#sec-symbol.prototype.description
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "6JNq");
var NativeSymbol = global.Symbol;
if (DESCRIPTORS && typeof NativeSymbol == 'function' && (!('description' in NativeSymbol.prototype) ||
// Safari 12 bug
NativeSymbol().description !== undefined
)) {
var EmptyStringDescriptionStore = {};
// wrap Symbol constructor for correct work with undefined description
var SymbolWrapper = function Symbol() {
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : String(arguments[0]);
var result = this instanceof SymbolWrapper
? new NativeSymbol(description)
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
: description === undefined ? NativeSymbol() : NativeSymbol(description);
if (description === '') EmptyStringDescriptionStore[result] = true;
return result;
};
copyConstructorProperties(SymbolWrapper, NativeSymbol);
var symbolPrototype = SymbolWrapper.prototype = NativeSymbol.prototype;
symbolPrototype.constructor = SymbolWrapper;
var symbolToString = symbolPrototype.toString;
var native = String(NativeSymbol('test')) == 'Symbol(test)';
var regexp = /^Symbol\((.*)\)[^)]+$/;
defineProperty(symbolPrototype, 'description', {
configurable: true,
get: function description() {
var symbol = isObject(this) ? this.valueOf() : this;
var string = symbolToString.call(symbol);
if (has(EmptyStringDescriptionStore, symbol)) return '';
var desc = native ? string.slice(7, -1) : string.replace(regexp, '$1');
return desc === '' ? undefined : desc;
}
});
$({ global: true, forced: true }, {
Symbol: SymbolWrapper
});
}
/***/ }),
/***/ "4IlW":
/*!********************************************!*\
!*** ./node_modules/rc-util/es/KeyCode.js ***!
\********************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/**
* @ignore
* some key-codes definition and utils from closure-library
* @author yiminghe@gmail.com
*/
var KeyCode = {
/**
* MAC_ENTER
*/
MAC_ENTER: 3,
/**
* BACKSPACE
*/
BACKSPACE: 8,
/**
* TAB
*/
TAB: 9,
/**
* NUMLOCK on FF/Safari Mac
*/
NUM_CENTER: 12,
// NUMLOCK on FF/Safari Mac
/**
* ENTER
*/
ENTER: 13,
/**
* SHIFT
*/
SHIFT: 16,
/**
* CTRL
*/
CTRL: 17,
/**
* ALT
*/
ALT: 18,
/**
* PAUSE
*/
PAUSE: 19,
/**
* CAPS_LOCK
*/
CAPS_LOCK: 20,
/**
* ESC
*/
ESC: 27,
/**
* SPACE
*/
SPACE: 32,
/**
* PAGE_UP
*/
PAGE_UP: 33,
// also NUM_NORTH_EAST
/**
* PAGE_DOWN
*/
PAGE_DOWN: 34,
// also NUM_SOUTH_EAST
/**
* END
*/
END: 35,
// also NUM_SOUTH_WEST
/**
* HOME
*/
HOME: 36,
// also NUM_NORTH_WEST
/**
* LEFT
*/
LEFT: 37,
// also NUM_WEST
/**
* UP
*/
UP: 38,
// also NUM_NORTH
/**
* RIGHT
*/
RIGHT: 39,
// also NUM_EAST
/**
* DOWN
*/
DOWN: 40,
// also NUM_SOUTH
/**
* PRINT_SCREEN
*/
PRINT_SCREEN: 44,
/**
* INSERT
*/
INSERT: 45,
// also NUM_INSERT
/**
* DELETE
*/
DELETE: 46,
// also NUM_DELETE
/**
* ZERO
*/
ZERO: 48,
/**
* ONE
*/
ONE: 49,
/**
* TWO
*/
TWO: 50,
/**
* THREE
*/
THREE: 51,
/**
* FOUR
*/
FOUR: 52,
/**
* FIVE
*/
FIVE: 53,
/**
* SIX
*/
SIX: 54,
/**
* SEVEN
*/
SEVEN: 55,
/**
* EIGHT
*/
EIGHT: 56,
/**
* NINE
*/
NINE: 57,
/**
* QUESTION_MARK
*/
QUESTION_MARK: 63,
// needs localization
/**
* A
*/
A: 65,
/**
* B
*/
B: 66,
/**
* C
*/
C: 67,
/**
* D
*/
D: 68,
/**
* E
*/
E: 69,
/**
* F
*/
F: 70,
/**
* G
*/
G: 71,
/**
* H
*/
H: 72,
/**
* I
*/
I: 73,
/**
* J
*/
J: 74,
/**
* K
*/
K: 75,
/**
* L
*/
L: 76,
/**
* M
*/
M: 77,
/**
* N
*/
N: 78,
/**
* O
*/
O: 79,
/**
* P
*/
P: 80,
/**
* Q
*/
Q: 81,
/**
* R
*/
R: 82,
/**
* S
*/
S: 83,
/**
* T
*/
T: 84,
/**
* U
*/
U: 85,
/**
* V
*/
V: 86,
/**
* W
*/
W: 87,
/**
* X
*/
X: 88,
/**
* Y
*/
Y: 89,
/**
* Z
*/
Z: 90,
/**
* META
*/
META: 91,
// WIN_KEY_LEFT
/**
* WIN_KEY_RIGHT
*/
WIN_KEY_RIGHT: 92,
/**
* CONTEXT_MENU
*/
CONTEXT_MENU: 93,
/**
* NUM_ZERO
*/
NUM_ZERO: 96,
/**
* NUM_ONE
*/
NUM_ONE: 97,
/**
* NUM_TWO
*/
NUM_TWO: 98,
/**
* NUM_THREE
*/
NUM_THREE: 99,
/**
* NUM_FOUR
*/
NUM_FOUR: 100,
/**
* NUM_FIVE
*/
NUM_FIVE: 101,
/**
* NUM_SIX
*/
NUM_SIX: 102,
/**
* NUM_SEVEN
*/
NUM_SEVEN: 103,
/**
* NUM_EIGHT
*/
NUM_EIGHT: 104,
/**
* NUM_NINE
*/
NUM_NINE: 105,
/**
* NUM_MULTIPLY
*/
NUM_MULTIPLY: 106,
/**
* NUM_PLUS
*/
NUM_PLUS: 107,
/**
* NUM_MINUS
*/
NUM_MINUS: 109,
/**
* NUM_PERIOD
*/
NUM_PERIOD: 110,
/**
* NUM_DIVISION
*/
NUM_DIVISION: 111,
/**
* F1
*/
F1: 112,
/**
* F2
*/
F2: 113,
/**
* F3
*/
F3: 114,
/**
* F4
*/
F4: 115,
/**
* F5
*/
F5: 116,
/**
* F6
*/
F6: 117,
/**
* F7
*/
F7: 118,
/**
* F8
*/
F8: 119,
/**
* F9
*/
F9: 120,
/**
* F10
*/
F10: 121,
/**
* F11
*/
F11: 122,
/**
* F12
*/
F12: 123,
/**
* NUMLOCK
*/
NUMLOCK: 144,
/**
* SEMICOLON
*/
SEMICOLON: 186,
// needs localization
/**
* DASH
*/
DASH: 189,
// needs localization
/**
* EQUALS
*/
EQUALS: 187,
// needs localization
/**
* COMMA
*/
COMMA: 188,
// needs localization
/**
* PERIOD
*/
PERIOD: 190,
// needs localization
/**
* SLASH
*/
SLASH: 191,
// needs localization
/**
* APOSTROPHE
*/
APOSTROPHE: 192,
// needs localization
/**
* SINGLE_QUOTE
*/
SINGLE_QUOTE: 222,
// needs localization
/**
* OPEN_SQUARE_BRACKET
*/
OPEN_SQUARE_BRACKET: 219,
// needs localization
/**
* BACKSLASH
*/
BACKSLASH: 220,
// needs localization
/**
* CLOSE_SQUARE_BRACKET
*/
CLOSE_SQUARE_BRACKET: 221,
// needs localization
/**
* WIN_KEY
*/
WIN_KEY: 224,
/**
* MAC_FF_META
*/
MAC_FF_META: 224,
// Firefox (Gecko) fires this for the meta key instead of 91
/**
* WIN_IME
*/
WIN_IME: 229,
// ======================== Function ========================
/**
* whether text and modified key is entered at the same time.
*/
isTextModifyingKeyEvent: function isTextModifyingKeyEvent(e) {
var keyCode = e.keyCode;
if (e.altKey && !e.ctrlKey || e.metaKey ||
// Function keys don't generate text
keyCode >= KeyCode.F1 && keyCode <= KeyCode.F12) {
return false;
}
// The following keys are quite harmless, even in combination with
// CTRL, ALT or SHIFT.
switch (keyCode) {
case KeyCode.ALT:
case KeyCode.CAPS_LOCK:
case KeyCode.CONTEXT_MENU:
case KeyCode.CTRL:
case KeyCode.DOWN:
case KeyCode.END:
case KeyCode.ESC:
case KeyCode.HOME:
case KeyCode.INSERT:
case KeyCode.LEFT:
case KeyCode.MAC_FF_META:
case KeyCode.META:
case KeyCode.NUMLOCK:
case KeyCode.NUM_CENTER:
case KeyCode.PAGE_DOWN:
case KeyCode.PAGE_UP:
case KeyCode.PAUSE:
case KeyCode.PRINT_SCREEN:
case KeyCode.RIGHT:
case KeyCode.SHIFT:
case KeyCode.UP:
case KeyCode.WIN_KEY:
case KeyCode.WIN_KEY_RIGHT:
return false;
default:
return true;
}
},
/**
* whether character is entered.
*/
isCharacterKey: function isCharacterKey(keyCode) {
if (keyCode >= KeyCode.ZERO && keyCode <= KeyCode.NINE) {
return true;
}
if (keyCode >= KeyCode.NUM_ZERO && keyCode <= KeyCode.NUM_MULTIPLY) {
return true;
}
if (keyCode >= KeyCode.A && keyCode <= KeyCode.Z) {
return true;
}
// Safari sends zero key code for non-latin characters.
if (window.navigator.userAgent.indexOf('WebKit') !== -1 && keyCode === 0) {
return true;
}
switch (keyCode) {
case KeyCode.SPACE:
case KeyCode.QUESTION_MARK:
case KeyCode.NUM_PLUS:
case KeyCode.NUM_MINUS:
case KeyCode.NUM_PERIOD:
case KeyCode.NUM_DIVISION:
case KeyCode.SEMICOLON:
case KeyCode.DASH:
case KeyCode.EQUALS:
case KeyCode.COMMA:
case KeyCode.PERIOD:
case KeyCode.SLASH:
case KeyCode.APOSTROPHE:
case KeyCode.SINGLE_QUOTE:
case KeyCode.OPEN_SQUARE_BRACKET:
case KeyCode.BACKSLASH:
case KeyCode.CLOSE_SQUARE_BRACKET:
return true;
default:
return false;
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (KeyCode);
/***/ }),
/***/ "4MGa":
/*!********************************************!*\
!*** ./src/styles/iconeditor/iconfont.css ***!
\********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "4RId":
/*!************************************************************************!*\
!*** ./node_modules/dva-immer/node_modules/immer/dist/immer.module.js ***!
\************************************************************************/
/*! exports provided: default, Immer, applyPatches, createDraft, finishDraft, immerable, isDraft, isDraftable, nothing, original, produce, setAutoFreeze, setUseProxies */
/*! all exports used */
/*! ModuleConcatenation bailout: Module uses injected variables (process) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Immer", function() { return Immer; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "applyPatches", function() { return applyPatches$1; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createDraft", function() { return createDraft; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "finishDraft", function() { return finishDraft; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "immerable", function() { return DRAFTABLE; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDraft", function() { return isDraft; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isDraftable", function() { return isDraftable; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "nothing", function() { return NOTHING; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "original", function() { return original; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "produce", function() { return produce; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setAutoFreeze", function() { return setAutoFreeze; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setUseProxies", function() { return setUseProxies; });
var obj;
var NOTHING = typeof Symbol !== "undefined" ? Symbol("immer-nothing") : ( obj = {}, obj["immer-nothing"] = true, obj );
var DRAFTABLE = typeof Symbol !== "undefined" ? Symbol.for("immer-draftable") : "__$immer_draftable";
var DRAFT_STATE = typeof Symbol !== "undefined" ? Symbol.for("immer-state") : "__$immer_state";
function isDraft(value) {
return !!value && !!value[DRAFT_STATE];
}
function isDraftable(value) {
if (!value || typeof value !== "object") { return false; }
if (Array.isArray(value)) { return true; }
var proto = Object.getPrototypeOf(value);
if (!proto || proto === Object.prototype) { return true; }
return !!value[DRAFTABLE] || !!value.constructor[DRAFTABLE];
}
function original(value) {
if (value && value[DRAFT_STATE]) {
return value[DRAFT_STATE].base;
} // otherwise return undefined
}
var assign = Object.assign || function assign(target, value) {
for (var key in value) {
if (has(value, key)) {
target[key] = value[key];
}
}
return target;
};
var ownKeys = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : typeof Object.getOwnPropertySymbols !== "undefined" ? function (obj) { return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj)); } : Object.getOwnPropertyNames;
function shallowCopy(base, invokeGetters) {
if ( invokeGetters === void 0 ) invokeGetters = false;
if (Array.isArray(base)) { return base.slice(); }
var clone = Object.create(Object.getPrototypeOf(base));
ownKeys(base).forEach(function (key) {
if (key === DRAFT_STATE) {
return; // Never copy over draft state.
}
var desc = Object.getOwnPropertyDescriptor(base, key);
var value = desc.value;
if (desc.get) {
if (!invokeGetters) {
throw new Error("Immer drafts cannot have computed properties");
}
value = desc.get.call(base);
}
if (desc.enumerable) {
clone[key] = value;
} else {
Object.defineProperty(clone, key, {
value: value,
writable: true,
configurable: true
});
}
});
return clone;
}
function each(value, cb) {
if (Array.isArray(value)) {
for (var i = 0; i < value.length; i++) { cb(i, value[i], value); }
} else {
ownKeys(value).forEach(function (key) { return cb(key, value[key], value); });
}
}
function isEnumerable(base, prop) {
return Object.getOwnPropertyDescriptor(base, prop).enumerable;
}
function has(thing, prop) {
return Object.prototype.hasOwnProperty.call(thing, prop);
}
function is(x, y) {
// From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js
if (x === y) {
return x !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
/** Each scope represents a `produce` call. */
var ImmerScope = function ImmerScope(parent) {
this.drafts = [];
this.parent = parent; // Whenever the modified draft contains a draft from another scope, we
// need to prevent auto-freezing so the unowned draft can be finalized.
this.canAutoFreeze = true; // To avoid prototype lookups:
this.patches = null;
};
ImmerScope.prototype.usePatches = function usePatches (patchListener) {
if (patchListener) {
this.patches = [];
this.inversePatches = [];
this.patchListener = patchListener;
}
};
ImmerScope.prototype.revoke = function revoke$1 () {
this.leave();
this.drafts.forEach(revoke);
this.drafts = null; // Make draft-related methods throw.
};
ImmerScope.prototype.leave = function leave () {
if (this === ImmerScope.current) {
ImmerScope.current = this.parent;
}
};
ImmerScope.current = null;
ImmerScope.enter = function () {
return this.current = new ImmerScope(this.current);
};
function revoke(draft) {
draft[DRAFT_STATE].revoke();
}
// but share them all instead
var descriptors = {};
function willFinalize(scope, result, isReplaced) {
scope.drafts.forEach(function (draft) {
draft[DRAFT_STATE].finalizing = true;
});
if (!isReplaced) {
if (scope.patches) {
markChangesRecursively(scope.drafts[0]);
} // This is faster when we don't care about which attributes changed.
markChangesSweep(scope.drafts);
} // When a child draft is returned, look for changes.
else if (isDraft(result) && result[DRAFT_STATE].scope === scope) {
markChangesSweep(scope.drafts);
}
}
function createProxy(base, parent) {
var isArray = Array.isArray(base);
var draft = clonePotentialDraft(base);
each(draft, function (prop) {
proxyProperty(draft, prop, isArray || isEnumerable(base, prop));
}); // See "proxy.js" for property documentation.
var scope = parent ? parent.scope : ImmerScope.current;
var state = {
scope: scope,
modified: false,
finalizing: false,
// es5 only
finalized: false,
assigned: {},
parent: parent,
base: base,
draft: draft,
copy: null,
revoke: revoke$1,
revoked: false // es5 only
};
createHiddenProperty(draft, DRAFT_STATE, state);
scope.drafts.push(draft);
return draft;
}
function revoke$1() {
this.revoked = true;
}
function source(state) {
return state.copy || state.base;
} // Access a property without creating an Immer draft.
function peek(draft, prop) {
var state = draft[DRAFT_STATE];
if (state && !state.finalizing) {
state.finalizing = true;
var value = draft[prop];
state.finalizing = false;
return value;
}
return draft[prop];
}
function get(state, prop) {
assertUnrevoked(state);
var value = peek(source(state), prop);
if (state.finalizing) { return value; } // Create a draft if the value is unmodified.
if (value === peek(state.base, prop) && isDraftable(value)) {
prepareCopy(state);
return state.copy[prop] = createProxy(value, state);
}
return value;
}
function set(state, prop, value) {
assertUnrevoked(state);
state.assigned[prop] = true;
if (!state.modified) {
if (is(value, peek(source(state), prop))) { return; }
markChanged(state);
prepareCopy(state);
}
state.copy[prop] = value;
}
function markChanged(state) {
if (!state.modified) {
state.modified = true;
if (state.parent) { markChanged(state.parent); }
}
}
function prepareCopy(state) {
if (!state.copy) { state.copy = clonePotentialDraft(state.base); }
}
function clonePotentialDraft(base) {
var state = base && base[DRAFT_STATE];
if (state) {
state.finalizing = true;
var draft = shallowCopy(state.draft, true);
state.finalizing = false;
return draft;
}
return shallowCopy(base);
}
function proxyProperty(draft, prop, enumerable) {
var desc = descriptors[prop];
if (desc) {
desc.enumerable = enumerable;
} else {
descriptors[prop] = desc = {
configurable: true,
enumerable: enumerable,
get: function get$1() {
return get(this[DRAFT_STATE], prop);
},
set: function set$1(value) {
set(this[DRAFT_STATE], prop, value);
}
};
}
Object.defineProperty(draft, prop, desc);
}
function assertUnrevoked(state) {
if (state.revoked === true) { throw new Error("Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + JSON.stringify(source(state))); }
} // This looks expensive, but only proxies are visited, and only objects without known changes are scanned.
function markChangesSweep(drafts) {
// The natural order of drafts in the `scope` array is based on when they
// were accessed. By processing drafts in reverse natural order, we have a
// better chance of processing leaf nodes first. When a leaf node is known to
// have changed, we can avoid any traversal of its ancestor nodes.
for (var i = drafts.length - 1; i >= 0; i--) {
var state = drafts[i][DRAFT_STATE];
if (!state.modified) {
if (Array.isArray(state.base)) {
if (hasArrayChanges(state)) { markChanged(state); }
} else if (hasObjectChanges(state)) { markChanged(state); }
}
}
}
function markChangesRecursively(object) {
if (!object || typeof object !== "object") { return; }
var state = object[DRAFT_STATE];
if (!state) { return; }
var base = state.base;
var draft = state.draft;
var assigned = state.assigned;
if (!Array.isArray(object)) {
// Look for added keys.
Object.keys(draft).forEach(function (key) {
// The `undefined` check is a fast path for pre-existing keys.
if (base[key] === undefined && !has(base, key)) {
assigned[key] = true;
markChanged(state);
} else if (!assigned[key]) {
// Only untouched properties trigger recursion.
markChangesRecursively(draft[key]);
}
}); // Look for removed keys.
Object.keys(base).forEach(function (key) {
// The `undefined` check is a fast path for pre-existing keys.
if (draft[key] === undefined && !has(draft, key)) {
assigned[key] = false;
markChanged(state);
}
});
} else if (hasArrayChanges(state)) {
markChanged(state);
assigned.length = true;
if (draft.length < base.length) {
for (var i = draft.length; i < base.length; i++) { assigned[i] = false; }
} else {
for (var i$1 = base.length; i$1 < draft.length; i$1++) { assigned[i$1] = true; }
}
for (var i$2 = 0; i$2 < draft.length; i$2++) {
// Only untouched indices trigger recursion.
if (assigned[i$2] === undefined) { markChangesRecursively(draft[i$2]); }
}
}
}
function hasObjectChanges(state) {
var base = state.base;
var draft = state.draft; // Search for added keys and changed keys. Start at the back, because
// non-numeric keys are ordered by time of definition on the object.
var keys = Object.keys(draft);
for (var i = keys.length - 1; i >= 0; i--) {
var key = keys[i];
var baseValue = base[key]; // The `undefined` check is a fast path for pre-existing keys.
if (baseValue === undefined && !has(base, key)) {
return true;
} // Once a base key is deleted, future changes go undetected, because its
// descriptor is erased. This branch detects any missed changes.
else {
var value = draft[key];
var state$1 = value && value[DRAFT_STATE];
if (state$1 ? state$1.base !== baseValue : !is(value, baseValue)) {
return true;
}
}
} // At this point, no keys were added or changed.
// Compare key count to determine if keys were deleted.
return keys.length !== Object.keys(base).length;
}
function hasArrayChanges(state) {
var draft = state.draft;
if (draft.length !== state.base.length) { return true; } // See #116
// If we first shorten the length, our array interceptors will be removed.
// If after that new items are added, result in the same original length,
// those last items will have no intercepting property.
// So if there is no own descriptor on the last position, we know that items were removed and added
// N.B.: splice, unshift, etc only shift values around, but not prop descriptors, so we only have to check
// the last one
var descriptor = Object.getOwnPropertyDescriptor(draft, draft.length - 1); // descriptor can be null, but only for newly created sparse arrays, eg. new Array(10)
if (descriptor && !descriptor.get) { return true; } // For all other cases, we don't have to compare, as they would have been picked up by the index setters
return false;
}
function createHiddenProperty(target, prop, value) {
Object.defineProperty(target, prop, {
value: value,
enumerable: false,
writable: true
});
}
var legacyProxy = /*#__PURE__*/Object.freeze({
willFinalize: willFinalize,
createProxy: createProxy
});
function willFinalize$1() {}
function createProxy$1(base, parent) {
var scope = parent ? parent.scope : ImmerScope.current;
var state = {
// Track which produce call this is associated with.
scope: scope,
// True for both shallow and deep changes.
modified: false,
// Used during finalization.
finalized: false,
// Track which properties have been assigned (true) or deleted (false).
assigned: {},
// The parent draft state.
parent: parent,
// The base state.
base: base,
// The base proxy.
draft: null,
// Any property proxies.
drafts: {},
// The base copy with any updated values.
copy: null,
// Called by the `produce` function.
revoke: null
};
var ref = Array.isArray(base) ? // [state] is used for arrays, to make sure the proxy is array-ish and not violate invariants,
// although state itself is an object
Proxy.revocable([state], arrayTraps) : Proxy.revocable(state, objectTraps);
var revoke = ref.revoke;
var proxy = ref.proxy;
state.draft = proxy;
state.revoke = revoke;
scope.drafts.push(proxy);
return proxy;
}
var objectTraps = {
get: get$1,
has: function has(target, prop) {
return prop in source$1(target);
},
ownKeys: function ownKeys(target) {
return Reflect.ownKeys(source$1(target));
},
set: set$1,
deleteProperty: deleteProperty,
getOwnPropertyDescriptor: getOwnPropertyDescriptor,
defineProperty: function defineProperty() {
throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
},
getPrototypeOf: function getPrototypeOf(target) {
return Object.getPrototypeOf(target.base);
},
setPrototypeOf: function setPrototypeOf() {
throw new Error("Object.setPrototypeOf() cannot be used on an Immer draft"); // prettier-ignore
}
};
var arrayTraps = {};
each(objectTraps, function (key, fn) {
arrayTraps[key] = function () {
arguments[0] = arguments[0][0];
return fn.apply(this, arguments);
};
});
arrayTraps.deleteProperty = function (state, prop) {
if (isNaN(parseInt(prop))) {
throw new Error("Immer only supports deleting array indices"); // prettier-ignore
}
return objectTraps.deleteProperty.call(this, state[0], prop);
};
arrayTraps.set = function (state, prop, value) {
if (prop !== "length" && isNaN(parseInt(prop))) {
throw new Error("Immer only supports setting array indices and the 'length' property"); // prettier-ignore
}
return objectTraps.set.call(this, state[0], prop, value);
}; // returns the object we should be reading the current value from, which is base, until some change has been made
function source$1(state) {
return state.copy || state.base;
} // Access a property without creating an Immer draft.
function peek$1(draft, prop) {
var state = draft[DRAFT_STATE];
var desc = Reflect.getOwnPropertyDescriptor(state ? source$1(state) : draft, prop);
return desc && desc.value;
}
function get$1(state, prop) {
if (prop === DRAFT_STATE) { return state; }
var drafts = state.drafts; // Check for existing draft in unmodified state.
if (!state.modified && has(drafts, prop)) {
return drafts[prop];
}
var value = source$1(state)[prop];
if (state.finalized || !isDraftable(value)) {
return value;
} // Check for existing draft in modified state.
if (state.modified) {
// Assigned values are never drafted. This catches any drafts we created, too.
if (value !== peek$1(state.base, prop)) { return value; } // Store drafts on the copy (when one exists).
drafts = state.copy;
}
return drafts[prop] = createProxy$1(value, state);
}
function set$1(state, prop, value) {
if (!state.modified) {
var baseValue = peek$1(state.base, prop); // Optimize based on value's truthiness. Truthy values are guaranteed to
// never be undefined, so we can avoid the `in` operator. Lastly, truthy
// values may be drafts, but falsy values are never drafts.
var isUnchanged = value ? is(baseValue, value) || value === state.drafts[prop] : is(baseValue, value) && prop in state.base;
if (isUnchanged) { return true; }
markChanged$1(state);
}
state.assigned[prop] = true;
state.copy[prop] = value;
return true;
}
function deleteProperty(state, prop) {
// The `undefined` check is a fast path for pre-existing keys.
if (peek$1(state.base, prop) !== undefined || prop in state.base) {
state.assigned[prop] = false;
markChanged$1(state);
}
if (state.copy) { delete state.copy[prop]; }
return true;
} // Note: We never coerce `desc.value` into an Immer draft, because we can't make
// the same guarantee in ES5 mode.
function getOwnPropertyDescriptor(state, prop) {
var owner = source$1(state);
var desc = Reflect.getOwnPropertyDescriptor(owner, prop);
if (desc) {
desc.writable = true;
desc.configurable = !Array.isArray(owner) || prop !== "length";
}
return desc;
}
function markChanged$1(state) {
if (!state.modified) {
state.modified = true;
state.copy = assign(shallowCopy(state.base), state.drafts);
state.drafts = null;
if (state.parent) { markChanged$1(state.parent); }
}
}
var modernProxy = /*#__PURE__*/Object.freeze({
willFinalize: willFinalize$1,
createProxy: createProxy$1
});
function generatePatches(state, basePath, patches, inversePatches) {
Array.isArray(state.base) ? generateArrayPatches(state, basePath, patches, inversePatches) : generateObjectPatches(state, basePath, patches, inversePatches);
}
function generateArrayPatches(state, basePath, patches, inversePatches) {
var assign, assign$1;
var base = state.base;
var copy = state.copy;
var assigned = state.assigned; // Reduce complexity by ensuring `base` is never longer.
if (copy.length < base.length) {
(assign = [copy, base], base = assign[0], copy = assign[1]);
(assign$1 = [inversePatches, patches], patches = assign$1[0], inversePatches = assign$1[1]);
}
var delta = copy.length - base.length; // Find the first replaced index.
var start = 0;
while (base[start] === copy[start] && start < base.length) {
++start;
} // Find the last replaced index. Search from the end to optimize splice patches.
var end = base.length;
while (end > start && base[end - 1] === copy[end + delta - 1]) {
--end;
} // Process replaced indices.
for (var i = start; i < end; ++i) {
if (assigned[i] && copy[i] !== base[i]) {
var path = basePath.concat([i]);
patches.push({
op: "replace",
path: path,
value: copy[i]
});
inversePatches.push({
op: "replace",
path: path,
value: base[i]
});
}
}
var useRemove = end != base.length;
var replaceCount = patches.length; // Process added indices.
for (var i$1 = end + delta - 1; i$1 >= end; --i$1) {
var path$1 = basePath.concat([i$1]);
patches[replaceCount + i$1 - end] = {
op: "add",
path: path$1,
value: copy[i$1]
};
if (useRemove) {
inversePatches.push({
op: "remove",
path: path$1
});
}
} // One "replace" patch reverses all non-splicing "add" patches.
if (!useRemove) {
inversePatches.push({
op: "replace",
path: basePath.concat(["length"]),
value: base.length
});
}
}
function generateObjectPatches(state, basePath, patches, inversePatches) {
var base = state.base;
var copy = state.copy;
each(state.assigned, function (key, assignedValue) {
var origValue = base[key];
var value = copy[key];
var op = !assignedValue ? "remove" : key in base ? "replace" : "add";
if (origValue === value && op === "replace") { return; }
var path = basePath.concat(key);
patches.push(op === "remove" ? {
op: op,
path: path
} : {
op: op,
path: path,
value: value
});
inversePatches.push(op === "add" ? {
op: "remove",
path: path
} : op === "remove" ? {
op: "add",
path: path,
value: origValue
} : {
op: "replace",
path: path,
value: origValue
});
});
}
function applyPatches(draft, patches) {
for (var i = 0; i < patches.length; i++) {
var patch = patches[i];
var path = patch.path;
if (path.length === 0 && patch.op === "replace") {
draft = patch.value;
} else {
var base = draft;
for (var i$1 = 0; i$1 < path.length - 1; i$1++) {
base = base[path[i$1]];
if (!base || typeof base !== "object") { throw new Error("Cannot apply patch, path doesn't resolve: " + path.join("/")); } // prettier-ignore
}
var key = path[path.length - 1];
switch (patch.op) {
case "replace":
base[key] = patch.value;
break;
case "add":
if (Array.isArray(base)) {
// TODO: support "foo/-" paths for appending to an array
base.splice(key, 0, patch.value);
} else {
base[key] = patch.value;
}
break;
case "remove":
if (Array.isArray(base)) {
base.splice(key, 1);
} else {
delete base[key];
}
break;
default:
throw new Error("Unsupported patch operation: " + patch.op);
}
}
}
return draft;
}
function verifyMinified() {}
var configDefaults = {
useProxies: typeof Proxy !== "undefined" && typeof Reflect !== "undefined",
autoFreeze: typeof process !== "undefined" ? "production" !== "production" : verifyMinified.name === "verifyMinified",
onAssign: null,
onDelete: null,
onCopy: null
};
var Immer = function Immer(config) {
assign(this, configDefaults, config);
this.setUseProxies(this.useProxies);
this.produce = this.produce.bind(this);
};
Immer.prototype.produce = function produce (base, recipe, patchListener) {
var this$1 = this;
// curried invocation
if (typeof base === "function" && typeof recipe !== "function") {
var defaultBase = recipe;
recipe = base; // prettier-ignore
return function (base) {
if ( base === void 0 ) base = defaultBase;
var args = [], len = arguments.length - 1;
while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];
return this$1.produce(base, function (draft) { return recipe.call.apply(recipe, [ draft, draft ].concat( args )); });
};
} // prettier-ignore
{
if (typeof recipe !== "function") {
throw new Error("The first or second argument to `produce` must be a function");
}
if (patchListener !== undefined && typeof patchListener !== "function") {
throw new Error("The third argument to `produce` must be a function or undefined");
}
}
var result; // Only plain objects, arrays, and "immerable classes" are drafted.
if (isDraftable(base)) {
var scope = ImmerScope.enter();
var proxy = this.createProxy(base);
var hasError = true;
try {
result = recipe.call(proxy, proxy);
hasError = false;
} finally {
// finally instead of catch + rethrow better preserves original stack
if (hasError) { scope.revoke(); }else { scope.leave(); }
}
if (result instanceof Promise) {
return result.then(function (result) {
scope.usePatches(patchListener);
return this$1.processResult(result, scope);
}, function (error) {
scope.revoke();
throw error;
});
}
scope.usePatches(patchListener);
return this.processResult(result, scope);
} else {
result = recipe(base);
if (result === undefined) { return base; }
return result !== NOTHING ? result : undefined;
}
};
Immer.prototype.createDraft = function createDraft (base) {
if (!isDraftable(base)) {
throw new Error("First argument to `createDraft` must be a plain object, an array, or an immerable object"); // prettier-ignore
}
var scope = ImmerScope.enter();
var proxy = this.createProxy(base);
proxy[DRAFT_STATE].isManual = true;
scope.leave();
return proxy;
};
Immer.prototype.finishDraft = function finishDraft (draft, patchListener) {
var state = draft && draft[DRAFT_STATE];
if (!state || !state.isManual) {
throw new Error("First argument to `finishDraft` must be a draft returned by `createDraft`"); // prettier-ignore
}
if (state.finalized) {
throw new Error("The given draft is already finalized"); // prettier-ignore
}
var scope = state.scope;
scope.usePatches(patchListener);
return this.processResult(undefined, scope);
};
Immer.prototype.setAutoFreeze = function setAutoFreeze (value) {
this.autoFreeze = value;
};
Immer.prototype.setUseProxies = function setUseProxies (value) {
this.useProxies = value;
assign(this, value ? modernProxy : legacyProxy);
};
Immer.prototype.applyPatches = function applyPatches$1 (base, patches) {
// Mutate the base state when a draft is passed.
if (isDraft(base)) {
return applyPatches(base, patches);
} // Otherwise, produce a copy of the base state.
return this.produce(base, function (draft) { return applyPatches(draft, patches); });
};
/** @internal */
Immer.prototype.processResult = function processResult (result, scope) {
var baseDraft = scope.drafts[0];
var isReplaced = result !== undefined && result !== baseDraft;
this.willFinalize(scope, result, isReplaced);
if (isReplaced) {
if (baseDraft[DRAFT_STATE].modified) {
scope.revoke();
throw new Error("An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft."); // prettier-ignore
}
if (isDraftable(result)) {
// Finalize the result in case it contains (or is) a subset of the draft.
result = this.finalize(result, null, scope);
}
if (scope.patches) {
scope.patches.push({
op: "replace",
path: [],
value: result
});
scope.inversePatches.push({
op: "replace",
path: [],
value: baseDraft[DRAFT_STATE].base
});
}
} else {
// Finalize the base draft.
result = this.finalize(baseDraft, [], scope);
}
scope.revoke();
if (scope.patches) {
scope.patchListener(scope.patches, scope.inversePatches);
}
return result !== NOTHING ? result : undefined;
};
/**
* @internal
* Finalize a draft, returning either the unmodified base state or a modified
* copy of the base state.
*/
Immer.prototype.finalize = function finalize (draft, path, scope) {
var this$1 = this;
var state = draft[DRAFT_STATE];
if (!state) {
if (Object.isFrozen(draft)) { return draft; }
return this.finalizeTree(draft, null, scope);
} // Never finalize drafts owned by another scope.
if (state.scope !== scope) {
return draft;
}
if (!state.modified) {
return state.base;
}
if (!state.finalized) {
state.finalized = true;
this.finalizeTree(state.draft, path, scope);
if (this.onDelete) {
// The `assigned` object is unreliable with ES5 drafts.
if (this.useProxies) {
var assigned = state.assigned;
for (var prop in assigned) {
if (!assigned[prop]) { this.onDelete(state, prop); }
}
} else {
var base = state.base;
var copy = state.copy;
each(base, function (prop) {
if (!has(copy, prop)) { this$1.onDelete(state, prop); }
});
}
}
if (this.onCopy) {
this.onCopy(state);
} // At this point, all descendants of `state.copy` have been finalized,
// so we can be sure that `scope.canAutoFreeze` is accurate.
if (this.autoFreeze && scope.canAutoFreeze) {
Object.freeze(state.copy);
}
if (path && scope.patches) {
generatePatches(state, path, scope.patches, scope.inversePatches);
}
}
return state.copy;
};
/**
* @internal
* Finalize all drafts in the given state tree.
*/
Immer.prototype.finalizeTree = function finalizeTree (root, rootPath, scope) {
var this$1 = this;
var state = root[DRAFT_STATE];
if (state) {
if (!this.useProxies) {
// Create the final copy, with added keys and without deleted keys.
state.copy = shallowCopy(state.draft, true);
}
root = state.copy;
}
var needPatches = !!rootPath && !!scope.patches;
var finalizeProperty = function (prop, value, parent) {
if (value === parent) {
throw Error("Immer forbids circular references");
} // In the `finalizeTree` method, only the `root` object may be a draft.
var isDraftProp = !!state && parent === root;
if (isDraft(value)) {
var path = isDraftProp && needPatches && !state.assigned[prop] ? rootPath.concat(prop) : null; // Drafts owned by `scope` are finalized here.
value = this$1.finalize(value, path, scope); // Drafts from another scope must prevent auto-freezing.
if (isDraft(value)) {
scope.canAutoFreeze = false;
} // Preserve non-enumerable properties.
if (Array.isArray(parent) || isEnumerable(parent, prop)) {
parent[prop] = value;
} else {
Object.defineProperty(parent, prop, {
value: value
});
} // Unchanged drafts are never passed to the `onAssign` hook.
if (isDraftProp && value === state.base[prop]) { return; }
} // Unchanged draft properties are ignored.
else if (isDraftProp && is(value, state.base[prop])) {
return;
} // Search new objects for unfinalized drafts. Frozen objects should never contain drafts.
else if (isDraftable(value) && !Object.isFrozen(value)) {
each(value, finalizeProperty);
}
if (isDraftProp && this$1.onAssign) {
this$1.onAssign(state, prop, value);
}
};
each(root, finalizeProperty);
return root;
};
var immer = new Immer();
/**
* The `produce` function takes a value and a "recipe function" (whose
* return value often depends on the base state). The recipe function is
* free to mutate its first argument however it wants. All mutations are
* only ever applied to a __copy__ of the base state.
*
* Pass only a function to create a "curried producer" which relieves you
* from passing the recipe function every time.
*
* Only plain objects and arrays are made mutable. All other objects are
* considered uncopyable.
*
* Note: This function is __bound__ to its `Immer` instance.
*
* @param {any} base - the initial state
* @param {Function} producer - function that receives a proxy of the base state as first argument and which can be freely modified
* @param {Function} patchListener - optional function that will be called with all the patches produced here
* @returns {any} a new state, or the initial state if nothing was modified
*/
var produce = immer.produce;
/**
* Pass true to automatically freeze all copies created by Immer.
*
* By default, auto-freezing is disabled in production.
*/
var setAutoFreeze = immer.setAutoFreeze.bind(immer);
/**
* Pass true to use the ES2015 `Proxy` class when creating drafts, which is
* always faster than using ES5 proxies.
*
* By default, feature detection is used, so calling this is rarely necessary.
*/
var setUseProxies = immer.setUseProxies.bind(immer);
/**
* Apply an array of Immer patches to the first argument.
*
* This function is a producer, which means copy-on-write is in effect.
*/
var applyPatches$1 = immer.applyPatches.bind(immer);
/**
* Create an Immer draft from the given base state, which may be a draft itself.
* The draft can be modified until you finalize it with the `finishDraft` function.
*/
var createDraft = immer.createDraft.bind(immer);
/**
* Finalize an Immer draft from a `createDraft` call, returning the base state
* (if no changes were made) or a modified copy. The draft must *not* be
* mutated afterwards.
*
* Pass a function as the 2nd argument to generate Immer patches based on the
* changes that were made.
*/
var finishDraft = immer.finishDraft.bind(immer);
/* harmony default export */ __webpack_exports__["default"] = (produce);
//# sourceMappingURL=immer.module.js.map
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../node-libs-browser/mock/process.js */ "Q2Ig")))
/***/ }),
/***/ "4WOD":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-prototype-of.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "93I0");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "4Xet");
var IE_PROTO = sharedKey('IE_PROTO');
var ObjectPrototype = Object.prototype;
// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {
O = toObject(O);
if (has(O, IE_PROTO)) return O[IE_PROTO];
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
return O.constructor.prototype;
} return O instanceof Object ? ObjectPrototype : null;
};
/***/ }),
/***/ "4XaG":
/*!******************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.symbol.observable.js ***!
\******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.observable` well-known symbol
// https://github.com/tc39/proposal-observable
defineWellKnownSymbol('observable');
/***/ }),
/***/ "4Xet":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/correct-prototype-getter.js ***!
\********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
module.exports = !fails(function () {
function F() { /* empty */ }
F.prototype.constructor = null;
return Object.getPrototypeOf(new F()) !== F.prototype;
});
/***/ }),
/***/ "4h0Y":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.is-frozen.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var nativeIsFrozen = Object.isFrozen;
var FAILS_ON_PRIMITIVES = fails(function () { nativeIsFrozen(1); });
// `Object.isFrozen` method
// https://tc39.github.io/ecma262/#sec-object.isfrozen
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
isFrozen: function isFrozen(it) {
return isObject(it) ? nativeIsFrozen ? nativeIsFrozen(it) : false : true;
}
});
/***/ }),
/***/ "4mDm":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.array.iterator.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "P4y1");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "fdAy");
var ARRAY_ITERATOR = 'Array Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
// `Array.prototype.entries` method
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
// `Array.prototype.keys` method
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
// `Array.prototype.values` method
// https://tc39.github.io/ecma262/#sec-array.prototype.values
// `Array.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-array.prototype-@@iterator
// `CreateArrayIterator` internal method
// https://tc39.github.io/ecma262/#sec-createarrayiterator
module.exports = defineIterator(Array, 'Array', function (iterated, kind) {
setInternalState(this, {
type: ARRAY_ITERATOR,
target: toIndexedObject(iterated), // target
index: 0, // next index
kind: kind // kind
});
// `%ArrayIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%arrayiteratorprototype%.next
}, function () {
var state = getInternalState(this);
var target = state.target;
var kind = state.kind;
var index = state.index++;
if (!target || index >= target.length) {
state.target = undefined;
return { value: undefined, done: true };
}
if (kind == 'keys') return { value: index, done: false };
if (kind == 'values') return { value: target[index], done: false };
return { value: [index, target[index]], done: false };
}, 'values');
// argumentsList[@@iterator] is %ArrayProto_values%
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
Iterators.Arguments = Iterators.Array;
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('keys');
addToUnscopables('values');
addToUnscopables('entries');
/***/ }),
/***/ "4oU/":
/*!************************************************************!*\
!*** ./node_modules/core-js/internals/number-is-finite.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var globalIsFinite = global.isFinite;
// `Number.isFinite` method
// https://tc39.github.io/ecma262/#sec-number.isfinite
module.exports = Number.isFinite || function isFinite(it) {
return typeof it == 'number' && globalIsFinite(it);
};
/***/ }),
/***/ "4syw":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/redefine-all.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
module.exports = function (target, src, options) {
for (var key in src) redefine(target, key, src[key], options);
return target;
};
/***/ }),
/***/ "55Ip":
/*!***************************************************************!*\
!*** ./node_modules/react-router-dom/esm/react-router-dom.js ***!
\***************************************************************/
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, BrowserRouter, HashRouter, Link, NavLink */
/*! exports used: Link, NavLink */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export BrowserRouter */
/* unused harmony export HashRouter */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Link; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return NavLink; });
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router */ "Ty5D");
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "dI71");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! history */ "YS25");
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "wx14");
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "zLVn");
/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! tiny-invariant */ "9R94");
/**
* The public API for a <Router> that uses HTML5 history.
*/
var BrowserRouter =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(BrowserRouter, _React$Component);
function BrowserRouter() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createBrowserHistory */ "a"])(_this.props);
return _this;
}
var _proto = BrowserRouter.prototype;
_proto.render = function render() {
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "e"], {
history: this.history,
children: this.props.children
});
};
return BrowserRouter;
}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);
if (false) {}
/**
* The public API for a <Router> that uses window.location.hash.
*/
var HashRouter =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(HashRouter, _React$Component);
function HashRouter() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.history = Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createHashHistory */ "b"])(_this.props);
return _this;
}
var _proto = HashRouter.prototype;
_proto.render = function render() {
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "e"], {
history: this.history,
children: this.props.children
});
};
return HashRouter;
}(react__WEBPACK_IMPORTED_MODULE_2___default.a.Component);
if (false) {}
var resolveToLocation = function resolveToLocation(to, currentLocation) {
return typeof to === "function" ? to(currentLocation) : to;
};
var normalizeToLocation = function normalizeToLocation(to, currentLocation) {
return typeof to === "string" ? Object(history__WEBPACK_IMPORTED_MODULE_3__[/* createLocation */ "c"])(to, null, null, currentLocation) : to;
};
var forwardRefShim = function forwardRefShim(C) {
return C;
};
var forwardRef = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;
if (typeof forwardRef === "undefined") {
forwardRef = forwardRefShim;
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
var LinkAnchor = forwardRef(function (_ref, forwardedRef) {
var innerRef = _ref.innerRef,
navigate = _ref.navigate,
_onClick = _ref.onClick,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_ref, ["innerRef", "navigate", "onClick"]);
var target = rest.target;
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, rest, {
onClick: function onClick(event) {
try {
if (_onClick) _onClick(event);
} catch (ex) {
event.preventDefault();
throw ex;
}
if (!event.defaultPrevented && // onClick prevented default
event.button === 0 && ( // ignore everything but left clicks
!target || target === "_self") && // let browser handle "target=_blank" etc.
!isModifiedEvent(event) // ignore clicks with modifier keys
) {
event.preventDefault();
navigate();
}
}
}); // React 15 compat
if (forwardRefShim !== forwardRef) {
props.ref = forwardedRef || innerRef;
} else {
props.ref = innerRef;
}
/* eslint-disable-next-line jsx-a11y/anchor-has-content */
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement("a", props);
});
if (false) {}
/**
* The public API for rendering a history-aware <a>.
*/
var Link = forwardRef(function (_ref2, forwardedRef) {
var _ref2$component = _ref2.component,
component = _ref2$component === void 0 ? LinkAnchor : _ref2$component,
replace = _ref2.replace,
to = _ref2.to,
innerRef = _ref2.innerRef,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_ref2, ["component", "replace", "to", "innerRef"]);
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "h"].Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(false) : void 0;
var history = context.history;
var location = normalizeToLocation(resolveToLocation(to, context.location), context.location);
var href = location ? history.createHref(location) : "";
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, rest, {
href: href,
navigate: function navigate() {
var location = resolveToLocation(to, context.location);
var method = replace ? history.replace : history.push;
method(location);
}
}); // React 15 compat
if (forwardRefShim !== forwardRef) {
props.ref = forwardedRef || innerRef;
} else {
props.innerRef = innerRef;
}
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(component, props);
});
});
if (false) { var refType, toType; }
var forwardRefShim$1 = function forwardRefShim(C) {
return C;
};
var forwardRef$1 = react__WEBPACK_IMPORTED_MODULE_2___default.a.forwardRef;
if (typeof forwardRef$1 === "undefined") {
forwardRef$1 = forwardRefShim$1;
}
function joinClassnames() {
for (var _len = arguments.length, classnames = new Array(_len), _key = 0; _key < _len; _key++) {
classnames[_key] = arguments[_key];
}
return classnames.filter(function (i) {
return i;
}).join(" ");
}
/**
* A <Link> wrapper that knows if it's "active" or not.
*/
var NavLink = forwardRef$1(function (_ref, forwardedRef) {
var _ref$ariaCurrent = _ref["aria-current"],
ariaCurrent = _ref$ariaCurrent === void 0 ? "page" : _ref$ariaCurrent,
_ref$activeClassName = _ref.activeClassName,
activeClassName = _ref$activeClassName === void 0 ? "active" : _ref$activeClassName,
activeStyle = _ref.activeStyle,
classNameProp = _ref.className,
exact = _ref.exact,
isActiveProp = _ref.isActive,
locationProp = _ref.location,
sensitive = _ref.sensitive,
strict = _ref.strict,
styleProp = _ref.style,
to = _ref.to,
innerRef = _ref.innerRef,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(_ref, ["aria-current", "activeClassName", "activeStyle", "className", "exact", "isActive", "location", "sensitive", "strict", "style", "to", "innerRef"]);
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* __RouterContext */ "h"].Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(false) : void 0;
var currentLocation = locationProp || context.location;
var toLocation = normalizeToLocation(resolveToLocation(to, currentLocation), currentLocation);
var path = toLocation.pathname; // Regex taken from: https://github.com/pillarjs/path-to-regexp/blob/master/index.js#L202
var escapedPath = path && path.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
var match = escapedPath ? Object(react_router__WEBPACK_IMPORTED_MODULE_0__[/* matchPath */ "i"])(currentLocation.pathname, {
path: escapedPath,
exact: exact,
sensitive: sensitive,
strict: strict
}) : null;
var isActive = !!(isActiveProp ? isActiveProp(match, currentLocation) : match);
var className = isActive ? joinClassnames(classNameProp, activeClassName) : classNameProp;
var style = isActive ? Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, styleProp, {}, activeStyle) : styleProp;
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({
"aria-current": isActive && ariaCurrent || null,
className: className,
style: style,
to: toLocation
}, rest); // React 15 compat
if (forwardRefShim$1 !== forwardRef$1) {
props.ref = forwardedRef || innerRef;
} else {
props.innerRef = innerRef;
}
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(Link, props);
});
});
if (false) { var ariaCurrentType; }
//# sourceMappingURL=react-router-dom.js.map
/***/ }),
/***/ "58Ye":
/*!******************************!*\
!*** ./src/styles/base.less ***!
\******************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "5921":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.of.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var of = __webpack_require__(/*! ../internals/collection-of */ "P940");
// `Map.of` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of
$({ target: 'Map', stat: true }, {
of: of
});
/***/ }),
/***/ "5D5o":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.is-sealed.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var nativeIsSealed = Object.isSealed;
var FAILS_ON_PRIMITIVES = fails(function () { nativeIsSealed(1); });
// `Object.isSealed` method
// https://tc39.github.io/ecma262/#sec-object.issealed
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
isSealed: function isSealed(it) {
return isObject(it) ? nativeIsSealed ? nativeIsSealed(it) : false : true;
}
});
/***/ }),
/***/ "5DmW":
/*!*******************************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js ***!
\*******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var nativeGetOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); });
var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
}
});
/***/ }),
/***/ "5FVT":
/*!*************************************!*\
!*** ./src/models/forums/detail.ts ***!
\*************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_forums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/forums */ "h+Ho");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var ForumsDetailModal = {
namespace: 'forumsDetail',
state: {
forumsDetailData: {}
},
effects: {
getForumsDetailData: function getForumsDetailData(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_forums__WEBPACK_IMPORTED_MODULE_1__[/* getForumsDetailData */ "b"], payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: "save",
payload: {
forumsDetailData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
setForumsDetailData: function setForumsDetailData(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return put({
type: "save",
payload: {
forumsDetailData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context2.stop();
}
}, _callee2);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref5) {
var dispatch = _ref5.dispatch,
history = _ref5.history;
return history.listen(function (_ref6) {
var pathname = _ref6.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (ForumsDetailModal);
/***/ }),
/***/ "5GeT":
/*!******************************************************!*\
!*** ./node_modules/axios/lib/helpers/toFormData.js ***!
\******************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module uses injected variables (Buffer) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(Buffer) {/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "xTJ+");
/* harmony import */ var _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../core/AxiosError.js */ "eRe6");
/* harmony import */ var _platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../platform/node/classes/FormData.js */ "RYHr");
// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored
/**
* Determines if the given thing is a array or js object.
*
* @param {string} thing - The object or array to be visited.
*
* @returns {boolean}
*/
function isVisitable(thing) {
return _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isPlainObject(thing) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArray(thing);
}
/**
* It removes the brackets from the end of a string
*
* @param {string} key - The key of the parameter.
*
* @returns {string} the key without the brackets.
*/
function removeBrackets(key) {
return _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endsWith(key, '[]') ? key.slice(0, -2) : key;
}
/**
* It takes a path, a key, and a boolean, and returns a string
*
* @param {string} path - The path to the current key.
* @param {string} key - The key of the current object being iterated over.
* @param {string} dots - If true, the key will be rendered with dots instead of brackets.
*
* @returns {string} The path to the current key.
*/
function renderKey(path, key, dots) {
if (!path) return key;
return path.concat(key).map(function each(token, i) {
// eslint-disable-next-line no-param-reassign
token = removeBrackets(token);
return !dots && i ? '[' + token + ']' : token;
}).join(dots ? '.' : '');
}
/**
* If the array is an array and none of its elements are visitable, then it's a flat array.
*
* @param {Array<any>} arr - The array to check
*
* @returns {boolean}
*/
function isFlatArray(arr) {
return _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArray(arr) && !arr.some(isVisitable);
}
const predicates = _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toFlatObject(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"], {}, null, function filter(prop) {
return /^is[A-Z]/.test(prop);
});
/**
* Convert a data object to FormData
*
* @param {Object} obj
* @param {?Object} [formData]
* @param {?Object} [options]
* @param {Function} [options.visitor]
* @param {Boolean} [options.metaTokens = true]
* @param {Boolean} [options.dots = false]
* @param {?Boolean} [options.indexes = false]
*
* @returns {Object}
**/
/**
* It converts an object into a FormData object
*
* @param {Object<any, any>} obj - The object to convert to form data.
* @param {string} formData - The FormData object to append to.
* @param {Object<string, any>} options
*
* @returns
*/
function toFormData(obj, formData, options) {
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isObject(obj)) {
throw new TypeError('target must be an object');
}
// eslint-disable-next-line no-param-reassign
formData = formData || new (_platform_node_classes_FormData_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"] || FormData)();
// eslint-disable-next-line no-param-reassign
options = _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toFlatObject(options, {
metaTokens: true,
dots: false,
indexes: false
}, false, function defined(option, source) {
// eslint-disable-next-line no-eq-null,eqeqeq
return !_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(source[option]);
});
const metaTokens = options.metaTokens;
// eslint-disable-next-line no-use-before-define
const visitor = options.visitor || defaultVisitor;
const dots = options.dots;
const indexes = options.indexes;
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
const useBlob = _Blob && _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isSpecCompliantForm(formData);
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isFunction(visitor)) {
throw new TypeError('visitor must be a function');
}
function convertValue(value) {
if (value === null) return '';
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isDate(value)) {
return value.toISOString();
}
if (!useBlob && _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isBlob(value)) {
throw new _core_AxiosError_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"]('Blob is not supported. Use a Buffer instead.');
}
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArrayBuffer(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isTypedArray(value)) {
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
}
return value;
}
/**
* Default visitor.
*
* @param {*} value
* @param {String|Number} key
* @param {Array<String|Number>} path
* @this {FormData}
*
* @returns {boolean} return true to visit the each prop of the value recursively
*/
function defaultVisitor(value, key, path) {
let arr = value;
if (value && !path && typeof value === 'object') {
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endsWith(key, '{}')) {
// eslint-disable-next-line no-param-reassign
key = metaTokens ? key : key.slice(0, -2);
// eslint-disable-next-line no-param-reassign
value = JSON.stringify(value);
} else if (
(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isArray(value) && isFlatArray(value)) ||
((_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isFileList(value) || _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endsWith(key, '[]')) && (arr = _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toArray(value))
)) {
// eslint-disable-next-line no-param-reassign
key = removeBrackets(key);
arr.forEach(function each(el, index) {
!(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(el) || el === null) && formData.append(
// eslint-disable-next-line no-nested-ternary
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
convertValue(el)
);
});
return false;
}
}
if (isVisitable(value)) {
return true;
}
formData.append(renderKey(path, key, dots), convertValue(value));
return false;
}
const stack = [];
const exposedHelpers = Object.assign(predicates, {
defaultVisitor,
convertValue,
isVisitable
});
function build(value, path) {
if (_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(value)) return;
if (stack.indexOf(value) !== -1) {
throw Error('Circular reference detected in ' + path.join('.'));
}
stack.push(value);
_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].forEach(value, function each(el, key) {
const result = !(_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isUndefined(el) || el === null) && visitor.call(
formData, el, _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isString(key) ? key.trim() : key, path, exposedHelpers
);
if (result === true) {
build(el, path ? path.concat(key) : [key]);
}
});
stack.pop();
}
if (!_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].isObject(obj)) {
throw new TypeError('data must be an object');
}
build(obj);
return formData;
}
/* harmony default export */ __webpack_exports__["a"] = (toFormData);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../node-libs-browser/node_modules/buffer/index.js */ "HDXh").Buffer))
/***/ }),
/***/ "5JV0":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.join.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.join` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
join: function join(separator) {
var set = anObject(this);
var iterator = getSetIterator(set);
var sep = separator === undefined ? ',' : String(separator);
var result = [];
iterate(iterator, result.push, result, false, true);
return result.join(sep);
}
});
/***/ }),
/***/ "5Q0V":
/*!************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/toPrimitive.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var _typeof = __webpack_require__(/*! ./typeof.js */ "cDf5")["default"];
function toPrimitive(t, r) {
if ("object" != _typeof(t) || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != _typeof(i)) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "5Tg+":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/internals/well-known-symbol-wrapped.js ***!
\*********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
exports.f = wellKnownSymbol;
/***/ }),
/***/ "5Yz+":
/*!***************************************************************!*\
!*** ./node_modules/core-js/internals/array-last-index-of.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var min = Math.min;
var nativeLastIndexOf = [].lastIndexOf;
var NEGATIVE_ZERO = !!nativeLastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf');
// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
var FORCED = NEGATIVE_ZERO || !STRICT_METHOD || !USES_TO_LENGTH;
// `Array.prototype.lastIndexOf` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.lastindexof
module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
// convert -0 to +0
if (NEGATIVE_ZERO) return nativeLastIndexOf.apply(this, arguments) || 0;
var O = toIndexedObject(this);
var length = toLength(O.length);
var index = length - 1;
if (arguments.length > 1) index = min(index, toInteger(arguments[1]));
if (index < 0) index = length + index;
for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
return -1;
} : nativeLastIndexOf;
/***/ }),
/***/ "5mCs":
/*!****************************************!*\
!*** ./src/models/classrooms/index.ts ***!
\****************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */ "oBTY");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_classrooms__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/service/classrooms */ "oUNq");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var ClassroomsListModel = {
namespace: 'classroomList',
state: {
name: '',
loading: true,
detailTopBanner: {
// 课堂详情页面头部数据
},
detailLeftMenus: {
// 课堂详情页面左侧menus
},
// 实训作业
detailShixunsList: {},
detailGraduationTopicsList: {},
detailGraduationTaskList: {},
detailExerciseList: {},
detailPollsList: {},
// 普通作业
detailCommonHomeworksList: {},
detailAttendancesList: {},
detailAttendancesDetail: {},
detailAnnouncementList: {},
// 资源
detailAttachmentList: {},
detailCourseware: {},
// 我的课堂
courseMine: {},
// 视频
detailVideoList: {},
//直播
detailLiveVideoList: {},
// 问卷
detailBoardList: {},
// 课堂分组
courseGroups: {},
allCourseGroups: {},
// 分班
detailCourseGroupsList: {},
// 学生
detailCoursStudentsList: {},
// 统计
detailCourseStatisticsList: {},
// 签到统计
detailAttendancesStatistic: {},
// 学习成绩
detailCourseWorkscore: {},
// 课堂活跃度
detailCourseActscore: {},
// 所有课程列表
coursesLists: {},
// 实训所有列表
shixunLists: {},
// 学校列表
schoolList: {},
taskList: [],
searchMemberList: {},
//记录操作的action key值
actionTabs: {
key: ''
},
listParams: {
order: 'all',
page: 1,
//第一页开始
limit: 16,
search: ''
},
shareStatus: false
},
effects: {
// 教学课堂首页
getClassroom: function getClassroom(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var listParams, response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
listParams = payload;
_context.next = 3;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomList */ "B"], payload);
case 3:
response = _context.sent;
_context.next = 6;
return put({
type: 'save',
payload: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({
listParams: listParams
}, response)
});
case 6:
return _context.abrupt("return", response);
case 7:
case "end":
return _context.stop();
}
}, _callee);
})();
},
// 教学课堂详情头部信息
getClassroomTopBanner: function getClassroomTopBanner(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomTopBanner */ "F"], payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
detailTopBanner: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
// 教学客堂详情左侧banner
getClassroomLeftMenus: function getClassroomLeftMenus(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomLeftMenus */ "A"], payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
detailLeftMenus: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
//教学课堂详情-实训列表
getClassroomShixunsList: function getClassroomShixunsList(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var response;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomShixunsList */ "D"], payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
detailShixunsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
//教学课堂详情-实训列表老师
getClassroomTeacherShixunsList: function getClassroomTeacherShixunsList(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var response;
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomTeacherShixunsList */ "E"], payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return put({
type: 'save',
payload: {
detailShixunsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context5.abrupt("return", response);
case 6:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
//教学课堂详情-普通作业列表
getClassroomCommonList: function getClassroomCommonList(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var response;
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomShixunsList */ "D"], payload);
case 2:
response = _context6.sent;
_context6.next = 5;
return put({
type: 'save',
payload: {
detailCommonHomeworksList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
//教学课堂详情-普通作业列表老师
getClassroomTeacherCommonList: function getClassroomTeacherCommonList(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var response;
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomTeacherShixunsList */ "E"], payload);
case 2:
response = _context7.sent;
_context7.next = 5;
return put({
type: 'save',
payload: {
detailCommonHomeworksList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context7.abrupt("return", response);
case 6:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
//教学课堂详情-毕业设计-毕设选题
getClassroomGraduationTopicsList: function getClassroomGraduationTopicsList(_ref15, _ref16) {
var payload = _ref15.payload;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
var response;
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomGraduationTopicsList */ "z"], payload);
case 2:
response = _context8.sent;
_context8.next = 5;
return put({
type: 'save',
payload: {
detailGraduationTopicsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
//教学课堂详情-毕业设计-毕设任务
getClassroomGraduationTaskList: function getClassroomGraduationTaskList(_ref17, _ref18) {
var payload = _ref17.payload;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
var response;
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomGraduationTaskList */ "y"], payload);
case 2:
response = _context9.sent;
_context9.next = 5;
return put({
type: 'save',
payload: {
detailGraduationTaskList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
//教学课堂详情-试卷
getClassroomExercisesList: function getClassroomExercisesList(_ref19, _ref20) {
var payload = _ref19.payload;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
var response;
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomExercisesList */ "x"], payload);
case 2:
response = _context10.sent;
_context10.next = 5;
return put({
type: 'save',
payload: {
detailExerciseList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
//教学课堂详情-问卷
getClassroomPollsList: function getClassroomPollsList(_ref21, _ref22) {
var payload = _ref21.payload;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
var response;
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomPollsList */ "C"], payload);
case 2:
response = _context11.sent;
_context11.next = 5;
return put({
type: 'save',
payload: {
detailPollsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
// 教学课堂-获取课堂班级
getCourseGroups: function getCourseGroups(_ref23, _ref24) {
var payload = _ref23.payload;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
var response;
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseGroups */ "H"], payload);
case 2:
response = _context12.sent;
_context12.next = 5;
return put({
type: 'save',
payload: {
courseGroups: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
// 教学课堂-获取课堂班级
getAllCourseGroup: function getAllCourseGroup(_ref25, _ref26) {
var payload = _ref25.payload;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
var response;
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAllCourseGroup */ "o"], payload);
case 2:
response = _context13.sent;
_context13.next = 5;
return put({
type: 'save',
payload: {
allCourseGroups: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
// 教学课堂 - 普通作业
getClassroomCommonHomeworksList: function getClassroomCommonHomeworksList(_ref27, _ref28) {
var payload = _ref27.payload;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
var response;
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomCommonHomeworksList */ "w"], payload);
case 2:
response = _context14.sent;
_context14.next = 5;
return put({
type: 'save',
payload: {
detailCommonHomeworksList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
// 教学课堂 - 签到
getClassroomAttendancesList: function getClassroomAttendancesList(_ref29, _ref30) {
var payload = _ref29.payload;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
var response;
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomAttendancesList */ "u"], payload);
case 2:
response = _context15.sent;
_context15.next = 5;
return put({
type: 'save',
payload: {
detailAttendancesList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
// 教学课堂 - 签到统计
getClassroomAttendancesStatistic: function getClassroomAttendancesStatistic(_ref31, _ref32) {
var payload = _ref31.payload;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
var response;
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getClassroomAttendancesStatistic */ "v"], payload);
case 2:
response = _context16.sent;
_context16.next = 5;
return put({
type: 'save',
payload: {
detailAttendancesStatistic: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
// 教学课堂 - 签到详情
getAttendanceDetail: function getAttendanceDetail(_ref33, _ref34) {
var payload = _ref33.payload;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
var response;
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAttendanceDetail */ "s"], payload);
case 2:
response = _context17.sent;
_context17.next = 5;
return put({
type: 'save',
payload: {
detailAttendancesDetail: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context17.abrupt("return", response);
case 6:
case "end":
return _context17.stop();
}
}, _callee17);
})();
},
// 教学课堂 - 公告列表
getAnnouncementList: function getAnnouncementList(_ref35, _ref36) {
var payload = _ref35.payload;
var call = _ref36.call,
put = _ref36.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
var response;
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context18.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAnnouncementList */ "q"], payload);
case 2:
response = _context18.sent;
_context18.next = 5;
return put({
type: 'save',
payload: {
detailAnnouncementList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context18.stop();
}
}, _callee18);
})();
},
//教学课堂 - 资源
getAttachmentList: function getAttachmentList(_ref37, _ref38) {
var payload = _ref37.payload;
var call = _ref38.call,
put = _ref38.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
var response;
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
_context19.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAttachmentList */ "r"], payload);
case 2:
response = _context19.sent;
_context19.next = 5;
return put({
type: 'save',
payload: {
detailAttachmentList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response.data)
}
});
case 5:
case "end":
return _context19.stop();
}
}, _callee19);
})();
},
//教学课堂 - 资源 需求回滚
getCourseware: function getCourseware(_ref39, _ref40) {
var payload = _ref39.payload;
var call = _ref40.call,
put = _ref40.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
var response;
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
_context20.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseware */ "O"], payload);
case 2:
response = _context20.sent;
_context20.next = 5;
return put({
type: 'save',
payload: {
detailCourseware: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response.data)
}
});
case 5:
case "end":
return _context20.stop();
}
}, _callee20);
})();
},
//教学课堂 - 视频
getVideoList: function getVideoList(_ref41, _ref42) {
var payload = _ref41.payload;
var call = _ref42.call,
put = _ref42.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
var response;
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
_context21.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getVideoList */ "V"], payload);
case 2:
response = _context21.sent;
_context21.next = 5;
return put({
type: 'save',
payload: {
detailVideoList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context21.stop();
}
}, _callee21);
})();
},
//教学课堂 - 直播
getLiveVideoList: function getLiveVideoList(_ref43, _ref44) {
var payload = _ref43.payload;
var call = _ref44.call,
put = _ref44.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
var response;
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
_context22.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getLiveVideoList */ "Q"], payload);
case 2:
response = _context22.sent;
_context22.next = 5;
return put({
type: 'save',
payload: {
detailLiveVideoList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context22.stop();
}
}, _callee22);
})();
},
// 教学课堂 我的课堂
getCoursesMine: function getCoursesMine(_ref45, _ref46) {
var payload = _ref45.payload,
callback = _ref45.callback;
var call = _ref46.call,
put = _ref46.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
var response;
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
_context23.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCoursesMine */ "N"], payload);
case 2:
response = _context23.sent;
_context23.next = 5;
return put({
type: 'save',
payload: {
courseMine: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context23.abrupt("return", response.data);
case 6:
case "end":
return _context23.stop();
}
}, _callee23);
})();
},
// 教学课堂 讨论
getBoardList: function getBoardList(_ref47, _ref48) {
var payload = _ref47.payload,
callback = _ref47.callback;
var call = _ref48.call,
put = _ref48.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
var response;
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
_context24.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getBoardList */ "t"], payload);
case 2:
response = _context24.sent;
_context24.next = 5;
return put({
type: 'save',
payload: {
detailBoardList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response.data)
}
});
case 5:
return _context24.abrupt("return", response.data);
case 6:
case "end":
return _context24.stop();
}
}, _callee24);
})();
},
// 教学课堂 分班
getCourseGroupsList: function getCourseGroupsList(_ref49, _ref50) {
var payload = _ref49.payload,
callback = _ref49.callback;
var call = _ref50.call,
put = _ref50.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
var response;
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
_context25.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseGroupsList */ "I"], payload);
case 2:
response = _context25.sent;
_context25.next = 5;
return put({
type: 'save',
payload: {
detailCourseGroupsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context25.abrupt("return", response);
case 6:
case "end":
return _context25.stop();
}
}, _callee25);
})();
},
// 教学课堂- 学生列表
getCourseStudentsList: function getCourseStudentsList(_ref51, _ref52) {
var payload = _ref51.payload,
callback = _ref51.callback;
var call = _ref52.call,
put = _ref52.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
var response;
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
_context26.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseStudentsList */ "K"], payload);
case 2:
response = _context26.sent;
_context26.next = 5;
return put({
type: 'save',
payload: {
detailCoursStudentsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context26.abrupt("return", response.data);
case 6:
case "end":
return _context26.stop();
}
}, _callee26);
})();
},
// 教学课堂 - 统计
getCourseStatistics: function getCourseStatistics(_ref53, _ref54) {
var payload = _ref53.payload,
callback = _ref53.callback;
var call = _ref54.call,
put = _ref54.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
var response;
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
_context27.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseStatistics */ "J"], payload);
case 2:
response = _context27.sent;
_context27.next = 5;
return put({
type: 'save',
payload: {
detailCourseStatisticsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context27.abrupt("return", response);
case 6:
case "end":
return _context27.stop();
}
}, _callee27);
})();
},
// 教学课堂 - 课堂活跃度
getCourseActscore: function getCourseActscore(_ref55, _ref56) {
var payload = _ref55.payload,
callback = _ref55.callback;
var call = _ref56.call,
put = _ref56.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
var response;
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
_context28.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseActscore */ "G"], payload);
case 2:
response = _context28.sent;
_context28.next = 5;
return put({
type: 'save',
payload: {
detailCourseActscore: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context28.abrupt("return", response);
case 6:
case "end":
return _context28.stop();
}
}, _callee28);
})();
},
// 教学课堂 - 学生成绩
getCourseWorkscore: function getCourseWorkscore(_ref57, _ref58) {
var payload = _ref57.payload,
callback = _ref57.callback;
var call = _ref58.call,
put = _ref58.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
var response;
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
_context29.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCourseWorkscore */ "L"], payload);
case 2:
response = _context29.sent;
_context29.next = 5;
return put({
type: 'save',
payload: {
detailCourseWorkscore: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context29.abrupt("return", response);
case 6:
case "end":
return _context29.stop();
}
}, _callee29);
})();
},
// 教学课堂 全部实训列表
getShixunLists: function getShixunLists(_ref59, _ref60) {
var payload = _ref59.payload,
callback = _ref59.callback;
var call = _ref60.call,
put = _ref60.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
var response;
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
_context30.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getShixunLists */ "U"], payload);
case 2:
response = _context30.sent;
_context30.next = 5;
return put({
type: 'save',
payload: {
shixunLists: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context30.abrupt("return", response);
case 6:
case "end":
return _context30.stop();
}
}, _callee30);
})();
},
// 从课堂实验添加
getExperimentLists: function getExperimentLists(_ref61, _ref62) {
var payload = _ref61.payload,
callback = _ref61.callback;
var call = _ref62.call,
put = _ref62.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
var response;
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
_context31.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getExperimentLists */ "P"], payload);
case 2:
response = _context31.sent;
_context31.next = 5;
return put({
type: 'save',
payload: {
shixunLists: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context31.abrupt("return", response);
case 6:
case "end":
return _context31.stop();
}
}, _callee31);
})();
},
getShixunAiRecommendLists: function getShixunAiRecommendLists(_ref63, _ref64) {
var payload = _ref63.payload,
callback = _ref63.callback;
var call = _ref64.call,
put = _ref64.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
var response;
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
_context32.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getShixunAiRecommendLists */ "T"], payload);
case 2:
response = _context32.sent;
_context32.next = 5;
return put({
type: 'save',
payload: {
shixunAiRecommendLists: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context32.abrupt("return", response);
case 6:
case "end":
return _context32.stop();
}
}, _callee32);
})();
},
// 教学课堂 全部课程列表
getCoursesLists: function getCoursesLists(_ref65, _ref66) {
var payload = _ref65.payload,
callback = _ref65.callback;
var call = _ref66.call,
put = _ref66.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() {
var response;
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
_context33.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getCoursesLists */ "M"], payload);
case 2:
response = _context33.sent;
_context33.next = 5;
return put({
type: 'save',
payload: {
coursesLists: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context33.abrupt("return", response);
case 6:
case "end":
return _context33.stop();
}
}, _callee33);
})();
},
// 教学课堂 创建课程
createCoursesHomework: function createCoursesHomework(_ref67, _ref68) {
var payload = _ref67.payload,
callback = _ref67.callback;
var call = _ref68.call,
put = _ref68.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() {
var response;
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
_context34.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* createCoursesHomework */ "b"], payload);
case 2:
response = _context34.sent;
return _context34.abrupt("return", response);
case 4:
case "end":
return _context34.stop();
}
}, _callee34);
})();
},
// 教学课堂 创建实训作业
createShixunHomework: function createShixunHomework(_ref69, _ref70) {
var payload = _ref69.payload,
callback = _ref69.callback;
var call = _ref70.call,
put = _ref70.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() {
var response;
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
_context35.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* createShixunHomework */ "d"], payload);
case 2:
response = _context35.sent;
return _context35.abrupt("return", response);
case 4:
case "end":
return _context35.stop();
}
}, _callee35);
})();
},
// 教学课堂 创建实训作业
createExperiment: function createExperiment(_ref71, _ref72) {
var payload = _ref71.payload,
callback = _ref71.callback;
var call = _ref72.call,
put = _ref72.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee36() {
var response;
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
_context36.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* createExperiment */ "c"], payload);
case 2:
response = _context36.sent;
return _context36.abrupt("return", response);
case 4:
case "end":
return _context36.stop();
}
}, _callee36);
})();
},
getSchoolList: function getSchoolList(_ref73, _ref74) {
var payload = _ref73.payload,
callback = _ref73.callback;
var call = _ref74.call,
put = _ref74.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee37() {
var response;
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
while (1) switch (_context37.prev = _context37.next) {
case 0:
_context37.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getSchoolList */ "R"], payload);
case 2:
response = _context37.sent;
_context37.next = 5;
return put({
type: 'save',
payload: {
schoolList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response.school_names)
}
});
case 5:
return _context37.abrupt("return", response.school_names);
case 6:
case "end":
return _context37.stop();
}
}, _callee37);
})();
},
searchSchoolTeacherList: function searchSchoolTeacherList(_ref75, _ref76) {
var payload = _ref75.payload,
callback = _ref75.callback;
var call = _ref76.call,
put = _ref76.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee38() {
var response;
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
while (1) switch (_context38.prev = _context38.next) {
case 0:
_context38.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* searchSchoolTeacherList */ "X"], payload);
case 2:
response = _context38.sent;
_context38.next = 5;
return put({
type: 'save',
payload: {
searchMemberList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context38.abrupt("return", response);
case 6:
case "end":
return _context38.stop();
}
}, _callee38);
})();
},
// 教学课堂 全部课程列表
getAllTaskList: function getAllTaskList(_ref77, _ref78) {
var payload = _ref77.payload,
callback = _ref77.callback;
var call = _ref78.call,
put = _ref78.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee39() {
var response;
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
while (1) switch (_context39.prev = _context39.next) {
case 0:
_context39.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* getAllTasks */ "p"], payload);
case 2:
response = _context39.sent;
_context39.next = 5;
return put({
type: 'save',
payload: {
taskList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(response.tasks)
}
});
case 5:
return _context39.abrupt("return", response);
case 6:
case "end":
return _context39.stop();
}
}, _callee39);
})();
},
updateTaskPosition: function updateTaskPosition(_ref79, _ref80) {
var payload = _ref79.payload,
callback = _ref79.callback;
var call = _ref80.call,
put = _ref80.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
var response;
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
while (1) switch (_context40.prev = _context40.next) {
case 0:
_context40.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_2__[/* updateTaskPosition */ "Z"], payload);
case 2:
response = _context40.sent;
_context40.next = 5;
return put({
type: 'save',
payload: {
actionTabs: {
key: ''
}
}
});
case 5:
return _context40.abrupt("return", response);
case 6:
case "end":
return _context40.stop();
}
}, _callee40);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref81, _ref82) {
var payload = _ref81.payload;
var call = _ref82.call,
put = _ref82.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee41() {
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
while (1) switch (_context41.prev = _context41.next) {
case 0:
_context41.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context41.stop();
}
}, _callee41);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref83) {
var dispatch = _ref83.dispatch,
history = _ref83.history;
// console.log("subscriptions:", dispatch, history)
return history.listen(function (_ref84) {
var pathname = _ref84.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (ClassroomsListModel);
/***/ }),
/***/ "5mdu":
/*!***************************************************!*\
!*** ./node_modules/core-js/internals/perform.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = function (exec) {
try {
return { error: false, value: exec() };
} catch (error) {
return { error: true, value: error };
}
};
/***/ }),
/***/ "5r1n":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.reflect.get-own-metadata.js ***!
\*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var ordinaryGetOwnMetadata = ReflectMetadataModule.get;
var toMetadataKey = ReflectMetadataModule.toKey;
// `Reflect.getOwnMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
getOwnMetadata: function getOwnMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
return ordinaryGetOwnMetadata(metadataKey, anObject(target), targetKey);
}
});
/***/ }),
/***/ "5s+n":
/*!****************************************************!*\
!*** ./node_modules/core-js/modules/es.promise.js ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "/qmn");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "4syw");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JiZb");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "iSVu");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "HH4o");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var task = __webpack_require__(/*! ../internals/task */ "LPSS").set;
var microtask = __webpack_require__(/*! ../internals/microtask */ "tXUg");
var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "zfnd");
var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "RN6c");
var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "8GlL");
var perform = __webpack_require__(/*! ../internals/perform */ "5mdu");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "lMq5");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "LQDL");
var SPECIES = wellKnownSymbol('species');
var PROMISE = 'Promise';
var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
var PromiseConstructor = NativePromise;
var TypeError = global.TypeError;
var document = global.document;
var process = global.process;
var $fetch = getBuiltIn('fetch');
var newPromiseCapability = newPromiseCapabilityModule.f;
var newGenericPromiseCapability = newPromiseCapability;
var IS_NODE = classof(process) == 'process';
var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent);
var UNHANDLED_REJECTION = 'unhandledrejection';
var REJECTION_HANDLED = 'rejectionhandled';
var PENDING = 0;
var FULFILLED = 1;
var REJECTED = 2;
var HANDLED = 1;
var UNHANDLED = 2;
var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
var FORCED = isForced(PROMISE, function () {
var GLOBAL_CORE_JS_PROMISE = inspectSource(PromiseConstructor) !== String(PromiseConstructor);
if (!GLOBAL_CORE_JS_PROMISE) {
// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
// We can't detect it synchronously, so just check versions
if (V8_VERSION === 66) return true;
// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
if (!IS_NODE && typeof PromiseRejectionEvent != 'function') return true;
}
// We need Promise#finally in the pure version for preventing prototype pollution
if (IS_PURE && !PromiseConstructor.prototype['finally']) return true;
// We can't use @@species feature detection in V8 since it causes
// deoptimization and performance degradation
// https://github.com/zloirock/core-js/issues/679
if (V8_VERSION >= 51 && /native code/.test(PromiseConstructor)) return false;
// Detect correctness of subclassing with @@species support
var promise = PromiseConstructor.resolve(1);
var FakePromise = function (exec) {
exec(function () { /* empty */ }, function () { /* empty */ });
};
var constructor = promise.constructor = {};
constructor[SPECIES] = FakePromise;
return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
});
var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) {
PromiseConstructor.all(iterable)['catch'](function () { /* empty */ });
});
// helpers
var isThenable = function (it) {
var then;
return isObject(it) && typeof (then = it.then) == 'function' ? then : false;
};
var notify = function (promise, state, isReject) {
if (state.notified) return;
state.notified = true;
var chain = state.reactions;
microtask(function () {
var value = state.value;
var ok = state.state == FULFILLED;
var index = 0;
// variable length - can't use forEach
while (chain.length > index) {
var reaction = chain[index++];
var handler = ok ? reaction.ok : reaction.fail;
var resolve = reaction.resolve;
var reject = reaction.reject;
var domain = reaction.domain;
var result, then, exited;
try {
if (handler) {
if (!ok) {
if (state.rejection === UNHANDLED) onHandleUnhandled(promise, state);
state.rejection = HANDLED;
}
if (handler === true) result = value;
else {
if (domain) domain.enter();
result = handler(value); // can throw
if (domain) {
domain.exit();
exited = true;
}
}
if (result === reaction.promise) {
reject(TypeError('Promise-chain cycle'));
} else if (then = isThenable(result)) {
then.call(result, resolve, reject);
} else resolve(result);
} else reject(value);
} catch (error) {
if (domain && !exited) domain.exit();
reject(error);
}
}
state.reactions = [];
state.notified = false;
if (isReject && !state.rejection) onUnhandled(promise, state);
});
};
var dispatchEvent = function (name, promise, reason) {
var event, handler;
if (DISPATCH_EVENT) {
event = document.createEvent('Event');
event.promise = promise;
event.reason = reason;
event.initEvent(name, false, true);
global.dispatchEvent(event);
} else event = { promise: promise, reason: reason };
if (handler = global['on' + name]) handler(event);
else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
};
var onUnhandled = function (promise, state) {
task.call(global, function () {
var value = state.value;
var IS_UNHANDLED = isUnhandled(state);
var result;
if (IS_UNHANDLED) {
result = perform(function () {
if (IS_NODE) {
process.emit('unhandledRejection', value, promise);
} else dispatchEvent(UNHANDLED_REJECTION, promise, value);
});
// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
if (result.error) throw result.value;
}
});
};
var isUnhandled = function (state) {
return state.rejection !== HANDLED && !state.parent;
};
var onHandleUnhandled = function (promise, state) {
task.call(global, function () {
if (IS_NODE) {
process.emit('rejectionHandled', promise);
} else dispatchEvent(REJECTION_HANDLED, promise, state.value);
});
};
var bind = function (fn, promise, state, unwrap) {
return function (value) {
fn(promise, state, value, unwrap);
};
};
var internalReject = function (promise, state, value, unwrap) {
if (state.done) return;
state.done = true;
if (unwrap) state = unwrap;
state.value = value;
state.state = REJECTED;
notify(promise, state, true);
};
var internalResolve = function (promise, state, value, unwrap) {
if (state.done) return;
state.done = true;
if (unwrap) state = unwrap;
try {
if (promise === value) throw TypeError("Promise can't be resolved itself");
var then = isThenable(value);
if (then) {
microtask(function () {
var wrapper = { done: false };
try {
then.call(value,
bind(internalResolve, promise, wrapper, state),
bind(internalReject, promise, wrapper, state)
);
} catch (error) {
internalReject(promise, wrapper, error, state);
}
});
} else {
state.value = value;
state.state = FULFILLED;
notify(promise, state, false);
}
} catch (error) {
internalReject(promise, { done: false }, error, state);
}
};
// constructor polyfill
if (FORCED) {
// 25.4.3.1 Promise(executor)
PromiseConstructor = function Promise(executor) {
anInstance(this, PromiseConstructor, PROMISE);
aFunction(executor);
Internal.call(this);
var state = getInternalState(this);
try {
executor(bind(internalResolve, this, state), bind(internalReject, this, state));
} catch (error) {
internalReject(this, state, error);
}
};
// eslint-disable-next-line no-unused-vars
Internal = function Promise(executor) {
setInternalState(this, {
type: PROMISE,
done: false,
notified: false,
parent: false,
reactions: [],
rejection: false,
state: PENDING,
value: undefined
});
};
Internal.prototype = redefineAll(PromiseConstructor.prototype, {
// `Promise.prototype.then` method
// https://tc39.github.io/ecma262/#sec-promise.prototype.then
then: function then(onFulfilled, onRejected) {
var state = getInternalPromiseState(this);
var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true;
reaction.fail = typeof onRejected == 'function' && onRejected;
reaction.domain = IS_NODE ? process.domain : undefined;
state.parent = true;
state.reactions.push(reaction);
if (state.state != PENDING) notify(this, state, false);
return reaction.promise;
},
// `Promise.prototype.catch` method
// https://tc39.github.io/ecma262/#sec-promise.prototype.catch
'catch': function (onRejected) {
return this.then(undefined, onRejected);
}
});
OwnPromiseCapability = function () {
var promise = new Internal();
var state = getInternalState(promise);
this.promise = promise;
this.resolve = bind(internalResolve, promise, state);
this.reject = bind(internalReject, promise, state);
};
newPromiseCapabilityModule.f = newPromiseCapability = function (C) {
return C === PromiseConstructor || C === PromiseWrapper
? new OwnPromiseCapability(C)
: newGenericPromiseCapability(C);
};
if (!IS_PURE && typeof NativePromise == 'function') {
nativeThen = NativePromise.prototype.then;
// wrap native Promise#then for native async functions
redefine(NativePromise.prototype, 'then', function then(onFulfilled, onRejected) {
var that = this;
return new PromiseConstructor(function (resolve, reject) {
nativeThen.call(that, resolve, reject);
}).then(onFulfilled, onRejected);
// https://github.com/zloirock/core-js/issues/640
}, { unsafe: true });
// wrap fetch result
if (typeof $fetch == 'function') $({ global: true, enumerable: true, forced: true }, {
// eslint-disable-next-line no-unused-vars
fetch: function fetch(input /* , init */) {
return promiseResolve(PromiseConstructor, $fetch.apply(global, arguments));
}
});
}
}
$({ global: true, wrap: true, forced: FORCED }, {
Promise: PromiseConstructor
});
setToStringTag(PromiseConstructor, PROMISE, false, true);
setSpecies(PROMISE);
PromiseWrapper = getBuiltIn(PROMISE);
// statics
$({ target: PROMISE, stat: true, forced: FORCED }, {
// `Promise.reject` method
// https://tc39.github.io/ecma262/#sec-promise.reject
reject: function reject(r) {
var capability = newPromiseCapability(this);
capability.reject.call(undefined, r);
return capability.promise;
}
});
$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, {
// `Promise.resolve` method
// https://tc39.github.io/ecma262/#sec-promise.resolve
resolve: function resolve(x) {
return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x);
}
});
$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
// `Promise.all` method
// https://tc39.github.io/ecma262/#sec-promise.all
all: function all(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var $promiseResolve = aFunction(C.resolve);
var values = [];
var counter = 0;
var remaining = 1;
iterate(iterable, function (promise) {
var index = counter++;
var alreadyCalled = false;
values.push(undefined);
remaining++;
$promiseResolve.call(C, promise).then(function (value) {
if (alreadyCalled) return;
alreadyCalled = true;
values[index] = value;
--remaining || resolve(values);
}, reject);
});
--remaining || resolve(values);
});
if (result.error) reject(result.value);
return capability.promise;
},
// `Promise.race` method
// https://tc39.github.io/ecma262/#sec-promise.race
race: function race(iterable) {
var C = this;
var capability = newPromiseCapability(C);
var reject = capability.reject;
var result = perform(function () {
var $promiseResolve = aFunction(C.resolve);
iterate(iterable, function (promise) {
$promiseResolve.call(C, promise).then(capability.resolve, reject);
});
});
if (result.error) reject(result.value);
return capability.promise;
}
});
/***/ }),
/***/ "5uH8":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.number.min-safe-integer.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Number.MIN_SAFE_INTEGER` constant
// https://tc39.github.io/ecma262/#sec-number.min_safe_integer
$({ target: 'Number', stat: true }, {
MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF
});
/***/ }),
/***/ "5wUe":
/*!***************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/slicedToArray.js ***!
\***************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles */ "Q9SF");
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "MIOZ");
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "mGKP");
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "h0XC");
function _slicedToArray(arr, i) {
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
}
module.exports = _slicedToArray;
/***/ }),
/***/ "5xtp":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.define-setter.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var FORCED = __webpack_require__(/*! ../internals/object-prototype-accessors-forced */ "6x0u");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
// `Object.prototype.__defineSetter__` method
// https://tc39.github.io/ecma262/#sec-object.prototype.__defineSetter__
if (DESCRIPTORS) {
$({ target: 'Object', proto: true, forced: FORCED }, {
__defineSetter__: function __defineSetter__(P, setter) {
definePropertyModule.f(toObject(this), P, { set: aFunction(setter), enumerable: true, configurable: true });
}
});
}
/***/ }),
/***/ "66V8":
/*!****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.aggregate-error.js ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr");
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var setInternalState = InternalStateModule.set;
var getInternalAggregateErrorState = InternalStateModule.getterFor('AggregateError');
var $AggregateError = function AggregateError(errors, message) {
var that = this;
if (!(that instanceof $AggregateError)) return new $AggregateError(errors, message);
if (setPrototypeOf) {
that = setPrototypeOf(new Error(message), getPrototypeOf(that));
}
var errorsArray = [];
iterate(errors, errorsArray.push, errorsArray);
if (DESCRIPTORS) setInternalState(that, { errors: errorsArray, type: 'AggregateError' });
else that.errors = errorsArray;
if (message !== undefined) createNonEnumerableProperty(that, 'message', String(message));
return that;
};
$AggregateError.prototype = create(Error.prototype, {
constructor: createPropertyDescriptor(5, $AggregateError),
message: createPropertyDescriptor(5, ''),
name: createPropertyDescriptor(5, 'AggregateError')
});
if (DESCRIPTORS) defineProperty.f($AggregateError.prototype, 'errors', {
get: function () {
return getInternalAggregateErrorState(this).errors;
},
configurable: true
});
$({ global: true }, {
AggregateError: $AggregateError
});
/***/ }),
/***/ "67WC":
/*!******************************************************************!*\
!*** ./node_modules/core-js/internals/array-buffer-view-core.js ***!
\******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var NATIVE_ARRAY_BUFFER = __webpack_require__(/*! ../internals/array-buffer-native */ "qYE9");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var classof = __webpack_require__(/*! ../internals/classof */ "9d/t");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var uid = __webpack_require__(/*! ../internals/uid */ "kOOl");
var Int8Array = global.Int8Array;
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
var Uint8ClampedArray = global.Uint8ClampedArray;
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
var TypedArray = Int8Array && getPrototypeOf(Int8Array);
var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype);
var ObjectPrototype = Object.prototype;
var isPrototypeOf = ObjectPrototype.isPrototypeOf;
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera';
var TYPED_ARRAY_TAG_REQIRED = false;
var NAME;
var TypedArrayConstructorsList = {
Int8Array: 1,
Uint8Array: 1,
Uint8ClampedArray: 1,
Int16Array: 2,
Uint16Array: 2,
Int32Array: 4,
Uint32Array: 4,
Float32Array: 4,
Float64Array: 8
};
var isView = function isView(it) {
var klass = classof(it);
return klass === 'DataView' || has(TypedArrayConstructorsList, klass);
};
var isTypedArray = function (it) {
return isObject(it) && has(TypedArrayConstructorsList, classof(it));
};
var aTypedArray = function (it) {
if (isTypedArray(it)) return it;
throw TypeError('Target is not a typed array');
};
var aTypedArrayConstructor = function (C) {
if (setPrototypeOf) {
if (isPrototypeOf.call(TypedArray, C)) return C;
} else for (var ARRAY in TypedArrayConstructorsList) if (has(TypedArrayConstructorsList, NAME)) {
var TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && (C === TypedArrayConstructor || isPrototypeOf.call(TypedArrayConstructor, C))) {
return C;
}
} throw TypeError('Target is not a typed array constructor');
};
var exportTypedArrayMethod = function (KEY, property, forced) {
if (!DESCRIPTORS) return;
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
var TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && has(TypedArrayConstructor.prototype, KEY)) {
delete TypedArrayConstructor.prototype[KEY];
}
}
if (!TypedArrayPrototype[KEY] || forced) {
redefine(TypedArrayPrototype, KEY, forced ? property
: NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property);
}
};
var exportTypedArrayStaticMethod = function (KEY, property, forced) {
var ARRAY, TypedArrayConstructor;
if (!DESCRIPTORS) return;
if (setPrototypeOf) {
if (forced) for (ARRAY in TypedArrayConstructorsList) {
TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && has(TypedArrayConstructor, KEY)) {
delete TypedArrayConstructor[KEY];
}
}
if (!TypedArray[KEY] || forced) {
// V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
try {
return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8Array[KEY] || property);
} catch (error) { /* empty */ }
} else return;
}
for (ARRAY in TypedArrayConstructorsList) {
TypedArrayConstructor = global[ARRAY];
if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
redefine(TypedArrayConstructor, KEY, property);
}
}
};
for (NAME in TypedArrayConstructorsList) {
if (!global[NAME]) NATIVE_ARRAY_BUFFER_VIEWS = false;
}
// WebKit bug - typed arrays constructors prototype is Object.prototype
if (!NATIVE_ARRAY_BUFFER_VIEWS || typeof TypedArray != 'function' || TypedArray === Function.prototype) {
// eslint-disable-next-line no-shadow
TypedArray = function TypedArray() {
throw TypeError('Incorrect invocation');
};
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
if (global[NAME]) setPrototypeOf(global[NAME], TypedArray);
}
}
if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) {
TypedArrayPrototype = TypedArray.prototype;
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype);
}
}
// WebKit bug - one more object in Uint8ClampedArray prototype chain
if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
}
if (DESCRIPTORS && !has(TypedArrayPrototype, TO_STRING_TAG)) {
TYPED_ARRAY_TAG_REQIRED = true;
defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function () {
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
} });
for (NAME in TypedArrayConstructorsList) if (global[NAME]) {
createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME);
}
}
module.exports = {
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG,
aTypedArray: aTypedArray,
aTypedArrayConstructor: aTypedArrayConstructor,
exportTypedArrayMethod: exportTypedArrayMethod,
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
isView: isView,
isTypedArray: isTypedArray,
TypedArray: TypedArray,
TypedArrayPrototype: TypedArrayPrototype
};
/***/ }),
/***/ "6CvP":
/*!*****************************!*\
!*** ./src/service/home.ts ***!
\*****************************/
/*! exports provided: HomeIndex, applyToJoinCourse, projectApplies, getHomeNotice, UploadNotice */
/*! exports used: HomeIndex, UploadNotice, applyToJoinCourse, getHomeNotice, projectApplies */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HomeIndex; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return applyToJoinCourse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return projectApplies; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getHomeNotice; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return UploadNotice; });
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/env */ "m3rI");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function HomeIndex() {
return _HomeIndex.apply(this, arguments);
}
function _HomeIndex() {
_HomeIndex = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('/api/home/index.json', {
method: 'Get'
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _HomeIndex.apply(this, arguments);
}
function applyToJoinCourse(_x) {
return _applyToJoinCourse.apply(this, arguments);
}
function _applyToJoinCourse() {
_applyToJoinCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('/api/courses/apply_to_join_course.json', {
method: 'post',
body: params
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _applyToJoinCourse.apply(this, arguments);
}
function projectApplies(_x2) {
return _projectApplies.apply(this, arguments);
}
//获取首页广告
function _projectApplies() {
_projectApplies = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"].FORGE_SERVER, "/api/applied_projects.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _projectApplies.apply(this, arguments);
}
function getHomeNotice(_x3) {
return _getHomeNotice.apply(this, arguments);
}
//确认是否点击弹窗
function _getHomeNotice() {
_getHomeNotice = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('/api/users/home_notice.json', {
method: 'Get'
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getHomeNotice.apply(this, arguments);
}
function UploadNotice(_x4) {
return _UploadNotice.apply(this, arguments);
}
function _UploadNotice() {
_UploadNotice = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])('/api/users/view_notice.json', {
method: 'post',
body: params
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _UploadNotice.apply(this, arguments);
}
/***/ }),
/***/ "6JNq":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/internals/copy-constructor-properties.js ***!
\***********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "Vu81");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
module.exports = function (target, source) {
var keys = ownKeys(source);
var defineProperty = definePropertyModule.f;
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
}
};
/***/ }),
/***/ "6LWA":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/is-array.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
// `IsArray` abstract operation
// https://tc39.github.io/ecma262/#sec-isarray
module.exports = Array.isArray || function isArray(arg) {
return classof(arg) == 'Array';
};
/***/ }),
/***/ "6R/c":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.index-of.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $indexOf = __webpack_require__(/*! ../internals/array-includes */ "TWQb").indexOf;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.indexof
exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) {
return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/***/ "6V7H":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.symbol.pattern-match.js ***!
\*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.patternMatch` well-known symbol
// https://github.com/tc39/proposal-pattern-matching
defineWellKnownSymbol('patternMatch');
/***/ }),
/***/ "6VoE":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/is-array-iterator-method.js ***!
\********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "P4y1");
var ITERATOR = wellKnownSymbol('iterator');
var ArrayPrototype = Array.prototype;
// check on default Array iterator
module.exports = function (it) {
return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);
};
/***/ }),
/***/ "6YAi":
/*!***********************************************************!*\
!*** ./src/models/classrooms/announcement.ts + 1 modules ***!
\***********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/announcement.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
// 公告上移
function announcement_informUp(_x) {
return _informUp.apply(this, arguments);
}
// 公告下移
function _informUp() {
_informUp = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/inform_up.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _informUp.apply(this, arguments);
}
function announcement_informDown(_x2) {
return _informDown.apply(this, arguments);
}
// 更新公告
function _informDown() {
_informDown = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/inform_down.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _informDown.apply(this, arguments);
}
function updateInforms(_x3) {
return _updateInforms.apply(this, arguments);
}
// 新建公告
function _updateInforms() {
_updateInforms = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/update_informs.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _updateInforms.apply(this, arguments);
}
function newInforms(_x4) {
return _newInforms.apply(this, arguments);
}
function _newInforms() {
_newInforms = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/new_informs.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _newInforms.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/classrooms/announcement.ts
function announcement_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ announcement_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var AnnouncementModel = {
namespace: 'announcement',
state: {
name: '普通试卷,随机试卷详情页面',
loading: true,
// 题库
actionTabs: {}
},
effects: {
// 公告 下移
informDown: function informDown(_ref, _ref2) {
var payload = _ref.payload,
callback = _ref.callback;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/announcement_regeneratorRuntime().mark(function _callee() {
var response;
return announcement_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(announcement_informDown, payload);
case 2:
response = _context.sent;
return _context.abrupt("return", response);
case 4:
case "end":
return _context.stop();
}
}, _callee);
})();
},
// 公告 上移
informUp: function informUp(_ref3, _ref4) {
var payload = _ref3.payload,
callback = _ref3.callback;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/announcement_regeneratorRuntime().mark(function _callee2() {
var response;
return announcement_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(announcement_informUp, payload);
case 2:
response = _context2.sent;
return _context2.abrupt("return", response);
case 4:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/announcement_regeneratorRuntime().mark(function _callee3() {
return announcement_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context3.stop();
}
}, _callee3);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref7) {
var dispatch = _ref7.dispatch,
history = _ref7.history;
}
}
};
/* harmony default export */ var announcement = __webpack_exports__["a"] = (AnnouncementModel);
/***/ }),
/***/ "6acW":
/*!*******************************************!*\
!*** ./node_modules/lodash/capitalize.js ***!
\*******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toString = __webpack_require__(/*! ./toString */ "dt0z"),
upperFirst = __webpack_require__(/*! ./upperFirst */ "gQMU");
/**
* Converts the first character of `string` to upper case and the remaining
* to lower case.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to capitalize.
* @returns {string} Returns the capitalized string.
* @example
*
* _.capitalize('FRED');
* // => 'Fred'
*/
function capitalize(string) {
return upperFirst(toString(string).toLowerCase());
}
module.exports = capitalize;
/***/ }),
/***/ "6fQ5":
/*!***************************************!*\
!*** ./src/models/problemset/util.ts ***!
\***************************************/
/*! exports provided: formatCourseOptions, formatPaperData */
/*! exports used: formatCourseOptions, formatPaperData */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return formatCourseOptions; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return formatPaperData; });
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
var formatCourseOptions = function formatCourseOptions(disciplines) {
return disciplines === null || disciplines === void 0 ? void 0 : disciplines.map(function (item) {
var children = (item.sub_disciplines || []).map(function (subItem) {
return {
value: subItem.id,
label: subItem.name
};
});
return {
value: item.id,
label: item.name,
children: children
};
});
};
var numberFormatChinese = {
1: '一',
2: '二',
3: '三',
4: '四',
5: '五',
6: '六',
7: '七'
};
var formatPaperData = function formatPaperData(originData) {
if (!originData) {
return;
}
var _ref = originData || {},
all_questions_count = _ref.all_questions_count,
all_score = _ref.all_score,
single_questions = _ref.single_questions,
multiple_questions = _ref.multiple_questions,
judgement_questions = _ref.judgement_questions,
program_questions = _ref.program_questions,
completion_questions = _ref.completion_questions,
subjective_questions = _ref.subjective_questions,
practical_questions = _ref.practical_questions;
var questionData = [Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
type: 'SINGLE',
name: '单选题'
}, single_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
type: 'MULTIPLE',
name: '多选题'
}, multiple_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
type: 'COMPLETION',
name: '填空题'
}, completion_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
type: 'JUDGMENT',
name: '判断题'
}, judgement_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
type: 'SUBJECTIVE',
name: '简答题'
}, subjective_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
type: 'PROGRAM',
name: '编程题'
}, program_questions), Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
type: 'PRACTICAL',
name: '实训题'
}, practical_questions)];
var questionList = questionData.filter(function (item) {
return item.questions_count > 0;
}).map(function (item, index) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, item), {
number: numberFormatChinese[index + 1]
});
});
return {
all_questions_count: all_questions_count,
all_score: all_score,
questionList: questionList
};
};
/***/ }),
/***/ "6koa":
/*!*****************************************************!*\
!*** ./node_modules/shallow-equal/objects/index.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function shallowEqualObjects(objA, objB) {
if (objA === objB) {
return true;
}
if (!objA || !objB) {
return false;
}
var aKeys = Object.keys(objA);
var bKeys = Object.keys(objB);
var len = aKeys.length;
if (bKeys.length !== len) {
return false;
}
for (var i = 0; i < len; i++) {
var key = aKeys[i];
if (objA[key] !== objB[key] || !Object.prototype.hasOwnProperty.call(objB, key)) {
return false;
}
}
return true;
}
module.exports = shallowEqualObjects;
/***/ }),
/***/ "6nK8":
/*!**************************************!*\
!*** ./node_modules/lodash/words.js ***!
\**************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var asciiWords = __webpack_require__(/*! ./_asciiWords */ "dVn5"),
hasUnicodeWord = __webpack_require__(/*! ./_hasUnicodeWord */ "fo6e"),
toString = __webpack_require__(/*! ./toString */ "dt0z"),
unicodeWords = __webpack_require__(/*! ./_unicodeWords */ "9NmV");
/**
* Splits `string` into an array of its words.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to inspect.
* @param {RegExp|string} [pattern] The pattern to match words.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the words of `string`.
* @example
*
* _.words('fred, barney, & pebbles');
* // => ['fred', 'barney', 'pebbles']
*
* _.words('fred, barney, & pebbles', /[^, ]+/g);
* // => ['fred', 'barney', '&', 'pebbles']
*/
function words(string, pattern, guard) {
string = toString(string);
pattern = guard ? undefined : pattern;
if (pattern === undefined) {
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
}
return string.match(pattern) || [];
}
module.exports = words;
/***/ }),
/***/ "6x0u":
/*!*****************************************************************************!*\
!*** ./node_modules/core-js/internals/object-prototype-accessors-forced.js ***!
\*****************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
// Forced replacement object prototype accessors methods
module.exports = IS_PURE || !fails(function () {
var key = Math.random();
// In FF throws only define methods
// eslint-disable-next-line no-undef, no-useless-call
__defineSetter__.call(null, key, function () { /* empty */ });
delete global[key];
});
/***/ }),
/***/ "7+kd":
/*!************************************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.is-concat-spreadable.js ***!
\************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.isConcatSpreadable` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.isconcatspreadable
defineWellKnownSymbol('isConcatSpreadable');
/***/ }),
/***/ "7+zs":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/es.date.to-primitive.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var dateToPrimitive = __webpack_require__(/*! ../internals/date-to-primitive */ "UesL");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
var DatePrototype = Date.prototype;
// `Date.prototype[@@toPrimitive]` method
// https://tc39.github.io/ecma262/#sec-date.prototype-@@toprimitive
if (!(TO_PRIMITIVE in DatePrototype)) {
createNonEnumerableProperty(DatePrototype, TO_PRIMITIVE, dateToPrimitive);
}
/***/ }),
/***/ "702D":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.weak-map.from.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var from = __webpack_require__(/*! ../internals/collection-from */ "qY7S");
// `WeakMap.from` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.from
$({ target: 'WeakMap', stat: true }, {
from: from
});
/***/ }),
/***/ "72Ab":
/*!************************************************************!*\
!*** ./node_modules/@ant-design/icons/InfoCircleFilled.js ***!
\************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _InfoCircleFilled = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/InfoCircleFilled */ "8KD2"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _InfoCircleFilled;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "7JcK":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.of.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(/*! ../internals/typed-array-constructors-require-wrappers */ "iqeF");
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayStaticMethod = ArrayBufferViewCore.exportTypedArrayStaticMethod;
// `%TypedArray%.of` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.of
exportTypedArrayStaticMethod('of', function of(/* ...items */) {
var index = 0;
var length = arguments.length;
var result = new (aTypedArrayConstructor(this))(length);
while (length > index) result[index] = arguments[index++];
return result;
}, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);
/***/ }),
/***/ "7VZV":
/*!*************************************************!*\
!*** ./src/models/globalSetting.ts + 1 modules ***!
\*************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__("m3rI");
// CONCATENATED MODULE: ./src/service/global.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
// console.log('-------123213-',window.location.hostname);
//获取所有频道
function getGlobalSetting() {
return _getGlobalSetting.apply(this, arguments);
}
function _getGlobalSetting() {
_getGlobalSetting = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("".concat(env["a" /* default */].FORGE_SERVER, "/api/setting.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getGlobalSetting.apply(this, arguments);
}
function global_getSystemUpdate() {
return _getSystemUpdate.apply(this, arguments);
}
//添加搜索记录
function _getSystemUpdate() {
_getSystemUpdate = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])('/api/users/system_update.json', {
method: 'Get'
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getSystemUpdate.apply(this, arguments);
}
function addSearchRecord(_x) {
return _addSearchRecord.apply(this, arguments);
}
function _addSearchRecord() {
_addSearchRecord = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])('/api/search_records', {
method: 'post',
body: params
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _addSearchRecord.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/globalSetting.ts
function globalSetting_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ globalSetting_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var GlobalSettingModel = {
namespace: 'globalSetting',
state: {
name: '全局配置',
loading: true,
showFooter: true,
showHeader: true,
showHeaderFooter: true,
showHeaderFixed: false,
onlyShowBackTop: true,
onlyShowBackTopIcons: true,
operateModel: false,
operateModelPath: '',
showQuestionBackTop: false,
globalLoading: {
show: false,
text: ""
},
updateData: {
end_time: "",
start_time: "",
subject: "",
system_score: "",
system_update: false
}
},
effects: {
query: function query(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee() {
var response;
return globalSetting_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(getGlobalSetting, payload);
case 2:
response = _context.sent;
// 获取页面数据
globalSetting_handleDynamicFavicon(response);
_context.next = 6;
return put({
type: 'save',
payload: Object(objectSpread2["a" /* default */])({}, response)
});
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getSystemUpdate: function getSystemUpdate(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee2() {
var response;
return globalSetting_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(global_getSystemUpdate, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
updateData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
setGlobalLoading: function setGlobalLoading(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee3() {
return globalSetting_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return put({
type: 'save',
payload: {
globalLoading: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
// 显示隐藏头部 true显示 hide隐藏
headerToggle: function headerToggle(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee4() {
return globalSetting_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return put({
type: 'save',
payload: {
showHeader: payload
}
});
case 2:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
// 显示隐藏尾部 true显示 hide隐藏
footerToggle: function footerToggle(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee5() {
return globalSetting_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return put({
type: 'save',
payload: {
showFooter: payload
}
});
case 2:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
// 显示隐藏头部尾部 true显示 hide隐藏
headerFooterToggle: function headerFooterToggle(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee6() {
return globalSetting_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return put({
type: 'save',
payload: {
showHeaderFooter: payload
}
});
case 2:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
// 显示隐藏头部 Fixed 布局 true显示 hide隐藏
headerFixedToggle: function headerFixedToggle(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee7() {
return globalSetting_regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return put({
type: 'save',
payload: {
showHeaderFixed: payload
}
});
case 2:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
// 只显示隐藏侧边返回顶部操作 true显示 hide隐藏
onlyShowBackTopToggle: function onlyShowBackTopToggle(_ref15, _ref16) {
var payload = _ref15.payload;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee8() {
return globalSetting_regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return put({
type: 'save',
payload: {
onlyShowBackTop: payload
}
});
case 2:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
// 只显示隐藏侧边返回顶部操作 true显示 false隐藏
onlyShowBackTopIconToggle: function onlyShowBackTopIconToggle(_ref17, _ref18) {
var payload = _ref17.payload;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee9() {
return globalSetting_regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return put({
type: 'save',
payload: {
onlyShowBackTopIcons: payload
}
});
case 2:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
// 运营弹框 true显示 false隐藏
setOperateModel: function setOperateModel(_ref19, _ref20) {
var payload = _ref19.payload;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee10() {
return globalSetting_regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return put({
type: 'save',
payload: {
operateModel: payload
}
});
case 2:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
// 运营弹框地址
setOperateModelPath: function setOperateModelPath(_ref21, _ref22) {
var payload = _ref21.payload;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee11() {
return globalSetting_regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return put({
type: 'save',
payload: {
operateModelPath: payload
}
});
case 2:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
// 刷题
setShowQuestionBackTop: function setShowQuestionBackTop(_ref23, _ref24) {
var payload = _ref23.payload;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/globalSetting_regeneratorRuntime().mark(function _callee12() {
return globalSetting_regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return put({
type: 'save',
payload: {
showQuestionBackTop: payload
}
});
case 2:
case "end":
return _context12.stop();
}
}, _callee12);
})();
}
},
reducers: {
save: function save(state, action) {
// console.log("reducers:",state,action)
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref25) {
var dispatch = _ref25.dispatch,
history = _ref25.history;
// console.log("subscriptions:", dispatch, history)
return history.listen(function (_ref26) {
var pathname = _ref26.pathname;
if (pathname === '/') {}
});
}
}
};
/* harmony default export */ var globalSetting = __webpack_exports__["a"] = (GlobalSettingModel);
var globalSetting_handleDynamicFavicon = function handleDynamicFavicon() {
var _response$setting, _response$setting2, _response$setting3;
var response = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
(_response$setting = response.setting) === null || _response$setting === void 0 ? void 0 : _response$setting.tab_logo_url;
var link = document.createElement('link');
var oldLink = document.getElementById('dynamic-favicon');
link.id = 'dynamic-favicon';
link.rel = 'shortcut icon';
link.href = ((_response$setting2 = response.setting) === null || _response$setting2 === void 0 ? void 0 : _response$setting2.tab_logo_url) ? "".concat(env["a" /* default */].FORGE_SERVER, "/").concat((_response$setting3 = response.setting) === null || _response$setting3 === void 0 ? void 0 : _response$setting3.tab_logo_url) : "".concat(env["a" /* default */].FORGE_SERVER, "/react/build/./favicon.ico");
oldLink && document.head.removeChild(oldLink);
document.head.appendChild(link);
};
/***/ }),
/***/ "7W2i":
/*!*********************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/inherits.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var setPrototypeOf = __webpack_require__(/*! ./setPrototypeOf.js */ "SksO");
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
Object.defineProperty(subClass, "prototype", {
writable: false
});
if (superClass) setPrototypeOf(subClass, superClass);
}
module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "7ckf":
/*!*************************************************!*\
!*** ./node_modules/hash.js/lib/hash/common.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ./utils */ "w8CP");
var assert = __webpack_require__(/*! minimalistic-assert */ "2j6C");
function BlockHash() {
this.pending = null;
this.pendingTotal = 0;
this.blockSize = this.constructor.blockSize;
this.outSize = this.constructor.outSize;
this.hmacStrength = this.constructor.hmacStrength;
this.padLength = this.constructor.padLength / 8;
this.endian = 'big';
this._delta8 = this.blockSize / 8;
this._delta32 = this.blockSize / 32;
}
exports.BlockHash = BlockHash;
BlockHash.prototype.update = function update(msg, enc) {
// Convert message to array, pad it, and join into 32bit blocks
msg = utils.toArray(msg, enc);
if (!this.pending)
this.pending = msg;
else
this.pending = this.pending.concat(msg);
this.pendingTotal += msg.length;
// Enough data, try updating
if (this.pending.length >= this._delta8) {
msg = this.pending;
// Process pending data in blocks
var r = msg.length % this._delta8;
this.pending = msg.slice(msg.length - r, msg.length);
if (this.pending.length === 0)
this.pending = null;
msg = utils.join32(msg, 0, msg.length - r, this.endian);
for (var i = 0; i < msg.length; i += this._delta32)
this._update(msg, i, i + this._delta32);
}
return this;
};
BlockHash.prototype.digest = function digest(enc) {
this.update(this._pad());
assert(this.pending === null);
return this._digest(enc);
};
BlockHash.prototype._pad = function pad() {
var len = this.pendingTotal;
var bytes = this._delta8;
var k = bytes - ((len + this.padLength) % bytes);
var res = new Array(k + this.padLength);
res[0] = 0x80;
for (var i = 1; i < k; i++)
res[i] = 0;
// Append length
len <<= 3;
if (this.endian === 'big') {
for (var t = 8; t < this.padLength; t++)
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
res[i++] = (len >>> 24) & 0xff;
res[i++] = (len >>> 16) & 0xff;
res[i++] = (len >>> 8) & 0xff;
res[i++] = len & 0xff;
} else {
res[i++] = len & 0xff;
res[i++] = (len >>> 8) & 0xff;
res[i++] = (len >>> 16) & 0xff;
res[i++] = (len >>> 24) & 0xff;
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
res[i++] = 0;
for (t = 8; t < this.padLength; t++)
res[i++] = 0;
}
return res;
};
/***/ }),
/***/ "7ueG":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.trim-start.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $trimStart = __webpack_require__(/*! ../internals/string-trim */ "WKiH").start;
var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "yNLB");
var FORCED = forcedStringTrimMethod('trimStart');
var trimStart = FORCED ? function trimStart() {
return $trimStart(this);
} : ''.trimStart;
// `String.prototype.{ trimStart, trimLeft }` methods
// https://github.com/tc39/ecmascript-string-left-right-trim
$({ target: 'String', proto: true, forced: FORCED }, {
trimStart: trimStart,
trimLeft: trimStart
});
/***/ }),
/***/ "7xWI":
/*!********************************************************************!*\
!*** ./node_modules/@umijs/plugin-model/lib/helpers/dispatcher.js ***!
\********************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
var Dispatcher = function Dispatcher() {
var _this = this;
_classCallCheck(this, Dispatcher);
this.callbacks = {};
this.data = {};
this.update = function (namespace) {
(_this.callbacks[namespace] || []).forEach(function (callback) {
try {
var data = _this.data[namespace];
callback(data);
} catch (e) {
callback(undefined);
}
});
};
};
exports.default = Dispatcher;
/***/ }),
/***/ "7zRj":
/*!*****************************************!*\
!*** ./node_modules/global/document.js ***!
\*****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var topLevel = typeof global !== 'undefined' ? global :
typeof window !== 'undefined' ? window : {}
var minDoc = __webpack_require__(/*! min-document */ 3);
var doccy;
if (typeof document !== 'undefined') {
doccy = document;
} else {
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'];
if (!doccy) {
doccy = topLevel['__GLOBAL_DOCUMENT_CACHE@4'] = minDoc;
}
}
module.exports = doccy;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "8+s/":
/*!*****************************************************!*\
!*** ./node_modules/react-side-effect/lib/index.js ***!
\*****************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var React = __webpack_require__(/*! react */ "q1tI");
var React__default = _interopDefault(React);
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
}
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
function withSideEffect(reducePropsToState, handleStateChangeOnClient, mapStateOnServer) {
if (typeof reducePropsToState !== 'function') {
throw new Error('Expected reducePropsToState to be a function.');
}
if (typeof handleStateChangeOnClient !== 'function') {
throw new Error('Expected handleStateChangeOnClient to be a function.');
}
if (typeof mapStateOnServer !== 'undefined' && typeof mapStateOnServer !== 'function') {
throw new Error('Expected mapStateOnServer to either be undefined or a function.');
}
function getDisplayName(WrappedComponent) {
return WrappedComponent.displayName || WrappedComponent.name || 'Component';
}
return function wrap(WrappedComponent) {
if (typeof WrappedComponent !== 'function') {
throw new Error('Expected WrappedComponent to be a React component.');
}
var mountedInstances = [];
var state;
function emitChange() {
state = reducePropsToState(mountedInstances.map(function (instance) {
return instance.props;
}));
if (SideEffect.canUseDOM) {
handleStateChangeOnClient(state);
} else if (mapStateOnServer) {
state = mapStateOnServer(state);
}
}
var SideEffect =
/*#__PURE__*/
function (_PureComponent) {
_inheritsLoose(SideEffect, _PureComponent);
function SideEffect() {
return _PureComponent.apply(this, arguments) || this;
}
// Try to use displayName of wrapped component
// Expose canUseDOM so tests can monkeypatch it
SideEffect.peek = function peek() {
return state;
};
SideEffect.rewind = function rewind() {
if (SideEffect.canUseDOM) {
throw new Error('You may only call rewind() on the server. Call peek() to read the current state.');
}
var recordedState = state;
state = undefined;
mountedInstances = [];
return recordedState;
};
var _proto = SideEffect.prototype;
_proto.UNSAFE_componentWillMount = function UNSAFE_componentWillMount() {
mountedInstances.push(this);
emitChange();
};
_proto.componentDidUpdate = function componentDidUpdate() {
emitChange();
};
_proto.componentWillUnmount = function componentWillUnmount() {
var index = mountedInstances.indexOf(this);
mountedInstances.splice(index, 1);
emitChange();
};
_proto.render = function render() {
return React__default.createElement(WrappedComponent, this.props);
};
return SideEffect;
}(React.PureComponent);
_defineProperty(SideEffect, "displayName", "SideEffect(" + getDisplayName(WrappedComponent) + ")");
_defineProperty(SideEffect, "canUseDOM", canUseDOM);
return SideEffect;
};
}
module.exports = withSideEffect;
/***/ }),
/***/ "85Yc":
/*!*************************************************************!*\
!*** ./node_modules/rc-field-form/es/index.js + 11 modules ***!
\*************************************************************/
/*! exports provided: Field, List, useForm, FormProvider, default */
/*! exports used: Field, FormProvider, List, default, useForm */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./node_modules/rc-trigger/es/Popup/useVisibleStatus.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/async-validator/dist-web/index.js (<- Module uses injected variables (process)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-field-form/es/FieldContext.js because of ./node_modules/antd/es/form/FormItem.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Children/toArray.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/utils/get.js because of ./node_modules/rc-util/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/utils/set.js because of ./node_modules/rc-util/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_Field; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ es_List; });
__webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ es_useForm; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ FormContext_FormProvider; });
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__("Ff2n");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("VTBJ");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("KQm4");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("1OyB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("vuIU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("Ji7U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
var createSuper = __webpack_require__("LK+K");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Children/toArray.js
var toArray = __webpack_require__("Zm9Q");
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("Kwbf");
// EXTERNAL MODULE: ./node_modules/rc-field-form/es/FieldContext.js
var FieldContext = __webpack_require__("KW7l");
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/typeUtil.js
function typeUtil_toArray(value) {
if (value === undefined || value === null) {
return [];
}
return Array.isArray(value) ? value : [value];
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
var regenerator = __webpack_require__("o0o1");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("HaE+");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("U8pU");
// EXTERNAL MODULE: ./node_modules/async-validator/dist-web/index.js
var dist_web = __webpack_require__("KpVd");
// EXTERNAL MODULE: ./node_modules/rc-util/es/utils/get.js
var utils_get = __webpack_require__("ub+h");
// EXTERNAL MODULE: ./node_modules/rc-util/es/utils/set.js
var utils_set = __webpack_require__("bG1m");
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/valueUtil.js
/**
* Convert name to internal supported format.
* This function should keep since we still thinking if need support like `a.b.c` format.
* 'a' => ['a']
* 123 => [123]
* ['a', 123] => ['a', 123]
*/
function getNamePath(path) {
return typeUtil_toArray(path);
}
function getValue(store, namePath) {
var value = Object(utils_get["a" /* default */])(store, namePath);
return value;
}
function setValue(store, namePath, value) {
var newStore = Object(utils_set["a" /* default */])(store, namePath, value);
return newStore;
}
function cloneByNamePathList(store, namePathList) {
var newStore = {};
namePathList.forEach(function (namePath) {
var value = getValue(store, namePath);
newStore = setValue(newStore, namePath, value);
});
return newStore;
}
function containsNamePath(namePathList, namePath) {
return namePathList && namePathList.some(function (path) {
return matchNamePath(path, namePath);
});
}
function isObject(obj) {
return Object(esm_typeof["a" /* default */])(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;
}
/**
* Copy values into store and return a new values object
* ({ a: 1, b: { c: 2 } }, { a: 4, b: { d: 5 } }) => { a: 4, b: { c: 2, d: 5 } }
*/
function internalSetValues(store, values) {
var newStore = Array.isArray(store) ? Object(toConsumableArray["a" /* default */])(store) : Object(objectSpread2["a" /* default */])({}, store);
if (!values) {
return newStore;
}
Object.keys(values).forEach(function (key) {
var prevValue = newStore[key];
var value = values[key]; // If both are object (but target is not array), we use recursion to set deep value
var recursive = isObject(prevValue) && isObject(value);
newStore[key] = recursive ? internalSetValues(prevValue, value || {}) : value;
});
return newStore;
}
function setValues(store) {
for (var _len = arguments.length, restValues = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
restValues[_key - 1] = arguments[_key];
}
return restValues.reduce(function (current, newStore) {
return internalSetValues(current, newStore);
}, store);
}
function matchNamePath(namePath, changedNamePath) {
if (!namePath || !changedNamePath || namePath.length !== changedNamePath.length) {
return false;
}
return namePath.every(function (nameUnit, i) {
return changedNamePath[i] === nameUnit;
});
}
function isSimilar(source, target) {
if (source === target) {
return true;
}
if (!source && target || source && !target) {
return false;
}
if (!source || !target || Object(esm_typeof["a" /* default */])(source) !== 'object' || Object(esm_typeof["a" /* default */])(target) !== 'object') {
return false;
}
var sourceKeys = Object.keys(source);
var targetKeys = Object.keys(target);
var keys = new Set([].concat(Object(toConsumableArray["a" /* default */])(sourceKeys), Object(toConsumableArray["a" /* default */])(targetKeys)));
return Object(toConsumableArray["a" /* default */])(keys).every(function (key) {
var sourceValue = source[key];
var targetValue = target[key];
if (typeof sourceValue === 'function' && typeof targetValue === 'function') {
return true;
}
return sourceValue === targetValue;
});
}
function defaultGetValueFromEvent(valuePropName) {
var event = arguments.length <= 1 ? undefined : arguments[1];
if (event && event.target && valuePropName in event.target) {
return event.target[valuePropName];
}
return event;
}
/**
* Moves an array item from one position in an array to another.
*
* Note: This is a pure function so a new array will be returned, instead
* of altering the array argument.
*
* @param array Array in which to move an item. (required)
* @param moveIndex The index of the item to move. (required)
* @param toIndex The index to move item at moveIndex to. (required)
*/
function valueUtil_move(array, moveIndex, toIndex) {
var length = array.length;
if (moveIndex < 0 || moveIndex >= length || toIndex < 0 || toIndex >= length) {
return array;
}
var item = array[moveIndex];
var diff = moveIndex - toIndex;
if (diff > 0) {
// move left
return [].concat(Object(toConsumableArray["a" /* default */])(array.slice(0, toIndex)), [item], Object(toConsumableArray["a" /* default */])(array.slice(toIndex, moveIndex)), Object(toConsumableArray["a" /* default */])(array.slice(moveIndex + 1, length)));
}
if (diff < 0) {
// move right
return [].concat(Object(toConsumableArray["a" /* default */])(array.slice(0, moveIndex)), Object(toConsumableArray["a" /* default */])(array.slice(moveIndex + 1, toIndex + 1)), [item], Object(toConsumableArray["a" /* default */])(array.slice(toIndex + 1, length)));
}
return array;
}
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/messages.js
var typeTemplate = "'${name}' is not a valid ${type}";
var defaultValidateMessages = {
default: "Validation error on field '${name}'",
required: "'${name}' is required",
enum: "'${name}' must be one of [${enum}]",
whitespace: "'${name}' cannot be empty",
date: {
format: "'${name}' is invalid for format date",
parse: "'${name}' could not be parsed as date",
invalid: "'${name}' is invalid date"
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: "'${name}' must be exactly ${len} characters",
min: "'${name}' must be at least ${min} characters",
max: "'${name}' cannot be longer than ${max} characters",
range: "'${name}' must be between ${min} and ${max} characters"
},
number: {
len: "'${name}' must equal ${len}",
min: "'${name}' cannot be less than ${min}",
max: "'${name}' cannot be greater than ${max}",
range: "'${name}' must be between ${min} and ${max}"
},
array: {
len: "'${name}' must be exactly ${len} in length",
min: "'${name}' cannot be less than ${min} in length",
max: "'${name}' cannot be greater than ${max} in length",
range: "'${name}' must be between ${min} and ${max} in length"
},
pattern: {
mismatch: "'${name}' does not match pattern ${pattern}"
}
};
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/validateUtil.js
// Remove incorrect original ts define
var AsyncValidator = dist_web["a" /* default */];
/**
* Replace with template.
* `I'm ${name}` + { name: 'bamboo' } = I'm bamboo
*/
function replaceMessage(template, kv) {
return template.replace(/\$\{\w+\}/g, function (str) {
var key = str.slice(2, -1);
return kv[key];
});
}
/**
* We use `async-validator` to validate rules. So have to hot replace the message with validator.
* { required: '${name} is required' } => { required: () => 'field is required' }
*/
function convertMessages(messages, name, rule, messageVariables) {
var kv = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, rule), {}, {
name: name,
enum: (rule.enum || []).join(', ')
});
var replaceFunc = function replaceFunc(template, additionalKV) {
return function () {
return replaceMessage(template, Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, kv), additionalKV));
};
};
/* eslint-disable no-param-reassign */
function fillTemplate(source) {
var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
Object.keys(source).forEach(function (ruleName) {
var value = source[ruleName];
if (typeof value === 'string') {
target[ruleName] = replaceFunc(value, messageVariables);
} else if (value && Object(esm_typeof["a" /* default */])(value) === 'object') {
target[ruleName] = {};
fillTemplate(value, target[ruleName]);
} else {
target[ruleName] = value;
}
});
return target;
}
/* eslint-enable */
return fillTemplate(setValues({}, defaultValidateMessages, messages));
}
function validateRule(_x, _x2, _x3, _x4, _x5) {
return _validateRule.apply(this, arguments);
}
/**
* We use `async-validator` to validate the value.
* But only check one value in a time to avoid namePath validate issue.
*/
function _validateRule() {
_validateRule = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee2(name, value, rule, options, messageVariables) {
var cloneRule, subRuleField, validator, messages, result, subResults;
return regenerator_default.a.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
cloneRule = Object(objectSpread2["a" /* default */])({}, rule); // We should special handle array validate
subRuleField = null;
if (cloneRule && cloneRule.type === 'array' && cloneRule.defaultField) {
subRuleField = cloneRule.defaultField;
delete cloneRule.defaultField;
}
validator = new AsyncValidator(Object(defineProperty["a" /* default */])({}, name, [cloneRule]));
messages = convertMessages(options.validateMessages, name, cloneRule, messageVariables);
validator.messages(messages);
result = [];
_context2.prev = 7;
_context2.next = 10;
return Promise.resolve(validator.validate(Object(defineProperty["a" /* default */])({}, name, value), Object(objectSpread2["a" /* default */])({}, options)));
case 10:
_context2.next = 15;
break;
case 12:
_context2.prev = 12;
_context2.t0 = _context2["catch"](7);
if (_context2.t0.errors) {
result = _context2.t0.errors.map(function (_ref2, index) {
var message = _ref2.message;
return (// Wrap ReactNode with `key`
react["isValidElement"](message) ? react["cloneElement"](message, {
key: "error_".concat(index)
}) : message
);
});
} else {
console.error(_context2.t0);
result = [messages.default()];
}
case 15:
if (!(!result.length && subRuleField)) {
_context2.next = 20;
break;
}
_context2.next = 18;
return Promise.all(value.map(function (subValue, i) {
return validateRule("".concat(name, ".").concat(i), subValue, subRuleField, options, messageVariables);
}));
case 18:
subResults = _context2.sent;
return _context2.abrupt("return", subResults.reduce(function (prev, errors) {
return [].concat(Object(toConsumableArray["a" /* default */])(prev), Object(toConsumableArray["a" /* default */])(errors));
}, []));
case 20:
return _context2.abrupt("return", result);
case 21:
case "end":
return _context2.stop();
}
}
}, _callee2, null, [[7, 12]]);
}));
return _validateRule.apply(this, arguments);
}
function validateRules(namePath, value, rules, options, validateFirst, messageVariables) {
var name = namePath.join('.'); // Fill rule with context
var filledRules = rules.map(function (currentRule) {
var originValidatorFunc = currentRule.validator;
if (!originValidatorFunc) {
return currentRule;
}
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, currentRule), {}, {
validator: function validator(rule, val, callback) {
var hasPromise = false; // Wrap callback only accept when promise not provided
var wrappedCallback = function wrappedCallback() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
// Wait a tick to make sure return type is a promise
Promise.resolve().then(function () {
Object(warning["a" /* default */])(!hasPromise, 'Your validator function has already return a promise. `callback` will be ignored.');
if (!hasPromise) {
callback.apply(void 0, args);
}
});
}; // Get promise
var promise = originValidatorFunc(rule, val, wrappedCallback);
hasPromise = promise && typeof promise.then === 'function' && typeof promise.catch === 'function';
/**
* 1. Use promise as the first priority.
* 2. If promise not exist, use callback with warning instead
*/
Object(warning["a" /* default */])(hasPromise, '`callback` is deprecated. Please return a promise instead.');
if (hasPromise) {
promise.then(function () {
callback();
}).catch(function (err) {
callback(err);
});
}
}
});
});
var summaryPromise;
if (validateFirst === true) {
// >>>>> Validate by serialization
summaryPromise = new Promise( /*#__PURE__*/function () {
var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(resolve, reject) {
var i, errors;
return regenerator_default.a.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
i = 0;
case 1:
if (!(i < filledRules.length)) {
_context.next = 11;
break;
}
_context.next = 4;
return validateRule(name, value, filledRules[i], options, messageVariables);
case 4:
errors = _context.sent;
if (!errors.length) {
_context.next = 8;
break;
}
reject(errors);
return _context.abrupt("return");
case 8:
i += 1;
_context.next = 1;
break;
case 11:
/* eslint-enable */
resolve([]);
case 12:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function (_x6, _x7) {
return _ref.apply(this, arguments);
};
}());
} else {
// >>>>> Validate by parallel
var rulePromises = filledRules.map(function (rule) {
return validateRule(name, value, rule, options, messageVariables);
});
summaryPromise = (validateFirst ? finishOnFirstFailed(rulePromises) : finishOnAllFailed(rulePromises)).then(function (errors) {
if (!errors.length) {
return [];
}
return Promise.reject(errors);
});
} // Internal catch error to avoid console error log.
summaryPromise.catch(function (e) {
return e;
});
return summaryPromise;
}
function finishOnAllFailed(_x8) {
return _finishOnAllFailed.apply(this, arguments);
}
function _finishOnAllFailed() {
_finishOnAllFailed = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee3(rulePromises) {
return regenerator_default.a.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Promise.all(rulePromises).then(function (errorsList) {
var _ref3;
var errors = (_ref3 = []).concat.apply(_ref3, Object(toConsumableArray["a" /* default */])(errorsList));
return errors;
}));
case 1:
case "end":
return _context3.stop();
}
}
}, _callee3);
}));
return _finishOnAllFailed.apply(this, arguments);
}
function finishOnFirstFailed(_x9) {
return _finishOnFirstFailed.apply(this, arguments);
}
function _finishOnFirstFailed() {
_finishOnFirstFailed = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee4(rulePromises) {
var count;
return regenerator_default.a.wrap(function _callee4$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
count = 0;
return _context4.abrupt("return", new Promise(function (resolve) {
rulePromises.forEach(function (promise) {
promise.then(function (errors) {
if (errors.length) {
resolve(errors);
}
count += 1;
if (count === rulePromises.length) {
resolve([]);
}
});
});
}));
case 2:
case "end":
return _context4.stop();
}
}
}, _callee4);
}));
return _finishOnFirstFailed.apply(this, arguments);
}
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/Field.js
function requireUpdate(shouldUpdate, prev, next, prevValue, nextValue, info) {
if (typeof shouldUpdate === 'function') {
return shouldUpdate(prev, next, 'source' in info ? {
source: info.source
} : {});
}
return prevValue !== nextValue;
} // We use Class instead of Hooks here since it will cost much code by using Hooks.
var Field_Field = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(Field, _React$Component);
var _super = Object(createSuper["a" /* default */])(Field);
function Field() {
var _this;
Object(classCallCheck["a" /* default */])(this, Field);
_this = _super.apply(this, arguments);
_this.state = {
resetCount: 0
};
_this.cancelRegisterFunc = null;
_this.destroy = false;
/**
* Follow state should not management in State since it will async update by React.
* This makes first render of form can not get correct state value.
*/
_this.touched = false;
/** Mark when touched & validated. Currently only used for `dependencies` */
_this.dirty = false;
_this.validatePromise = null;
_this.errors = [];
_this.cancelRegister = function () {
var _this$props = _this.props,
preserve = _this$props.preserve,
isListField = _this$props.isListField;
if (_this.cancelRegisterFunc) {
_this.cancelRegisterFunc(isListField, preserve);
}
_this.cancelRegisterFunc = null;
}; // ================================== Utils ==================================
_this.getNamePath = function () {
var name = _this.props.name;
var _this$context$prefixN = _this.context.prefixName,
prefixName = _this$context$prefixN === void 0 ? [] : _this$context$prefixN;
return name !== undefined ? [].concat(Object(toConsumableArray["a" /* default */])(prefixName), Object(toConsumableArray["a" /* default */])(name)) : [];
};
_this.getRules = function () {
var _this$props$rules = _this.props.rules,
rules = _this$props$rules === void 0 ? [] : _this$props$rules;
return rules.map(function (rule) {
if (typeof rule === 'function') {
return rule(_this.context);
}
return rule;
});
};
_this.refresh = function () {
if (_this.destroy) return;
/**
* Clean up current node.
*/
_this.setState(function (_ref) {
var resetCount = _ref.resetCount;
return {
resetCount: resetCount + 1
};
});
}; // ========================= Field Entity Interfaces =========================
// Trigger by store update. Check if need update the component
_this.onStoreChange = function (prevStore, namePathList, info) {
var _this$props2 = _this.props,
shouldUpdate = _this$props2.shouldUpdate,
_this$props2$dependen = _this$props2.dependencies,
dependencies = _this$props2$dependen === void 0 ? [] : _this$props2$dependen,
onReset = _this$props2.onReset;
var store = info.store;
var namePath = _this.getNamePath();
var prevValue = _this.getValue(prevStore);
var curValue = _this.getValue(store);
var namePathMatch = namePathList && containsNamePath(namePathList, namePath); // `setFieldsValue` is a quick access to update related status
if (info.type === 'valueUpdate' && info.source === 'external' && prevValue !== curValue) {
_this.touched = true;
_this.dirty = true;
_this.validatePromise = null;
_this.errors = [];
}
switch (info.type) {
case 'reset':
if (!namePathList || namePathMatch) {
// Clean up state
_this.touched = false;
_this.dirty = false;
_this.validatePromise = null;
_this.errors = [];
if (onReset) {
onReset();
}
_this.refresh();
return;
}
break;
case 'setField':
{
if (namePathMatch) {
var data = info.data;
if ('touched' in data) {
_this.touched = data.touched;
}
if ('validating' in data && !('originRCField' in data)) {
_this.validatePromise = data.validating ? Promise.resolve([]) : null;
}
if ('errors' in data) {
_this.errors = data.errors || [];
}
_this.dirty = true;
_this.reRender();
return;
} // Handle update by `setField` with `shouldUpdate`
if (shouldUpdate && !namePath.length && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
_this.reRender();
return;
}
break;
}
case 'dependenciesUpdate':
{
/**
* Trigger when marked `dependencies` updated. Related fields will all update
*/
var dependencyList = dependencies.map(getNamePath); // No need for `namePathMath` check and `shouldUpdate` check, since `valueUpdate` will be
// emitted earlier and they will work there
// If set it may cause unnecessary twice rerendering
if (dependencyList.some(function (dependency) {
return containsNamePath(info.relatedFields, dependency);
})) {
_this.reRender();
return;
}
break;
}
default:
// 1. If `namePath` exists in `namePathList`, means it's related value and should update
// For example <List name="list"><Field name={['list', 0]}></List>
// If `namePathList` is [['list']] (List value update), Field should be updated
// If `namePathList` is [['list', 0]] (Field value update), List shouldn't be updated
// 2.
// 2.1 If `dependencies` is set, `name` is not set and `shouldUpdate` is not set,
// don't use `shouldUpdate`. `dependencies` is view as a shortcut if `shouldUpdate`
// is not provided
// 2.2 If `shouldUpdate` provided, use customize logic to update the field
// else to check if value changed
if (namePathMatch || (!dependencies.length || namePath.length || shouldUpdate) && requireUpdate(shouldUpdate, prevStore, store, prevValue, curValue, info)) {
_this.reRender();
return;
}
break;
}
if (shouldUpdate === true) {
_this.reRender();
}
};
_this.validateRules = function (options) {
var _this$props3 = _this.props,
_this$props3$validate = _this$props3.validateFirst,
validateFirst = _this$props3$validate === void 0 ? false : _this$props3$validate,
messageVariables = _this$props3.messageVariables;
var _ref2 = options || {},
triggerName = _ref2.triggerName;
var namePath = _this.getNamePath();
var filteredRules = _this.getRules();
if (triggerName) {
filteredRules = filteredRules.filter(function (rule) {
var validateTrigger = rule.validateTrigger;
if (!validateTrigger) {
return true;
}
var triggerList = typeUtil_toArray(validateTrigger);
return triggerList.includes(triggerName);
});
}
var promise = validateRules(namePath, _this.getValue(), filteredRules, options, validateFirst, messageVariables);
_this.dirty = true;
_this.validatePromise = promise;
_this.errors = [];
promise.catch(function (e) {
return e;
}).then(function () {
var errors = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
if (_this.validatePromise === promise) {
_this.validatePromise = null;
_this.errors = errors;
_this.reRender();
}
});
return promise;
};
_this.isFieldValidating = function () {
return !!_this.validatePromise;
};
_this.isFieldTouched = function () {
return _this.touched;
};
_this.isFieldDirty = function () {
return _this.dirty;
};
_this.getErrors = function () {
return _this.errors;
}; // ============================= Child Component =============================
_this.getMeta = function () {
// Make error & validating in cache to save perf
_this.prevValidating = _this.isFieldValidating();
var meta = {
touched: _this.isFieldTouched(),
validating: _this.prevValidating,
errors: _this.errors,
name: _this.getNamePath()
};
return meta;
}; // Only return validate child node. If invalidate, will do nothing about field.
_this.getOnlyChild = function (children) {
// Support render props
if (typeof children === 'function') {
var meta = _this.getMeta();
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.getOnlyChild(children(_this.getControlled(), meta, _this.context))), {}, {
isFunction: true
});
} // Filed element only
var childList = Object(toArray["a" /* default */])(children);
if (childList.length !== 1 || !react["isValidElement"](childList[0])) {
return {
child: childList,
isFunction: false
};
}
return {
child: childList[0],
isFunction: false
};
}; // ============================== Field Control ==============================
_this.getValue = function (store) {
var getFieldsValue = _this.context.getFieldsValue;
var namePath = _this.getNamePath();
return getValue(store || getFieldsValue(true), namePath);
};
_this.getControlled = function () {
var childProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var _this$props4 = _this.props,
trigger = _this$props4.trigger,
validateTrigger = _this$props4.validateTrigger,
getValueFromEvent = _this$props4.getValueFromEvent,
normalize = _this$props4.normalize,
valuePropName = _this$props4.valuePropName,
getValueProps = _this$props4.getValueProps;
var mergedValidateTrigger = validateTrigger !== undefined ? validateTrigger : _this.context.validateTrigger;
var namePath = _this.getNamePath();
var _this$context = _this.context,
getInternalHooks = _this$context.getInternalHooks,
getFieldsValue = _this$context.getFieldsValue;
var _getInternalHooks = getInternalHooks(FieldContext["a" /* HOOK_MARK */]),
dispatch = _getInternalHooks.dispatch;
var value = _this.getValue();
var mergedGetValueProps = getValueProps || function (val) {
return Object(defineProperty["a" /* default */])({}, valuePropName, val);
}; // eslint-disable-next-line @typescript-eslint/no-explicit-any
var originTriggerFunc = childProps[trigger];
var control = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, childProps), mergedGetValueProps(value)); // Add trigger
control[trigger] = function () {
// Mark as touched
_this.touched = true;
_this.dirty = true;
var newValue;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (getValueFromEvent) {
newValue = getValueFromEvent.apply(void 0, args);
} else {
newValue = defaultGetValueFromEvent.apply(void 0, [valuePropName].concat(args));
}
if (normalize) {
newValue = normalize(newValue, value, getFieldsValue(true));
}
dispatch({
type: 'updateValue',
namePath: namePath,
value: newValue
});
if (originTriggerFunc) {
originTriggerFunc.apply(void 0, args);
}
}; // Add validateTrigger
var validateTriggerList = typeUtil_toArray(mergedValidateTrigger || []);
validateTriggerList.forEach(function (triggerName) {
// Wrap additional function of component, so that we can get latest value from store
var originTrigger = control[triggerName];
control[triggerName] = function () {
if (originTrigger) {
originTrigger.apply(void 0, arguments);
} // Always use latest rules
var rules = _this.props.rules;
if (rules && rules.length) {
// We dispatch validate to root,
// since it will update related data with other field with same name
dispatch({
type: 'validateField',
namePath: namePath,
triggerName: triggerName
});
}
};
});
return control;
};
return _this;
} // ============================== Subscriptions ==============================
Object(createClass["a" /* default */])(Field, [{
key: "componentDidMount",
value: function componentDidMount() {
var shouldUpdate = this.props.shouldUpdate;
var getInternalHooks = this.context.getInternalHooks;
var _getInternalHooks2 = getInternalHooks(FieldContext["a" /* HOOK_MARK */]),
registerField = _getInternalHooks2.registerField;
this.cancelRegisterFunc = registerField(this); // One more render for component in case fields not ready
if (shouldUpdate === true) {
this.reRender();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.cancelRegister();
this.destroy = true;
}
}, {
key: "reRender",
value: function reRender() {
if (this.destroy) return;
this.forceUpdate();
}
}, {
key: "render",
value: function render() {
var resetCount = this.state.resetCount;
var children = this.props.children;
var _this$getOnlyChild = this.getOnlyChild(children),
child = _this$getOnlyChild.child,
isFunction = _this$getOnlyChild.isFunction; // Not need to `cloneElement` since user can handle this in render function self
var returnChildNode;
if (isFunction) {
returnChildNode = child;
} else if (react["isValidElement"](child)) {
returnChildNode = react["cloneElement"](child, this.getControlled(child.props));
} else {
Object(warning["a" /* default */])(!child, '`children` of Field is not validate ReactElement.');
returnChildNode = child;
}
return react["createElement"](react["Fragment"], {
key: resetCount
}, returnChildNode);
}
}]);
return Field;
}(react["Component"]);
Field_Field.contextType = FieldContext["b" /* default */];
Field_Field.defaultProps = {
trigger: 'onChange',
valuePropName: 'value'
};
var Field_WrapperField = function WrapperField(_ref4) {
var name = _ref4.name,
restProps = Object(objectWithoutProperties["a" /* default */])(_ref4, ["name"]);
var namePath = name !== undefined ? getNamePath(name) : undefined;
var key = 'keep';
if (!restProps.isListField) {
key = "_".concat((namePath || []).join('_'));
}
if (false) {}
return react["createElement"](Field_Field, Object.assign({
key: key,
name: namePath
}, restProps));
};
/* harmony default export */ var es_Field = (Field_WrapperField);
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/List.js
var List_List = function List(_ref) {
var name = _ref.name,
children = _ref.children;
var context = react["useContext"](FieldContext["b" /* default */]);
var keyRef = react["useRef"]({
keys: [],
id: 0
});
var keyManager = keyRef.current; // User should not pass `children` as other type.
if (typeof children !== 'function') {
Object(warning["a" /* default */])(false, 'Form.List only accepts function as children.');
return null;
}
var parentPrefixName = getNamePath(context.prefixName) || [];
var prefixName = [].concat(Object(toConsumableArray["a" /* default */])(parentPrefixName), Object(toConsumableArray["a" /* default */])(getNamePath(name)));
var shouldUpdate = function shouldUpdate(prevValue, nextValue, _ref2) {
var source = _ref2.source;
if (source === 'internal') {
return false;
}
return prevValue !== nextValue;
};
return react["createElement"](FieldContext["b" /* default */].Provider, {
value: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, context), {}, {
prefixName: prefixName
})
}, react["createElement"](es_Field, {
name: [],
shouldUpdate: shouldUpdate
}, function (_ref3) {
var _ref3$value = _ref3.value,
value = _ref3$value === void 0 ? [] : _ref3$value,
onChange = _ref3.onChange;
var getFieldValue = context.getFieldValue;
var getNewValue = function getNewValue() {
var values = getFieldValue(prefixName || []);
return values || [];
};
/**
* Always get latest value in case user update fields by `form` api.
*/
var operations = {
add: function add(defaultValue, index) {
// Mapping keys
var newValue = getNewValue();
if (index >= 0 && index <= newValue.length) {
keyManager.keys = [].concat(Object(toConsumableArray["a" /* default */])(keyManager.keys.slice(0, index)), [keyManager.id], Object(toConsumableArray["a" /* default */])(keyManager.keys.slice(index)));
onChange([].concat(Object(toConsumableArray["a" /* default */])(newValue.slice(0, index)), [defaultValue], Object(toConsumableArray["a" /* default */])(newValue.slice(index))));
} else {
if (false) {}
keyManager.keys = [].concat(Object(toConsumableArray["a" /* default */])(keyManager.keys), [keyManager.id]);
onChange([].concat(Object(toConsumableArray["a" /* default */])(newValue), [defaultValue]));
}
keyManager.id += 1;
},
remove: function remove(index) {
var newValue = getNewValue();
var indexSet = new Set(Array.isArray(index) ? index : [index]);
if (indexSet.size <= 0) {
return;
}
keyManager.keys = keyManager.keys.filter(function (_, keysIndex) {
return !indexSet.has(keysIndex);
}); // Trigger store change
onChange(newValue.filter(function (_, valueIndex) {
return !indexSet.has(valueIndex);
}));
},
move: function move(from, to) {
if (from === to) {
return;
}
var newValue = getNewValue(); // Do not handle out of range
if (from < 0 || from >= newValue.length || to < 0 || to >= newValue.length) {
return;
}
keyManager.keys = valueUtil_move(keyManager.keys, from, to); // Trigger store change
onChange(valueUtil_move(newValue, from, to));
}
};
var listValue = value || [];
if (!Array.isArray(listValue)) {
listValue = [];
if (false) {}
}
return children(listValue.map(function (__, index) {
var key = keyManager.keys[index];
if (key === undefined) {
keyManager.keys[index] = keyManager.id;
key = keyManager.keys[index];
keyManager.id += 1;
}
return {
name: index,
key: key,
isListField: true
};
}), operations);
}));
};
/* harmony default export */ var es_List = (List_List);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("ODXe");
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/asyncUtil.js
function allPromiseFinish(promiseList) {
var hasError = false;
var count = promiseList.length;
var results = [];
if (!promiseList.length) {
return Promise.resolve([]);
}
return new Promise(function (resolve, reject) {
promiseList.forEach(function (promise, index) {
promise.catch(function (e) {
hasError = true;
return e;
}).then(function (result) {
count -= 1;
results[index] = result;
if (count > 0) {
return;
}
if (hasError) {
reject(results);
}
resolve(results);
});
});
});
}
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/utils/NameMap.js
/**
* NameMap like a `Map` but accepts `string[]` as key.
*/
var NameMap_NameMap = /*#__PURE__*/function () {
function NameMap() {
Object(classCallCheck["a" /* default */])(this, NameMap);
this.list = [];
}
Object(createClass["a" /* default */])(NameMap, [{
key: "set",
value: function set(key, value) {
var index = this.list.findIndex(function (item) {
return matchNamePath(item.key, key);
});
if (index !== -1) {
this.list[index].value = value;
} else {
this.list.push({
key: key,
value: value
});
}
}
}, {
key: "get",
value: function get(key) {
var result = this.list.find(function (item) {
return matchNamePath(item.key, key);
});
return result && result.value;
}
}, {
key: "update",
value: function update(key, updater) {
var origin = this.get(key);
var next = updater(origin);
if (!next) {
this.delete(key);
} else {
this.set(key, next);
}
}
}, {
key: "delete",
value: function _delete(key) {
this.list = this.list.filter(function (item) {
return !matchNamePath(item.key, key);
});
}
}, {
key: "map",
value: function map(callback) {
return this.list.map(callback);
}
}, {
key: "toJSON",
value: function toJSON() {
var json = {};
this.map(function (_ref) {
var key = _ref.key,
value = _ref.value;
json[key.join('.')] = value;
return null;
});
return json;
}
}]);
return NameMap;
}();
/* harmony default export */ var utils_NameMap = (NameMap_NameMap);
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/useForm.js
var useForm_FormStore = function FormStore(forceRootUpdate) {
var _this = this;
Object(classCallCheck["a" /* default */])(this, FormStore);
this.formHooked = false;
this.subscribable = true;
this.store = {};
this.fieldEntities = [];
this.initialValues = {};
this.callbacks = {};
this.validateMessages = null;
this.preserve = null;
this.lastValidatePromise = null;
this.getForm = function () {
return {
getFieldValue: _this.getFieldValue,
getFieldsValue: _this.getFieldsValue,
getFieldError: _this.getFieldError,
getFieldsError: _this.getFieldsError,
isFieldsTouched: _this.isFieldsTouched,
isFieldTouched: _this.isFieldTouched,
isFieldValidating: _this.isFieldValidating,
isFieldsValidating: _this.isFieldsValidating,
resetFields: _this.resetFields,
setFields: _this.setFields,
setFieldsValue: _this.setFieldsValue,
validateFields: _this.validateFields,
submit: _this.submit,
getInternalHooks: _this.getInternalHooks
};
}; // ======================== Internal Hooks ========================
this.getInternalHooks = function (key) {
if (key === FieldContext["a" /* HOOK_MARK */]) {
_this.formHooked = true;
return {
dispatch: _this.dispatch,
registerField: _this.registerField,
useSubscribe: _this.useSubscribe,
setInitialValues: _this.setInitialValues,
setCallbacks: _this.setCallbacks,
setValidateMessages: _this.setValidateMessages,
getFields: _this.getFields,
setPreserve: _this.setPreserve
};
}
Object(warning["a" /* default */])(false, '`getInternalHooks` is internal usage. Should not call directly.');
return null;
};
this.useSubscribe = function (subscribable) {
_this.subscribable = subscribable;
};
/**
* First time `setInitialValues` should update store with initial value
*/
this.setInitialValues = function (initialValues, init) {
_this.initialValues = initialValues || {};
if (init) {
_this.store = setValues({}, initialValues, _this.store);
}
};
this.getInitialValue = function (namePath) {
return getValue(_this.initialValues, namePath);
};
this.setCallbacks = function (callbacks) {
_this.callbacks = callbacks;
};
this.setValidateMessages = function (validateMessages) {
_this.validateMessages = validateMessages;
};
this.setPreserve = function (preserve) {
_this.preserve = preserve;
}; // ========================== Dev Warning =========================
this.timeoutId = null;
this.warningUnhooked = function () {
if (false) {}
}; // ============================ Fields ============================
/**
* Get registered field entities.
* @param pure Only return field which has a `name`. Default: false
*/
this.getFieldEntities = function () {
var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (!pure) {
return _this.fieldEntities;
}
return _this.fieldEntities.filter(function (field) {
return field.getNamePath().length;
});
};
this.getFieldsMap = function () {
var pure = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
var cache = new utils_NameMap();
_this.getFieldEntities(pure).forEach(function (field) {
var namePath = field.getNamePath();
cache.set(namePath, field);
});
return cache;
};
this.getFieldEntitiesForNamePathList = function (nameList) {
if (!nameList) {
return _this.getFieldEntities(true);
}
var cache = _this.getFieldsMap(true);
return nameList.map(function (name) {
var namePath = getNamePath(name);
return cache.get(namePath) || {
INVALIDATE_NAME_PATH: getNamePath(name)
};
});
};
this.getFieldsValue = function (nameList, filterFunc) {
_this.warningUnhooked();
if (nameList === true && !filterFunc) {
return _this.store;
}
var fieldEntities = _this.getFieldEntitiesForNamePathList(Array.isArray(nameList) ? nameList : null);
var filteredNameList = [];
fieldEntities.forEach(function (entity) {
var namePath = 'INVALIDATE_NAME_PATH' in entity ? entity.INVALIDATE_NAME_PATH : entity.getNamePath();
if (!filterFunc) {
filteredNameList.push(namePath);
} else {
var meta = 'getMeta' in entity ? entity.getMeta() : null;
if (filterFunc(meta)) {
filteredNameList.push(namePath);
}
}
});
return cloneByNamePathList(_this.store, filteredNameList.map(getNamePath));
};
this.getFieldValue = function (name) {
_this.warningUnhooked();
var namePath = getNamePath(name);
return getValue(_this.store, namePath);
};
this.getFieldsError = function (nameList) {
_this.warningUnhooked();
var fieldEntities = _this.getFieldEntitiesForNamePathList(nameList);
return fieldEntities.map(function (entity, index) {
if (entity && !('INVALIDATE_NAME_PATH' in entity)) {
return {
name: entity.getNamePath(),
errors: entity.getErrors()
};
}
return {
name: getNamePath(nameList[index]),
errors: []
};
});
};
this.getFieldError = function (name) {
_this.warningUnhooked();
var namePath = getNamePath(name);
var fieldError = _this.getFieldsError([namePath])[0];
return fieldError.errors;
};
this.isFieldsTouched = function () {
_this.warningUnhooked();
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var arg0 = args[0],
arg1 = args[1];
var namePathList;
var isAllFieldsTouched = false;
if (args.length === 0) {
namePathList = null;
} else if (args.length === 1) {
if (Array.isArray(arg0)) {
namePathList = arg0.map(getNamePath);
isAllFieldsTouched = false;
} else {
namePathList = null;
isAllFieldsTouched = arg0;
}
} else {
namePathList = arg0.map(getNamePath);
isAllFieldsTouched = arg1;
}
var testTouched = function testTouched(field) {
// Not provide `nameList` will check all the fields
if (!namePathList) {
return field.isFieldTouched();
}
var fieldNamePath = field.getNamePath();
if (containsNamePath(namePathList, fieldNamePath)) {
return field.isFieldTouched();
}
return isAllFieldsTouched;
};
return isAllFieldsTouched ? _this.getFieldEntities(true).every(testTouched) : _this.getFieldEntities(true).some(testTouched);
};
this.isFieldTouched = function (name) {
_this.warningUnhooked();
return _this.isFieldsTouched([name]);
};
this.isFieldsValidating = function (nameList) {
_this.warningUnhooked();
var fieldEntities = _this.getFieldEntities();
if (!nameList) {
return fieldEntities.some(function (testField) {
return testField.isFieldValidating();
});
}
var namePathList = nameList.map(getNamePath);
return fieldEntities.some(function (testField) {
var fieldNamePath = testField.getNamePath();
return containsNamePath(namePathList, fieldNamePath) && testField.isFieldValidating();
});
};
this.isFieldValidating = function (name) {
_this.warningUnhooked();
return _this.isFieldsValidating([name]);
};
/**
* Reset Field with field `initialValue` prop.
* Can pass `entities` or `namePathList` or just nothing.
*/
this.resetWithFieldInitialValue = function () {
var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
// Create cache
var cache = new utils_NameMap();
var fieldEntities = _this.getFieldEntities(true);
fieldEntities.forEach(function (field) {
var initialValue = field.props.initialValue;
var namePath = field.getNamePath(); // Record only if has `initialValue`
if (initialValue !== undefined) {
var records = cache.get(namePath) || new Set();
records.add({
entity: field,
value: initialValue
});
cache.set(namePath, records);
}
}); // Reset
var resetWithFields = function resetWithFields(entities) {
entities.forEach(function (field) {
var initialValue = field.props.initialValue;
if (initialValue !== undefined) {
var namePath = field.getNamePath();
var formInitialValue = _this.getInitialValue(namePath);
if (formInitialValue !== undefined) {
// Warning if conflict with form initialValues and do not modify value
Object(warning["a" /* default */])(false, "Form already set 'initialValues' with path '".concat(namePath.join('.'), "'. Field can not overwrite it."));
} else {
var records = cache.get(namePath);
if (records && records.size > 1) {
// Warning if multiple field set `initialValue`and do not modify value
Object(warning["a" /* default */])(false, "Multiple Field with path '".concat(namePath.join('.'), "' set 'initialValue'. Can not decide which one to pick."));
} else if (records) {
var originValue = _this.getFieldValue(namePath); // Set `initialValue`
if (!info.skipExist || originValue === undefined) {
_this.store = setValue(_this.store, namePath, Object(toConsumableArray["a" /* default */])(records)[0].value);
}
}
}
}
});
};
var requiredFieldEntities;
if (info.entities) {
requiredFieldEntities = info.entities;
} else if (info.namePathList) {
requiredFieldEntities = [];
info.namePathList.forEach(function (namePath) {
var records = cache.get(namePath);
if (records) {
var _requiredFieldEntitie;
(_requiredFieldEntitie = requiredFieldEntities).push.apply(_requiredFieldEntitie, Object(toConsumableArray["a" /* default */])(Object(toConsumableArray["a" /* default */])(records).map(function (r) {
return r.entity;
})));
}
});
} else {
requiredFieldEntities = fieldEntities;
}
resetWithFields(requiredFieldEntities);
};
this.resetFields = function (nameList) {
_this.warningUnhooked();
var prevStore = _this.store;
if (!nameList) {
_this.store = setValues({}, _this.initialValues);
_this.resetWithFieldInitialValue();
_this.notifyObservers(prevStore, null, {
type: 'reset'
});
return;
} // Reset by `nameList`
var namePathList = nameList.map(getNamePath);
namePathList.forEach(function (namePath) {
var initialValue = _this.getInitialValue(namePath);
_this.store = setValue(_this.store, namePath, initialValue);
});
_this.resetWithFieldInitialValue({
namePathList: namePathList
});
_this.notifyObservers(prevStore, namePathList, {
type: 'reset'
});
};
this.setFields = function (fields) {
_this.warningUnhooked();
var prevStore = _this.store;
fields.forEach(function (fieldData) {
var name = fieldData.name,
errors = fieldData.errors,
data = Object(objectWithoutProperties["a" /* default */])(fieldData, ["name", "errors"]);
var namePath = getNamePath(name); // Value
if ('value' in data) {
_this.store = setValue(_this.store, namePath, data.value);
}
_this.notifyObservers(prevStore, [namePath], {
type: 'setField',
data: fieldData
});
});
};
this.getFields = function () {
var entities = _this.getFieldEntities(true);
var fields = entities.map(function (field) {
var namePath = field.getNamePath();
var meta = field.getMeta();
var fieldData = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, meta), {}, {
name: namePath,
value: _this.getFieldValue(namePath)
});
Object.defineProperty(fieldData, 'originRCField', {
value: true
});
return fieldData;
});
return fields;
}; // =========================== Observer ===========================
this.registerField = function (entity) {
_this.fieldEntities.push(entity); // Set initial values
if (entity.props.initialValue !== undefined) {
var prevStore = _this.store;
_this.resetWithFieldInitialValue({
entities: [entity],
skipExist: true
});
_this.notifyObservers(prevStore, [entity.getNamePath()], {
type: 'valueUpdate',
source: 'internal'
});
} // un-register field callback
return function (isListField, preserve) {
_this.fieldEntities = _this.fieldEntities.filter(function (item) {
return item !== entity;
}); // Clean up store value if preserve
var mergedPreserve = preserve !== undefined ? preserve : _this.preserve;
if (mergedPreserve === false && !isListField) {
var namePath = entity.getNamePath();
if (_this.getFieldValue(namePath) !== undefined) {
_this.store = setValue(_this.store, namePath, undefined);
}
}
};
};
this.dispatch = function (action) {
switch (action.type) {
case 'updateValue':
{
var namePath = action.namePath,
value = action.value;
_this.updateValue(namePath, value);
break;
}
case 'validateField':
{
var _namePath = action.namePath,
triggerName = action.triggerName;
_this.validateFields([_namePath], {
triggerName: triggerName
});
break;
}
default: // Currently we don't have other action. Do nothing.
}
};
this.notifyObservers = function (prevStore, namePathList, info) {
if (_this.subscribable) {
var mergedInfo = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, info), {}, {
store: _this.getFieldsValue(true)
});
_this.getFieldEntities().forEach(function (_ref) {
var onStoreChange = _ref.onStoreChange;
onStoreChange(prevStore, namePathList, mergedInfo);
});
} else {
_this.forceRootUpdate();
}
};
this.updateValue = function (name, value) {
var namePath = getNamePath(name);
var prevStore = _this.store;
_this.store = setValue(_this.store, namePath, value);
_this.notifyObservers(prevStore, [namePath], {
type: 'valueUpdate',
source: 'internal'
}); // Notify dependencies children with parent update
var childrenFields = _this.getDependencyChildrenFields(namePath);
_this.validateFields(childrenFields);
_this.notifyObservers(prevStore, childrenFields, {
type: 'dependenciesUpdate',
relatedFields: [namePath].concat(Object(toConsumableArray["a" /* default */])(childrenFields))
}); // trigger callback function
var onValuesChange = _this.callbacks.onValuesChange;
if (onValuesChange) {
var changedValues = cloneByNamePathList(_this.store, [namePath]);
onValuesChange(changedValues, _this.store);
}
_this.triggerOnFieldsChange([namePath].concat(Object(toConsumableArray["a" /* default */])(childrenFields)));
}; // Let all child Field get update.
this.setFieldsValue = function (store) {
_this.warningUnhooked();
var prevStore = _this.store;
if (store) {
_this.store = setValues(_this.store, store);
}
_this.notifyObservers(prevStore, null, {
type: 'valueUpdate',
source: 'external'
});
};
this.getDependencyChildrenFields = function (rootNamePath) {
var children = new Set();
var childrenFields = [];
var dependencies2fields = new utils_NameMap();
/**
* Generate maps
* Can use cache to save perf if user report performance issue with this
*/
_this.getFieldEntities().forEach(function (field) {
var dependencies = field.props.dependencies;
(dependencies || []).forEach(function (dependency) {
var dependencyNamePath = getNamePath(dependency);
dependencies2fields.update(dependencyNamePath, function () {
var fields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Set();
fields.add(field);
return fields;
});
});
});
var fillChildren = function fillChildren(namePath) {
var fields = dependencies2fields.get(namePath) || new Set();
fields.forEach(function (field) {
if (!children.has(field)) {
children.add(field);
var fieldNamePath = field.getNamePath();
if (field.isFieldDirty() && fieldNamePath.length) {
childrenFields.push(fieldNamePath);
fillChildren(fieldNamePath);
}
}
});
};
fillChildren(rootNamePath);
return childrenFields;
};
this.triggerOnFieldsChange = function (namePathList, filedErrors) {
var onFieldsChange = _this.callbacks.onFieldsChange;
if (onFieldsChange) {
var fields = _this.getFields();
/**
* Fill errors since `fields` may be replaced by controlled fields
*/
if (filedErrors) {
var cache = new utils_NameMap();
filedErrors.forEach(function (_ref2) {
var name = _ref2.name,
errors = _ref2.errors;
cache.set(name, errors);
});
fields.forEach(function (field) {
// eslint-disable-next-line no-param-reassign
field.errors = cache.get(field.name) || field.errors;
});
}
var changedFields = fields.filter(function (_ref3) {
var fieldName = _ref3.name;
return containsNamePath(namePathList, fieldName);
});
onFieldsChange(changedFields, fields);
}
}; // =========================== Validate ===========================
this.validateFields = function (nameList, options) {
_this.warningUnhooked();
var provideNameList = !!nameList;
var namePathList = provideNameList ? nameList.map(getNamePath) : []; // Collect result in promise list
var promiseList = [];
_this.getFieldEntities(true).forEach(function (field) {
// Add field if not provide `nameList`
if (!provideNameList) {
namePathList.push(field.getNamePath());
} // Skip if without rule
if (!field.props.rules || !field.props.rules.length) {
return;
}
var fieldNamePath = field.getNamePath(); // Add field validate rule in to promise list
if (!provideNameList || containsNamePath(namePathList, fieldNamePath)) {
var promise = field.validateRules(Object(objectSpread2["a" /* default */])({
validateMessages: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, defaultValidateMessages), _this.validateMessages)
}, options)); // Wrap promise with field
promiseList.push(promise.then(function () {
return {
name: fieldNamePath,
errors: []
};
}).catch(function (errors) {
return Promise.reject({
name: fieldNamePath,
errors: errors
});
}));
}
});
var summaryPromise = allPromiseFinish(promiseList);
_this.lastValidatePromise = summaryPromise; // Notify fields with rule that validate has finished and need update
summaryPromise.catch(function (results) {
return results;
}).then(function (results) {
var resultNamePathList = results.map(function (_ref4) {
var name = _ref4.name;
return name;
});
_this.notifyObservers(_this.store, resultNamePathList, {
type: 'validateFinish'
});
_this.triggerOnFieldsChange(resultNamePathList, results);
});
var returnPromise = summaryPromise.then(function () {
if (_this.lastValidatePromise === summaryPromise) {
return Promise.resolve(_this.getFieldsValue(namePathList));
}
return Promise.reject([]);
}).catch(function (results) {
var errorList = results.filter(function (result) {
return result && result.errors.length;
});
return Promise.reject({
values: _this.getFieldsValue(namePathList),
errorFields: errorList,
outOfDate: _this.lastValidatePromise !== summaryPromise
});
}); // Do not throw in console
returnPromise.catch(function (e) {
return e;
});
return returnPromise;
}; // ============================ Submit ============================
this.submit = function () {
_this.warningUnhooked();
_this.validateFields().then(function (values) {
var onFinish = _this.callbacks.onFinish;
if (onFinish) {
try {
onFinish(values);
} catch (err) {
// Should print error if user `onFinish` callback failed
console.error(err);
}
}
}).catch(function (e) {
var onFinishFailed = _this.callbacks.onFinishFailed;
if (onFinishFailed) {
onFinishFailed(e);
}
});
};
this.forceRootUpdate = forceRootUpdate;
};
function useForm(form) {
var formRef = react["useRef"]();
var _React$useState = react["useState"](),
_React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2),
forceUpdate = _React$useState2[1];
if (!formRef.current) {
if (form) {
formRef.current = form;
} else {
// Create a new FormStore if not provided
var forceReRender = function forceReRender() {
forceUpdate({});
};
var formStore = new useForm_FormStore(forceReRender);
formRef.current = formStore.getForm();
}
}
return [formRef.current];
}
/* harmony default export */ var es_useForm = (useForm);
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/FormContext.js
var FormContext = react["createContext"]({
triggerFormChange: function triggerFormChange() {},
triggerFormFinish: function triggerFormFinish() {},
registerForm: function registerForm() {},
unregisterForm: function unregisterForm() {}
});
var FormContext_FormProvider = function FormProvider(_ref) {
var validateMessages = _ref.validateMessages,
onFormChange = _ref.onFormChange,
onFormFinish = _ref.onFormFinish,
children = _ref.children;
var formContext = react["useContext"](FormContext);
var formsRef = react["useRef"]({});
return react["createElement"](FormContext.Provider, {
value: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formContext), {}, {
validateMessages: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formContext.validateMessages), validateMessages),
// =========================================================
// = Global Form Control =
// =========================================================
triggerFormChange: function triggerFormChange(name, changedFields) {
if (onFormChange) {
onFormChange(name, {
changedFields: changedFields,
forms: formsRef.current
});
}
formContext.triggerFormChange(name, changedFields);
},
triggerFormFinish: function triggerFormFinish(name, values) {
if (onFormFinish) {
onFormFinish(name, {
values: values,
forms: formsRef.current
});
}
formContext.triggerFormFinish(name, values);
},
registerForm: function registerForm(name, form) {
if (name) {
formsRef.current = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formsRef.current), {}, Object(defineProperty["a" /* default */])({}, name, form));
}
formContext.registerForm(name, form);
},
unregisterForm: function unregisterForm(name) {
var newForms = Object(objectSpread2["a" /* default */])({}, formsRef.current);
delete newForms[name];
formsRef.current = newForms;
formContext.unregisterForm(name);
}
})
}, children);
};
/* harmony default export */ var es_FormContext = (FormContext);
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/Form.js
var Form_Form = function Form(_ref, ref) {
var name = _ref.name,
initialValues = _ref.initialValues,
fields = _ref.fields,
form = _ref.form,
preserve = _ref.preserve,
children = _ref.children,
_ref$component = _ref.component,
Component = _ref$component === void 0 ? 'form' : _ref$component,
validateMessages = _ref.validateMessages,
_ref$validateTrigger = _ref.validateTrigger,
validateTrigger = _ref$validateTrigger === void 0 ? 'onChange' : _ref$validateTrigger,
onValuesChange = _ref.onValuesChange,
_onFieldsChange = _ref.onFieldsChange,
_onFinish = _ref.onFinish,
onFinishFailed = _ref.onFinishFailed,
restProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["name", "initialValues", "fields", "form", "preserve", "children", "component", "validateMessages", "validateTrigger", "onValuesChange", "onFieldsChange", "onFinish", "onFinishFailed"]);
var formContext = react["useContext"](es_FormContext); // We customize handle event since Context will makes all the consumer re-render:
// https://reactjs.org/docs/context.html#contextprovider
var _useForm = es_useForm(form),
_useForm2 = Object(slicedToArray["a" /* default */])(_useForm, 1),
formInstance = _useForm2[0];
var _formInstance$getInte = formInstance.getInternalHooks(FieldContext["a" /* HOOK_MARK */]),
useSubscribe = _formInstance$getInte.useSubscribe,
setInitialValues = _formInstance$getInte.setInitialValues,
setCallbacks = _formInstance$getInte.setCallbacks,
setValidateMessages = _formInstance$getInte.setValidateMessages,
setPreserve = _formInstance$getInte.setPreserve; // Pass ref with form instance
react["useImperativeHandle"](ref, function () {
return formInstance;
}); // Register form into Context
react["useEffect"](function () {
formContext.registerForm(name, formInstance);
return function () {
formContext.unregisterForm(name);
};
}, [formContext, formInstance, name]); // Pass props to store
setValidateMessages(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formContext.validateMessages), validateMessages));
setCallbacks({
onValuesChange: onValuesChange,
onFieldsChange: function onFieldsChange(changedFields) {
formContext.triggerFormChange(name, changedFields);
if (_onFieldsChange) {
for (var _len = arguments.length, rest = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
rest[_key - 1] = arguments[_key];
}
_onFieldsChange.apply(void 0, [changedFields].concat(rest));
}
},
onFinish: function onFinish(values) {
formContext.triggerFormFinish(name, values);
if (_onFinish) {
_onFinish(values);
}
},
onFinishFailed: onFinishFailed
});
setPreserve(preserve); // Set initial value, init store value when first mount
var mountRef = react["useRef"](null);
setInitialValues(initialValues, !mountRef.current);
if (!mountRef.current) {
mountRef.current = true;
} // Prepare children by `children` type
var childrenNode = children;
var childrenRenderProps = typeof children === 'function';
if (childrenRenderProps) {
var values = formInstance.getFieldsValue(true);
childrenNode = children(values, formInstance);
} // Not use subscribe when using render props
useSubscribe(!childrenRenderProps); // Listen if fields provided. We use ref to save prev data here to avoid additional render
var prevFieldsRef = react["useRef"]();
react["useEffect"](function () {
if (!isSimilar(prevFieldsRef.current || [], fields || [])) {
formInstance.setFields(fields || []);
}
prevFieldsRef.current = fields;
}, [fields, formInstance]);
var formContextValue = react["useMemo"](function () {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, formInstance), {}, {
validateTrigger: validateTrigger
});
}, [formInstance, validateTrigger]);
var wrapperNode = react["createElement"](FieldContext["b" /* default */].Provider, {
value: formContextValue
}, childrenNode);
if (Component === false) {
return wrapperNode;
}
return react["createElement"](Component, Object.assign({}, restProps, {
onSubmit: function onSubmit(event) {
event.preventDefault();
event.stopPropagation();
formInstance.submit();
}
}), wrapperNode);
};
/* harmony default export */ var es_Form = (Form_Form);
// CONCATENATED MODULE: ./node_modules/rc-field-form/es/index.js
var InternalForm = react["forwardRef"](es_Form);
var RefForm = InternalForm;
RefForm.FormProvider = FormContext_FormProvider;
RefForm.Field = es_Field;
RefForm.List = es_List;
RefForm.useForm = es_useForm;
/* harmony default export */ var es = __webpack_exports__["d"] = (RefForm);
/***/ }),
/***/ "8AyJ":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.number.is-finite.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var numberIsFinite = __webpack_require__(/*! ../internals/number-is-finite */ "4oU/");
// `Number.isFinite` method
// https://tc39.github.io/ecma262/#sec-number.isfinite
$({ target: 'Number', stat: true }, { isFinite: numberIsFinite });
/***/ }),
/***/ "8GlL":
/*!******************************************************************!*\
!*** ./node_modules/core-js/internals/new-promise-capability.js ***!
\******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var PromiseCapability = function (C) {
var resolve, reject;
this.promise = new C(function ($$resolve, $$reject) {
if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor');
resolve = $$resolve;
reject = $$reject;
});
this.resolve = aFunction(resolve);
this.reject = aFunction(reject);
};
// 25.4.1.5 NewPromiseCapability(C)
module.exports.f = function (C) {
return new PromiseCapability(C);
};
/***/ }),
/***/ "8HVG":
/*!************************************************************!*\
!*** ./node_modules/rc-notification/es/useNotification.js ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useNotification; });
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "KQm4");
/* harmony import */ var _babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/slicedToArray */ "ODXe");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _Notice__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Notice */ "EE3K");
function useNotification(notificationInstance) {
var createdRef = react__WEBPACK_IMPORTED_MODULE_2__["useRef"]({});
var _React$useState = react__WEBPACK_IMPORTED_MODULE_2__["useState"]([]),
_React$useState2 = Object(_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_React$useState, 2),
elements = _React$useState2[0],
setElements = _React$useState2[1];
function notify(noticeProps) {
notificationInstance.add(noticeProps, function (div, props) {
var key = props.key;
if (div && !createdRef.current[key]) {
var noticeEle = react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_Notice__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"], Object.assign({}, props, {
holder: div
}));
createdRef.current[key] = noticeEle;
setElements(function (originElements) {
return [].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(originElements), [noticeEle]);
});
}
});
}
return [notify, react__WEBPACK_IMPORTED_MODULE_2__["createElement"](react__WEBPACK_IMPORTED_MODULE_2__["Fragment"], null, elements)];
}
/***/ }),
/***/ "8KD2":
/*!**********************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/InfoCircleFilled.js ***!
\**********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _InfoCircleFilled = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/InfoCircleFilled */ "nFTT"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InfoCircleFilled = function InfoCircleFilled(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _InfoCircleFilled.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(InfoCircleFilled);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "8OQS":
/*!*****************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/objectWithoutPropertiesLoose.js ***!
\*****************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
module.exports = _objectWithoutPropertiesLoose, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "8STE":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.weak-set.delete-all.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var collectionDeleteAll = __webpack_require__(/*! ../internals/collection-delete-all */ "Cg3G");
// `WeakSet.prototype.deleteAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'WeakSet', proto: true, real: true, forced: IS_PURE }, {
deleteAll: function deleteAll(/* ...elements */) {
return collectionDeleteAll.apply(this, arguments);
}
});
/***/ }),
/***/ "8YOa":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/internal-metadata.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "0BK2");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
var uid = __webpack_require__(/*! ../internals/uid */ "kOOl");
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "uy83");
var METADATA = uid('meta');
var id = 0;
var isExtensible = Object.isExtensible || function () {
return true;
};
var setMetadata = function (it) {
defineProperty(it, METADATA, { value: {
objectID: 'O' + ++id, // object ID
weakData: {} // weak collections IDs
} });
};
var fastKey = function (it, create) {
// return a primitive with prefix
if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;
if (!has(it, METADATA)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return 'F';
// not necessary to add metadata
if (!create) return 'E';
// add missing metadata
setMetadata(it);
// return object ID
} return it[METADATA].objectID;
};
var getWeakData = function (it, create) {
if (!has(it, METADATA)) {
// can't set metadata to uncaught frozen object
if (!isExtensible(it)) return true;
// not necessary to add metadata
if (!create) return false;
// add missing metadata
setMetadata(it);
// return the store of weak collections IDs
} return it[METADATA].weakData;
};
// add metadata on freeze-family methods calling
var onFreeze = function (it) {
if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);
return it;
};
var meta = module.exports = {
REQUIRED: false,
fastKey: fastKey,
getWeakData: getWeakData,
onFreeze: onFreeze
};
hiddenKeys[METADATA] = true;
/***/ }),
/***/ "8go2":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.promise.all-settled.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// TODO: Remove from `core-js@4`
__webpack_require__(/*! ./es.promise.all-settled.js */ "gg6r");
/***/ }),
/***/ "8jRI":
/*!****************************************************!*\
!*** ./node_modules/decode-uri-component/index.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var token = '%[a-f0-9]{2}';
var singleMatcher = new RegExp('(' + token + ')|([^%]+?)', 'gi');
var multiMatcher = new RegExp('(' + token + ')+', 'gi');
function decodeComponents(components, split) {
try {
// Try to decode the entire string first
return [decodeURIComponent(components.join(''))];
} catch (err) {
// Do nothing
}
if (components.length === 1) {
return components;
}
split = split || 1;
// Split the array in 2 parts
var left = components.slice(0, split);
var right = components.slice(split);
return Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));
}
function decode(input) {
try {
return decodeURIComponent(input);
} catch (err) {
var tokens = input.match(singleMatcher) || [];
for (var i = 1; i < tokens.length; i++) {
input = decodeComponents(tokens, i).join('');
tokens = input.match(singleMatcher) || [];
}
return input;
}
}
function customDecodeURIComponent(input) {
// Keep track of all the replacements and prefill the map with the `BOM`
var replaceMap = {
'%FE%FF': '\uFFFD\uFFFD',
'%FF%FE': '\uFFFD\uFFFD'
};
var match = multiMatcher.exec(input);
while (match) {
try {
// Decode as big chunks as possible
replaceMap[match[0]] = decodeURIComponent(match[0]);
} catch (err) {
var result = decode(match[0]);
if (result !== match[0]) {
replaceMap[match[0]] = result;
}
}
match = multiMatcher.exec(input);
}
// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else
replaceMap['%C2'] = '\uFFFD';
var entries = Object.keys(replaceMap);
for (var i = 0; i < entries.length; i++) {
// Replace all decoded components
var key = entries[i];
input = input.replace(new RegExp(key, 'g'), replaceMap[key]);
}
return input;
}
module.exports = function (encodedURI) {
if (typeof encodedURI !== 'string') {
throw new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');
}
try {
encodedURI = encodedURI.replace(/\+/g, ' ');
// Try the built in decoder first
return decodeURIComponent(encodedURI);
} catch (err) {
// Fallback to a more advanced decoder
return customDecodeURIComponent(encodedURI);
}
};
/***/ }),
/***/ "8r4s":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.of.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var of = __webpack_require__(/*! ../internals/collection-of */ "P940");
// `Set.of` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-set.of
$({ target: 'Set', stat: true }, {
of: of
});
/***/ }),
/***/ "8tx+":
/*!**************************************************************!*\
!*** ./node_modules/rc-notification/es/index.js + 6 modules ***!
\**************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/css-animation/es/index.js because of ./node_modules/antd/es/upload/UploadList.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/Notice.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/useNotification.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js because of ./node_modules/antd/node_modules/rc-menu/es/SubPopupMenu.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__("Ff2n");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("1OyB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("vuIU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("Ji7U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
var possibleConstructorReturn = __webpack_require__("md7G");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
var getPrototypeOf = __webpack_require__("foSv");
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// EXTERNAL MODULE: ./node_modules/react-dom/index.js
var react_dom = __webpack_require__("i8i4");
var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom);
// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/node_modules/rc-util/es/unsafeLifecyclesPolyfill.js
var unsafeLifecyclesPolyfill_unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) {
var prototype = Component.prototype;
if (!prototype || !prototype.isReactComponent) {
throw new Error('Can only polyfill class components');
} // only handle componentWillReceiveProps
if (typeof prototype.componentWillReceiveProps !== 'function') {
return Component;
} // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps
// https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler
if (!react_default.a.Profiler) {
return Component;
} // Here polyfill get started
prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps;
delete prototype.componentWillReceiveProps;
return Component;
};
/* harmony default export */ var es_unsafeLifecyclesPolyfill = (unsafeLifecyclesPolyfill_unsafeLifecyclesPolyfill);
// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/es/ChildrenUtils.js
function toArrayChildren(children) {
var ret = [];
react_default.a.Children.forEach(children, function (child) {
ret.push(child);
});
return ret;
}
function findChildInChildrenByKey(children, key) {
var ret = null;
if (children) {
children.forEach(function (child) {
if (ret) {
return;
}
if (child && child.key === key) {
ret = child;
}
});
}
return ret;
}
function findShownChildInChildrenByKey(children, key, showProp) {
var ret = null;
if (children) {
children.forEach(function (child) {
if (child && child.key === key && child.props[showProp]) {
if (ret) {
throw new Error('two child with same key for <rc-animate> children');
}
ret = child;
}
});
}
return ret;
}
function findHiddenChildInChildrenByKey(children, key, showProp) {
var found = 0;
if (children) {
children.forEach(function (child) {
if (found) {
return;
}
found = child && child.key === key && !child.props[showProp];
});
}
return found;
}
function isSameChildren(c1, c2, showProp) {
var same = c1.length === c2.length;
if (same) {
c1.forEach(function (child, index) {
var child2 = c2[index];
if (child && child2) {
if (child && !child2 || !child && child2) {
same = false;
} else if (child.key !== child2.key) {
same = false;
} else if (showProp && child.props[showProp] !== child2.props[showProp]) {
same = false;
}
}
});
}
return same;
}
function mergeChildren(prev, next) {
var ret = [];
// For each key of `next`, the list of keys to insert before that key in
// the combined list
var nextChildrenPending = {};
var pendingChildren = [];
prev.forEach(function (child) {
if (child && findChildInChildrenByKey(next, child.key)) {
if (pendingChildren.length) {
nextChildrenPending[child.key] = pendingChildren;
pendingChildren = [];
}
} else {
pendingChildren.push(child);
}
});
next.forEach(function (child) {
if (child && Object.prototype.hasOwnProperty.call(nextChildrenPending, child.key)) {
ret = ret.concat(nextChildrenPending[child.key]);
}
ret.push(child);
});
ret = ret.concat(pendingChildren);
return ret;
}
// EXTERNAL MODULE: ./node_modules/@ant-design/css-animation/es/index.js
var es = __webpack_require__("UwPn");
// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/es/util/animate.js
var util = {
isAppearSupported: function isAppearSupported(props) {
return props.transitionName && props.transitionAppear || props.animation.appear;
},
isEnterSupported: function isEnterSupported(props) {
return props.transitionName && props.transitionEnter || props.animation.enter;
},
isLeaveSupported: function isLeaveSupported(props) {
return props.transitionName && props.transitionLeave || props.animation.leave;
},
allowAppearCallback: function allowAppearCallback(props) {
return props.transitionAppear || props.animation.appear;
},
allowEnterCallback: function allowEnterCallback(props) {
return props.transitionEnter || props.animation.enter;
},
allowLeaveCallback: function allowLeaveCallback(props) {
return props.transitionLeave || props.animation.leave;
}
};
/* harmony default export */ var animate = (util);
// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/es/AnimateChild.js
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/* eslint react/prop-types: 0 */
var transitionMap = {
enter: 'transitionEnter',
appear: 'transitionAppear',
leave: 'transitionLeave'
};
var AnimateChild_AnimateChild = function (_React$Component) {
_inherits(AnimateChild, _React$Component);
function AnimateChild() {
_classCallCheck(this, AnimateChild);
return _possibleConstructorReturn(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).apply(this, arguments));
}
_createClass(AnimateChild, [{
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.stop();
}
}, {
key: 'componentWillEnter',
value: function componentWillEnter(done) {
if (animate.isEnterSupported(this.props)) {
this.transition('enter', done);
} else {
done();
}
}
}, {
key: 'componentWillAppear',
value: function componentWillAppear(done) {
if (animate.isAppearSupported(this.props)) {
this.transition('appear', done);
} else {
done();
}
}
}, {
key: 'componentWillLeave',
value: function componentWillLeave(done) {
if (animate.isLeaveSupported(this.props)) {
this.transition('leave', done);
} else {
// always sync, do not interupt with react component life cycle
// update hidden -> animate hidden ->
// didUpdate -> animate leave -> unmount (if animate is none)
done();
}
}
}, {
key: 'transition',
value: function transition(animationType, finishCallback) {
var _this2 = this;
var node = react_dom_default.a.findDOMNode(this);
var props = this.props;
var transitionName = props.transitionName;
var nameIsObj = typeof transitionName === 'object';
this.stop();
var end = function end() {
_this2.stopper = null;
finishCallback();
};
if ((es["b" /* isCssAnimationSupported */] || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) {
var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType;
var activeName = name + '-active';
if (nameIsObj && transitionName[animationType + 'Active']) {
activeName = transitionName[animationType + 'Active'];
}
this.stopper = Object(es["a" /* default */])(node, {
name: name,
active: activeName
}, end);
} else {
this.stopper = props.animation[animationType](node, end);
}
}
}, {
key: 'stop',
value: function stop() {
var stopper = this.stopper;
if (stopper) {
this.stopper = null;
stopper.stop();
}
}
}, {
key: 'render',
value: function render() {
return this.props.children;
}
}]);
return AnimateChild;
}(react_default.a.Component);
/* harmony default export */ var es_AnimateChild = (AnimateChild_AnimateChild);
// CONCATENATED MODULE: ./node_modules/rc-notification/node_modules/rc-animate/es/Animate.js
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var Animate_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function Animate_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function Animate_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function Animate_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/* eslint react/prop-types: 0 */
var defaultKey = 'rc_animate_' + Date.now();
function getChildrenFromProps(props) {
var children = props.children;
if (react_default.a.isValidElement(children)) {
if (!children.key) {
return react_default.a.cloneElement(children, {
key: defaultKey
});
}
}
return children;
}
function noop() {}
var Animate_Animate = function (_React$Component) {
Animate_inherits(Animate, _React$Component);
function Animate(props) {
Animate_classCallCheck(this, Animate);
var _this = Animate_possibleConstructorReturn(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props));
Animate_initialiseProps.call(_this);
_this.currentlyAnimatingKeys = {};
_this.keysToEnter = [];
_this.keysToLeave = [];
_this.state = {
children: toArrayChildren(getChildrenFromProps(props))
};
_this.childrenRefs = {};
return _this;
} // eslint-disable-line
Animate_createClass(Animate, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
var showProp = this.props.showProp;
var children = this.state.children;
if (showProp) {
children = children.filter(function (child) {
return !!child.props[showProp];
});
}
children.forEach(function (child) {
if (child) {
_this2.performAppear(child.key);
}
});
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var _this3 = this;
this.nextProps = nextProps;
var nextChildren = toArrayChildren(getChildrenFromProps(nextProps));
var props = this.props;
// exclusive needs immediate response
if (props.exclusive) {
Object.keys(this.currentlyAnimatingKeys).forEach(function (key) {
_this3.stop(key);
});
}
var showProp = props.showProp;
var currentlyAnimatingKeys = this.currentlyAnimatingKeys;
// last props children if exclusive
var currentChildren = props.exclusive ? toArrayChildren(getChildrenFromProps(props)) : this.state.children;
// in case destroy in showProp mode
var newChildren = [];
if (showProp) {
currentChildren.forEach(function (currentChild) {
var nextChild = currentChild && findChildInChildrenByKey(nextChildren, currentChild.key);
var newChild = void 0;
if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) {
newChild = react_default.a.cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true));
} else {
newChild = nextChild;
}
if (newChild) {
newChildren.push(newChild);
}
});
nextChildren.forEach(function (nextChild) {
if (!nextChild || !findChildInChildrenByKey(currentChildren, nextChild.key)) {
newChildren.push(nextChild);
}
});
} else {
newChildren = mergeChildren(currentChildren, nextChildren);
}
// need render to avoid update
this.setState({
children: newChildren
});
nextChildren.forEach(function (child) {
var key = child && child.key;
if (child && currentlyAnimatingKeys[key]) {
return;
}
var hasPrev = child && findChildInChildrenByKey(currentChildren, key);
if (showProp) {
var showInNext = child.props[showProp];
if (hasPrev) {
var showInNow = findShownChildInChildrenByKey(currentChildren, key, showProp);
if (!showInNow && showInNext) {
_this3.keysToEnter.push(key);
}
} else if (showInNext) {
_this3.keysToEnter.push(key);
}
} else if (!hasPrev) {
_this3.keysToEnter.push(key);
}
});
currentChildren.forEach(function (child) {
var key = child && child.key;
if (child && currentlyAnimatingKeys[key]) {
return;
}
var hasNext = child && findChildInChildrenByKey(nextChildren, key);
if (showProp) {
var showInNow = child.props[showProp];
if (hasNext) {
var showInNext = findShownChildInChildrenByKey(nextChildren, key, showProp);
if (!showInNext && showInNow) {
_this3.keysToLeave.push(key);
}
} else if (showInNow) {
_this3.keysToLeave.push(key);
}
} else if (!hasNext) {
_this3.keysToLeave.push(key);
}
});
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
var keysToEnter = this.keysToEnter;
this.keysToEnter = [];
keysToEnter.forEach(this.performEnter);
var keysToLeave = this.keysToLeave;
this.keysToLeave = [];
keysToLeave.forEach(this.performLeave);
}
}, {
key: 'isValidChildByKey',
value: function isValidChildByKey(currentChildren, key) {
var showProp = this.props.showProp;
if (showProp) {
return findShownChildInChildrenByKey(currentChildren, key, showProp);
}
return findChildInChildrenByKey(currentChildren, key);
}
}, {
key: 'stop',
value: function stop(key) {
delete this.currentlyAnimatingKeys[key];
var component = this.childrenRefs[key];
if (component) {
component.stop();
}
}
}, {
key: 'render',
value: function render() {
var _this4 = this;
var props = this.props;
this.nextProps = props;
var stateChildren = this.state.children;
var children = null;
if (stateChildren) {
children = stateChildren.map(function (child) {
if (child === null || child === undefined) {
return child;
}
if (!child.key) {
throw new Error('must set key for <rc-animate> children');
}
return react_default.a.createElement(
es_AnimateChild,
{
key: child.key,
ref: function ref(node) {
_this4.childrenRefs[child.key] = node;
},
animation: props.animation,
transitionName: props.transitionName,
transitionEnter: props.transitionEnter,
transitionAppear: props.transitionAppear,
transitionLeave: props.transitionLeave
},
child
);
});
}
var Component = props.component;
if (Component) {
var passedProps = props;
if (typeof Component === 'string') {
passedProps = _extends({
className: props.className,
style: props.style
}, props.componentProps);
}
return react_default.a.createElement(
Component,
passedProps,
children
);
}
return children[0] || null;
}
}]);
return Animate;
}(react_default.a.Component);
Animate_Animate.isAnimate = true;
Animate_Animate.defaultProps = {
animation: {},
component: 'span',
componentProps: {},
transitionEnter: true,
transitionLeave: true,
transitionAppear: false,
onEnd: noop,
onEnter: noop,
onLeave: noop,
onAppear: noop
};
var Animate_initialiseProps = function _initialiseProps() {
var _this5 = this;
this.performEnter = function (key) {
// may already remove by exclusive
if (_this5.childrenRefs[key]) {
_this5.currentlyAnimatingKeys[key] = true;
_this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter'));
}
};
this.performAppear = function (key) {
if (_this5.childrenRefs[key]) {
_this5.currentlyAnimatingKeys[key] = true;
_this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear'));
}
};
this.handleDoneAdding = function (key, type) {
var props = _this5.props;
delete _this5.currentlyAnimatingKeys[key];
// if update on exclusive mode, skip check
if (props.exclusive && props !== _this5.nextProps) {
return;
}
var currentChildren = toArrayChildren(getChildrenFromProps(props));
if (!_this5.isValidChildByKey(currentChildren, key)) {
// exclusive will not need this
_this5.performLeave(key);
} else if (type === 'appear') {
if (animate.allowAppearCallback(props)) {
props.onAppear(key);
props.onEnd(key, true);
}
} else if (animate.allowEnterCallback(props)) {
props.onEnter(key);
props.onEnd(key, true);
}
};
this.performLeave = function (key) {
// may already remove by exclusive
if (_this5.childrenRefs[key]) {
_this5.currentlyAnimatingKeys[key] = true;
_this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key));
}
};
this.handleDoneLeaving = function (key) {
var props = _this5.props;
delete _this5.currentlyAnimatingKeys[key];
// if update on exclusive mode, skip check
if (props.exclusive && props !== _this5.nextProps) {
return;
}
var currentChildren = toArrayChildren(getChildrenFromProps(props));
// in case state change is too fast
if (_this5.isValidChildByKey(currentChildren, key)) {
_this5.performEnter(key);
} else {
var end = function end() {
if (animate.allowLeaveCallback(props)) {
props.onLeave(key);
props.onEnd(key, false);
}
};
if (!isSameChildren(_this5.state.children, currentChildren, props.showProp)) {
_this5.setState({
children: currentChildren
}, end);
} else {
end();
}
}
};
};
/* harmony default export */ var es_Animate = (es_unsafeLifecyclesPolyfill(Animate_Animate));
// EXTERNAL MODULE: ./node_modules/rc-util/es/createChainedFunction.js
var createChainedFunction = __webpack_require__("2GS6");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/rc-notification/es/Notice.js
var Notice = __webpack_require__("EE3K");
// EXTERNAL MODULE: ./node_modules/rc-notification/es/useNotification.js
var es_useNotification = __webpack_require__("8HVG");
// CONCATENATED MODULE: ./node_modules/rc-notification/es/Notification.js
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { Object(defineProperty["a" /* default */])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = Object(getPrototypeOf["a" /* default */])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(possibleConstructorReturn["a" /* default */])(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var seed = 0;
var now = Date.now();
function getUuid() {
var id = seed;
seed += 1;
return "rcNotification_".concat(now, "_").concat(id);
}
var Notification_Notification = /*#__PURE__*/function (_Component) {
Object(inherits["a" /* default */])(Notification, _Component);
var _super = _createSuper(Notification);
function Notification() {
var _this;
Object(classCallCheck["a" /* default */])(this, Notification);
_this = _super.apply(this, arguments);
_this.state = {
notices: []
};
_this.hookRefs = new Map();
_this.add = function (notice, holderCallback) {
// eslint-disable-next-line no-param-reassign
notice.key = notice.key || getUuid();
var key = notice.key;
var maxCount = _this.props.maxCount;
_this.setState(function (previousState) {
var notices = previousState.notices;
var noticeIndex = notices.map(function (v) {
return v.notice.key;
}).indexOf(key);
var updatedNotices = notices.concat();
if (noticeIndex !== -1) {
updatedNotices.splice(noticeIndex, 1, {
notice: notice,
holderCallback: holderCallback
});
} else {
if (maxCount && notices.length >= maxCount) {
// XXX, use key of first item to update new added (let React to move exsiting
// instead of remove and mount). Same key was used before for both a) external
// manual control and b) internal react 'key' prop , which is not that good.
// eslint-disable-next-line no-param-reassign
notice.updateKey = updatedNotices[0].notice.updateKey || updatedNotices[0].notice.key;
updatedNotices.shift();
}
updatedNotices.push({
notice: notice,
holderCallback: holderCallback
});
}
return {
notices: updatedNotices
};
});
};
_this.remove = function (key) {
_this.setState(function (previousState) {
return {
notices: previousState.notices.filter(function (_ref) {
var notice = _ref.notice;
return notice.key !== key;
})
};
});
};
return _this;
}
Object(createClass["a" /* default */])(Notification, [{
key: "getTransitionName",
value: function getTransitionName() {
var _this$props = this.props,
prefixCls = _this$props.prefixCls,
animation = _this$props.animation;
var transitionName = this.props.transitionName;
if (!transitionName && animation) {
transitionName = "".concat(prefixCls, "-").concat(animation);
}
return transitionName;
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var notices = this.state.notices;
var _this$props2 = this.props,
prefixCls = _this$props2.prefixCls,
className = _this$props2.className,
closeIcon = _this$props2.closeIcon,
style = _this$props2.style;
var noticeNodes = notices.map(function (_ref2, index) {
var notice = _ref2.notice,
holderCallback = _ref2.holderCallback;
var update = Boolean(index === notices.length - 1 && notice.updateKey);
var key = notice.updateKey ? notice.updateKey : notice.key;
var onClose = Object(createChainedFunction["a" /* default */])(_this2.remove.bind(_this2, notice.key), notice.onClose);
var noticeProps = _objectSpread(_objectSpread(_objectSpread({
prefixCls: prefixCls,
closeIcon: closeIcon
}, notice), notice.props), {}, {
key: key,
update: update,
onClose: onClose,
onClick: notice.onClick,
children: notice.content
});
if (holderCallback) {
return react_default.a.createElement("div", {
key: key,
className: "".concat(prefixCls, "-hook-holder"),
ref: function ref(div) {
if (typeof key === 'undefined') {
return;
}
if (div) {
_this2.hookRefs.set(key, div);
holderCallback(div, noticeProps);
} else {
_this2.hookRefs.delete(key);
}
}
});
}
return react_default.a.createElement(Notice["a" /* default */], Object.assign({}, noticeProps));
});
return react_default.a.createElement("div", {
className: classnames_default()(prefixCls, className),
style: style
}, react_default.a.createElement(es_Animate, {
transitionName: this.getTransitionName()
}, noticeNodes));
}
}]);
return Notification;
}(react["Component"]);
Notification_Notification.defaultProps = {
prefixCls: 'rc-notification',
animation: 'fade',
style: {
top: 65,
left: '50%'
}
};
Notification_Notification.newInstance = function newNotificationInstance(properties, callback) {
var _ref3 = properties || {},
getContainer = _ref3.getContainer,
props = Object(objectWithoutProperties["a" /* default */])(_ref3, ["getContainer"]);
var div = document.createElement('div');
if (getContainer) {
var root = getContainer();
root.appendChild(div);
} else {
document.body.appendChild(div);
}
var called = false;
function ref(notification) {
if (called) {
return;
}
called = true;
callback({
notice: function notice(noticeProps) {
notification.add(noticeProps);
},
removeNotice: function removeNotice(key) {
notification.remove(key);
},
component: notification,
destroy: function destroy() {
react_dom_default.a.unmountComponentAtNode(div);
if (div.parentNode) {
div.parentNode.removeChild(div);
}
},
// Hooks
useNotification: function useNotification() {
return Object(es_useNotification["a" /* default */])(notification);
}
});
} // Only used for test case usage
if (false) {}
react_dom_default.a.render(react_default.a.createElement(Notification_Notification, Object.assign({}, props, {
ref: ref
})), div);
};
/* harmony default export */ var es_Notification = (Notification_Notification);
// CONCATENATED MODULE: ./node_modules/rc-notification/es/index.js
/* harmony default export */ var rc_notification_es = __webpack_exports__["a"] = (es_Notification);
/***/ }),
/***/ "8yz6":
/*!**********************************************!*\
!*** ./node_modules/split-on-first/index.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (string, separator) {
if (!(typeof string === 'string' && typeof separator === 'string')) {
throw new TypeError('Expected the arguments to be of type `string`');
}
if (separator === '') {
return [string];
}
var separatorIndex = string.indexOf(separator);
if (separatorIndex === -1) {
return [string];
}
return [string.slice(0, separatorIndex), string.slice(separatorIndex + separator.length)];
};
/***/ }),
/***/ "9/5/":
/*!***********************************************!*\
!*** ./node_modules/lodash.debounce/index.js ***!
\***********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/**
* lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* Gets the timestamp of the number of milliseconds that have elapsed since
* the Unix epoch (1 January 1970 00:00:00 UTC).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Date
* @returns {number} Returns the timestamp.
* @example
*
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
* // => Logs the number of milliseconds it took for the deferred invocation.
*/
var now = function() {
return root.Date.now();
};
/**
* Creates a debounced function that delays invoking `func` until after `wait`
* milliseconds have elapsed since the last time the debounced function was
* invoked. The debounced function comes with a `cancel` method to cancel
* delayed `func` invocations and a `flush` method to immediately invoke them.
* Provide `options` to indicate whether `func` should be invoked on the
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
* with the last arguments provided to the debounced function. Subsequent
* calls to the debounced function return the result of the last `func`
* invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the debounced function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.debounce` and `_.throttle`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to debounce.
* @param {number} [wait=0] The number of milliseconds to delay.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=false]
* Specify invoking on the leading edge of the timeout.
* @param {number} [options.maxWait]
* The maximum time `func` is allowed to be delayed before it's invoked.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new debounced function.
* @example
*
* // Avoid costly calculations while the window size is in flux.
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
*
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
* jQuery(element).on('click', _.debounce(sendMail, 300, {
* 'leading': true,
* 'trailing': false
* }));
*
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
* var source = new EventSource('/stream');
* jQuery(source).on('message', debounced);
*
* // Cancel the trailing debounced invocation.
* jQuery(window).on('popstate', debounced.cancel);
*/
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime,
lastInvokeTime = 0,
leading = false,
maxing = false,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = 'maxWait' in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs,
thisArg = lastThis;
lastArgs = lastThis = undefined;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
// Reset any `maxWait` timer.
lastInvokeTime = time;
// Start the timer for the trailing edge.
timerId = setTimeout(timerExpired, wait);
// Invoke the leading edge.
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
result = wait - timeSinceLastCall;
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime;
// Either this is the first call, activity has stopped and we're at the
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
function timerExpired() {
var time = now();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
// Restart the timer.
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined;
// Only invoke if we have `lastArgs` which means `func` has been
// debounced at least once.
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = undefined;
return result;
}
function cancel() {
if (timerId !== undefined) {
clearTimeout(timerId);
}
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
return timerId === undefined ? result : trailingEdge(now());
}
function debounced() {
var time = now(),
isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined) {
return leadingEdge(lastCallTime);
}
if (maxing) {
// Handle invocations in a tight loop.
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
: (reIsBadHex.test(value) ? NAN : +value);
}
module.exports = debounce;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "90hW":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/math-sign.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
// `Math.sign` method implementation
// https://tc39.github.io/ecma262/#sec-math.sign
module.exports = Math.sign || function sign(x) {
// eslint-disable-next-line no-self-compare
return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
};
/***/ }),
/***/ "93I0":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/shared-key.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var shared = __webpack_require__(/*! ../internals/shared */ "VpIT");
var uid = __webpack_require__(/*! ../internals/uid */ "kOOl");
var keys = shared('keys');
module.exports = function (key) {
return keys[key] || (keys[key] = uid(key));
};
/***/ }),
/***/ "94Xl":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.array.species.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JiZb");
// `Array[@@species]` getter
// https://tc39.github.io/ecma262/#sec-get-array-@@species
setSpecies('Array');
/***/ }),
/***/ "9D6x":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.update.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
// `Set.prototype.update` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
update: function update(key, callback /* , thunk */) {
var map = anObject(this);
var length = arguments.length;
aFunction(callback);
var isPresentInMap = map.has(key);
if (!isPresentInMap && length < 3) {
throw TypeError('Updating absent value');
}
var value = isPresentInMap ? map.get(key) : aFunction(length > 2 ? arguments[2] : undefined)(key, map);
map.set(key, callback(value, key, map));
return map;
}
});
/***/ }),
/***/ "9N29":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/es.array.reduce-right.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $reduceRight = __webpack_require__(/*! ../internals/array-reduce */ "1Y/n").right;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var STRICT_METHOD = arrayMethodIsStrict('reduceRight');
// For preventing possible almost infinite loop in non-standard implementations, test the forward version of the method
var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });
// `Array.prototype.reduceRight` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
reduceRight: function reduceRight(callbackfn /* , initialValue */) {
return $reduceRight(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "9NmV":
/*!**********************************************!*\
!*** ./node_modules/lodash/_unicodeWords.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f',
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
rsComboSymbolsRange = '\\u20d0-\\u20ff',
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
rsDingbatRange = '\\u2700-\\u27bf',
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
rsPunctuationRange = '\\u2000-\\u206f',
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
rsVarRange = '\\ufe0e\\ufe0f',
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
/** Used to compose unicode capture groups. */
var rsApos = "['\u2019]",
rsBreak = '[' + rsBreakRange + ']',
rsCombo = '[' + rsComboRange + ']',
rsDigits = '\\d+',
rsDingbat = '[' + rsDingbatRange + ']',
rsLower = '[' + rsLowerRange + ']',
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
rsFitz = '\\ud83c[\\udffb-\\udfff]',
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
rsNonAstral = '[^' + rsAstralRange + ']',
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
rsUpper = '[' + rsUpperRange + ']',
rsZWJ = '\\u200d';
/** Used to compose unicode regexes. */
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
rsSeq = rsOptVar + reOptMod + rsOptJoin,
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq;
/** Used to match complex or compound words. */
var reUnicodeWord = RegExp([
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
rsUpper + '+' + rsOptContrUpper,
rsOrdUpper,
rsOrdLower,
rsDigits,
rsEmoji
].join('|'), 'g');
/**
* Splits a Unicode `string` into an array of its words.
*
* @private
* @param {string} The string to inspect.
* @returns {Array} Returns the words of `string`.
*/
function unicodeWords(string) {
return string.match(reUnicodeWord) || [];
}
module.exports = unicodeWords;
/***/ }),
/***/ "9Odx":
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/RightOutlined.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _RightOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/RightOutlined */ "FhTr"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var RightOutlined = function RightOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _RightOutlined.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(RightOutlined);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "9R94":
/*!****************************************************************!*\
!*** ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js ***!
\****************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return invariant; });
var isProduction = "production" === 'production';
var prefix = 'Invariant failed';
function invariant(condition, message) {
if (condition) {
return;
}
if (isProduction) {
throw new Error(prefix);
}
var provided = typeof message === 'function' ? message() : message;
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
throw new Error(value);
}
/***/ }),
/***/ "9bJ7":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.code-point-at.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var codeAt = __webpack_require__(/*! ../internals/string-multibyte */ "ZUd8").codeAt;
// `String.prototype.codePointAt` method
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
$({ target: 'String', proto: true }, {
codePointAt: function codePointAt(pos) {
return codeAt(this, pos);
}
});
/***/ }),
/***/ "9d/t":
/*!***************************************************!*\
!*** ./node_modules/core-js/internals/classof.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "AO7/");
var classofRaw = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
// ES3 wrong here
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
// fallback for IE11 Script Access Denied error
var tryGet = function (it, key) {
try {
return it[key];
} catch (error) { /* empty */ }
};
// getting tag from ES6+ `Object.prototype.toString`
module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
var O, tag, result;
return it === undefined ? 'Undefined' : it === null ? 'Null'
// @@toStringTag case
: typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag
// builtinTag case
: CORRECT_ARGUMENTS ? classofRaw(O)
// ES3 arguments fallback
: (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
};
/***/ }),
/***/ "9hUv":
/*!**************************************************!*\
!*** ./src/models/messages/index.ts + 1 modules ***!
\**************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/messages.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function messages_getTidings(_x) {
return _getTidings.apply(this, arguments);
}
function _getTidings() {
_getTidings = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])('/api/users/tidings.json', {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getTidings.apply(this, arguments);
}
function messages_unreadMessageInfo(_x2) {
return _unreadMessageInfo.apply(this, arguments);
}
function _unreadMessageInfo() {
_unreadMessageInfo = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/unread_message_info.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _unreadMessageInfo.apply(this, arguments);
}
function messages_getPrivateMessages(_x3) {
return _getPrivateMessages.apply(this, arguments);
}
function _getPrivateMessages() {
_getPrivateMessages = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/private_messages.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getPrivateMessages.apply(this, arguments);
}
function postPrivateMessages(_x4) {
return _postPrivateMessages.apply(this, arguments);
}
function _postPrivateMessages() {
_postPrivateMessages = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/private_messages.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _postPrivateMessages.apply(this, arguments);
}
function messages_getRecentContacts(_x5) {
return _getRecentContacts.apply(this, arguments);
}
function _getRecentContacts() {
_getRecentContacts = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.id, "/recent_contacts.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getRecentContacts.apply(this, arguments);
}
function messages_getUsersForPrivateMessages(_x6) {
return _getUsersForPrivateMessages.apply(this, arguments);
}
function _getUsersForPrivateMessages() {
_getUsersForPrivateMessages = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/users_for_private_messages.json", {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _getUsersForPrivateMessages.apply(this, arguments);
}
function messages_getPrivateMessageDetails(_x7) {
return _getPrivateMessageDetails.apply(this, arguments);
}
function _getPrivateMessageDetails() {
_getPrivateMessageDetails = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/private_message_details.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getPrivateMessageDetails.apply(this, arguments);
}
function deletePrivateMessage(_x8) {
return _deletePrivateMessage.apply(this, arguments);
}
function _deletePrivateMessage() {
_deletePrivateMessage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.userId, "/private_messages/").concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _deletePrivateMessage.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/messages/index.ts
function messages_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ messages_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var MessagesModel = {
namespace: 'messages',
state: {
tidingsList: [],
privateMessage: [],
unreadInfo: [],
recentContacts: {},
privateMessageDetails: {},
userPrivateMessage: {},
actionTabs: {
key: '',
params: {}
}
},
effects: {
getPrivateMessageDetails: function getPrivateMessageDetails(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee() {
var response;
return messages_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(messages_getPrivateMessageDetails, payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
privateMessageDetails: response || []
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getTidings: function getTidings(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee2() {
var response;
return messages_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(messages_getTidings, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
tidingsList: response || []
}
});
case 5:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getPrivateMessages: function getPrivateMessages(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee3() {
var response;
return messages_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(messages_getPrivateMessages, payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
privateMessage: response || []
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
getUsersForPrivateMessages: function getUsersForPrivateMessages(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee4() {
var response;
return messages_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(messages_getUsersForPrivateMessages, payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
userPrivateMessage: response || []
}
});
case 5:
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
unreadMessageInfo: function unreadMessageInfo(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee5() {
var response;
return messages_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(messages_unreadMessageInfo, payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return put({
type: 'save',
payload: {
unreadInfo: response || []
}
});
case 5:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
getRecentContacts: function getRecentContacts(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee6() {
var response;
return messages_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(messages_getRecentContacts, payload);
case 2:
response = _context6.sent;
_context6.next = 5;
return put({
type: 'save',
payload: {
recentContacts: response || []
}
});
case 5:
return _context6.abrupt("return", response);
case 6:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/messages_regeneratorRuntime().mark(function _callee7() {
return messages_regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context7.stop();
}
}, _callee7);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref15) {
var dispatch = _ref15.dispatch,
history = _ref15.history;
}
}
};
/* harmony default export */ var messages = __webpack_exports__["a"] = (MessagesModel);
/***/ }),
/***/ "9kvl":
/*!*************************************************************!*\
!*** ./src/.umi-production/core/umiExports.ts + 19 modules ***!
\*************************************************************/
/*! exports provided: history, setCreateHistoryOptions, plugin, connect, useDispatch, useStore, useSelector, getDvaApp, __PLUGIN_INITIAL_STATE, createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, RawIntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, localeInfo, addLocale, getIntl, setIntl, getLocale, getDirection, setLocale, formatMessage, getAllLocales, SelectLang, useModel, ErrorShowType, request, useRequest, UseRequestProvider, Helmet */
/*! exports used: connect, getDvaApp, history, plugin, setLocale, useModel */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js because of ./src/components/UploadFile/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/history.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/plugin.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-dva/dva.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-locale/localeExports.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-model/useModel.tsx because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/account/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/announcement.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/attachment.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/boards.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/exercise.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/graduation.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/homeworks.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/new.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/polls.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/teacher.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/video.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/competitions/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/engineering/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/forums/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/forums/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/globalSetting.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/homePage.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/messages/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paperlibrary/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paths/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paths/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paths/new.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/problemset/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/problemset/preview.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/resetFul/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/new.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/practiceSetting.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/user/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/user/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/video/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js because of ./src/pages/Competitions/Entered/Assembly/ManagedTeams.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/style/index.js because of ./node_modules/antd/es/table/style/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/notification/index.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/notification/style/index.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash.debounce/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash.throttle/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-helmet/es/Helmet.js (<- Module uses injected variables (global)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/index.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/umi-request/dist/index.esm.js (<- Module uses injected variables (process)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "c", function() { return /* reexport */ core_history["b" /* history */]; });
__webpack_require__.d(__webpack_exports__, "d", function() { return /* reexport */ core_plugin["a" /* plugin */]; });
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es["c" /* connect */]; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* reexport */ dva["b" /* getApp */]; });
__webpack_require__.d(__webpack_exports__, "e", function() { return /* reexport */ localeExports["g" /* setLocale */]; });
__webpack_require__.d(__webpack_exports__, "f", function() { return /* reexport */ useModel["a" /* useModel */]; });
// UNUSED EXPORTS: setCreateHistoryOptions, useDispatch, useStore, useSelector, __PLUGIN_INITIAL_STATE, createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, RawIntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, localeInfo, addLocale, getIntl, setIntl, getLocale, getDirection, formatMessage, getAllLocales, SelectLang, ErrorShowType, request, useRequest, UseRequestProvider, Helmet
// EXTERNAL MODULE: ./src/.umi-production/core/history.ts
var core_history = __webpack_require__("FfOG");
// EXTERNAL MODULE: ./src/.umi-production/core/plugin.ts
var core_plugin = __webpack_require__("bCY9");
// EXTERNAL MODULE: ./node_modules/react-redux/es/index.js + 24 modules
var es = __webpack_require__("/MKj");
// EXTERNAL MODULE: ./src/.umi-production/plugin-dva/dva.ts + 1 modules
var dva = __webpack_require__("uRV1");
// CONCATENATED MODULE: ./src/.umi-production/plugin-dva/exports.ts
// @ts-nocheck
// EXTERNAL MODULE: ./src/models/account/index.ts + 1 modules
var account = __webpack_require__("OSZE");
// EXTERNAL MODULE: ./src/models/classrooms/announcement.ts + 1 modules
var announcement = __webpack_require__("6YAi");
// EXTERNAL MODULE: ./src/models/classrooms/attachment.ts + 1 modules
var attachment = __webpack_require__("0BeC");
// EXTERNAL MODULE: ./src/models/classrooms/boards.ts + 1 modules
var boards = __webpack_require__("FzKp");
// EXTERNAL MODULE: ./src/models/classrooms/exercise.ts
var exercise = __webpack_require__("qS6X");
// EXTERNAL MODULE: ./src/models/classrooms/graduation.ts + 1 modules
var graduation = __webpack_require__("02UQ");
// EXTERNAL MODULE: ./src/models/classrooms/homeworks.ts + 1 modules
var homeworks = __webpack_require__("tzui");
// EXTERNAL MODULE: ./src/models/classrooms/index.ts
var classrooms = __webpack_require__("5mCs");
// EXTERNAL MODULE: ./src/models/classrooms/new.ts
var classrooms_new = __webpack_require__("wCfY");
// EXTERNAL MODULE: ./src/models/classrooms/polls.ts + 1 modules
var polls = __webpack_require__("Cb9Y");
// EXTERNAL MODULE: ./src/models/classrooms/teacher.ts + 1 modules
var teacher = __webpack_require__("N9QN");
// EXTERNAL MODULE: ./src/models/classrooms/video.ts
var video = __webpack_require__("ggIM");
// EXTERNAL MODULE: ./src/models/competitions/index.ts
var competitions = __webpack_require__("3blH");
// EXTERNAL MODULE: ./src/models/engineering/index.ts
var engineering = __webpack_require__("amTc");
// EXTERNAL MODULE: ./src/models/forums/detail.ts
var detail = __webpack_require__("5FVT");
// EXTERNAL MODULE: ./src/models/forums/index.ts
var forums = __webpack_require__("Xq8t");
// EXTERNAL MODULE: ./src/models/globalSetting.ts + 1 modules
var globalSetting = __webpack_require__("7VZV");
// EXTERNAL MODULE: ./src/models/homePage.ts
var homePage = __webpack_require__("b6mv");
// EXTERNAL MODULE: ./src/models/messages/index.ts + 1 modules
var messages = __webpack_require__("9hUv");
// EXTERNAL MODULE: ./src/models/paperlibrary/index.ts + 2 modules
var paperlibrary = __webpack_require__("WRKT");
// EXTERNAL MODULE: ./src/models/paths/detail.ts
var paths_detail = __webpack_require__("noRp");
// EXTERNAL MODULE: ./src/models/paths/index.ts
var paths = __webpack_require__("TPcJ");
// EXTERNAL MODULE: ./src/models/paths/new.ts
var paths_new = __webpack_require__("en47");
// EXTERNAL MODULE: ./src/models/problemset/index.ts
var problemset = __webpack_require__("zU+Z");
// EXTERNAL MODULE: ./src/models/problemset/preview.ts
var preview = __webpack_require__("Zkxe");
// EXTERNAL MODULE: ./src/models/resetFul/index.ts + 1 modules
var resetFul = __webpack_require__("To2U");
// EXTERNAL MODULE: ./src/models/shixuns/detail.ts + 1 modules
var shixuns_detail = __webpack_require__("q0dX");
// EXTERNAL MODULE: ./src/models/shixuns/index.ts
var shixuns = __webpack_require__("piWV");
// EXTERNAL MODULE: ./src/models/shixuns/new.ts
var shixuns_new = __webpack_require__("aZPP");
// EXTERNAL MODULE: ./src/models/shixuns/practiceSetting.ts + 1 modules
var practiceSetting = __webpack_require__("1cmj");
// EXTERNAL MODULE: ./src/models/user/detail.ts
var user_detail = __webpack_require__("XuYy");
// EXTERNAL MODULE: ./src/models/user/index.ts
var user = __webpack_require__("G+G9");
// EXTERNAL MODULE: ./src/models/video/detail.ts + 1 modules
var video_detail = __webpack_require__("iUp/");
// CONCATENATED MODULE: ./src/.umi-production/plugin-dva/connect.ts
// @ts-nocheck
/**
* @type P: Type of payload
* @type C: Type of callback
*/
/**
* @type P: Params matched in dynamic routing
*/
/**
* @type T: React props
* @type U: match props types
*/
// CONCATENATED MODULE: ./src/.umi-production/plugin-initial-state/exports.ts
// @ts-nocheck
// @ts-ignore
var __PLUGIN_INITIAL_STATE = 1;
// EXTERNAL MODULE: ./src/.umi-production/plugin-locale/localeExports.ts + 20 modules
var localeExports = __webpack_require__("Fghh");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("jrin");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/style/index.js
var style = __webpack_require__("qVdP");
// EXTERNAL MODULE: ./node_modules/antd/es/dropdown/index.js
var dropdown = __webpack_require__("jsC+");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("0Owb");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules
var objectWithoutProperties = __webpack_require__("PpiC");
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// CONCATENATED MODULE: ./src/.umi-production/plugin-locale/SelectLang.tsx
// @ts-nocheck
var SelectLang_HeaderDropdown = function HeaderDropdown(_ref) {
var cls = _ref.overlayClassName,
restProps = Object(objectWithoutProperties["a" /* default */])(_ref, ["overlayClassName"]);
return /*#__PURE__*/react_default.a.createElement(dropdown["a" /* default */], Object(esm_extends["a" /* default */])({
overlayClassName: cls
}, restProps));
};
var SelectLang_transformArrayToObject = function transformArrayToObject(allLangUIConfig) {
return allLangUIConfig.reduce(function (obj, item) {
if (!item.lang) {
return obj;
}
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, Object(defineProperty["a" /* default */])({}, item.lang, item));
}, {});
};
var defaultLangUConfigMap = Object(defineProperty["a" /* default */])({
'ar-EG': {
lang: 'ar-EG',
label: 'العربية',
icon: '🇪🇬',
title: 'لغة'
},
'az-AZ': {
lang: 'az-AZ',
label: 'Azərbaycan dili',
icon: '🇦🇿',
title: 'Dil'
},
'bg-BG': {
lang: 'bg-BG',
label: 'Български език',
icon: '🇧🇬',
title: 'език'
},
'ca-ES': {
lang: 'ca-ES',
label: 'Catalá',
icon: '🇨🇦',
title: 'llengua'
},
'cs-CZ': {
lang: 'cs-CZ',
label: 'Čeština',
icon: '🇨🇿',
title: 'Jazyk'
},
'da-DK': {
lang: 'da-DK',
label: 'Dansk',
icon: '🇩🇰',
title: 'Sprog'
},
'de-DE': {
lang: 'de-DE',
label: 'Deutsch',
icon: '🇩🇪',
title: 'Sprache'
},
'el-GR': {
lang: 'el-GR',
label: 'Ελληνικά',
icon: '🇬🇷',
title: 'Γλώσσα'
},
'en-GB': {
lang: 'en-GB',
label: 'English',
icon: '🇬🇧',
title: 'Language'
},
'en-US': {
lang: 'en-US',
label: 'English',
icon: '🇺🇸',
title: 'Language'
},
'es-ES': {
lang: 'es-ES',
label: 'Español',
icon: '🇪🇸',
title: 'Idioma'
},
'et-EE': {
lang: 'et-EE',
label: 'Eesti',
icon: '🇪🇪',
title: 'Keel'
},
'fa-IR': {
lang: 'fa-IR',
label: 'فارسی',
icon: '🇮🇷',
title: 'زبان'
},
'fi-FI': {
lang: 'fi-FI',
label: 'Suomi',
icon: '🇫🇮',
title: 'Kieli'
},
'fr-BE': {
lang: 'fr-BE',
label: 'Français',
icon: '🇧🇪',
title: 'Langue'
},
'fr-FR': {
lang: 'fr-FR',
label: 'Français',
icon: '🇫🇷',
title: 'Langue'
},
'ga-IE': {
lang: 'ga-IE',
label: 'Gaeilge',
icon: '🇮🇪',
title: 'Teanga'
},
'he-IL': {
lang: 'he-IL',
label: 'עברית',
icon: '🇮🇱',
title: 'שפה'
},
'hi-IN': {
lang: 'hi-IN',
label: 'हिन्दी, हिंदी',
icon: '🇮🇳',
title: 'भाषा: हिन्दी'
},
'hr-HR': {
lang: 'hr-HR',
label: 'Hrvatski jezik',
icon: '🇭🇷',
title: 'Jezik'
},
'hu-HU': {
lang: 'hu-HU',
label: 'Magyar',
icon: '🇭🇺',
title: 'Nyelv'
},
'hy-AM': {
lang: 'hu-HU',
label: 'Հայերեն',
icon: '🇦🇲',
title: 'Լեզու'
},
'id-ID': {
lang: 'id-ID',
label: 'Bahasa Indonesia',
icon: '🇮🇩',
title: 'Bahasa'
},
'it-IT': {
lang: 'it-IT',
label: 'Italiano',
icon: '🇮🇹',
title: 'Linguaggio'
},
'is-IS': {
lang: 'is-IS',
label: 'Íslenska',
icon: '🇮🇸',
title: 'Tungumál'
},
'ja-JP': {
lang: 'ja-JP',
label: '日本語',
icon: '🇯🇵',
title: '言語'
},
'ku-IQ': {
lang: 'ku-IQ',
label: 'کوردی',
icon: '🇮🇶',
title: 'Ziman'
},
'kn-IN': {
lang: 'zh-TW',
label: 'ಕನ್ನಡ',
icon: '🇮🇳',
title: 'ಭಾಷೆ'
},
'ko-KR': {
lang: 'ko-KR',
label: '한국어',
icon: '🇰🇷',
title: '언어'
},
'lv-LV': {
lang: 'lv-LV',
label: 'Latviešu valoda',
icon: '🇱🇮',
title: 'Kalba'
},
'mk-MK': {
lang: 'mk-MK',
label: 'македонски јазик',
icon: '🇲🇰',
title: 'Јазик'
},
'mn-MN': {
lang: 'mn-MN',
label: 'Монгол хэл',
icon: '🇲🇳',
title: 'Хэл'
},
'ms-MY': {
lang: 'ms-MY',
label: 'بهاس ملايو‎',
icon: '🇲🇾',
title: 'Bahasa'
},
'nb-NO': {
lang: 'nb-NO',
label: 'Norsk',
icon: '🇳🇴',
title: 'Språk'
},
'ne-NP': {
lang: 'ne-NP',
label: 'नेपाली',
icon: '🇳🇵',
title: 'भाषा'
},
'nl-BE': {
lang: 'nl-BE',
label: 'Vlaams',
icon: '🇧🇪',
title: 'Taal'
},
'nl-NL': {
lang: 'nl-NL',
label: 'Vlaams',
icon: '🇳🇱',
title: 'Taal'
},
'pt-BR': {
lang: 'pt-BR',
label: 'Português',
icon: '🇧🇷',
title: 'Idiomas'
},
'pt-PT': {
lang: 'pt-PT',
label: 'Português',
icon: '🇵🇹',
title: 'Idiomas'
},
'ro-RO': {
lang: 'ro-RO',
label: 'Română',
icon: '🇷🇴',
title: 'Limba'
},
'ru-RU': {
lang: 'ru-RU',
label: 'русский',
icon: '🇷🇺',
title: 'язык'
},
'sk-SK': {
lang: 'sk-SK',
label: 'Slovenčina',
icon: '🇸🇰',
title: 'Jazyk'
},
'sr-RS': {
lang: 'sr-RS',
label: 'српски језик',
icon: '🇸🇷',
title: 'Језик'
},
'sl-SI': {
lang: 'sl-SI',
label: 'Slovenščina',
icon: '🇸🇱',
title: 'Jezik'
},
'sv-SE': {
lang: 'sv-SE',
label: 'Svenska',
icon: '🇸🇪',
title: 'Språk'
},
'ta-IN': {
lang: 'ta-IN',
label: 'தமிழ்',
icon: '🇮🇳',
title: 'மொழி'
},
'th-TH': {
lang: 'th-TH',
label: 'ไทย',
icon: '🇹🇭',
title: 'ภาษา'
},
'tr-TR': {
lang: 'tr-TR',
label: 'Türkçe',
icon: '🇹🇷',
title: 'Dil'
},
'uk-UA': {
lang: 'uk-UA',
label: 'Українська',
icon: '🇺🇰',
title: 'Мова'
},
'vi-VN': {
lang: 'vi-VN',
label: 'Tiếng Việt',
icon: '🇻🇳',
title: 'Ngôn ngữ'
},
'zh-CN': {
lang: 'zh-CN',
label: '简体中文',
icon: '🇨🇳',
title: '语言'
},
'zh-TW': {
lang: 'zh-TW',
label: '繁体中文',
icon: '🇭🇰',
title: '語言'
}
}, "zh-TW", {
lang: 'zh-TW',
label: '繁体中文',
icon: '🇹🇼',
title: '語言'
});
var SelectLang_SelectLang = function SelectLang(props) {
return /*#__PURE__*/react_default.a.createElement(react_default.a.Fragment, null);
};
// EXTERNAL MODULE: ./src/.umi-production/plugin-model/useModel.tsx
var useModel = __webpack_require__("I5X1");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./node_modules/antd/es/notification/style/index.js
var notification_style = __webpack_require__("/xke");
// EXTERNAL MODULE: ./node_modules/antd/es/notification/index.js + 1 modules
var notification = __webpack_require__("TeRw");
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js
var message_style = __webpack_require__("miYZ");
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
var message = __webpack_require__("tsqr");
// EXTERNAL MODULE: ./node_modules/umi-request/dist/index.esm.js
var index_esm = __webpack_require__("ZqBY");
// EXTERNAL MODULE: ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js
var dist_index_esm = __webpack_require__("rlch");
// EXTERNAL MODULE: ./node_modules/lodash.debounce/index.js
var lodash_debounce = __webpack_require__("9/5/");
var lodash_debounce_default = /*#__PURE__*/__webpack_require__.n(lodash_debounce);
// EXTERNAL MODULE: ./node_modules/lodash.throttle/index.js
var lodash_throttle = __webpack_require__("hKI/");
var lodash_throttle_default = /*#__PURE__*/__webpack_require__.n(lodash_throttle);
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/utils.js
function isDocumentVisible() {
if (typeof document !== 'undefined' && typeof document.visibilityState !== 'undefined') {
return document.visibilityState !== 'hidden';
}
return true;
}
function isOnline() {
if (typeof navigator.onLine !== 'undefined') {
return navigator.onLine;
}
return true;
}
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/index.js
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/cache.js
var cache = new Map();
var setCache = function setCache(key, cacheTime, data) {
var currentCache = cache.get(key);
if (currentCache === null || currentCache === void 0 ? void 0 : currentCache.timer) {
clearTimeout(currentCache.timer);
}
var timer = undefined;
if (cacheTime > -1) {
// 数据在不活跃 cacheTime 后,删除掉
timer = setTimeout(function () {
cache["delete"](key);
}, cacheTime);
}
cache.set(key, {
data: data,
timer: timer,
startTime: new Date().getTime()
});
};
var getCache = function getCache(key) {
var currentCache = cache.get(key);
return {
data: currentCache === null || currentCache === void 0 ? void 0 : currentCache.data,
startTime: currentCache === null || currentCache === void 0 ? void 0 : currentCache.startTime
};
};
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/limit.js
var __read = undefined && undefined.__read || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o),
r,
ar = [],
e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
ar.push(r.value);
}
} catch (error) {
e = {
error: error
};
} finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
};
var __spread = undefined && undefined.__spread || function () {
for (var ar = [], i = 0; i < arguments.length; i++) {
ar = ar.concat(__read(arguments[i]));
}
return ar;
};
function limit(fn, timespan) {
var pending = false;
return function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (pending) return;
pending = true;
fn.apply(void 0, __spread(args));
setTimeout(function () {
pending = false;
}, timespan);
};
}
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/usePersistFn.js
var usePersistFn_read = undefined && undefined.__read || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o),
r,
ar = [],
e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
ar.push(r.value);
}
} catch (error) {
e = {
error: error
};
} finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
};
var usePersistFn_spread = undefined && undefined.__spread || function () {
for (var ar = [], i = 0; i < arguments.length; i++) {
ar = ar.concat(usePersistFn_read(arguments[i]));
}
return ar;
};
function usePersistFn(fn) {
var ref = Object(react["useRef"])(function () {
throw new Error('Cannot call an event handler while rendering.');
});
ref.current = fn;
var persist = Object(react["useCallback"])(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var refFn = ref.current;
if (refFn) {
return refFn.apply(void 0, usePersistFn_spread(args));
}
}, [ref]);
if (typeof fn === 'function') {
return persist;
}
return undefined;
}
/* harmony default export */ var utils_usePersistFn = (usePersistFn);
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/useUpdateEffect.js
var useUpdateEffect_useUpdateEffect = function useUpdateEffect(effect, deps) {
var isMounted = Object(react["useRef"])(false);
Object(react["useEffect"])(function () {
return function () {
isMounted.current = false;
};
}, []);
Object(react["useEffect"])(function () {
if (!isMounted.current) {
isMounted.current = true;
} else {
return effect();
}
}, deps);
};
/* harmony default export */ var utils_useUpdateEffect = (useUpdateEffect_useUpdateEffect);
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/windowFocus.js
// from swr
var listeners = [];
function windowFocus_subscribe(listener) {
listeners.push(listener);
return function unsubscribe() {
var index = listeners.indexOf(listener);
listeners.splice(index, 1);
};
}
var eventsBinded = false;
if (typeof window !== 'undefined' && window.addEventListener && !eventsBinded) {
var windowFocus_revalidate = function revalidate() {
if (!isDocumentVisible() || !isOnline()) return;
for (var i = 0; i < listeners.length; i++) {
var listener = listeners[i];
listener();
}
};
window.addEventListener('visibilitychange', windowFocus_revalidate, false);
window.addEventListener('focus', windowFocus_revalidate, false); // only bind the events once
eventsBinded = true;
}
/* harmony default export */ var windowFocus = (windowFocus_subscribe);
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/utils/windowVisible.js
// from swr
var windowVisible_listeners = [];
function windowVisible_subscribe(listener) {
windowVisible_listeners.push(listener);
return function unsubscribe() {
var index = windowVisible_listeners.indexOf(listener);
windowVisible_listeners.splice(index, 1);
};
}
var windowVisible_eventsBinded = false;
if (typeof window !== 'undefined' && window.addEventListener && !windowVisible_eventsBinded) {
var windowVisible_revalidate = function revalidate() {
if (!isDocumentVisible()) return;
for (var i = 0; i < windowVisible_listeners.length; i++) {
var listener = windowVisible_listeners[i];
listener();
}
};
window.addEventListener('visibilitychange', windowVisible_revalidate, false); // only bind the events once
windowVisible_eventsBinded = true;
}
/* harmony default export */ var windowVisible = (windowVisible_subscribe);
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/useAsync.js
var __assign = undefined && undefined.__assign || function () {
__assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
return __assign.apply(this, arguments);
};
var useAsync_read = undefined && undefined.__read || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o),
r,
ar = [],
e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
ar.push(r.value);
}
} catch (error) {
e = {
error: error
};
} finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
};
var useAsync_spread = undefined && undefined.__spread || function () {
for (var ar = [], i = 0; i < arguments.length; i++) {
ar = ar.concat(useAsync_read(arguments[i]));
}
return ar;
};
var DEFAULT_KEY = 'AHOOKS_USE_REQUEST_DEFAULT_KEY';
var useAsync_Fetch =
/** @class */
function () {
function Fetch(service, config, subscribe, initState) {
// 请求时序
this.count = 0; // visible 后,是否继续轮询
this.pollingWhenVisibleFlag = false;
this.pollingTimer = undefined;
this.loadingDelayTimer = undefined;
this.unsubscribe = [];
this.that = this;
this.state = {
loading: false,
params: [],
data: undefined,
error: undefined,
run: this.run.bind(this.that),
mutate: this.mutate.bind(this.that),
refresh: this.refresh.bind(this.that),
cancel: this.cancel.bind(this.that),
unmount: this.unmount.bind(this.that)
};
this.service = service;
this.config = config;
this.subscribe = subscribe;
if (initState) {
this.state = __assign(__assign({}, this.state), initState);
}
this.debounceRun = this.config.debounceInterval ? lodash_debounce_default()(this._run, this.config.debounceInterval) : undefined;
this.throttleRun = this.config.throttleInterval ? lodash_throttle_default()(this._run, this.config.throttleInterval) : undefined;
this.limitRefresh = limit(this.refresh.bind(this), this.config.focusTimespan);
if (this.config.pollingInterval) {
this.unsubscribe.push(windowVisible(this.rePolling.bind(this)));
}
if (this.config.refreshOnWindowFocus) {
this.unsubscribe.push(windowFocus(this.limitRefresh.bind(this)));
}
}
Fetch.prototype.setState = function (s) {
if (s === void 0) {
s = {};
}
this.state = __assign(__assign({}, this.state), s);
this.subscribe(this.state);
};
Fetch.prototype._run = function () {
var _this = this;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
} // 取消已有定时器
if (this.pollingTimer) {
clearTimeout(this.pollingTimer);
} // 取消 loadingDelayTimer
if (this.loadingDelayTimer) {
clearTimeout(this.loadingDelayTimer);
}
this.count += 1; // 闭包存储当次请求的 count
var currentCount = this.count;
this.setState({
loading: !this.config.loadingDelay,
params: args
});
if (this.config.loadingDelay) {
this.loadingDelayTimer = setTimeout(function () {
_this.setState({
loading: true
});
}, this.config.loadingDelay);
}
return this.service.apply(this, useAsync_spread(args)).then(function (res) {
if (currentCount !== _this.count) {
// prevent run.then when request is canceled
return new Promise(function () {});
}
if (_this.loadingDelayTimer) {
clearTimeout(_this.loadingDelayTimer);
}
var formattedResult = _this.config.formatResult ? _this.config.formatResult(res) : res;
_this.setState({
data: formattedResult,
error: undefined,
loading: false
});
if (_this.config.onSuccess) {
_this.config.onSuccess(formattedResult, args);
}
return formattedResult;
})["catch"](function (error) {
if (currentCount !== _this.count) {
// prevent run.then when request is canceled
return new Promise(function () {});
}
if (_this.loadingDelayTimer) {
clearTimeout(_this.loadingDelayTimer);
}
_this.setState({
data: undefined,
error: error,
loading: false
});
if (_this.config.onError) {
_this.config.onError(error, args);
} // If throwOnError, user should catch the error self,
// or the page will crash
if (_this.config.throwOnError) {
throw error;
}
console.error(error); // eslint-disable-next-line prefer-promise-reject-errors
return Promise.reject('useRequest has caught the exception, if you need to handle the exception yourself, you can set options.throwOnError to true.');
})["finally"](function () {
if (currentCount === _this.count) {
if (_this.config.pollingInterval) {
// 如果屏幕隐藏,并且 !pollingWhenHidden, 则停止轮询,并记录 flag等 visible 时,继续轮询
if (!isDocumentVisible() && !_this.config.pollingWhenHidden) {
_this.pollingWhenVisibleFlag = true;
return;
}
_this.pollingTimer = setTimeout(function () {
_this._run.apply(_this, useAsync_spread(args));
}, _this.config.pollingInterval);
}
}
});
};
Fetch.prototype.run = function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (this.debounceRun) {
this.debounceRun.apply(this, useAsync_spread(args)); // TODO 如果 options 存在 debounceInterval或 throttleInterval则 run 和 refresh 不会返回 Promise。 带类型需要修复后,此处变成 return;。
return Promise.resolve(null);
}
if (this.throttleRun) {
this.throttleRun.apply(this, useAsync_spread(args));
return Promise.resolve(null);
}
return this._run.apply(this, useAsync_spread(args));
};
Fetch.prototype.cancel = function () {
if (this.debounceRun) {
this.debounceRun.cancel();
}
if (this.throttleRun) {
this.throttleRun.cancel();
}
if (this.loadingDelayTimer) {
clearTimeout(this.loadingDelayTimer);
}
if (this.pollingTimer) {
clearTimeout(this.pollingTimer);
}
this.pollingWhenVisibleFlag = false;
this.count += 1;
this.setState({
loading: false
});
};
Fetch.prototype.refresh = function () {
return this.run.apply(this, useAsync_spread(this.state.params));
};
Fetch.prototype.rePolling = function () {
if (this.pollingWhenVisibleFlag) {
this.pollingWhenVisibleFlag = false;
this.refresh();
}
};
Fetch.prototype.mutate = function (data) {
if (typeof data === 'function') {
this.setState({
// eslint-disable-next-line react/no-access-state-in-setstate
data: data(this.state.data) || {}
});
} else {
this.setState({
data: data
});
}
};
Fetch.prototype.unmount = function () {
this.cancel();
this.unsubscribe.forEach(function (s) {
s();
});
};
return Fetch;
}();
function useAsync(service, options) {
var _options = options || {};
var _a = _options.refreshDeps,
refreshDeps = _a === void 0 ? [] : _a,
_b = _options.manual,
manual = _b === void 0 ? false : _b,
_c = _options.onSuccess,
onSuccess = _c === void 0 ? function () {} : _c,
_d = _options.onError,
onError = _d === void 0 ? function () {} : _d,
_e = _options.defaultLoading,
defaultLoading = _e === void 0 ? false : _e,
loadingDelay = _options.loadingDelay,
_f = _options.pollingInterval,
pollingInterval = _f === void 0 ? 0 : _f,
_g = _options.pollingWhenHidden,
pollingWhenHidden = _g === void 0 ? true : _g,
_h = _options.defaultParams,
defaultParams = _h === void 0 ? [] : _h,
_j = _options.refreshOnWindowFocus,
refreshOnWindowFocus = _j === void 0 ? false : _j,
_k = _options.focusTimespan,
focusTimespan = _k === void 0 ? 5000 : _k,
fetchKey = _options.fetchKey,
cacheKey = _options.cacheKey,
_l = _options.cacheTime,
cacheTime = _l === void 0 ? 5 * 60 * 1000 : _l,
_m = _options.staleTime,
staleTime = _m === void 0 ? 0 : _m,
debounceInterval = _options.debounceInterval,
throttleInterval = _options.throttleInterval,
initialData = _options.initialData,
_o = _options.ready,
ready = _o === void 0 ? true : _o,
_p = _options.throwOnError,
throwOnError = _p === void 0 ? false : _p;
var newstFetchKey = Object(react["useRef"])(DEFAULT_KEY); // 持久化一些函数
var servicePersist = utils_usePersistFn(service);
var onSuccessPersist = utils_usePersistFn(onSuccess);
var onErrorPersist = utils_usePersistFn(onError);
var fetchKeyPersist = utils_usePersistFn(fetchKey);
var formatResult;
if ('formatResult' in _options) {
// eslint-disable-next-line prefer-destructuring
formatResult = _options.formatResult;
}
var formatResultPersist = utils_usePersistFn(formatResult);
var config = {
formatResult: formatResultPersist,
onSuccess: onSuccessPersist,
onError: onErrorPersist,
loadingDelay: loadingDelay,
pollingInterval: pollingInterval,
pollingWhenHidden: pollingWhenHidden,
// refreshOnWindowFocus should not work on manual mode
refreshOnWindowFocus: !manual && refreshOnWindowFocus,
focusTimespan: focusTimespan,
debounceInterval: debounceInterval,
throttleInterval: throttleInterval,
throwOnError: throwOnError
};
var subscribe = utils_usePersistFn(function (key, data) {
setFetches(function (s) {
// eslint-disable-next-line no-param-reassign
s[key] = data;
return __assign({}, s);
});
});
var _q = useAsync_read(Object(react["useState"])(function () {
var _a; // 如果有 缓存,则从缓存中读数据
if (cacheKey) {
var cacheData_1 = (_a = getCache(cacheKey)) === null || _a === void 0 ? void 0 : _a.data;
if (cacheData_1) {
newstFetchKey.current = cacheData_1.newstFetchKey;
/* 使用 initState, 重新 new Fetch */
var newFetches_1 = {};
Object.keys(cacheData_1.fetches).forEach(function (key) {
var cacheFetch = cacheData_1.fetches[key];
var newFetch = new useAsync_Fetch(servicePersist, config, subscribe.bind(null, key), {
loading: cacheFetch.loading,
params: cacheFetch.params,
data: cacheFetch.data,
error: cacheFetch.error
});
newFetches_1[key] = newFetch.state;
});
return newFetches_1;
}
}
return {};
}), 2),
fetches = _q[0],
setFetches = _q[1];
var fetchesRef = Object(react["useRef"])(fetches);
fetchesRef.current = fetches;
var readyMemoryParams = Object(react["useRef"])();
var run = Object(react["useCallback"])(function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
if (!ready) {
// 没有 ready, 记录请求参数,等 ready 后,发起请求用
readyMemoryParams.current = args;
return;
}
if (fetchKeyPersist) {
var key = fetchKeyPersist.apply(void 0, useAsync_spread(args));
newstFetchKey.current = key === undefined ? DEFAULT_KEY : key;
}
var currentFetchKey = newstFetchKey.current; // 这里必须用 fetchsRef而不能用 fetches。
// 否则在 reset 完,立即 run 的时候,这里拿到的 fetches 是旧的。
var currentFetch = fetchesRef.current[currentFetchKey];
if (!currentFetch) {
var newFetch = new useAsync_Fetch(servicePersist, config, subscribe.bind(null, currentFetchKey), {
data: initialData
});
currentFetch = newFetch.state;
setFetches(function (s) {
// eslint-disable-next-line no-param-reassign
s[currentFetchKey] = currentFetch;
return __assign({}, s);
});
}
return currentFetch.run.apply(currentFetch, useAsync_spread(args));
}, [fetchKey, subscribe, ready]);
var runRef = Object(react["useRef"])(run);
runRef.current = run; // cache
utils_useUpdateEffect(function () {
if (cacheKey) {
setCache(cacheKey, cacheTime, {
fetches: fetches,
newstFetchKey: newstFetchKey.current
});
}
}, [cacheKey, fetches]); // for ready
var hasTriggeredByReady = Object(react["useRef"])(false);
utils_useUpdateEffect(function () {
if (ready) {
if (!hasTriggeredByReady.current && readyMemoryParams.current) {
runRef.current.apply(runRef, useAsync_spread(readyMemoryParams.current));
}
hasTriggeredByReady.current = true;
}
}, [ready]); // 第一次默认执行
Object(react["useEffect"])(function () {
var _a;
if (!manual) {
// 如果有缓存,则重新请求
if (Object.keys(fetches).length > 0) {
// 如果 staleTime 是 -1则 cache 永不过期
// 如果 statleTime 超期了,则重新请求
var cacheStartTime = cacheKey && ((_a = getCache(cacheKey)) === null || _a === void 0 ? void 0 : _a.startTime) || 0;
if (!(staleTime === -1 || new Date().getTime() - cacheStartTime <= staleTime)) {
/* 重新执行所有的 cache */
Object.values(fetches).forEach(function (f) {
f.refresh();
});
}
} else {
// 第一次默认执行,可以通过 defaultParams 设置参数
runRef.current.apply(runRef, useAsync_spread(defaultParams));
}
}
}, []); // 重置 fetches
var reset = Object(react["useCallback"])(function () {
Object.values(fetchesRef.current).forEach(function (f) {
f.unmount();
});
newstFetchKey.current = DEFAULT_KEY;
setFetches({}); // 不写会有问题。如果不写,此时立即 run会是老的数据
fetchesRef.current = {};
}, [setFetches]); // refreshDeps 变化,重新执行所有请求
utils_useUpdateEffect(function () {
if (!manual) {
/* 全部重新执行 */
Object.values(fetchesRef.current).forEach(function (f) {
f.refresh();
});
}
}, useAsync_spread(refreshDeps)); // 卸载组件触发
Object(react["useEffect"])(function () {
return function () {
Object.values(fetchesRef.current).forEach(function (f) {
f.unmount();
});
};
}, []);
var notExecutedWarning = Object(react["useCallback"])(function (name) {
return function () {
console.warn("You should't call " + name + " when service not executed once.");
};
}, []);
return __assign(__assign({
loading: ready && !manual || defaultLoading,
data: initialData,
error: undefined,
params: [],
cancel: notExecutedWarning('cancel'),
refresh: notExecutedWarning('refresh'),
mutate: notExecutedWarning('mutate')
}, fetches[newstFetchKey.current] || {}), {
run: run,
fetches: fetches,
reset: reset
});
}
/* harmony default export */ var es_useAsync = (useAsync);
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/useLoadMore.js
var useLoadMore_assign = undefined && undefined.__assign || function () {
useLoadMore_assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
return useLoadMore_assign.apply(this, arguments);
};
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var useLoadMore_read = undefined && undefined.__read || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o),
r,
ar = [],
e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
ar.push(r.value);
}
} catch (error) {
e = {
error: error
};
} finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
};
var useLoadMore_spread = undefined && undefined.__spread || function () {
for (var ar = [], i = 0; i < arguments.length; i++) {
ar = ar.concat(useLoadMore_read(arguments[i]));
}
return ar;
};
function useLoadMore(service, options) {
var _a = options.refreshDeps,
refreshDeps = _a === void 0 ? [] : _a,
ref = options.ref,
isNoMore = options.isNoMore,
_b = options.threshold,
threshold = _b === void 0 ? 100 : _b,
fetchKey = options.fetchKey,
restOptions = __rest(options, ["refreshDeps", "ref", "isNoMore", "threshold", "fetchKey"]);
var _c = useLoadMore_read(Object(react["useState"])(false), 2),
loadingMore = _c[0],
setLoadingMore = _c[1];
Object(react["useEffect"])(function () {
if (options.fetchKey) {
console.warn("useRequest loadMore mode don't need fetchKey!");
}
}, []);
var result = es_useAsync(service, useLoadMore_assign(useLoadMore_assign({}, restOptions), {
fetchKey: function fetchKey(d) {
var _a;
return ((_a = d === null || d === void 0 ? void 0 : d.list) === null || _a === void 0 ? void 0 : _a.length) || 0;
},
onSuccess: function onSuccess() {
var params = [];
for (var _i = 0; _i < arguments.length; _i++) {
params[_i] = arguments[_i];
}
setLoadingMore(false);
if (options.onSuccess) {
options.onSuccess.apply(options, useLoadMore_spread(params));
}
}
}));
var data = result.data,
run = result.run,
params = result.params,
reset = result.reset,
loading = result.loading,
fetches = result.fetches;
var reload = Object(react["useCallback"])(function () {
reset();
var _a = useLoadMore_read(params),
restParams = _a.slice(1);
run.apply(void 0, useLoadMore_spread([undefined], restParams));
}, [run, reset, params]);
var reloadRef = Object(react["useRef"])(reload);
reloadRef.current = reload;
/* loadMore 场景下,如果 refreshDeps 变化,重置到第一页 */
utils_useUpdateEffect(function () {
/* 只有自动执行的场景, refreshDeps 才有效 */
if (!options.manual) {
reloadRef.current();
}
}, useLoadMore_spread(refreshDeps));
var dataGroup = Object(react["useMemo"])(function () {
var listGroup = []; // 在 loadMore 时,不希望清空上一次的 data。需要把最后一个 非 loading 的请求 data放回去。
var lastNoLoadingData = data;
Object.values(fetches).forEach(function (h) {
var _a, _b;
if ((_a = h.data) === null || _a === void 0 ? void 0 : _a.list) {
listGroup = listGroup.concat((_b = h.data) === null || _b === void 0 ? void 0 : _b.list);
}
if (!h.loading) {
lastNoLoadingData = h.data;
}
});
return useLoadMore_assign(useLoadMore_assign({}, lastNoLoadingData), {
list: listGroup
});
}, [fetches, data]);
var noMore = isNoMore ? !loading && !loadingMore && isNoMore(dataGroup) : false;
var loadMore = Object(react["useCallback"])(function () {
if (noMore) {
return;
}
setLoadingMore(true);
var _a = useLoadMore_read(params),
restParams = _a.slice(1);
run.apply(void 0, useLoadMore_spread([dataGroup], restParams));
}, [noMore, run, dataGroup, params]);
/* 上拉加载的方法 */
var scrollMethod = function scrollMethod() {
if (loading || loadingMore || !ref || !ref.current) {
return;
}
if (ref.current.scrollHeight - ref.current.scrollTop <= ref.current.clientHeight + threshold) {
loadMore();
}
}; // 如果不用 ref而用之前的 useCallbak在某些情况下会出问题造成拿到的 loading 不是最新的。
// fix https://github.com/alibaba/hooks/issues/630
var scrollMethodRef = Object(react["useRef"])(scrollMethod);
scrollMethodRef.current = scrollMethod;
/* 如果有 ref则会上拉加载更多 */
Object(react["useEffect"])(function () {
if (!ref || !ref.current) {
return function () {};
}
var scrollTrigger = function scrollTrigger() {
return scrollMethodRef.current();
};
ref.current.addEventListener('scroll', scrollTrigger);
return function () {
if (ref && ref.current) {
ref.current.removeEventListener('scroll', scrollTrigger);
}
};
}, [scrollMethodRef]);
return useLoadMore_assign(useLoadMore_assign({}, result), {
data: dataGroup,
reload: reload,
loading: loading && dataGroup.list.length === 0,
loadMore: loadMore,
loadingMore: loadingMore,
noMore: noMore
});
}
/* harmony default export */ var es_useLoadMore = (useLoadMore);
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/usePaginated.js
var usePaginated_assign = undefined && undefined.__assign || function () {
usePaginated_assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
return usePaginated_assign.apply(this, arguments);
};
var usePaginated_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var usePaginated_read = undefined && undefined.__read || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o),
r,
ar = [],
e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
ar.push(r.value);
}
} catch (error) {
e = {
error: error
};
} finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
};
var usePaginated_spread = undefined && undefined.__spread || function () {
for (var ar = [], i = 0; i < arguments.length; i++) {
ar = ar.concat(usePaginated_read(arguments[i]));
}
return ar;
};
function usePaginated(service, options) {
var paginated = options.paginated,
_a = options.defaultPageSize,
defaultPageSize = _a === void 0 ? 10 : _a,
_b = options.refreshDeps,
refreshDeps = _b === void 0 ? [] : _b,
fetchKey = options.fetchKey,
restOptions = usePaginated_rest(options, ["paginated", "defaultPageSize", "refreshDeps", "fetchKey"]);
Object(react["useEffect"])(function () {
if (fetchKey) {
console.error("useRequest pagination's fetchKey will not work!");
}
}, []);
var _c = es_useAsync(service, usePaginated_assign({
defaultParams: [{
current: 1,
pageSize: defaultPageSize
}]
}, restOptions)),
data = _c.data,
params = _c.params,
run = _c.run,
loading = _c.loading,
rest = usePaginated_rest(_c, ["data", "params", "run", "loading"]);
var _d = params && params[0] ? params[0] : {},
_e = _d.current,
current = _e === void 0 ? 1 : _e,
_f = _d.pageSize,
pageSize = _f === void 0 ? defaultPageSize : _f,
_g = _d.sorter,
sorter = _g === void 0 ? {} : _g,
_h = _d.filters,
filters = _h === void 0 ? {} : _h; // 只改变 pagination其他参数原样传递
var runChangePagination = Object(react["useCallback"])(function (paginationParams) {
var _a = usePaginated_read(params),
oldPaginationParams = _a[0],
restParams = _a.slice(1);
run.apply(void 0, usePaginated_spread([usePaginated_assign(usePaginated_assign({}, oldPaginationParams), paginationParams)], restParams));
}, [run, params]);
var total = (data === null || data === void 0 ? void 0 : data.total) || 0;
var totalPage = Object(react["useMemo"])(function () {
return Math.ceil(total / pageSize);
}, [pageSize, total]);
var onChange = Object(react["useCallback"])(function (c, p) {
var toCurrent = c <= 0 ? 1 : c;
var toPageSize = p <= 0 ? 1 : p;
var tempTotalPage = Math.ceil(total / toPageSize);
if (toCurrent > tempTotalPage) {
toCurrent = Math.max(1, tempTotalPage);
}
runChangePagination({
current: toCurrent,
pageSize: toPageSize
});
}, [total, runChangePagination]);
var changeCurrent = Object(react["useCallback"])(function (c) {
onChange(c, pageSize);
}, [onChange, pageSize]);
var changePageSize = Object(react["useCallback"])(function (p) {
onChange(current, p);
}, [onChange, current]);
var changeCurrentRef = Object(react["useRef"])(changeCurrent);
changeCurrentRef.current = changeCurrent;
/* 分页场景下,如果 refreshDeps 变化,重置分页 */
utils_useUpdateEffect(function () {
/* 只有自动执行的场景, refreshDeps 才有效 */
if (!options.manual) {
changeCurrentRef.current(1);
}
}, usePaginated_spread(refreshDeps)); // 表格翻页 排序 筛选等
var changeTable = Object(react["useCallback"])(function (p, f, s) {
runChangePagination({
current: p.current,
pageSize: p.pageSize || defaultPageSize,
filters: f,
sorter: s
});
}, [filters, sorter, runChangePagination]);
return usePaginated_assign({
loading: loading,
data: data,
params: params,
run: run,
pagination: {
current: current,
pageSize: pageSize,
total: total,
totalPage: totalPage,
onChange: onChange,
changeCurrent: changeCurrent,
changePageSize: changePageSize
},
tableProps: {
dataSource: (data === null || data === void 0 ? void 0 : data.list) || [],
loading: loading,
onChange: changeTable,
pagination: {
current: current,
pageSize: pageSize,
total: total
}
},
sorter: sorter,
filters: filters
}, rest);
}
/* harmony default export */ var es_usePaginated = (usePaginated);
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/configContext.js
var ConfigContext = /*#__PURE__*/react_default.a.createContext({});
ConfigContext.displayName = 'UseRequestConfigContext';
/* harmony default export */ var configContext = (ConfigContext);
// CONCATENATED MODULE: ./node_modules/@ahooksjs/use-request/es/index.js
var es_assign = undefined && undefined.__assign || function () {
es_assign = Object.assign || function (t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
}
}
return t;
};
return es_assign.apply(this, arguments);
};
var es_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var es_read = undefined && undefined.__read || function (o, n) {
var m = typeof Symbol === "function" && o[Symbol.iterator];
if (!m) return o;
var i = m.call(o),
r,
ar = [],
e;
try {
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
ar.push(r.value);
}
} catch (error) {
e = {
error: error
};
} finally {
try {
if (r && !r.done && (m = i["return"])) m.call(i);
} finally {
if (e) throw e.error;
}
}
return ar;
};
var es_spread = undefined && undefined.__spread || function () {
for (var ar = [], i = 0; i < arguments.length; i++) {
ar = ar.concat(es_read(arguments[i]));
}
return ar;
};
/* eslint-disable react-hooks/rules-of-hooks */
function useRequest(service, options) {
if (options === void 0) {
options = {};
}
var contextConfig = Object(react["useContext"])(configContext);
var finalOptions = es_assign(es_assign({}, contextConfig), options);
var paginated = finalOptions.paginated,
loadMore = finalOptions.loadMore,
requestMethod = finalOptions.requestMethod;
var paginatedRef = Object(react["useRef"])(paginated);
var loadMoreRef = Object(react["useRef"])(loadMore);
if (paginatedRef.current !== paginated) {
throw Error('You should not modify the paginated of options');
}
if (loadMoreRef.current !== loadMore) {
throw Error('You should not modify the loadMore of options');
}
paginatedRef.current = paginated;
loadMoreRef.current = loadMore; // @ts-ignore
var fetchProxy = function fetchProxy() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
} // @ts-ignore
return fetch.apply(void 0, es_spread(args)).then(function (res) {
if (res.ok) {
return res.json();
}
throw new Error(res.statusText);
});
};
var finalRequestMethod = requestMethod || fetchProxy;
var promiseService;
switch (typeof service) {
case 'string':
promiseService = function promiseService() {
return finalRequestMethod(service);
};
break;
case 'object':
var url_1 = service.url,
rest_1 = es_rest(service, ["url"]);
promiseService = function promiseService() {
return requestMethod ? requestMethod(service) : fetchProxy(url_1, rest_1);
};
break;
default:
promiseService = function promiseService() {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
return new Promise(function (resolve, reject) {
var s = service.apply(void 0, es_spread(args));
var fn = s;
if (!s.then) {
switch (typeof s) {
case 'string':
fn = finalRequestMethod(s);
break;
case 'object':
var url_2 = s.url,
rest_2 = es_rest(s, ["url"]);
fn = requestMethod ? requestMethod(s) : fetchProxy(url_2, rest_2);
break;
}
}
fn.then(resolve)["catch"](reject);
});
};
}
if (loadMore) {
return es_useLoadMore(promiseService, finalOptions);
}
if (paginated) {
return es_usePaginated(promiseService, finalOptions);
}
return es_useAsync(promiseService, finalOptions);
}
var UseRequestProvider = configContext.Provider; // UseAPIProvider 已经废弃,此处为了兼容 umijs 插件 plugin-request
var UseAPIProvider = UseRequestProvider;
/* harmony default export */ var use_request_es = (useRequest);
// CONCATENATED MODULE: ./src/.umi-production/plugin-request/request.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
// @ts-nocheck
/**
* Base on https://github.com/umijs/D:/projects/competitions/forgeplus-react/node_modules/umi-request
*/
// @ts-ignore
function request_useRequest(service) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
return use_request_es(service, Object(objectSpread2["a" /* default */])({
formatResult: function formatResult(result) {
return result === null || result === void 0 ? void 0 : result.data;
},
requestMethod: function requestMethod(requestOptions) {
if (typeof requestOptions === 'string') {
return request(requestOptions);
}
if (typeof requestOptions === 'object') {
var _url = requestOptions.url,
rest = Object(objectWithoutProperties["a" /* default */])(requestOptions, ["url"]);
return request(_url, rest);
}
throw new Error('request options error');
}
}, options));
}
var ErrorShowType = /*#__PURE__*/function (ErrorShowType) {
ErrorShowType[ErrorShowType["SILENT"] = 0] = "SILENT";
ErrorShowType[ErrorShowType["WARN_MESSAGE"] = 1] = "WARN_MESSAGE";
ErrorShowType[ErrorShowType["ERROR_MESSAGE"] = 2] = "ERROR_MESSAGE";
ErrorShowType[ErrorShowType["NOTIFICATION"] = 4] = "NOTIFICATION";
ErrorShowType[ErrorShowType["REDIRECT"] = 9] = "REDIRECT";
return ErrorShowType;
}({});
var DEFAULT_ERROR_PAGE = '/exception';
var requestMethodInstance;
var request_getRequestMethod = function getRequestMethod() {
var _requestConfig$errorC;
if (requestMethodInstance) {
// request method 已经示例化
return requestMethodInstance;
}
// runtime 配置可能应为依赖顺序的问题在模块初始化的时候无法获取,所以需要封装一层在异步调用后初始化相关方法
// 当用户的 app.ts 中依赖了该文件的情况下就该模块的初始化时间就会被提前,无法获取到运行时配置
var requestConfig = core_plugin["a" /* plugin */].applyPlugins({
key: 'request',
type: dist_index_esm["a" /* ApplyPluginsType */].modify,
initialValue: {}
});
var errorAdaptor = ((_requestConfig$errorC = requestConfig.errorConfig) === null || _requestConfig$errorC === void 0 ? void 0 : _requestConfig$errorC.adaptor) || function (resData) {
return resData;
};
requestMethodInstance = Object(index_esm["a" /* extend */])(Object(objectSpread2["a" /* default */])({
errorHandler: function errorHandler(error) {
var _error$request, _error$request$option;
// @ts-ignore
if (error === null || error === void 0 ? void 0 : (_error$request = error.request) === null || _error$request === void 0 ? void 0 : (_error$request$option = _error$request.options) === null || _error$request$option === void 0 ? void 0 : _error$request$option.skipErrorHandler) {
throw error;
}
var errorInfo;
if (error.name === 'ResponseError' && error.data && error.request) {
var _errorInfo;
var _ctx = {
req: error.request,
res: error.response
};
errorInfo = errorAdaptor(error.data, _ctx);
error.message = ((_errorInfo = errorInfo) === null || _errorInfo === void 0 ? void 0 : _errorInfo.errorMessage) || error.message;
error.data = error.data;
error.info = errorInfo;
}
errorInfo = error.info;
if (errorInfo) {
var _errorInfo2, _errorInfo3, _requestConfig$errorC2, _errorInfo4;
var errorMessage = (_errorInfo2 = errorInfo) === null || _errorInfo2 === void 0 ? void 0 : _errorInfo2.errorMessage;
var errorCode = (_errorInfo3 = errorInfo) === null || _errorInfo3 === void 0 ? void 0 : _errorInfo3.errorCode;
var errorPage = ((_requestConfig$errorC2 = requestConfig.errorConfig) === null || _requestConfig$errorC2 === void 0 ? void 0 : _requestConfig$errorC2.errorPage) || DEFAULT_ERROR_PAGE;
switch ((_errorInfo4 = errorInfo) === null || _errorInfo4 === void 0 ? void 0 : _errorInfo4.showType) {
case ErrorShowType.SILENT:
// do nothing
break;
case ErrorShowType.WARN_MESSAGE:
message["b" /* default */].warn(errorMessage);
break;
case ErrorShowType.ERROR_MESSAGE:
message["b" /* default */].error(errorMessage);
break;
case ErrorShowType.NOTIFICATION:
notification["a" /* default */].open({
message: errorMessage
});
break;
case ErrorShowType.REDIRECT:
// @ts-ignore
core_history["b" /* history */].push({
pathname: errorPage,
query: {
errorCode: errorCode,
errorMessage: errorMessage
}
});
// redirect to error page
break;
default:
message["b" /* default */].error(errorMessage);
break;
}
} else {
message["b" /* default */].error(error.message || 'Request error, please retry.');
}
throw error;
}
}, requestConfig));
// 中间件统一错误处理
// 后端返回格式 { success: boolean, data: any }
// 按照项目具体情况修改该部分逻辑
requestMethodInstance.use( /*#__PURE__*/function () {
var _ref = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(ctx, next) {
var _req$options;
var req, res, options, getResponse, resData, errorInfo, error;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return next();
case 2:
req = ctx.req, res = ctx.res; // @ts-ignore
if (!((_req$options = req.options) === null || _req$options === void 0 ? void 0 : _req$options.skipErrorHandler)) {
_context.next = 5;
break;
}
return _context.abrupt("return");
case 5:
options = req.options;
getResponse = options.getResponse;
resData = getResponse ? res.data : res;
errorInfo = errorAdaptor(resData, ctx);
if (!(errorInfo.success === false)) {
_context.next = 15;
break;
}
// 抛出错误到 errorHandler 中处理
error = new Error(errorInfo.errorMessage);
error.name = 'BizError';
error.data = resData;
error.info = errorInfo;
throw error;
case 15:
case "end":
return _context.stop();
}
}, _callee);
}));
return function (_x, _x2) {
return _ref.apply(this, arguments);
};
}());
// Add user custom middlewares
var customMiddlewares = requestConfig.middlewares || [];
customMiddlewares.forEach(function (mw) {
requestMethodInstance.use(mw);
});
// Add user custom interceptors
var requestInterceptors = requestConfig.requestInterceptors || [];
var responseInterceptors = requestConfig.responseInterceptors || [];
requestInterceptors.map(function (ri) {
requestMethodInstance.interceptors.request.use(ri);
});
responseInterceptors.map(function (ri) {
requestMethodInstance.interceptors.response.use(ri);
});
return requestMethodInstance;
};
var request = function request(url, options) {
var requestMethod = request_getRequestMethod();
return requestMethod(url, options);
};
// EXTERNAL MODULE: ./node_modules/react-helmet/es/Helmet.js
var Helmet = __webpack_require__("qhky");
// CONCATENATED MODULE: ./src/.umi-production/plugin-helmet/exports.ts
// @ts-nocheck
// @ts-ignore
// CONCATENATED MODULE: ./src/.umi-production/core/umiExports.ts
// @ts-nocheck
/***/ }),
/***/ "9mRW":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.math.fround.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fround = __webpack_require__(/*! ../internals/math-fround */ "vo4V");
// `Math.fround` method
// https://tc39.github.io/ecma262/#sec-math.fround
$({ target: 'Math', stat: true }, { fround: fround });
/***/ }),
/***/ "9mu1":
/*!*******************************************************!*\
!*** ./node_modules/rc-align/es/index.js + 6 modules ***!
\*******************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/hooks/useLayoutEffect.js because of ./node_modules/rc-util/es/hooks/useMergedState.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js (<- Module uses injected variables (global)) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("ODXe");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("U8pU");
// CONCATENATED MODULE: ./node_modules/dom-align/dist-web/index.js
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
enumerableOnly && (symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
})), keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = null != arguments[i] ? arguments[i] : {};
i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
_defineProperty(target, key, source[key]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
return target;
}
function _typeof(obj) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
}, _typeof(obj);
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
var vendorPrefix;
var jsCssMap = {
Webkit: '-webkit-',
Moz: '-moz-',
// IE did it wrong again ...
ms: '-ms-',
O: '-o-'
};
function getVendorPrefix() {
if (vendorPrefix !== undefined) {
return vendorPrefix;
}
vendorPrefix = '';
var style = document.createElement('p').style;
var testProp = 'Transform';
for (var key in jsCssMap) {
if (key + testProp in style) {
vendorPrefix = key;
}
}
return vendorPrefix;
}
function getTransitionName() {
return getVendorPrefix() ? "".concat(getVendorPrefix(), "TransitionProperty") : 'transitionProperty';
}
function getTransformName() {
return getVendorPrefix() ? "".concat(getVendorPrefix(), "Transform") : 'transform';
}
function setTransitionProperty(node, value) {
var name = getTransitionName();
if (name) {
node.style[name] = value;
if (name !== 'transitionProperty') {
node.style.transitionProperty = value;
}
}
}
function setTransform(node, value) {
var name = getTransformName();
if (name) {
node.style[name] = value;
if (name !== 'transform') {
node.style.transform = value;
}
}
}
function getTransitionProperty(node) {
return node.style.transitionProperty || node.style[getTransitionName()];
}
function getTransformXY(node) {
var style = window.getComputedStyle(node, null);
var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName());
if (transform && transform !== 'none') {
var matrix = transform.replace(/[^0-9\-.,]/g, '').split(',');
return {
x: parseFloat(matrix[12] || matrix[4], 0),
y: parseFloat(matrix[13] || matrix[5], 0)
};
}
return {
x: 0,
y: 0
};
}
var matrix2d = /matrix\((.*)\)/;
var matrix3d = /matrix3d\((.*)\)/;
function setTransformXY(node, xy) {
var style = window.getComputedStyle(node, null);
var transform = style.getPropertyValue('transform') || style.getPropertyValue(getTransformName());
if (transform && transform !== 'none') {
var arr;
var match2d = transform.match(matrix2d);
if (match2d) {
match2d = match2d[1];
arr = match2d.split(',').map(function (item) {
return parseFloat(item, 10);
});
arr[4] = xy.x;
arr[5] = xy.y;
setTransform(node, "matrix(".concat(arr.join(','), ")"));
} else {
var match3d = transform.match(matrix3d)[1];
arr = match3d.split(',').map(function (item) {
return parseFloat(item, 10);
});
arr[12] = xy.x;
arr[13] = xy.y;
setTransform(node, "matrix3d(".concat(arr.join(','), ")"));
}
} else {
setTransform(node, "translateX(".concat(xy.x, "px) translateY(").concat(xy.y, "px) translateZ(0)"));
}
}
var RE_NUM = /[\-+]?(?:\d*\.|)\d+(?:[eE][\-+]?\d+|)/.source;
var getComputedStyleX;
// https://stackoverflow.com/a/3485654/3040605
function forceRelayout(elem) {
var originalStyle = elem.style.display;
elem.style.display = 'none';
elem.offsetHeight; // eslint-disable-line
elem.style.display = originalStyle;
}
function css(el, name, v) {
var value = v;
if (_typeof(name) === 'object') {
for (var i in name) {
if (name.hasOwnProperty(i)) {
css(el, i, name[i]);
}
}
return undefined;
}
if (typeof value !== 'undefined') {
if (typeof value === 'number') {
value = "".concat(value, "px");
}
el.style[name] = value;
return undefined;
}
return getComputedStyleX(el, name);
}
function getClientPosition(elem) {
var box;
var x;
var y;
var doc = elem.ownerDocument;
var body = doc.body;
var docElem = doc && doc.documentElement;
// 根据 GBS 最新数据A-Grade Browsers 都已支持 getBoundingClientRect 方法,不用再考虑传统的实现方式
box = elem.getBoundingClientRect();
// 注jQuery 还考虑减去 docElem.clientLeft/clientTop
// 但测试发现,这样反而会导致当 html 和 body 有边距/边框样式时,获取的值不正确
// 此外ie6 会忽略 html 的 margin 值,幸运地是没有谁会去设置 html 的 margin
x = Math.floor(box.left);
y = Math.floor(box.top);
// In IE, most of the time, 2 extra pixels are added to the top and left
// due to the implicit 2-pixel inset border. In IE6/7 quirks mode and
// IE6 standards mode, this border can be overridden by setting the
// document element's border to zero -- thus, we cannot rely on the
// offset always being 2 pixels.
// In quirks mode, the offset can be determined by querying the body's
// clientLeft/clientTop, but in standards mode, it is found by querying
// the document element's clientLeft/clientTop. Since we already called
// getClientBoundingRect we have already forced a reflow, so it is not
// too expensive just to query them all.
// ie 下应该减去窗口的边框吧,毕竟默认 absolute 都是相对窗口定位的
// 窗口边框标准是设 documentElement ,quirks 时设置 body
// 最好禁止在 body 和 html 上边框 ,但 ie < 9 html 默认有 2px ,减去
// 但是非 ie 不可能设置窗口边框body html 也不是窗口 ,ie 可以通过 html,body 设置
// 标准 ie 下 docElem.clientTop 就是 border-top
// ie7 html 即窗口边框改变不了。永远为 2
// 但标准 firefox/chrome/ie9 下 docElem.clientTop 是窗口边框,即使设了 border-top 也为 0
x -= docElem.clientLeft || body.clientLeft || 0;
y -= docElem.clientTop || body.clientTop || 0;
return {
left: x,
top: y
};
}
function getScroll(w, top) {
var ret = w["page".concat(top ? 'Y' : 'X', "Offset")];
var method = "scroll".concat(top ? 'Top' : 'Left');
if (typeof ret !== 'number') {
var d = w.document;
// ie6,7,8 standard mode
ret = d.documentElement[method];
if (typeof ret !== 'number') {
// quirks mode
ret = d.body[method];
}
}
return ret;
}
function getScrollLeft(w) {
return getScroll(w);
}
function getScrollTop(w) {
return getScroll(w, true);
}
function getOffset(el) {
var pos = getClientPosition(el);
var doc = el.ownerDocument;
var w = doc.defaultView || doc.parentWindow;
pos.left += getScrollLeft(w);
pos.top += getScrollTop(w);
return pos;
}
/**
* A crude way of determining if an object is a window
* @member util
*/
function isWindow(obj) {
// must use == for ie8
/* eslint eqeqeq:0 */
return obj !== null && obj !== undefined && obj == obj.window;
}
function getDocument(node) {
if (isWindow(node)) {
return node.document;
}
if (node.nodeType === 9) {
return node;
}
return node.ownerDocument;
}
function _getComputedStyle(elem, name, cs) {
var computedStyle = cs;
var val = '';
var d = getDocument(elem);
computedStyle = computedStyle || d.defaultView.getComputedStyle(elem, null);
// https://github.com/kissyteam/kissy/issues/61
if (computedStyle) {
val = computedStyle.getPropertyValue(name) || computedStyle[name];
}
return val;
}
var _RE_NUM_NO_PX = new RegExp("^(".concat(RE_NUM, ")(?!px)[a-z%]+$"), 'i');
var RE_POS = /^(top|right|bottom|left)$/;
var CURRENT_STYLE = 'currentStyle';
var RUNTIME_STYLE = 'runtimeStyle';
var LEFT = 'left';
var PX = 'px';
function _getComputedStyleIE(elem, name) {
// currentStyle maybe null
// http://msdn.microsoft.com/en-us/library/ms535231.aspx
var ret = elem[CURRENT_STYLE] && elem[CURRENT_STYLE][name];
// 当 width/height 设置为百分比时,通过 pixelLeft 方式转换的 width/height 值
// 一开始就处理了! CUSTOM_STYLE.height,CUSTOM_STYLE.width ,cssHook 解决@2011-08-19
// 在 ie 下不对,需要直接用 offset 方式
// borderWidth 等值也有问题,但考虑到 borderWidth 设为百分比的概率很小,这里就不考虑了
// From the awesome hack by Dean Edwards
// http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291
// If we're not dealing with a regular pixel number
// but a number that has a weird ending, we need to convert it to pixels
// exclude left right for relativity
if (_RE_NUM_NO_PX.test(ret) && !RE_POS.test(name)) {
// Remember the original values
var style = elem.style;
var left = style[LEFT];
var rsLeft = elem[RUNTIME_STYLE][LEFT];
// prevent flashing of content
elem[RUNTIME_STYLE][LEFT] = elem[CURRENT_STYLE][LEFT];
// Put in the new values to get a computed value out
style[LEFT] = name === 'fontSize' ? '1em' : ret || 0;
ret = style.pixelLeft + PX;
// Revert the changed values
style[LEFT] = left;
elem[RUNTIME_STYLE][LEFT] = rsLeft;
}
return ret === '' ? 'auto' : ret;
}
if (typeof window !== 'undefined') {
getComputedStyleX = window.getComputedStyle ? _getComputedStyle : _getComputedStyleIE;
}
function getOffsetDirection(dir, option) {
if (dir === 'left') {
return option.useCssRight ? 'right' : dir;
}
return option.useCssBottom ? 'bottom' : dir;
}
function oppositeOffsetDirection(dir) {
if (dir === 'left') {
return 'right';
} else if (dir === 'right') {
return 'left';
} else if (dir === 'top') {
return 'bottom';
} else if (dir === 'bottom') {
return 'top';
}
}
// 设置 elem 相对 elem.ownerDocument 的坐标
function setLeftTop(elem, offset, option) {
// set position first, in-case top/left are set even on static elem
if (css(elem, 'position') === 'static') {
elem.style.position = 'relative';
}
var presetH = -999;
var presetV = -999;
var horizontalProperty = getOffsetDirection('left', option);
var verticalProperty = getOffsetDirection('top', option);
var oppositeHorizontalProperty = oppositeOffsetDirection(horizontalProperty);
var oppositeVerticalProperty = oppositeOffsetDirection(verticalProperty);
if (horizontalProperty !== 'left') {
presetH = 999;
}
if (verticalProperty !== 'top') {
presetV = 999;
}
var originalTransition = '';
var originalOffset = getOffset(elem);
if ('left' in offset || 'top' in offset) {
originalTransition = getTransitionProperty(elem) || '';
setTransitionProperty(elem, 'none');
}
if ('left' in offset) {
elem.style[oppositeHorizontalProperty] = '';
elem.style[horizontalProperty] = "".concat(presetH, "px");
}
if ('top' in offset) {
elem.style[oppositeVerticalProperty] = '';
elem.style[verticalProperty] = "".concat(presetV, "px");
}
// force relayout
forceRelayout(elem);
var old = getOffset(elem);
var originalStyle = {};
for (var key in offset) {
if (offset.hasOwnProperty(key)) {
var dir = getOffsetDirection(key, option);
var preset = key === 'left' ? presetH : presetV;
var off = originalOffset[key] - old[key];
if (dir === key) {
originalStyle[dir] = preset + off;
} else {
originalStyle[dir] = preset - off;
}
}
}
css(elem, originalStyle);
// force relayout
forceRelayout(elem);
if ('left' in offset || 'top' in offset) {
setTransitionProperty(elem, originalTransition);
}
var ret = {};
for (var _key in offset) {
if (offset.hasOwnProperty(_key)) {
var _dir = getOffsetDirection(_key, option);
var _off = offset[_key] - originalOffset[_key];
if (_key === _dir) {
ret[_dir] = originalStyle[_dir] + _off;
} else {
ret[_dir] = originalStyle[_dir] - _off;
}
}
}
css(elem, ret);
}
function setTransform$1(elem, offset) {
var originalOffset = getOffset(elem);
var originalXY = getTransformXY(elem);
var resultXY = {
x: originalXY.x,
y: originalXY.y
};
if ('left' in offset) {
resultXY.x = originalXY.x + offset.left - originalOffset.left;
}
if ('top' in offset) {
resultXY.y = originalXY.y + offset.top - originalOffset.top;
}
setTransformXY(elem, resultXY);
}
function setOffset(elem, offset, option) {
if (option.ignoreShake) {
var oriOffset = getOffset(elem);
var oLeft = oriOffset.left.toFixed(0);
var oTop = oriOffset.top.toFixed(0);
var tLeft = offset.left.toFixed(0);
var tTop = offset.top.toFixed(0);
if (oLeft === tLeft && oTop === tTop) {
return;
}
}
if (option.useCssRight || option.useCssBottom) {
setLeftTop(elem, offset, option);
} else if (option.useCssTransform && getTransformName() in document.body.style) {
setTransform$1(elem, offset);
} else {
setLeftTop(elem, offset, option);
}
}
function each(arr, fn) {
for (var i = 0; i < arr.length; i++) {
fn(arr[i]);
}
}
function isBorderBoxFn(elem) {
return getComputedStyleX(elem, 'boxSizing') === 'border-box';
}
var BOX_MODELS = ['margin', 'border', 'padding'];
var CONTENT_INDEX = -1;
var PADDING_INDEX = 2;
var BORDER_INDEX = 1;
var MARGIN_INDEX = 0;
function swap(elem, options, callback) {
var old = {};
var style = elem.style;
var name;
// Remember the old values, and insert the new ones
for (name in options) {
if (options.hasOwnProperty(name)) {
old[name] = style[name];
style[name] = options[name];
}
}
callback.call(elem);
// Revert the old values
for (name in options) {
if (options.hasOwnProperty(name)) {
style[name] = old[name];
}
}
}
function getPBMWidth(elem, props, which) {
var value = 0;
var prop;
var j;
var i;
for (j = 0; j < props.length; j++) {
prop = props[j];
if (prop) {
for (i = 0; i < which.length; i++) {
var cssProp = void 0;
if (prop === 'border') {
cssProp = "".concat(prop).concat(which[i], "Width");
} else {
cssProp = prop + which[i];
}
value += parseFloat(getComputedStyleX(elem, cssProp)) || 0;
}
}
}
return value;
}
var domUtils = {
getParent: function getParent(element) {
var parent = element;
do {
if (parent.nodeType === 11 && parent.host) {
parent = parent.host;
} else {
parent = parent.parentNode;
}
} while (parent && parent.nodeType !== 1 && parent.nodeType !== 9);
return parent;
}
};
each(['Width', 'Height'], function (name) {
domUtils["doc".concat(name)] = function (refWin) {
var d = refWin.document;
return Math.max(
// firefox chrome documentElement.scrollHeight< body.scrollHeight
// ie standard mode : documentElement.scrollHeight> body.scrollHeight
d.documentElement["scroll".concat(name)],
// quirks : documentElement.scrollHeight 最大等于可视窗口多一点?
d.body["scroll".concat(name)], domUtils["viewport".concat(name)](d));
};
domUtils["viewport".concat(name)] = function (win) {
// pc browser includes scrollbar in window.innerWidth
var prop = "client".concat(name);
var doc = win.document;
var body = doc.body;
var documentElement = doc.documentElement;
var documentElementProp = documentElement[prop];
// 标准模式取 documentElement
// backcompat 取 body
return doc.compatMode === 'CSS1Compat' && documentElementProp || body && body[prop] || documentElementProp;
};
});
/*
得到元素的大小信息
@param elem
@param name
@param {String} [extra] 'padding' : (css width) + padding
'border' : (css width) + padding + border
'margin' : (css width) + padding + border + margin
*/
function getWH(elem, name, ex) {
var extra = ex;
if (isWindow(elem)) {
return name === 'width' ? domUtils.viewportWidth(elem) : domUtils.viewportHeight(elem);
} else if (elem.nodeType === 9) {
return name === 'width' ? domUtils.docWidth(elem) : domUtils.docHeight(elem);
}
var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
var borderBoxValue = name === 'width' ? Math.floor(elem.getBoundingClientRect().width) : Math.floor(elem.getBoundingClientRect().height);
var isBorderBox = isBorderBoxFn(elem);
var cssBoxValue = 0;
if (borderBoxValue === null || borderBoxValue === undefined || borderBoxValue <= 0) {
borderBoxValue = undefined;
// Fall back to computed then un computed css if necessary
cssBoxValue = getComputedStyleX(elem, name);
if (cssBoxValue === null || cssBoxValue === undefined || Number(cssBoxValue) < 0) {
cssBoxValue = elem.style[name] || 0;
}
// Normalize '', auto, and prepare for extra
cssBoxValue = Math.floor(parseFloat(cssBoxValue)) || 0;
}
if (extra === undefined) {
extra = isBorderBox ? BORDER_INDEX : CONTENT_INDEX;
}
var borderBoxValueOrIsBorderBox = borderBoxValue !== undefined || isBorderBox;
var val = borderBoxValue || cssBoxValue;
if (extra === CONTENT_INDEX) {
if (borderBoxValueOrIsBorderBox) {
return val - getPBMWidth(elem, ['border', 'padding'], which);
}
return cssBoxValue;
} else if (borderBoxValueOrIsBorderBox) {
if (extra === BORDER_INDEX) {
return val;
}
return val + (extra === PADDING_INDEX ? -getPBMWidth(elem, ['border'], which) : getPBMWidth(elem, ['margin'], which));
}
return cssBoxValue + getPBMWidth(elem, BOX_MODELS.slice(extra), which);
}
var cssShow = {
position: 'absolute',
visibility: 'hidden',
display: 'block'
};
// fix #119 : https://github.com/kissyteam/kissy/issues/119
function getWHIgnoreDisplay() {
for (var _len = arguments.length, args = new Array(_len), _key2 = 0; _key2 < _len; _key2++) {
args[_key2] = arguments[_key2];
}
var val;
var elem = args[0];
// in case elem is window
// elem.offsetWidth === undefined
if (elem.offsetWidth !== 0) {
val = getWH.apply(undefined, args);
} else {
swap(elem, cssShow, function () {
val = getWH.apply(undefined, args);
});
}
return val;
}
each(['width', 'height'], function (name) {
var first = name.charAt(0).toUpperCase() + name.slice(1);
domUtils["outer".concat(first)] = function (el, includeMargin) {
return el && getWHIgnoreDisplay(el, name, includeMargin ? MARGIN_INDEX : BORDER_INDEX);
};
var which = name === 'width' ? ['Left', 'Right'] : ['Top', 'Bottom'];
domUtils[name] = function (elem, v) {
var val = v;
if (val !== undefined) {
if (elem) {
var isBorderBox = isBorderBoxFn(elem);
if (isBorderBox) {
val += getPBMWidth(elem, ['padding', 'border'], which);
}
return css(elem, name, val);
}
return undefined;
}
return elem && getWHIgnoreDisplay(elem, name, CONTENT_INDEX);
};
});
function mix(to, from) {
for (var i in from) {
if (from.hasOwnProperty(i)) {
to[i] = from[i];
}
}
return to;
}
var utils = {
getWindow: function getWindow(node) {
if (node && node.document && node.setTimeout) {
return node;
}
var doc = node.ownerDocument || node;
return doc.defaultView || doc.parentWindow;
},
getDocument: getDocument,
offset: function offset(el, value, option) {
if (typeof value !== 'undefined') {
setOffset(el, value, option || {});
} else {
return getOffset(el);
}
},
isWindow: isWindow,
each: each,
css: css,
clone: function clone(obj) {
var i;
var ret = {};
for (i in obj) {
if (obj.hasOwnProperty(i)) {
ret[i] = obj[i];
}
}
var overflow = obj.overflow;
if (overflow) {
for (i in obj) {
if (obj.hasOwnProperty(i)) {
ret.overflow[i] = obj.overflow[i];
}
}
}
return ret;
},
mix: mix,
getWindowScrollLeft: function getWindowScrollLeft(w) {
return getScrollLeft(w);
},
getWindowScrollTop: function getWindowScrollTop(w) {
return getScrollTop(w);
},
merge: function merge() {
var ret = {};
for (var i = 0; i < arguments.length; i++) {
utils.mix(ret, i < 0 || arguments.length <= i ? undefined : arguments[i]);
}
return ret;
},
viewportWidth: 0,
viewportHeight: 0
};
mix(utils, domUtils);
/**
* 得到会导致元素显示不全的祖先元素
*/
var getParent = utils.getParent;
function getOffsetParent(element) {
if (utils.isWindow(element) || element.nodeType === 9) {
return null;
}
// ie 这个也不是完全可行
/*
<div style="width: 50px;height: 100px;overflow: hidden">
<div style="width: 50px;height: 100px;position: relative;" id="d6">
元素 6 高 100px 宽 50px<br/>
</div>
</div>
*/
// element.offsetParent does the right thing in ie7 and below. Return parent with layout!
// In other browsers it only includes elements with position absolute, relative or
// fixed, not elements with overflow set to auto or scroll.
// if (UA.ie && ieMode < 8) {
// return element.offsetParent;
// }
// 统一的 offsetParent 方法
var doc = utils.getDocument(element);
var body = doc.body;
var parent;
var positionStyle = utils.css(element, 'position');
var skipStatic = positionStyle === 'fixed' || positionStyle === 'absolute';
if (!skipStatic) {
return element.nodeName.toLowerCase() === 'html' ? null : getParent(element);
}
for (parent = getParent(element); parent && parent !== body && parent.nodeType !== 9; parent = getParent(parent)) {
positionStyle = utils.css(parent, 'position');
if (positionStyle !== 'static') {
return parent;
}
}
return null;
}
var getParent$1 = utils.getParent;
function isAncestorFixed(element) {
if (utils.isWindow(element) || element.nodeType === 9) {
return false;
}
var doc = utils.getDocument(element);
var body = doc.body;
var parent = null;
for (parent = getParent$1(element);
// 修复元素位于 document.documentElement 下导致崩溃问题
parent && parent !== body && parent !== doc; parent = getParent$1(parent)) {
var positionStyle = utils.css(parent, 'position');
if (positionStyle === 'fixed') {
return true;
}
}
return false;
}
/**
* 获得元素的显示部分的区域
*/
function getVisibleRectForElement(element, alwaysByViewport) {
var visibleRect = {
left: 0,
right: Infinity,
top: 0,
bottom: Infinity
};
var el = getOffsetParent(element);
var doc = utils.getDocument(element);
var win = doc.defaultView || doc.parentWindow;
var body = doc.body;
var documentElement = doc.documentElement;
// Determine the size of the visible rect by climbing the dom accounting for
// all scrollable containers.
while (el) {
// clientWidth is zero for inline block elements in ie.
if ((navigator.userAgent.indexOf('MSIE') === -1 || el.clientWidth !== 0) &&
// body may have overflow set on it, yet we still get the entire
// viewport. In some browsers, el.offsetParent may be
// document.documentElement, so check for that too.
el !== body && el !== documentElement && utils.css(el, 'overflow') !== 'visible') {
var pos = utils.offset(el);
// add border
pos.left += el.clientLeft;
pos.top += el.clientTop;
visibleRect.top = Math.max(visibleRect.top, pos.top);
visibleRect.right = Math.min(visibleRect.right,
// consider area without scrollBar
pos.left + el.clientWidth);
visibleRect.bottom = Math.min(visibleRect.bottom, pos.top + el.clientHeight);
visibleRect.left = Math.max(visibleRect.left, pos.left);
} else if (el === body || el === documentElement) {
break;
}
el = getOffsetParent(el);
}
// Set element position to fixed
// make sure absolute element itself don't affect it's visible area
// https://github.com/ant-design/ant-design/issues/7601
var originalPosition = null;
if (!utils.isWindow(element) && element.nodeType !== 9) {
originalPosition = element.style.position;
var position = utils.css(element, 'position');
if (position === 'absolute') {
element.style.position = 'fixed';
}
}
var scrollX = utils.getWindowScrollLeft(win);
var scrollY = utils.getWindowScrollTop(win);
var viewportWidth = utils.viewportWidth(win);
var viewportHeight = utils.viewportHeight(win);
var documentWidth = documentElement.scrollWidth;
var documentHeight = documentElement.scrollHeight;
// scrollXXX on html is sync with body which means overflow: hidden on body gets wrong scrollXXX.
// We should cut this ourself.
var bodyStyle = window.getComputedStyle(body);
if (bodyStyle.overflowX === 'hidden') {
documentWidth = win.innerWidth;
}
if (bodyStyle.overflowY === 'hidden') {
documentHeight = win.innerHeight;
}
// Reset element position after calculate the visible area
if (element.style) {
element.style.position = originalPosition;
}
if (alwaysByViewport || isAncestorFixed(element)) {
// Clip by viewport's size.
visibleRect.left = Math.max(visibleRect.left, scrollX);
visibleRect.top = Math.max(visibleRect.top, scrollY);
visibleRect.right = Math.min(visibleRect.right, scrollX + viewportWidth);
visibleRect.bottom = Math.min(visibleRect.bottom, scrollY + viewportHeight);
} else {
// Clip by document's size.
var maxVisibleWidth = Math.max(documentWidth, scrollX + viewportWidth);
visibleRect.right = Math.min(visibleRect.right, maxVisibleWidth);
var maxVisibleHeight = Math.max(documentHeight, scrollY + viewportHeight);
visibleRect.bottom = Math.min(visibleRect.bottom, maxVisibleHeight);
}
return visibleRect.top >= 0 && visibleRect.left >= 0 && visibleRect.bottom > visibleRect.top && visibleRect.right > visibleRect.left ? visibleRect : null;
}
function adjustForViewport(elFuturePos, elRegion, visibleRect, overflow) {
var pos = utils.clone(elFuturePos);
var size = {
width: elRegion.width,
height: elRegion.height
};
if (overflow.adjustX && pos.left < visibleRect.left) {
pos.left = visibleRect.left;
}
// Left edge inside and right edge outside viewport, try to resize it.
if (overflow.resizeWidth && pos.left >= visibleRect.left && pos.left + size.width > visibleRect.right) {
size.width -= pos.left + size.width - visibleRect.right;
}
// Right edge outside viewport, try to move it.
if (overflow.adjustX && pos.left + size.width > visibleRect.right) {
// 保证左边界和可视区域左边界对齐
pos.left = Math.max(visibleRect.right - size.width, visibleRect.left);
}
// Top edge outside viewport, try to move it.
if (overflow.adjustY && pos.top < visibleRect.top) {
pos.top = visibleRect.top;
}
// Top edge inside and bottom edge outside viewport, try to resize it.
if (overflow.resizeHeight && pos.top >= visibleRect.top && pos.top + size.height > visibleRect.bottom) {
size.height -= pos.top + size.height - visibleRect.bottom;
}
// Bottom edge outside viewport, try to move it.
if (overflow.adjustY && pos.top + size.height > visibleRect.bottom) {
// 保证上边界和可视区域上边界对齐
pos.top = Math.max(visibleRect.bottom - size.height, visibleRect.top);
}
return utils.mix(pos, size);
}
function getRegion(node) {
var offset;
var w;
var h;
if (!utils.isWindow(node) && node.nodeType !== 9) {
offset = utils.offset(node);
w = utils.outerWidth(node);
h = utils.outerHeight(node);
} else {
var win = utils.getWindow(node);
offset = {
left: utils.getWindowScrollLeft(win),
top: utils.getWindowScrollTop(win)
};
w = utils.viewportWidth(win);
h = utils.viewportHeight(win);
}
offset.width = w;
offset.height = h;
return offset;
}
/**
* 获取 node 上的 align 对齐点 相对于页面的坐标
*/
function getAlignOffset(region, align) {
var V = align.charAt(0);
var H = align.charAt(1);
var w = region.width;
var h = region.height;
var x = region.left;
var y = region.top;
if (V === 'c') {
y += h / 2;
} else if (V === 'b') {
y += h;
}
if (H === 'c') {
x += w / 2;
} else if (H === 'r') {
x += w;
}
return {
left: x,
top: y
};
}
function getElFuturePos(elRegion, refNodeRegion, points, offset, targetOffset) {
var p1 = getAlignOffset(refNodeRegion, points[1]);
var p2 = getAlignOffset(elRegion, points[0]);
var diff = [p2.left - p1.left, p2.top - p1.top];
return {
left: Math.round(elRegion.left - diff[0] + offset[0] - targetOffset[0]),
top: Math.round(elRegion.top - diff[1] + offset[1] - targetOffset[1])
};
}
/**
* align dom node flexibly
* @author yiminghe@gmail.com
*/
// http://yiminghe.iteye.com/blog/1124720
function isFailX(elFuturePos, elRegion, visibleRect) {
return elFuturePos.left < visibleRect.left || elFuturePos.left + elRegion.width > visibleRect.right;
}
function isFailY(elFuturePos, elRegion, visibleRect) {
return elFuturePos.top < visibleRect.top || elFuturePos.top + elRegion.height > visibleRect.bottom;
}
function isCompleteFailX(elFuturePos, elRegion, visibleRect) {
return elFuturePos.left > visibleRect.right || elFuturePos.left + elRegion.width < visibleRect.left;
}
function isCompleteFailY(elFuturePos, elRegion, visibleRect) {
return elFuturePos.top > visibleRect.bottom || elFuturePos.top + elRegion.height < visibleRect.top;
}
function flip(points, reg, map) {
var ret = [];
utils.each(points, function (p) {
ret.push(p.replace(reg, function (m) {
return map[m];
}));
});
return ret;
}
function flipOffset(offset, index) {
offset[index] = -offset[index];
return offset;
}
function convertOffset(str, offsetLen) {
var n;
if (/%$/.test(str)) {
n = parseInt(str.substring(0, str.length - 1), 10) / 100 * offsetLen;
} else {
n = parseInt(str, 10);
}
return n || 0;
}
function normalizeOffset(offset, el) {
offset[0] = convertOffset(offset[0], el.width);
offset[1] = convertOffset(offset[1], el.height);
}
/**
* @param el
* @param tgtRegion 参照节点所占的区域: { left, top, width, height }
* @param align
*/
function doAlign(el, tgtRegion, align, isTgtRegionVisible) {
var points = align.points;
var offset = align.offset || [0, 0];
var targetOffset = align.targetOffset || [0, 0];
var overflow = align.overflow;
var source = align.source || el;
offset = [].concat(offset);
targetOffset = [].concat(targetOffset);
overflow = overflow || {};
var newOverflowCfg = {};
var fail = 0;
var alwaysByViewport = !!(overflow && overflow.alwaysByViewport);
// 当前节点可以被放置的显示区域
var visibleRect = getVisibleRectForElement(source, alwaysByViewport);
// 当前节点所占的区域, left/top/width/height
var elRegion = getRegion(source);
// 将 offset 转换成数值,支持百分比
normalizeOffset(offset, elRegion);
normalizeOffset(targetOffset, tgtRegion);
// 当前节点将要被放置的位置
var elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset);
// 当前节点将要所处的区域
var newElRegion = utils.merge(elRegion, elFuturePos);
// 如果可视区域不能完全放置当前节点时允许调整
if (visibleRect && (overflow.adjustX || overflow.adjustY) && isTgtRegionVisible) {
if (overflow.adjustX) {
// 如果横向不能放下
if (isFailX(elFuturePos, elRegion, visibleRect)) {
// 对齐位置反下
var newPoints = flip(points, /[lr]/gi, {
l: 'r',
r: 'l'
});
// 偏移量也反下
var newOffset = flipOffset(offset, 0);
var newTargetOffset = flipOffset(targetOffset, 0);
var newElFuturePos = getElFuturePos(elRegion, tgtRegion, newPoints, newOffset, newTargetOffset);
if (!isCompleteFailX(newElFuturePos, elRegion, visibleRect)) {
fail = 1;
points = newPoints;
offset = newOffset;
targetOffset = newTargetOffset;
}
}
}
if (overflow.adjustY) {
// 如果纵向不能放下
if (isFailY(elFuturePos, elRegion, visibleRect)) {
// 对齐位置反下
var _newPoints = flip(points, /[tb]/gi, {
t: 'b',
b: 't'
});
// 偏移量也反下
var _newOffset = flipOffset(offset, 1);
var _newTargetOffset = flipOffset(targetOffset, 1);
var _newElFuturePos = getElFuturePos(elRegion, tgtRegion, _newPoints, _newOffset, _newTargetOffset);
if (!isCompleteFailY(_newElFuturePos, elRegion, visibleRect)) {
fail = 1;
points = _newPoints;
offset = _newOffset;
targetOffset = _newTargetOffset;
}
}
}
// 如果失败,重新计算当前节点将要被放置的位置
if (fail) {
elFuturePos = getElFuturePos(elRegion, tgtRegion, points, offset, targetOffset);
utils.mix(newElRegion, elFuturePos);
}
var isStillFailX = isFailX(elFuturePos, elRegion, visibleRect);
var isStillFailY = isFailY(elFuturePos, elRegion, visibleRect);
// 检查反下后的位置是否可以放下了,如果仍然放不下:
// 1. 复原修改过的定位参数
if (isStillFailX || isStillFailY) {
var _newPoints2 = points;
// 重置对应部分的翻转逻辑
if (isStillFailX) {
_newPoints2 = flip(points, /[lr]/gi, {
l: 'r',
r: 'l'
});
}
if (isStillFailY) {
_newPoints2 = flip(points, /[tb]/gi, {
t: 'b',
b: 't'
});
}
points = _newPoints2;
offset = align.offset || [0, 0];
targetOffset = align.targetOffset || [0, 0];
}
// 2. 只有指定了可以调整当前方向才调整
newOverflowCfg.adjustX = overflow.adjustX && isStillFailX;
newOverflowCfg.adjustY = overflow.adjustY && isStillFailY;
// 确实要调整,甚至可能会调整高度宽度
if (newOverflowCfg.adjustX || newOverflowCfg.adjustY) {
newElRegion = adjustForViewport(elFuturePos, elRegion, visibleRect, newOverflowCfg);
}
}
// need judge to in case set fixed with in css on height auto element
if (newElRegion.width !== elRegion.width) {
utils.css(source, 'width', utils.width(source) + newElRegion.width - elRegion.width);
}
if (newElRegion.height !== elRegion.height) {
utils.css(source, 'height', utils.height(source) + newElRegion.height - elRegion.height);
}
// https://github.com/kissyteam/kissy/issues/190
// 相对于屏幕位置没变,而 left/top 变了
// 例如 <div 'relative'><el absolute></div>
utils.offset(source, {
left: newElRegion.left,
top: newElRegion.top
}, {
useCssRight: align.useCssRight,
useCssBottom: align.useCssBottom,
useCssTransform: align.useCssTransform,
ignoreShake: align.ignoreShake
});
return {
points: points,
offset: offset,
targetOffset: targetOffset,
overflow: newOverflowCfg
};
}
/**
* 2012-04-26 yiminghe@gmail.com
* - 优化智能对齐算法
* - 慎用 resizeXX
*
* 2011-07-13 yiminghe@gmail.com note:
* - 增加智能对齐,以及大小调整选项
**/
function isOutOfVisibleRect(target, alwaysByViewport) {
var visibleRect = getVisibleRectForElement(target, alwaysByViewport);
var targetRegion = getRegion(target);
return !visibleRect || targetRegion.left + targetRegion.width <= visibleRect.left || targetRegion.top + targetRegion.height <= visibleRect.top || targetRegion.left >= visibleRect.right || targetRegion.top >= visibleRect.bottom;
}
function alignElement(el, refNode, align) {
var target = align.target || refNode;
var refNodeRegion = getRegion(target);
var isTargetNotOutOfVisible = !isOutOfVisibleRect(target, align.overflow && align.overflow.alwaysByViewport);
return doAlign(el, refNodeRegion, align, isTargetNotOutOfVisible);
}
alignElement.__getOffsetParent = getOffsetParent;
alignElement.__getVisibleRectForElement = getVisibleRectForElement;
/**
* `tgtPoint`: { pageX, pageY } or { clientX, clientY }.
* If client position provided, will internal convert to page position.
*/
function alignPoint(el, tgtPoint, align) {
var pageX;
var pageY;
var doc = utils.getDocument(el);
var win = doc.defaultView || doc.parentWindow;
var scrollX = utils.getWindowScrollLeft(win);
var scrollY = utils.getWindowScrollTop(win);
var viewportWidth = utils.viewportWidth(win);
var viewportHeight = utils.viewportHeight(win);
if ('pageX' in tgtPoint) {
pageX = tgtPoint.pageX;
} else {
pageX = scrollX + tgtPoint.clientX;
}
if ('pageY' in tgtPoint) {
pageY = tgtPoint.pageY;
} else {
pageY = scrollY + tgtPoint.clientY;
}
var tgtRegion = {
left: pageX,
top: pageY,
width: 0,
height: 0
};
var pointInView = pageX >= 0 && pageX <= scrollX + viewportWidth && pageY >= 0 && pageY <= scrollY + viewportHeight;
// Provide default target point
var points = [align.points[0], 'cc'];
return doAlign(el, tgtRegion, _objectSpread2(_objectSpread2({}, align), {}, {
points: points
}), pointInView);
}
/* harmony default export */ var dist_web = (alignElement);
//# sourceMappingURL=index.js.map
// EXTERNAL MODULE: ./node_modules/rc-util/es/warning.js
var warning = __webpack_require__("Kwbf");
// CONCATENATED MODULE: ./node_modules/rc-util/es/isEqual.js
/**
* Deeply compares two object literals.
* @param obj1 object 1
* @param obj2 object 2
* @param shallow shallow compare
* @returns
*/
function isEqual(obj1, obj2) {
var shallow = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
// https://github.com/mapbox/mapbox-gl-js/pull/5979/files#diff-fde7145050c47cc3a306856efd5f9c3016e86e859de9afbd02c879be5067e58f
var refSet = new Set();
function deepEqual(a, b) {
var level = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
var circular = refSet.has(a);
Object(warning["a" /* default */])(!circular, 'Warning: There may be circular references');
if (circular) {
return false;
}
if (a === b) {
return true;
}
if (shallow && level > 1) {
return false;
}
refSet.add(a);
var newLevel = level + 1;
if (Array.isArray(a)) {
if (!Array.isArray(b) || a.length !== b.length) {
return false;
}
for (var i = 0; i < a.length; i++) {
if (!deepEqual(a[i], b[i], newLevel)) {
return false;
}
}
return true;
}
if (a && b && Object(esm_typeof["a" /* default */])(a) === 'object' && Object(esm_typeof["a" /* default */])(b) === 'object') {
var keys = Object.keys(a);
if (keys.length !== Object.keys(b).length) {
return false;
}
return keys.every(function (key) {
return deepEqual(a[key], b[key], newLevel);
});
}
// other
return false;
}
return deepEqual(obj1, obj2);
}
/* harmony default export */ var es_isEqual = (isEqual);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js
var addEventListener = __webpack_require__("zT1h");
// CONCATENATED MODULE: ./node_modules/rc-util/es/Dom/isVisible.js
/* harmony default export */ var isVisible = (function (element) {
if (!element) {
return false;
}
if (element instanceof Element) {
if (element.offsetParent) {
return true;
}
if (element.getBBox) {
var _getBBox = element.getBBox(),
width = _getBBox.width,
height = _getBBox.height;
if (width || height) {
return true;
}
}
if (element.getBoundingClientRect) {
var _element$getBoundingC = element.getBoundingClientRect(),
_width = _element$getBoundingC.width,
_height = _element$getBoundingC.height;
if (_width || _height) {
return true;
}
}
}
return false;
});
// EXTERNAL MODULE: ./node_modules/rc-util/es/hooks/useLayoutEffect.js
var useLayoutEffect = __webpack_require__("TNol");
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__("c+Xe");
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// CONCATENATED MODULE: ./node_modules/rc-align/es/hooks/useBuffer.js
/* harmony default export */ var useBuffer = (function (callback, buffer) {
var calledRef = react_default.a.useRef(false);
var timeoutRef = react_default.a.useRef(null);
function cancelTrigger() {
window.clearTimeout(timeoutRef.current);
}
function trigger(force) {
cancelTrigger();
if (!calledRef.current || force === true) {
if (callback(force) === false) {
// Not delay since callback cancelled self
return;
}
calledRef.current = true;
timeoutRef.current = window.setTimeout(function () {
calledRef.current = false;
}, buffer);
} else {
timeoutRef.current = window.setTimeout(function () {
calledRef.current = false;
trigger();
}, buffer);
}
}
return [trigger, function () {
calledRef.current = false;
cancelTrigger();
}];
});
// EXTERNAL MODULE: ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js
var ResizeObserver_es = __webpack_require__("bdgK");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/contains.js
var contains = __webpack_require__("l4aY");
// CONCATENATED MODULE: ./node_modules/rc-align/es/util.js
function isSamePoint(prev, next) {
if (prev === next) return true;
if (!prev || !next) return false;
if ('pageX' in next && 'pageY' in next) {
return prev.pageX === next.pageX && prev.pageY === next.pageY;
}
if ('clientX' in next && 'clientY' in next) {
return prev.clientX === next.clientX && prev.clientY === next.clientY;
}
return false;
}
function restoreFocus(activeElement, container) {
// Focus back if is in the container
if (activeElement !== document.activeElement && Object(contains["a" /* default */])(container, activeElement) && typeof activeElement.focus === 'function') {
activeElement.focus();
}
}
function monitorResize(element, callback) {
var prevWidth = null;
var prevHeight = null;
function onResize(_ref) {
var _ref2 = Object(slicedToArray["a" /* default */])(_ref, 1),
target = _ref2[0].target;
if (!document.documentElement.contains(target)) return;
var _target$getBoundingCl = target.getBoundingClientRect(),
width = _target$getBoundingCl.width,
height = _target$getBoundingCl.height;
var fixedWidth = Math.floor(width);
var fixedHeight = Math.floor(height);
if (prevWidth !== fixedWidth || prevHeight !== fixedHeight) {
// https://webkit.org/blog/9997/resizeobserver-in-webkit/
Promise.resolve().then(function () {
callback({
width: fixedWidth,
height: fixedHeight
});
});
}
prevWidth = fixedWidth;
prevHeight = fixedHeight;
}
var resizeObserver = new ResizeObserver_es["default"](onResize);
if (element) {
resizeObserver.observe(element);
}
return function () {
resizeObserver.disconnect();
};
}
// CONCATENATED MODULE: ./node_modules/rc-align/es/Align.js
/**
* Removed props:
* - childrenProps
*/
function getElement(func) {
if (typeof func !== 'function') return null;
return func();
}
function getPoint(point) {
if (Object(esm_typeof["a" /* default */])(point) !== 'object' || !point) return null;
return point;
}
var Align_Align = function Align(_ref, ref) {
var children = _ref.children,
disabled = _ref.disabled,
target = _ref.target,
align = _ref.align,
onAlign = _ref.onAlign,
monitorWindowResize = _ref.monitorWindowResize,
_ref$monitorBufferTim = _ref.monitorBufferTime,
monitorBufferTime = _ref$monitorBufferTim === void 0 ? 0 : _ref$monitorBufferTim;
var cacheRef = react_default.a.useRef({});
/** Popup node ref */
var nodeRef = react_default.a.useRef();
var childNode = react_default.a.Children.only(children); // ===================== Align ======================
// We save the props here to avoid closure makes props ood
var forceAlignPropsRef = react_default.a.useRef({});
forceAlignPropsRef.current.disabled = disabled;
forceAlignPropsRef.current.target = target;
forceAlignPropsRef.current.align = align;
forceAlignPropsRef.current.onAlign = onAlign;
var _useBuffer = useBuffer(function () {
var _forceAlignPropsRef$c = forceAlignPropsRef.current,
latestDisabled = _forceAlignPropsRef$c.disabled,
latestTarget = _forceAlignPropsRef$c.target,
latestAlign = _forceAlignPropsRef$c.align,
latestOnAlign = _forceAlignPropsRef$c.onAlign;
var source = nodeRef.current;
if (!latestDisabled && latestTarget && source) {
var _result;
var _element = getElement(latestTarget);
var _point = getPoint(latestTarget);
cacheRef.current.element = _element;
cacheRef.current.point = _point;
cacheRef.current.align = latestAlign; // IE lose focus after element realign
// We should record activeElement and restore later
var _document = document,
activeElement = _document.activeElement; // We only align when element is visible
if (_element && isVisible(_element)) {
_result = alignElement(source, _element, latestAlign);
} else if (_point) {
_result = alignPoint(source, _point, latestAlign);
}
restoreFocus(activeElement, source);
if (latestOnAlign && _result) {
latestOnAlign(source, _result);
}
return true;
}
return false;
}, monitorBufferTime),
_useBuffer2 = Object(slicedToArray["a" /* default */])(_useBuffer, 2),
_forceAlign = _useBuffer2[0],
cancelForceAlign = _useBuffer2[1]; // ===================== Effect =====================
// Handle props change
var _React$useState = react_default.a.useState(),
_React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2),
element = _React$useState2[0],
setElement = _React$useState2[1];
var _React$useState3 = react_default.a.useState(),
_React$useState4 = Object(slicedToArray["a" /* default */])(_React$useState3, 2),
point = _React$useState4[0],
setPoint = _React$useState4[1];
Object(useLayoutEffect["a" /* default */])(function () {
setElement(getElement(target));
setPoint(getPoint(target));
});
react_default.a.useEffect(function () {
if (cacheRef.current.element !== element || !isSamePoint(cacheRef.current.point, point) || !es_isEqual(cacheRef.current.align, align)) {
_forceAlign();
}
}); // Watch popup element resize
react_default.a.useEffect(function () {
var cancelFn = monitorResize(nodeRef.current, _forceAlign);
return cancelFn;
}, [nodeRef.current]); // Watch target element resize
react_default.a.useEffect(function () {
var cancelFn = monitorResize(element, _forceAlign);
return cancelFn;
}, [element]); // Listen for disabled change
react_default.a.useEffect(function () {
if (!disabled) {
_forceAlign();
} else {
cancelForceAlign();
}
}, [disabled]); // Listen for window resize
react_default.a.useEffect(function () {
if (monitorWindowResize) {
var cancelFn = Object(addEventListener["a" /* default */])(window, 'resize', _forceAlign);
return cancelFn.remove;
}
}, [monitorWindowResize]); // Clear all if unmount
react_default.a.useEffect(function () {
return function () {
cancelForceAlign();
};
}, []); // ====================== Ref =======================
react_default.a.useImperativeHandle(ref, function () {
return {
forceAlign: function forceAlign() {
return _forceAlign(true);
}
};
}); // ===================== Render =====================
if ( /*#__PURE__*/react_default.a.isValidElement(childNode)) {
childNode = /*#__PURE__*/react_default.a.cloneElement(childNode, {
ref: Object(es_ref["a" /* composeRef */])(childNode.ref, nodeRef)
});
}
return childNode;
};
var RcAlign = /*#__PURE__*/react_default.a.forwardRef(Align_Align);
RcAlign.displayName = 'Align';
/* harmony default export */ var es_Align = (RcAlign);
// CONCATENATED MODULE: ./node_modules/rc-align/es/index.js
// export this package's api
/* harmony default export */ var es = __webpack_exports__["a"] = (es_Align);
/***/ }),
/***/ "9og8":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
\**********************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
/***/ }),
/***/ "9tb/":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.from-code-point.js ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh");
var fromCharCode = String.fromCharCode;
var nativeFromCodePoint = String.fromCodePoint;
// length should be 1, old FF problem
var INCORRECT_LENGTH = !!nativeFromCodePoint && nativeFromCodePoint.length != 1;
// `String.fromCodePoint` method
// https://tc39.github.io/ecma262/#sec-string.fromcodepoint
$({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, {
fromCodePoint: function fromCodePoint(x) { // eslint-disable-line no-unused-vars
var elements = [];
var length = arguments.length;
var i = 0;
var code;
while (length > i) {
code = +arguments[i++];
if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point');
elements.push(code < 0x10000
? fromCharCode(code)
: fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00)
);
} return elements.join('');
}
});
/***/ }),
/***/ "9xmf":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "EdiO");
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return arrayLikeToArray(arr);
}
module.exports = _arrayWithoutHoles;
/***/ }),
/***/ "A2ZE":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/internals/function-bind-context.js ***!
\*****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
// optional / simple context binding
module.exports = function (fn, that, length) {
aFunction(fn);
if (that === undefined) return fn;
switch (length) {
case 0: return function () {
return fn.call(that);
};
case 1: return function (a) {
return fn.call(that, a);
};
case 2: return function (a, b) {
return fn.call(that, a, b);
};
case 3: return function (a, b, c) {
return fn.call(that, a, b, c);
};
}
return function (/* ...args */) {
return fn.apply(that, arguments);
};
};
/***/ }),
/***/ "ACnJ":
/*!*********************************************************!*\
!*** ./node_modules/antd/es/_util/responsiveObserve.js ***!
\*********************************************************/
/*! exports provided: responsiveArray, responsiveMap, default */
/*! exports used: default, responsiveArray */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return responsiveArray; });
/* unused harmony export responsiveMap */
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "lSNA");
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "pVnL");
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1__);
var responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
var responsiveMap = {
xs: '(max-width: 575px)',
sm: '(min-width: 576px)',
md: '(min-width: 768px)',
lg: '(min-width: 992px)',
xl: '(min-width: 1200px)',
xxl: '(min-width: 1600px)'
};
var subscribers = new Map();
var subUid = -1;
var screens = {};
var responsiveObserve = {
matchHandlers: {},
dispatch: function dispatch(pointMap) {
screens = pointMap;
subscribers.forEach(function (func) {
return func(screens);
});
return subscribers.size >= 1;
},
subscribe: function subscribe(func) {
if (!subscribers.size) this.register();
subUid += 1;
subscribers.set(subUid, func);
func(screens);
return subUid;
},
unsubscribe: function unsubscribe(token) {
subscribers["delete"](token);
if (!subscribers.size) this.unregister();
},
unregister: function unregister() {
var _this = this;
Object.keys(responsiveMap).forEach(function (screen) {
var matchMediaQuery = responsiveMap[screen];
var handler = _this.matchHandlers[matchMediaQuery];
handler === null || handler === void 0 ? void 0 : handler.mql.removeListener(handler === null || handler === void 0 ? void 0 : handler.listener);
});
subscribers.clear();
},
register: function register() {
var _this2 = this;
Object.keys(responsiveMap).forEach(function (screen) {
var matchMediaQuery = responsiveMap[screen];
var listener = function listener(_ref) {
var matches = _ref.matches;
_this2.dispatch(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_1___default()({}, screens), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_0___default()({}, screen, matches)));
};
var mql = window.matchMedia(matchMediaQuery);
mql.addListener(listener);
_this2.matchHandlers[matchMediaQuery] = {
mql: mql,
listener: listener
};
listener(mql);
});
}
};
/* harmony default export */ __webpack_exports__["a"] = (responsiveObserve);
/***/ }),
/***/ "AJpP":
/*!***********************************************************************!*\
!*** ./node_modules/@ant-design/colors/dist/index.esm.js + 4 modules ***!
\***********************************************************************/
/*! exports provided: blue, cyan, geekblue, generate, gold, green, grey, lime, magenta, orange, presetDarkPalettes, presetPalettes, presetPrimaryColors, purple, red, volcano, yellow */
/*! all exports used */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, "blue", function() { return /* binding */ blue; });
__webpack_require__.d(__webpack_exports__, "cyan", function() { return /* binding */ cyan; });
__webpack_require__.d(__webpack_exports__, "geekblue", function() { return /* binding */ geekblue; });
__webpack_require__.d(__webpack_exports__, "generate", function() { return /* binding */ generate; });
__webpack_require__.d(__webpack_exports__, "gold", function() { return /* binding */ gold; });
__webpack_require__.d(__webpack_exports__, "green", function() { return /* binding */ green; });
__webpack_require__.d(__webpack_exports__, "grey", function() { return /* binding */ grey; });
__webpack_require__.d(__webpack_exports__, "lime", function() { return /* binding */ lime; });
__webpack_require__.d(__webpack_exports__, "magenta", function() { return /* binding */ magenta; });
__webpack_require__.d(__webpack_exports__, "orange", function() { return /* binding */ orange; });
__webpack_require__.d(__webpack_exports__, "presetDarkPalettes", function() { return /* binding */ presetDarkPalettes; });
__webpack_require__.d(__webpack_exports__, "presetPalettes", function() { return /* binding */ presetPalettes; });
__webpack_require__.d(__webpack_exports__, "presetPrimaryColors", function() { return /* binding */ presetPrimaryColors; });
__webpack_require__.d(__webpack_exports__, "purple", function() { return /* binding */ purple; });
__webpack_require__.d(__webpack_exports__, "red", function() { return /* binding */ red; });
__webpack_require__.d(__webpack_exports__, "volcano", function() { return /* binding */ volcano; });
__webpack_require__.d(__webpack_exports__, "yellow", function() { return /* binding */ yellow; });
// CONCATENATED MODULE: ./node_modules/@ctrl/tinycolor/dist/module/util.js
/**
* Take input from [0, n] and return it as [0, 1]
* @hidden
*/
function bound01(n, max) {
if (isOnePointZero(n)) {
n = '100%';
}
var isPercent = isPercentage(n);
n = max === 360 ? n : Math.min(max, Math.max(0, parseFloat(n)));
// Automatically convert percentage into number
if (isPercent) {
n = parseInt(String(n * max), 10) / 100;
}
// Handle floating point rounding errors
if (Math.abs(n - max) < 0.000001) {
return 1;
}
// Convert into [0, 1] range if it isn't already
if (max === 360) {
// If n is a hue given in degrees,
// wrap around out-of-range values into [0, 360] range
// then convert into [0, 1].
n = (n < 0 ? (n % max) + max : n % max) / parseFloat(String(max));
}
else {
// If n not a hue given in degrees
// Convert into [0, 1] range if it isn't already.
n = (n % max) / parseFloat(String(max));
}
return n;
}
/**
* Force a number between 0 and 1
* @hidden
*/
function clamp01(val) {
return Math.min(1, Math.max(0, val));
}
/**
* Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
* <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
* @hidden
*/
function isOnePointZero(n) {
return typeof n === 'string' && n.indexOf('.') !== -1 && parseFloat(n) === 1;
}
/**
* Check to see if string passed in is a percentage
* @hidden
*/
function isPercentage(n) {
return typeof n === 'string' && n.indexOf('%') !== -1;
}
/**
* Return a valid alpha value [0,1] with all invalid values being set to 1
* @hidden
*/
function boundAlpha(a) {
a = parseFloat(a);
if (isNaN(a) || a < 0 || a > 1) {
a = 1;
}
return a;
}
/**
* Replace a decimal with it's percentage value
* @hidden
*/
function convertToPercentage(n) {
if (n <= 1) {
return "".concat(Number(n) * 100, "%");
}
return n;
}
/**
* Force a hex value to have 2 characters
* @hidden
*/
function pad2(c) {
return c.length === 1 ? '0' + c : String(c);
}
// CONCATENATED MODULE: ./node_modules/@ctrl/tinycolor/dist/module/conversion.js
// `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
// <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
/**
* Handle bounds / percentage checking to conform to CSS color spec
* <http://www.w3.org/TR/css3-color/>
* *Assumes:* r, g, b in [0, 255] or [0, 1]
* *Returns:* { r, g, b } in [0, 255]
*/
function rgbToRgb(r, g, b) {
return {
r: bound01(r, 255) * 255,
g: bound01(g, 255) * 255,
b: bound01(b, 255) * 255,
};
}
/**
* Converts an RGB color value to HSL.
* *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
* *Returns:* { h, s, l } in [0,1]
*/
function rgbToHsl(r, g, b) {
r = bound01(r, 255);
g = bound01(g, 255);
b = bound01(b, 255);
var max = Math.max(r, g, b);
var min = Math.min(r, g, b);
var h = 0;
var s = 0;
var l = (max + min) / 2;
if (max === min) {
s = 0;
h = 0; // achromatic
}
else {
var d = max - min;
s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
switch (max) {
case r:
h = (g - b) / d + (g < b ? 6 : 0);
break;
case g:
h = (b - r) / d + 2;
break;
case b:
h = (r - g) / d + 4;
break;
default:
break;
}
h /= 6;
}
return { h: h, s: s, l: l };
}
function hue2rgb(p, q, t) {
if (t < 0) {
t += 1;
}
if (t > 1) {
t -= 1;
}
if (t < 1 / 6) {
return p + (q - p) * (6 * t);
}
if (t < 1 / 2) {
return q;
}
if (t < 2 / 3) {
return p + (q - p) * (2 / 3 - t) * 6;
}
return p;
}
/**
* Converts an HSL color value to RGB.
*
* *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
* *Returns:* { r, g, b } in the set [0, 255]
*/
function hslToRgb(h, s, l) {
var r;
var g;
var b;
h = bound01(h, 360);
s = bound01(s, 100);
l = bound01(l, 100);
if (s === 0) {
// achromatic
g = l;
b = l;
r = l;
}
else {
var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
var p = 2 * l - q;
r = hue2rgb(p, q, h + 1 / 3);
g = hue2rgb(p, q, h);
b = hue2rgb(p, q, h - 1 / 3);
}
return { r: r * 255, g: g * 255, b: b * 255 };
}
/**
* Converts an RGB color value to HSV
*
* *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
* *Returns:* { h, s, v } in [0,1]
*/
function rgbToHsv(r, g, b) {
r = bound01(r, 255);
g = bound01(g, 255);
b = bound01(b, 255);
var max = Math.max(r, g, b);
var min = Math.min(r, g, b);
var h = 0;
var v = max;
var d = max - min;
var s = max === 0 ? 0 : d / max;
if (max === min) {
h = 0; // achromatic
}
else {
switch (max) {
case r:
h = (g - b) / d + (g < b ? 6 : 0);
break;
case g:
h = (b - r) / d + 2;
break;
case b:
h = (r - g) / d + 4;
break;
default:
break;
}
h /= 6;
}
return { h: h, s: s, v: v };
}
/**
* Converts an HSV color value to RGB.
*
* *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
* *Returns:* { r, g, b } in the set [0, 255]
*/
function hsvToRgb(h, s, v) {
h = bound01(h, 360) * 6;
s = bound01(s, 100);
v = bound01(v, 100);
var i = Math.floor(h);
var f = h - i;
var p = v * (1 - s);
var q = v * (1 - f * s);
var t = v * (1 - (1 - f) * s);
var mod = i % 6;
var r = [v, q, p, p, t, v][mod];
var g = [t, v, v, q, p, p][mod];
var b = [p, p, t, v, v, q][mod];
return { r: r * 255, g: g * 255, b: b * 255 };
}
/**
* Converts an RGB color to hex
*
* Assumes r, g, and b are contained in the set [0, 255]
* Returns a 3 or 6 character hex
*/
function rgbToHex(r, g, b, allow3Char) {
var hex = [
pad2(Math.round(r).toString(16)),
pad2(Math.round(g).toString(16)),
pad2(Math.round(b).toString(16)),
];
// Return a 3 character hex if possible
if (allow3Char &&
hex[0].startsWith(hex[0].charAt(1)) &&
hex[1].startsWith(hex[1].charAt(1)) &&
hex[2].startsWith(hex[2].charAt(1))) {
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
}
return hex.join('');
}
/**
* Converts an RGBA color plus alpha transparency to hex
*
* Assumes r, g, b are contained in the set [0, 255] and
* a in [0, 1]. Returns a 4 or 8 character rgba hex
*/
// eslint-disable-next-line max-params
function rgbaToHex(r, g, b, a, allow4Char) {
var hex = [
pad2(Math.round(r).toString(16)),
pad2(Math.round(g).toString(16)),
pad2(Math.round(b).toString(16)),
pad2(convertDecimalToHex(a)),
];
// Return a 4 character hex if possible
if (allow4Char &&
hex[0].startsWith(hex[0].charAt(1)) &&
hex[1].startsWith(hex[1].charAt(1)) &&
hex[2].startsWith(hex[2].charAt(1)) &&
hex[3].startsWith(hex[3].charAt(1))) {
return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0) + hex[3].charAt(0);
}
return hex.join('');
}
/**
* Converts an RGBA color to an ARGB Hex8 string
* Rarely used, but required for "toFilter()"
*/
function rgbaToArgbHex(r, g, b, a) {
var hex = [
pad2(convertDecimalToHex(a)),
pad2(Math.round(r).toString(16)),
pad2(Math.round(g).toString(16)),
pad2(Math.round(b).toString(16)),
];
return hex.join('');
}
/** Converts a decimal to a hex value */
function convertDecimalToHex(d) {
return Math.round(parseFloat(d) * 255).toString(16);
}
/** Converts a hex value to a decimal */
function convertHexToDecimal(h) {
return parseIntFromHex(h) / 255;
}
/** Parse a base-16 hex value into a base-10 integer */
function parseIntFromHex(val) {
return parseInt(val, 16);
}
function numberInputToObject(color) {
return {
r: color >> 16,
g: (color & 0xff00) >> 8,
b: color & 0xff,
};
}
// CONCATENATED MODULE: ./node_modules/@ctrl/tinycolor/dist/module/css-color-names.js
// https://github.com/bahamas10/css-color-names/blob/master/css-color-names.json
/**
* @hidden
*/
var names = {
aliceblue: '#f0f8ff',
antiquewhite: '#faebd7',
aqua: '#00ffff',
aquamarine: '#7fffd4',
azure: '#f0ffff',
beige: '#f5f5dc',
bisque: '#ffe4c4',
black: '#000000',
blanchedalmond: '#ffebcd',
blue: '#0000ff',
blueviolet: '#8a2be2',
brown: '#a52a2a',
burlywood: '#deb887',
cadetblue: '#5f9ea0',
chartreuse: '#7fff00',
chocolate: '#d2691e',
coral: '#ff7f50',
cornflowerblue: '#6495ed',
cornsilk: '#fff8dc',
crimson: '#dc143c',
cyan: '#00ffff',
darkblue: '#00008b',
darkcyan: '#008b8b',
darkgoldenrod: '#b8860b',
darkgray: '#a9a9a9',
darkgreen: '#006400',
darkgrey: '#a9a9a9',
darkkhaki: '#bdb76b',
darkmagenta: '#8b008b',
darkolivegreen: '#556b2f',
darkorange: '#ff8c00',
darkorchid: '#9932cc',
darkred: '#8b0000',
darksalmon: '#e9967a',
darkseagreen: '#8fbc8f',
darkslateblue: '#483d8b',
darkslategray: '#2f4f4f',
darkslategrey: '#2f4f4f',
darkturquoise: '#00ced1',
darkviolet: '#9400d3',
deeppink: '#ff1493',
deepskyblue: '#00bfff',
dimgray: '#696969',
dimgrey: '#696969',
dodgerblue: '#1e90ff',
firebrick: '#b22222',
floralwhite: '#fffaf0',
forestgreen: '#228b22',
fuchsia: '#ff00ff',
gainsboro: '#dcdcdc',
ghostwhite: '#f8f8ff',
goldenrod: '#daa520',
gold: '#ffd700',
gray: '#808080',
green: '#008000',
greenyellow: '#adff2f',
grey: '#808080',
honeydew: '#f0fff0',
hotpink: '#ff69b4',
indianred: '#cd5c5c',
indigo: '#4b0082',
ivory: '#fffff0',
khaki: '#f0e68c',
lavenderblush: '#fff0f5',
lavender: '#e6e6fa',
lawngreen: '#7cfc00',
lemonchiffon: '#fffacd',
lightblue: '#add8e6',
lightcoral: '#f08080',
lightcyan: '#e0ffff',
lightgoldenrodyellow: '#fafad2',
lightgray: '#d3d3d3',
lightgreen: '#90ee90',
lightgrey: '#d3d3d3',
lightpink: '#ffb6c1',
lightsalmon: '#ffa07a',
lightseagreen: '#20b2aa',
lightskyblue: '#87cefa',
lightslategray: '#778899',
lightslategrey: '#778899',
lightsteelblue: '#b0c4de',
lightyellow: '#ffffe0',
lime: '#00ff00',
limegreen: '#32cd32',
linen: '#faf0e6',
magenta: '#ff00ff',
maroon: '#800000',
mediumaquamarine: '#66cdaa',
mediumblue: '#0000cd',
mediumorchid: '#ba55d3',
mediumpurple: '#9370db',
mediumseagreen: '#3cb371',
mediumslateblue: '#7b68ee',
mediumspringgreen: '#00fa9a',
mediumturquoise: '#48d1cc',
mediumvioletred: '#c71585',
midnightblue: '#191970',
mintcream: '#f5fffa',
mistyrose: '#ffe4e1',
moccasin: '#ffe4b5',
navajowhite: '#ffdead',
navy: '#000080',
oldlace: '#fdf5e6',
olive: '#808000',
olivedrab: '#6b8e23',
orange: '#ffa500',
orangered: '#ff4500',
orchid: '#da70d6',
palegoldenrod: '#eee8aa',
palegreen: '#98fb98',
paleturquoise: '#afeeee',
palevioletred: '#db7093',
papayawhip: '#ffefd5',
peachpuff: '#ffdab9',
peru: '#cd853f',
pink: '#ffc0cb',
plum: '#dda0dd',
powderblue: '#b0e0e6',
purple: '#800080',
rebeccapurple: '#663399',
red: '#ff0000',
rosybrown: '#bc8f8f',
royalblue: '#4169e1',
saddlebrown: '#8b4513',
salmon: '#fa8072',
sandybrown: '#f4a460',
seagreen: '#2e8b57',
seashell: '#fff5ee',
sienna: '#a0522d',
silver: '#c0c0c0',
skyblue: '#87ceeb',
slateblue: '#6a5acd',
slategray: '#708090',
slategrey: '#708090',
snow: '#fffafa',
springgreen: '#00ff7f',
steelblue: '#4682b4',
tan: '#d2b48c',
teal: '#008080',
thistle: '#d8bfd8',
tomato: '#ff6347',
turquoise: '#40e0d0',
violet: '#ee82ee',
wheat: '#f5deb3',
white: '#ffffff',
whitesmoke: '#f5f5f5',
yellow: '#ffff00',
yellowgreen: '#9acd32',
};
// CONCATENATED MODULE: ./node_modules/@ctrl/tinycolor/dist/module/format-input.js
/* eslint-disable @typescript-eslint/no-redundant-type-constituents */
/**
* Given a string or object, convert that input to RGB
*
* Possible string inputs:
* ```
* "red"
* "#f00" or "f00"
* "#ff0000" or "ff0000"
* "#ff000000" or "ff000000"
* "rgb 255 0 0" or "rgb (255, 0, 0)"
* "rgb 1.0 0 0" or "rgb (1, 0, 0)"
* "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
* "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
* "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
* "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
* "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
* ```
*/
function inputToRGB(color) {
var rgb = { r: 0, g: 0, b: 0 };
var a = 1;
var s = null;
var v = null;
var l = null;
var ok = false;
var format = false;
if (typeof color === 'string') {
color = stringInputToObject(color);
}
if (typeof color === 'object') {
if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
rgb = rgbToRgb(color.r, color.g, color.b);
ok = true;
format = String(color.r).substr(-1) === '%' ? 'prgb' : 'rgb';
}
else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.v)) {
s = convertToPercentage(color.s);
v = convertToPercentage(color.v);
rgb = hsvToRgb(color.h, s, v);
ok = true;
format = 'hsv';
}
else if (isValidCSSUnit(color.h) && isValidCSSUnit(color.s) && isValidCSSUnit(color.l)) {
s = convertToPercentage(color.s);
l = convertToPercentage(color.l);
rgb = hslToRgb(color.h, s, l);
ok = true;
format = 'hsl';
}
if (Object.prototype.hasOwnProperty.call(color, 'a')) {
a = color.a;
}
}
a = boundAlpha(a);
return {
ok: ok,
format: color.format || format,
r: Math.min(255, Math.max(rgb.r, 0)),
g: Math.min(255, Math.max(rgb.g, 0)),
b: Math.min(255, Math.max(rgb.b, 0)),
a: a,
};
}
// <http://www.w3.org/TR/css3-values/#integers>
var CSS_INTEGER = '[-\\+]?\\d+%?';
// <http://www.w3.org/TR/css3-values/#number-value>
var CSS_NUMBER = '[-\\+]?\\d*\\.\\d+%?';
// Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
var CSS_UNIT = "(?:".concat(CSS_NUMBER, ")|(?:").concat(CSS_INTEGER, ")");
// Actual matching.
// Parentheses and commas are optional, but not required.
// Whitespace can take the place of commas or opening paren
var PERMISSIVE_MATCH3 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
var PERMISSIVE_MATCH4 = "[\\s|\\(]+(".concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")[,|\\s]+(").concat(CSS_UNIT, ")\\s*\\)?");
var matchers = {
CSS_UNIT: new RegExp(CSS_UNIT),
rgb: new RegExp('rgb' + PERMISSIVE_MATCH3),
rgba: new RegExp('rgba' + PERMISSIVE_MATCH4),
hsl: new RegExp('hsl' + PERMISSIVE_MATCH3),
hsla: new RegExp('hsla' + PERMISSIVE_MATCH4),
hsv: new RegExp('hsv' + PERMISSIVE_MATCH3),
hsva: new RegExp('hsva' + PERMISSIVE_MATCH4),
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
};
/**
* Permissive string parsing. Take in a number of formats, and output an object
* based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
*/
function stringInputToObject(color) {
color = color.trim().toLowerCase();
if (color.length === 0) {
return false;
}
var named = false;
if (names[color]) {
color = names[color];
named = true;
}
else if (color === 'transparent') {
return { r: 0, g: 0, b: 0, a: 0, format: 'name' };
}
// Try to match string input using regular expressions.
// Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
// Just return an object and let the conversion functions handle that.
// This way the result will be the same whether the tinycolor is initialized with string or object.
var match = matchers.rgb.exec(color);
if (match) {
return { r: match[1], g: match[2], b: match[3] };
}
match = matchers.rgba.exec(color);
if (match) {
return { r: match[1], g: match[2], b: match[3], a: match[4] };
}
match = matchers.hsl.exec(color);
if (match) {
return { h: match[1], s: match[2], l: match[3] };
}
match = matchers.hsla.exec(color);
if (match) {
return { h: match[1], s: match[2], l: match[3], a: match[4] };
}
match = matchers.hsv.exec(color);
if (match) {
return { h: match[1], s: match[2], v: match[3] };
}
match = matchers.hsva.exec(color);
if (match) {
return { h: match[1], s: match[2], v: match[3], a: match[4] };
}
match = matchers.hex8.exec(color);
if (match) {
return {
r: parseIntFromHex(match[1]),
g: parseIntFromHex(match[2]),
b: parseIntFromHex(match[3]),
a: convertHexToDecimal(match[4]),
format: named ? 'name' : 'hex8',
};
}
match = matchers.hex6.exec(color);
if (match) {
return {
r: parseIntFromHex(match[1]),
g: parseIntFromHex(match[2]),
b: parseIntFromHex(match[3]),
format: named ? 'name' : 'hex',
};
}
match = matchers.hex4.exec(color);
if (match) {
return {
r: parseIntFromHex(match[1] + match[1]),
g: parseIntFromHex(match[2] + match[2]),
b: parseIntFromHex(match[3] + match[3]),
a: convertHexToDecimal(match[4] + match[4]),
format: named ? 'name' : 'hex8',
};
}
match = matchers.hex3.exec(color);
if (match) {
return {
r: parseIntFromHex(match[1] + match[1]),
g: parseIntFromHex(match[2] + match[2]),
b: parseIntFromHex(match[3] + match[3]),
format: named ? 'name' : 'hex',
};
}
return false;
}
/**
* Check to see if it looks like a CSS unit
* (see `matchers` above for definition).
*/
function isValidCSSUnit(color) {
return Boolean(matchers.CSS_UNIT.exec(String(color)));
}
// CONCATENATED MODULE: ./node_modules/@ant-design/colors/dist/index.esm.js
var hueStep = 2; // 色相阶梯
var saturationStep = 0.16; // 饱和度阶梯,浅色部分
var saturationStep2 = 0.05; // 饱和度阶梯,深色部分
var brightnessStep1 = 0.05; // 亮度阶梯,浅色部分
var brightnessStep2 = 0.15; // 亮度阶梯,深色部分
var lightColorCount = 5; // 浅色数量,主色上
var darkColorCount = 4; // 深色数量,主色下
// 暗色主题颜色映射关系表
var darkColorMap = [{
index: 7,
opacity: 0.15
}, {
index: 6,
opacity: 0.25
}, {
index: 5,
opacity: 0.3
}, {
index: 5,
opacity: 0.45
}, {
index: 5,
opacity: 0.65
}, {
index: 5,
opacity: 0.85
}, {
index: 4,
opacity: 0.9
}, {
index: 3,
opacity: 0.95
}, {
index: 2,
opacity: 0.97
}, {
index: 1,
opacity: 0.98
}]; // Wrapper function ported from TinyColor.prototype.toHsv
// Keep it here because of `hsv.h * 360`
function toHsv(_ref) {
var r = _ref.r,
g = _ref.g,
b = _ref.b;
var hsv = rgbToHsv(r, g, b);
return {
h: hsv.h * 360,
s: hsv.s,
v: hsv.v
};
} // Wrapper function ported from TinyColor.prototype.toHexString
// Keep it here because of the prefix `#`
function toHex(_ref2) {
var r = _ref2.r,
g = _ref2.g,
b = _ref2.b;
return "#".concat(rgbToHex(r, g, b, false));
} // Wrapper function ported from TinyColor.prototype.mix, not treeshakable.
// Amount in range [0, 1]
// Assume color1 & color2 has no alpha, since the following src code did so.
function mix(rgb1, rgb2, amount) {
var p = amount / 100;
var rgb = {
r: (rgb2.r - rgb1.r) * p + rgb1.r,
g: (rgb2.g - rgb1.g) * p + rgb1.g,
b: (rgb2.b - rgb1.b) * p + rgb1.b
};
return rgb;
}
function getHue(hsv, i, light) {
var hue; // 根据色相不同,色相转向不同
if (Math.round(hsv.h) >= 60 && Math.round(hsv.h) <= 240) {
hue = light ? Math.round(hsv.h) - hueStep * i : Math.round(hsv.h) + hueStep * i;
} else {
hue = light ? Math.round(hsv.h) + hueStep * i : Math.round(hsv.h) - hueStep * i;
}
if (hue < 0) {
hue += 360;
} else if (hue >= 360) {
hue -= 360;
}
return hue;
}
function getSaturation(hsv, i, light) {
// grey color don't change saturation
if (hsv.h === 0 && hsv.s === 0) {
return hsv.s;
}
var saturation;
if (light) {
saturation = hsv.s - saturationStep * i;
} else if (i === darkColorCount) {
saturation = hsv.s + saturationStep;
} else {
saturation = hsv.s + saturationStep2 * i;
} // 边界值修正
if (saturation > 1) {
saturation = 1;
} // 第一格的 s 限制在 0.06-0.1 之间
if (light && i === lightColorCount && saturation > 0.1) {
saturation = 0.1;
}
if (saturation < 0.06) {
saturation = 0.06;
}
return Number(saturation.toFixed(2));
}
function getValue(hsv, i, light) {
var value;
if (light) {
value = hsv.v + brightnessStep1 * i;
} else {
value = hsv.v - brightnessStep2 * i;
}
if (value > 1) {
value = 1;
}
return Number(value.toFixed(2));
}
function generate(color) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var patterns = [];
var pColor = inputToRGB(color);
for (var i = lightColorCount; i > 0; i -= 1) {
var hsv = toHsv(pColor);
var colorString = toHex(inputToRGB({
h: getHue(hsv, i, true),
s: getSaturation(hsv, i, true),
v: getValue(hsv, i, true)
}));
patterns.push(colorString);
}
patterns.push(toHex(pColor));
for (var _i = 1; _i <= darkColorCount; _i += 1) {
var _hsv = toHsv(pColor);
var _colorString = toHex(inputToRGB({
h: getHue(_hsv, _i),
s: getSaturation(_hsv, _i),
v: getValue(_hsv, _i)
}));
patterns.push(_colorString);
} // dark theme patterns
if (opts.theme === 'dark') {
return darkColorMap.map(function (_ref3) {
var index = _ref3.index,
opacity = _ref3.opacity;
var darkColorString = toHex(mix(inputToRGB(opts.backgroundColor || '#141414'), inputToRGB(patterns[index]), opacity * 100));
return darkColorString;
});
}
return patterns;
}
var presetPrimaryColors = {
red: '#F5222D',
volcano: '#FA541C',
orange: '#FA8C16',
gold: '#FAAD14',
yellow: '#FADB14',
lime: '#A0D911',
green: '#52C41A',
cyan: '#13C2C2',
blue: '#1890FF',
geekblue: '#2F54EB',
purple: '#722ED1',
magenta: '#EB2F96',
grey: '#666666'
};
var presetPalettes = {};
var presetDarkPalettes = {};
Object.keys(presetPrimaryColors).forEach(function (key) {
presetPalettes[key] = generate(presetPrimaryColors[key]);
presetPalettes[key].primary = presetPalettes[key][5]; // dark presetPalettes
presetDarkPalettes[key] = generate(presetPrimaryColors[key], {
theme: 'dark',
backgroundColor: '#141414'
});
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
});
var red = presetPalettes.red;
var volcano = presetPalettes.volcano;
var gold = presetPalettes.gold;
var orange = presetPalettes.orange;
var yellow = presetPalettes.yellow;
var lime = presetPalettes.lime;
var green = presetPalettes.green;
var cyan = presetPalettes.cyan;
var blue = presetPalettes.blue;
var geekblue = presetPalettes.geekblue;
var purple = presetPalettes.purple;
var magenta = presetPalettes.magenta;
var grey = presetPalettes.grey;
/***/ }),
/***/ "AM7I":
/*!*********************************************!*\
!*** ./node_modules/get-intrinsic/index.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var undefined;
var $Error = __webpack_require__(/*! es-errors */ "pkW7");
var $EvalError = __webpack_require__(/*! es-errors/eval */ "QX98");
var $RangeError = __webpack_require__(/*! es-errors/range */ "3JnH");
var $ReferenceError = __webpack_require__(/*! es-errors/ref */ "FAml");
var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ "Z+6F");
var $TypeError = __webpack_require__(/*! es-errors/type */ "DSU0");
var $URIError = __webpack_require__(/*! es-errors/uri */ "Z9lY");
var $Function = Function;
// eslint-disable-next-line consistent-return
var getEvalledConstructor = function (expressionSyntax) {
try {
return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
} catch (e) {}
};
var $gOPD = Object.getOwnPropertyDescriptor;
if ($gOPD) {
try {
$gOPD({}, '');
} catch (e) {
$gOPD = null; // this is IE 8, which has a broken gOPD
}
}
var throwTypeError = function () {
throw new $TypeError();
};
var ThrowTypeError = $gOPD
? (function () {
try {
// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
arguments.callee; // IE 8 does not throw here
return throwTypeError;
} catch (calleeThrows) {
try {
// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
return $gOPD(arguments, 'callee').get;
} catch (gOPDthrows) {
return throwTypeError;
}
}
}())
: throwTypeError;
var hasSymbols = __webpack_require__(/*! has-symbols */ "UVaH")();
var hasProto = __webpack_require__(/*! has-proto */ "CjYj")();
var getProto = Object.getPrototypeOf || (
hasProto
? function (x) { return x.__proto__; } // eslint-disable-line no-proto
: null
);
var needsEval = {};
var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
var INTRINSICS = {
__proto__: null,
'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
'%Array%': Array,
'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
'%AsyncFromSyncIteratorPrototype%': undefined,
'%AsyncFunction%': needsEval,
'%AsyncGenerator%': needsEval,
'%AsyncGeneratorFunction%': needsEval,
'%AsyncIteratorPrototype%': needsEval,
'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
'%Boolean%': Boolean,
'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
'%Date%': Date,
'%decodeURI%': decodeURI,
'%decodeURIComponent%': decodeURIComponent,
'%encodeURI%': encodeURI,
'%encodeURIComponent%': encodeURIComponent,
'%Error%': $Error,
'%eval%': eval, // eslint-disable-line no-eval
'%EvalError%': $EvalError,
'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
'%Function%': $Function,
'%GeneratorFunction%': needsEval,
'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,
'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,
'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
'%isFinite%': isFinite,
'%isNaN%': isNaN,
'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
'%JSON%': typeof JSON === 'object' ? JSON : undefined,
'%Map%': typeof Map === 'undefined' ? undefined : Map,
'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
'%Math%': Math,
'%Number%': Number,
'%Object%': Object,
'%parseFloat%': parseFloat,
'%parseInt%': parseInt,
'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
'%RangeError%': $RangeError,
'%ReferenceError%': $ReferenceError,
'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
'%RegExp%': RegExp,
'%Set%': typeof Set === 'undefined' ? undefined : Set,
'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),
'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
'%String%': String,
'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,
'%Symbol%': hasSymbols ? Symbol : undefined,
'%SyntaxError%': $SyntaxError,
'%ThrowTypeError%': ThrowTypeError,
'%TypedArray%': TypedArray,
'%TypeError%': $TypeError,
'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,
'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
'%URIError%': $URIError,
'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
};
if (getProto) {
try {
null.error; // eslint-disable-line no-unused-expressions
} catch (e) {
// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
var errorProto = getProto(getProto(e));
INTRINSICS['%Error.prototype%'] = errorProto;
}
}
var doEval = function doEval(name) {
var value;
if (name === '%AsyncFunction%') {
value = getEvalledConstructor('async function () {}');
} else if (name === '%GeneratorFunction%') {
value = getEvalledConstructor('function* () {}');
} else if (name === '%AsyncGeneratorFunction%') {
value = getEvalledConstructor('async function* () {}');
} else if (name === '%AsyncGenerator%') {
var fn = doEval('%AsyncGeneratorFunction%');
if (fn) {
value = fn.prototype;
}
} else if (name === '%AsyncIteratorPrototype%') {
var gen = doEval('%AsyncGenerator%');
if (gen && getProto) {
value = getProto(gen.prototype);
}
}
INTRINSICS[name] = value;
return value;
};
var LEGACY_ALIASES = {
__proto__: null,
'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
'%ArrayPrototype%': ['Array', 'prototype'],
'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
'%ArrayProto_values%': ['Array', 'prototype', 'values'],
'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
'%BooleanPrototype%': ['Boolean', 'prototype'],
'%DataViewPrototype%': ['DataView', 'prototype'],
'%DatePrototype%': ['Date', 'prototype'],
'%ErrorPrototype%': ['Error', 'prototype'],
'%EvalErrorPrototype%': ['EvalError', 'prototype'],
'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
'%FunctionPrototype%': ['Function', 'prototype'],
'%Generator%': ['GeneratorFunction', 'prototype'],
'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
'%JSONParse%': ['JSON', 'parse'],
'%JSONStringify%': ['JSON', 'stringify'],
'%MapPrototype%': ['Map', 'prototype'],
'%NumberPrototype%': ['Number', 'prototype'],
'%ObjectPrototype%': ['Object', 'prototype'],
'%ObjProto_toString%': ['Object', 'prototype', 'toString'],
'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
'%PromisePrototype%': ['Promise', 'prototype'],
'%PromiseProto_then%': ['Promise', 'prototype', 'then'],
'%Promise_all%': ['Promise', 'all'],
'%Promise_reject%': ['Promise', 'reject'],
'%Promise_resolve%': ['Promise', 'resolve'],
'%RangeErrorPrototype%': ['RangeError', 'prototype'],
'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
'%RegExpPrototype%': ['RegExp', 'prototype'],
'%SetPrototype%': ['Set', 'prototype'],
'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
'%StringPrototype%': ['String', 'prototype'],
'%SymbolPrototype%': ['Symbol', 'prototype'],
'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
'%TypedArrayPrototype%': ['TypedArray', 'prototype'],
'%TypeErrorPrototype%': ['TypeError', 'prototype'],
'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
'%URIErrorPrototype%': ['URIError', 'prototype'],
'%WeakMapPrototype%': ['WeakMap', 'prototype'],
'%WeakSetPrototype%': ['WeakSet', 'prototype']
};
var bind = __webpack_require__(/*! function-bind */ "D3zA");
var hasOwn = __webpack_require__(/*! hasown */ "lnE3");
var $concat = bind.call(Function.call, Array.prototype.concat);
var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
var $replace = bind.call(Function.call, String.prototype.replace);
var $strSlice = bind.call(Function.call, String.prototype.slice);
var $exec = bind.call(Function.call, RegExp.prototype.exec);
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
var stringToPath = function stringToPath(string) {
var first = $strSlice(string, 0, 1);
var last = $strSlice(string, -1);
if (first === '%' && last !== '%') {
throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
} else if (last === '%' && first !== '%') {
throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
}
var result = [];
$replace(string, rePropName, function (match, number, quote, subString) {
result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;
});
return result;
};
/* end adaptation */
var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
var intrinsicName = name;
var alias;
if (hasOwn(LEGACY_ALIASES, intrinsicName)) {
alias = LEGACY_ALIASES[intrinsicName];
intrinsicName = '%' + alias[0] + '%';
}
if (hasOwn(INTRINSICS, intrinsicName)) {
var value = INTRINSICS[intrinsicName];
if (value === needsEval) {
value = doEval(intrinsicName);
}
if (typeof value === 'undefined' && !allowMissing) {
throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
}
return {
alias: alias,
name: intrinsicName,
value: value
};
}
throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
};
module.exports = function GetIntrinsic(name, allowMissing) {
if (typeof name !== 'string' || name.length === 0) {
throw new $TypeError('intrinsic name must be a non-empty string');
}
if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
throw new $TypeError('"allowMissing" argument must be a boolean');
}
if ($exec(/^%?[^%]*%?$/, name) === null) {
throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');
}
var parts = stringToPath(name);
var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
var intrinsicRealName = intrinsic.name;
var value = intrinsic.value;
var skipFurtherCaching = false;
var alias = intrinsic.alias;
if (alias) {
intrinsicBaseName = alias[0];
$spliceApply(parts, $concat([0, 1], alias));
}
for (var i = 1, isOwn = true; i < parts.length; i += 1) {
var part = parts[i];
var first = $strSlice(part, 0, 1);
var last = $strSlice(part, -1);
if (
(
(first === '"' || first === "'" || first === '`')
|| (last === '"' || last === "'" || last === '`')
)
&& first !== last
) {
throw new $SyntaxError('property names with quotes must have matching quotes');
}
if (part === 'constructor' || !isOwn) {
skipFurtherCaching = true;
}
intrinsicBaseName += '.' + part;
intrinsicRealName = '%' + intrinsicBaseName + '%';
if (hasOwn(INTRINSICS, intrinsicRealName)) {
value = INTRINSICS[intrinsicRealName];
} else if (value != null) {
if (!(part in value)) {
if (!allowMissing) {
throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');
}
return void undefined;
}
if ($gOPD && (i + 1) >= parts.length) {
var desc = $gOPD(value, part);
isOwn = !!desc;
// By convention, when a data property is converted to an accessor
// property to emulate a data property that does not suffer from
// the override mistake, that accessor's getter is marked with
// an `originalValue` property. Here, when we detect this, we
// uphold the illusion by pretending to see that original data
// property, i.e., returning the value rather than the getter
// itself.
if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
value = desc.get;
} else {
value = value[part];
}
} else {
isOwn = hasOwn(value, part);
value = value[part];
}
if (isOwn && !skipFurtherCaching) {
INTRINSICS[intrinsicRealName] = value;
}
}
}
return value;
};
/***/ }),
/***/ "ANhw":
/*!*************************************!*\
!*** ./node_modules/crypt/crypt.js ***!
\*************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
(function() {
var base64map
= 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',
crypt = {
// Bit-wise rotation left
rotl: function(n, b) {
return (n << b) | (n >>> (32 - b));
},
// Bit-wise rotation right
rotr: function(n, b) {
return (n << (32 - b)) | (n >>> b);
},
// Swap big-endian to little-endian and vice versa
endian: function(n) {
// If number given, swap endian
if (n.constructor == Number) {
return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00;
}
// Else, assume array and swap all items
for (var i = 0; i < n.length; i++)
n[i] = crypt.endian(n[i]);
return n;
},
// Generate an array of any length of random bytes
randomBytes: function(n) {
for (var bytes = []; n > 0; n--)
bytes.push(Math.floor(Math.random() * 256));
return bytes;
},
// Convert a byte array to big-endian 32-bit words
bytesToWords: function(bytes) {
for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8)
words[b >>> 5] |= bytes[i] << (24 - b % 32);
return words;
},
// Convert big-endian 32-bit words to a byte array
wordsToBytes: function(words) {
for (var bytes = [], b = 0; b < words.length * 32; b += 8)
bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF);
return bytes;
},
// Convert a byte array to a hex string
bytesToHex: function(bytes) {
for (var hex = [], i = 0; i < bytes.length; i++) {
hex.push((bytes[i] >>> 4).toString(16));
hex.push((bytes[i] & 0xF).toString(16));
}
return hex.join('');
},
// Convert a hex string to a byte array
hexToBytes: function(hex) {
for (var bytes = [], c = 0; c < hex.length; c += 2)
bytes.push(parseInt(hex.substr(c, 2), 16));
return bytes;
},
// Convert a byte array to a base-64 string
bytesToBase64: function(bytes) {
for (var base64 = [], i = 0; i < bytes.length; i += 3) {
var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2];
for (var j = 0; j < 4; j++)
if (i * 8 + j * 6 <= bytes.length * 8)
base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F));
else
base64.push('=');
}
return base64.join('');
},
// Convert a base-64 string to a byte array
base64ToBytes: function(base64) {
// Remove non-base-64 characters
base64 = base64.replace(/[^A-Z0-9+\/]/ig, '');
for (var bytes = [], i = 0, imod4 = 0; i < base64.length;
imod4 = ++i % 4) {
if (imod4 == 0) continue;
bytes.push(((base64map.indexOf(base64.charAt(i - 1))
& (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2))
| (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2)));
}
return bytes;
}
};
module.exports = crypt;
})();
/***/ }),
/***/ "AO7/":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/internals/to-string-tag-support.js ***!
\*****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
var test = {};
test[TO_STRING_TAG] = 'z';
module.exports = String(test) === '[object z]';
/***/ }),
/***/ "AP2z":
/*!*******************************************!*\
!*** ./node_modules/lodash/_getRawTag.js ***!
\*******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(/*! ./_Symbol */ "nmnc");
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
module.exports = getRawTag;
/***/ }),
/***/ "AVoK":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.delete-all.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var collectionDeleteAll = __webpack_require__(/*! ../internals/collection-delete-all */ "Cg3G");
// `Set.prototype.deleteAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
deleteAll: function deleteAll(/* ...elements */) {
return collectionDeleteAll.apply(this, arguments);
}
});
/***/ }),
/***/ "AmFO":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.sinh.js ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "jrUv");
var abs = Math.abs;
var exp = Math.exp;
var E = Math.E;
var FORCED = fails(function () {
return Math.sinh(-2e-17) != -2e-17;
});
// `Math.sinh` method
// https://tc39.github.io/ecma262/#sec-math.sinh
// V8 near Chromium 38 has a problem with very small numbers
$({ target: 'Math', stat: true, forced: FORCED }, {
sinh: function sinh(x) {
return abs(x = +x) < 1 ? (expm1(x) - expm1(-x)) / 2 : (exp(x - 1) - exp(-x - 1)) * (E / 2);
}
});
/***/ }),
/***/ "AqCL":
/*!*******************************************************************!*\
!*** ./node_modules/path-to-regexp/node_modules/isarray/index.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = Array.isArray || function (arr) {
return Object.prototype.toString.call(arr) == '[object Array]';
};
/***/ }),
/***/ "AwgR":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.reflect.has-own-metadata.js ***!
\*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var ordinaryHasOwnMetadata = ReflectMetadataModule.has;
var toMetadataKey = ReflectMetadataModule.toKey;
// `Reflect.hasOwnMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
hasOwnMetadata: function hasOwnMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
return ordinaryHasOwnMetadata(metadataKey, anObject(target), targetKey);
}
});
/***/ }),
/***/ "B/J0":
/*!**************************************************!*\
!*** ./node_modules/hash.js/lib/hash/sha/224.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ "w8CP");
var SHA256 = __webpack_require__(/*! ./256 */ "bu2F");
function SHA224() {
if (!(this instanceof SHA224))
return new SHA224();
SHA256.call(this);
this.h = [
0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4 ];
}
utils.inherits(SHA224, SHA256);
module.exports = SHA224;
SHA224.blockSize = 512;
SHA224.outSize = 224;
SHA224.hmacStrength = 192;
SHA224.padLength = 64;
SHA224.prototype._digest = function digest(enc) {
// Just truncate output
if (enc === 'hex')
return utils.toHex32(this.h.slice(0, 7), 'big');
else
return utils.split32(this.h.slice(0, 7), 'big');
};
/***/ }),
/***/ "B6y2":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.object.values.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $values = __webpack_require__(/*! ../internals/object-to-array */ "b1O7").values;
// `Object.values` method
// https://tc39.github.io/ecma262/#sec-object.values
$({ target: 'Object', stat: true }, {
values: function values(O) {
return $values(O);
}
});
/***/ }),
/***/ "BEtg":
/*!*****************************************!*\
!*** ./node_modules/is-buffer/index.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
// The _isBuffer check is for Safari 5-7 support, because it's missing
// Object.prototype.constructor. Remove this eventually
module.exports = function (obj) {
return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer)
}
function isBuffer (obj) {
return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
}
// For Node v0.10 support. Remove this eventually.
function isSlowBuffer (obj) {
return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0))
}
/***/ }),
/***/ "BGR+":
/*!******************************************!*\
!*** ./node_modules/omit.js/es/index.js ***!
\******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
function omit(obj, fields) {
// eslint-disable-next-line prefer-object-spread
var shallowCopy = Object.assign({}, obj);
for (var i = 0; i < fields.length; i += 1) {
var key = fields[i];
delete shallowCopy[key];
}
return shallowCopy;
}
/* harmony default export */ __webpack_exports__["a"] = (omit);
/***/ }),
/***/ "BGb9":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.union.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.union` method
// https://github.com/tc39/proposal-set-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
union: function union(iterable) {
var set = anObject(this);
var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set);
iterate(iterable, aFunction(newSet.add), newSet);
return newSet;
}
});
/***/ }),
/***/ "BIHw":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.array.flat.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var flattenIntoArray = __webpack_require__(/*! ../internals/flatten-into-array */ "or9q");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "ZfDv");
// `Array.prototype.flat` method
// https://github.com/tc39/proposal-flatMap
$({ target: 'Array', proto: true }, {
flat: function flat(/* depthArg = 1 */) {
var depthArg = arguments.length ? arguments[0] : undefined;
var O = toObject(this);
var sourceLen = toLength(O.length);
var A = arraySpeciesCreate(O, 0);
A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toInteger(depthArg));
return A;
}
});
/***/ }),
/***/ "BMrR":
/*!*******************************************!*\
!*** ./node_modules/antd/es/row/index.js ***!
\*******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../grid */ "qrJ5");
/* harmony default export */ __webpack_exports__["a"] = (_grid__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
/***/ }),
/***/ "BNMt":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.blink.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.blink` method
// https://tc39.github.io/ecma262/#sec-string.prototype.blink
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('blink') }, {
blink: function blink() {
return createHTML(this, 'blink', '', '');
}
});
/***/ }),
/***/ "BTho":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/function-bind.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var slice = [].slice;
var factories = {};
var construct = function (C, argsLength, args) {
if (!(argsLength in factories)) {
for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']';
// eslint-disable-next-line no-new-func
factories[argsLength] = Function('C,a', 'return new C(' + list.join(',') + ')');
} return factories[argsLength](C, args);
};
// `Function.prototype.bind` method implementation
// https://tc39.github.io/ecma262/#sec-function.prototype.bind
module.exports = Function.bind || function bind(that /* , ...args */) {
var fn = aFunction(this);
var partArgs = slice.call(arguments, 1);
var boundFunction = function bound(/* args... */) {
var args = partArgs.concat(slice.call(arguments));
return this instanceof boundFunction ? construct(fn, args.length, args) : fn.apply(that, args);
};
if (isObject(fn.prototype)) boundFunction.prototype = fn.prototype;
return boundFunction;
};
/***/ }),
/***/ "BU3w":
/*!***************************************************!*\
!*** ./node_modules/rc-util/es/Dom/dynamicCSS.js ***!
\***************************************************/
/*! exports provided: injectCSS, removeCSS, clearContainerCache, updateCSS */
/*! exports used: removeCSS, updateCSS */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export injectCSS */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return removeCSS; });
/* unused harmony export clearContainerCache */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return updateCSS; });
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ");
/* harmony import */ var _canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./canUseDom */ "MNnm");
/* harmony import */ var _contains__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./contains */ "l4aY");
var APPEND_ORDER = 'data-rc-order';
var APPEND_PRIORITY = 'data-rc-priority';
var MARK_KEY = "rc-util-key";
var containerCache = new Map();
function getMark() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
mark = _ref.mark;
if (mark) {
return mark.startsWith('data-') ? mark : "data-".concat(mark);
}
return MARK_KEY;
}
function getContainer(option) {
if (option.attachTo) {
return option.attachTo;
}
var head = document.querySelector('head');
return head || document.body;
}
function getOrder(prepend) {
if (prepend === 'queue') {
return 'prependQueue';
}
return prepend ? 'prepend' : 'append';
}
/**
* Find style which inject by rc-util
*/
function findStyles(container) {
return Array.from((containerCache.get(container) || container).children).filter(function (node) {
return node.tagName === 'STYLE';
});
}
function injectCSS(css) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!Object(_canUseDom__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])()) {
return null;
}
var csp = option.csp,
prepend = option.prepend,
_option$priority = option.priority,
priority = _option$priority === void 0 ? 0 : _option$priority;
var mergedOrder = getOrder(prepend);
var isPrependQueue = mergedOrder === 'prependQueue';
var styleNode = document.createElement('style');
styleNode.setAttribute(APPEND_ORDER, mergedOrder);
if (isPrependQueue && priority) {
styleNode.setAttribute(APPEND_PRIORITY, "".concat(priority));
}
if (csp !== null && csp !== void 0 && csp.nonce) {
styleNode.nonce = csp === null || csp === void 0 ? void 0 : csp.nonce;
}
styleNode.innerHTML = css;
var container = getContainer(option);
var firstChild = container.firstChild;
if (prepend) {
// If is queue `prepend`, it will prepend first style and then append rest style
if (isPrependQueue) {
var existStyle = (option.styles || findStyles(container)).filter(function (node) {
// Ignore style which not injected by rc-util with prepend
if (!['prepend', 'prependQueue'].includes(node.getAttribute(APPEND_ORDER))) {
return false;
}
// Ignore style which priority less then new style
var nodePriority = Number(node.getAttribute(APPEND_PRIORITY) || 0);
return priority >= nodePriority;
});
if (existStyle.length) {
container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);
return styleNode;
}
}
// Use `insertBefore` as `prepend`
container.insertBefore(styleNode, firstChild);
} else {
container.appendChild(styleNode);
}
return styleNode;
}
function findExistNode(key) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var container = getContainer(option);
return (option.styles || findStyles(container)).find(function (node) {
return node.getAttribute(getMark(option)) === key;
});
}
function removeCSS(key) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var existNode = findExistNode(key, option);
if (existNode) {
var container = getContainer(option);
container.removeChild(existNode);
}
}
/**
* qiankun will inject `appendChild` to insert into other
*/
function syncRealContainer(container, option) {
var cachedRealContainer = containerCache.get(container);
// Find real container when not cached or cached container removed
if (!cachedRealContainer || !Object(_contains__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(document, cachedRealContainer)) {
var placeholderStyle = injectCSS('', option);
var parentNode = placeholderStyle.parentNode;
containerCache.set(container, parentNode);
container.removeChild(placeholderStyle);
}
}
/**
* manually clear container cache to avoid global cache in unit testes
*/
function clearContainerCache() {
containerCache.clear();
}
function updateCSS(css, key) {
var originOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var container = getContainer(originOption);
var styles = findStyles(container);
var option = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, originOption), {}, {
styles: styles
});
// Sync real parent
syncRealContainer(container, option);
var existNode = findExistNode(key, option);
if (existNode) {
var _option$csp, _option$csp2;
if ((_option$csp = option.csp) !== null && _option$csp !== void 0 && _option$csp.nonce && existNode.nonce !== ((_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce)) {
var _option$csp3;
existNode.nonce = (_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce;
}
if (existNode.innerHTML !== css) {
existNode.innerHTML = css;
}
return existNode;
}
var newNode = injectCSS(css, option);
newNode.setAttribute(getMark(option), key);
return newNode;
}
/***/ }),
/***/ "BX/b":
/*!**********************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-names-external.js ***!
\**********************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var nativeGetOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "JBy8").f;
var toString = {}.toString;
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
? Object.getOwnPropertyNames(window) : [];
var getWindowNames = function (it) {
try {
return nativeGetOwnPropertyNames(it);
} catch (error) {
return windowNames.slice();
}
};
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
module.exports.f = function getOwnPropertyNames(it) {
return windowNames && toString.call(it) == '[object Window]'
? getWindowNames(it)
: nativeGetOwnPropertyNames(toIndexedObject(it));
};
/***/ }),
/***/ "Bgsj":
/*!******************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/components/Context.js ***!
\******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = __webpack_require__(/*! react */ "q1tI");
var IconContext = /*#__PURE__*/(0, _react.createContext)({});
var _default = exports.default = IconContext;
/***/ }),
/***/ "Bnag":
/*!******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
\******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "Bs8V":
/*!******************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-descriptor.js ***!
\******************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "0eef");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "DPsx");
var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
exports.f = DESCRIPTORS ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
O = toIndexedObject(O);
P = toPrimitive(P, true);
if (IE8_DOM_DEFINE) try {
return nativeGetOwnPropertyDescriptor(O, P);
} catch (error) { /* empty */ }
if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);
};
/***/ }),
/***/ "BsWD":
/*!*******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
\*******************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray.js */ "a3WO");
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
}
/***/ }),
/***/ "C1JJ":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.is-disjoint-from.js ***!
\*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.isDisjointFrom` method
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isDisjointFrom
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
isDisjointFrom: function isDisjointFrom(iterable) {
var set = anObject(this);
var hasCheck = aFunction(set.has);
return !iterate(iterable, function (value) {
if (hasCheck.call(set, value) === true) return iterate.stop();
}).stopped;
}
});
/***/ }),
/***/ "CUyW":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.map-values.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.mapValues` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
mapValues: function mapValues(callbackfn /* , thisArg */) {
var map = anObject(this);
var iterator = getMapIterator(map);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();
var setter = aFunction(newMap.set);
iterate(iterator, function (key, value) {
setter.call(newMap, key, boundFunction(value, key, map));
}, undefined, true, true);
return newMap;
}
});
/***/ }),
/***/ "CWQg":
/*!********************************************!*\
!*** ./node_modules/antd/es/_util/type.js ***!
\********************************************/
/*! exports provided: tuple, tupleNum */
/*! exports used: tuple */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return tuple; });
/* unused harmony export tupleNum */
// https://stackoverflow.com/questions/46176165/ways-to-get-string-literal-type-of-array-values-without-enum-overhead
var tuple = function tuple() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return args;
};
var tupleNum = function tupleNum() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
return args;
};
/***/ }),
/***/ "Cb9Y":
/*!****************************************************!*\
!*** ./src/models/classrooms/polls.ts + 1 modules ***!
\****************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/polls.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
//试卷详情答题列表
function polls_getPollsList(_x) {
return _getPollsList.apply(this, arguments);
}
function _getPollsList() {
_getPollsList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/poll_lists.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getPollsList.apply(this, arguments);
}
function polls_getCommonHeader(_x2) {
return _getCommonHeader.apply(this, arguments);
}
function _getCommonHeader() {
_getCommonHeader = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/common_header.json"), {
method: 'get'
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getCommonHeader.apply(this, arguments);
}
function polls_getPollsSetting(_x3) {
return _getPollsSetting.apply(this, arguments);
}
function _getPollsSetting() {
_getPollsSetting = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/poll_setting.json"), {
method: 'get'
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getPollsSetting.apply(this, arguments);
}
function updateSetting(_x4) {
return _updateSetting.apply(this, arguments);
}
// 截止班级列表
function _updateSetting() {
_updateSetting = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/commit_setting.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _updateSetting.apply(this, arguments);
}
function polls_getEndGroups(_x5) {
return _getEndGroups.apply(this, arguments);
}
function _getEndGroups() {
_getEndGroups = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/polls/end_poll_modal.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getEndGroups.apply(this, arguments);
}
function polls_getPublishGroups(_x6) {
return _getPublishGroups.apply(this, arguments);
}
//试卷统计
function _getPublishGroups() {
_getPublishGroups = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/publish_groups.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _getPublishGroups.apply(this, arguments);
}
function polls_getPollsStatistics(_x7) {
return _getPollsStatistics.apply(this, arguments);
}
// 题库列表
function _getPollsStatistics() {
_getPollsStatistics = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/commit_result.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getPollsStatistics.apply(this, arguments);
}
function polls_getBrankList(_x8) {
return _getBrankList.apply(this, arguments);
}
// 保存题库
function _getBrankList() {
_getBrankList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/question_banks/bank_list.json", {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _getBrankList.apply(this, arguments);
}
function polls_saveBanks(_x9) {
return _saveBanks.apply(this, arguments);
}
// 获取班级列表 publish_modal
function _saveBanks() {
_saveBanks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/question_banks/save_banks.json", {
method: 'POST',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _saveBanks.apply(this, arguments);
}
function polls_getPollsCourses(_x10) {
return _getPollsCourses.apply(this, arguments);
}
// 试卷发送到课堂
// export async function postCoursesPublish(params: any) {
// return Fetch(`/api/courses/${params.coursesId}/exercises/publish.json`, {
// method: 'get',
// body: { ...params },
// });
// }
// 添加问卷
function _getPollsCourses() {
_getPollsCourses = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/polls/publish_modal.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _getPollsCourses.apply(this, arguments);
}
function addPolls(_x11) {
return _addPolls.apply(this, arguments);
}
function _addPolls() {
_addPolls = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/polls.json"), {
method: 'POST',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _addPolls.apply(this, arguments);
}
function polls_editPolls(_x12) {
return _editPolls.apply(this, arguments);
}
function _editPolls() {
_editPolls = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.categoryId, "/edit.json"), {
method: 'get'
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _editPolls.apply(this, arguments);
}
function putPolls(_x13) {
return _putPolls.apply(this, arguments);
}
// 编辑问卷选题
function _putPolls() {
_putPolls = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.pollsId, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _putPolls.apply(this, arguments);
}
function editPollsQuestion(_x14) {
return _editPollsQuestion.apply(this, arguments);
}
// 添加问卷选题
function _editPollsQuestion() {
_editPollsQuestion = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(fetch["a" /* default */])("/api/poll_questions/".concat(params.pollsId, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _editPollsQuestion.apply(this, arguments);
}
function addExerciseQuestion(_x15) {
return _addExerciseQuestion.apply(this, arguments);
}
// 删除问卷选题
function _addExerciseQuestion() {
_addExerciseQuestion = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(fetch["a" /* default */])("/api/polls/".concat(params.pollsId, "/poll_questions.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _addExerciseQuestion.apply(this, arguments);
}
function deletePollsQuestion(_x16) {
return _deletePollsQuestion.apply(this, arguments);
}
// 问卷问题上下排序
function _deletePollsQuestion() {
_deletePollsQuestion = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(fetch["a" /* default */])("/api/poll_questions/".concat(params.pollsId, ".json"), {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _deletePollsQuestion.apply(this, arguments);
}
function pollsMoveUpDown(_x17) {
return _pollsMoveUpDown.apply(this, arguments);
}
function _pollsMoveUpDown() {
_pollsMoveUpDown = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(fetch["a" /* default */])("/api/poll_questions/".concat(params.pollsId, "/up_down.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _pollsMoveUpDown.apply(this, arguments);
}
function polls_getExerciseBanks(_x18) {
return _getExerciseBanks.apply(this, arguments);
}
function _getExerciseBanks() {
_getExerciseBanks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_banks/".concat(params.topicId, ".json"), {
method: 'get'
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _getExerciseBanks.apply(this, arguments);
}
function putExerciseBanks(_x19) {
return _putExerciseBanks.apply(this, arguments);
}
function _putExerciseBanks() {
_putExerciseBanks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_banks/".concat(params.topicId, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _putExerciseBanks.apply(this, arguments);
}
function deleteExerciseBanks(_x20) {
return _deleteExerciseBanks.apply(this, arguments);
}
function _deleteExerciseBanks() {
_deleteExerciseBanks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_banks/".concat(params.topicId, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _deleteExerciseBanks.apply(this, arguments);
}
function deleteExerciseBanksQuestion(_x21) {
return _deleteExerciseBanksQuestion.apply(this, arguments);
}
// 问卷问题上下排序
function _deleteExerciseBanksQuestion() {
_deleteExerciseBanksQuestion = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_bank_questions/".concat(params.pollsId, ".json"), {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _deleteExerciseBanksQuestion.apply(this, arguments);
}
function exerciseBanksMoveUpDown(_x22) {
return _exerciseBanksMoveUpDown.apply(this, arguments);
}
function _exerciseBanksMoveUpDown() {
_exerciseBanksMoveUpDown = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", Object(fetch["a" /* default */])("/api/poll_questions/".concat(params.pollsId, "/up_down.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _exerciseBanksMoveUpDown.apply(this, arguments);
}
function addPollBankQuestions(_x23) {
return _addPollBankQuestions.apply(this, arguments);
}
function _addPollBankQuestions() {
_addPollBankQuestions = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", Object(fetch["a" /* default */])("/api/poll_bank_questions.json", {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _addPollBankQuestions.apply(this, arguments);
}
function putPollBankQuestions(_x24) {
return _putPollBankQuestions.apply(this, arguments);
}
function _putPollBankQuestions() {
_putPollBankQuestions = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", Object(fetch["a" /* default */])("/api/poll_bank_questions/".concat(params.pollsId, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _putPollBankQuestions.apply(this, arguments);
}
function putExerciseBankQuestions(_x25) {
return _putExerciseBankQuestions.apply(this, arguments);
}
function _putExerciseBankQuestions() {
_putExerciseBankQuestions = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_bank_questions/".concat(params.id, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _putExerciseBankQuestions.apply(this, arguments);
}
function addExerciseBankQuestions(_x26) {
return _addExerciseBankQuestions.apply(this, arguments);
}
function _addExerciseBankQuestions() {
_addExerciseBankQuestions = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_bank_questions.json", {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _addExerciseBankQuestions.apply(this, arguments);
}
function exercisesBanksMoveUpDown(_x27) {
return _exercisesBanksMoveUpDown.apply(this, arguments);
}
function _exercisesBanksMoveUpDown() {
_exercisesBanksMoveUpDown = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", Object(fetch["a" /* default */])("/api/exercise_bank_questions/".concat(params.exerciseId, "/up_down.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _exercisesBanksMoveUpDown.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/classrooms/polls.ts
function polls_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ polls_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var PollsModel = {
namespace: 'polls',
state: {
name: '普通试卷,随机试卷详情页面',
loading: true,
// 试卷作业列表
pollsList: {},
// 试卷统计
statisticsList: {},
// 试卷班级
pollsCoursesList: {},
// 题库
brankList: {},
actionTabs: {},
commonHeader: {},
pollSetting: {},
endGroups: {},
publishGroups: {},
exerciseBanks: {}
},
effects: {
// 试卷 - 作业列表
getPollsList: function getPollsList(_ref, _ref2) {
var payload = _ref.payload,
callback = _ref.callback;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee() {
var response;
return polls_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(polls_getPollsList, payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
pollsList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getCommonHeader: function getCommonHeader(_ref3, _ref4) {
var payload = _ref3.payload,
callback = _ref3.callback;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee2() {
var response;
return polls_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(polls_getCommonHeader, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
commonHeader: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context2.abrupt("return", response);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
// 试卷-统计
getPollsStatistics: function getPollsStatistics(_ref5, _ref6) {
var payload = _ref5.payload,
callback = _ref5.callback;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee3() {
var response;
return polls_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(polls_getPollsStatistics, payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
statisticsList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
// 试卷 题库列表
getBrankList: function getBrankList(_ref7, _ref8) {
var payload = _ref7.payload,
callback = _ref7.callback;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee4() {
var response;
return polls_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(polls_getBrankList, payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
brankList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
// 试卷保存题库
saveBanks: function saveBanks(_ref9, _ref10) {
var payload = _ref9.payload,
callback = _ref9.callback;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee5() {
var response;
return polls_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(polls_saveBanks, payload);
case 2:
response = _context5.sent;
return _context5.abrupt("return", response);
case 4:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
// 试卷课堂列表
getPollsCourses: function getPollsCourses(_ref11, _ref12) {
var payload = _ref11.payload,
callback = _ref11.callback;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee6() {
var response;
return polls_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(polls_getPollsCourses, payload);
case 2:
response = _context6.sent;
_context6.next = 5;
return put({
type: 'save',
payload: {
pollsCoursesList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context6.abrupt("return", response);
case 6:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
getPollsSetting: function getPollsSetting(_ref13, _ref14) {
var payload = _ref13.payload,
callback = _ref13.callback;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee7() {
var response;
return polls_regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(polls_getPollsSetting, payload);
case 2:
response = _context7.sent;
_context7.next = 5;
return put({
type: 'save',
payload: {
pollSetting: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context7.abrupt("return", response);
case 6:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
editPolls: function editPolls(_ref15, _ref16) {
var payload = _ref15.payload,
callback = _ref15.callback;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee8() {
var response;
return polls_regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(polls_editPolls, payload);
case 2:
response = _context8.sent;
_context8.next = 5;
return put({
type: 'save',
payload: {
editData: Object(objectSpread2["a" /* default */])({}, JSON.parse(JSON.stringify(response)))
}
});
case 5:
return _context8.abrupt("return", response);
case 6:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
getEndGroups: function getEndGroups(_ref17, _ref18) {
var payload = _ref17.payload,
callback = _ref17.callback;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee9() {
var response;
return polls_regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(polls_getEndGroups, payload);
case 2:
response = _context9.sent;
_context9.next = 5;
return put({
type: 'save',
payload: {
endGroups: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context9.abrupt("return", response);
case 6:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
getPublishGroups: function getPublishGroups(_ref19, _ref20) {
var payload = _ref19.payload,
callback = _ref19.callback;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee10() {
var response;
return polls_regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(polls_getPublishGroups, payload);
case 2:
response = _context10.sent;
_context10.next = 5;
return put({
type: 'save',
payload: {
publishGroups: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context10.abrupt("return", response);
case 6:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
getExerciseBanks: function getExerciseBanks(_ref21, _ref22) {
var payload = _ref21.payload,
callback = _ref21.callback;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee11() {
var response;
return polls_regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(polls_getExerciseBanks, payload);
case 2:
response = _context11.sent;
_context11.next = 5;
return put({
type: 'save',
payload: {
exerciseBanks: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context11.abrupt("return", response);
case 6:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref23, _ref24) {
var payload = _ref23.payload;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/polls_regeneratorRuntime().mark(function _callee12() {
return polls_regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context12.stop();
}
}, _callee12);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref25) {
var dispatch = _ref25.dispatch,
history = _ref25.history;
}
}
};
/* harmony default export */ var polls = __webpack_exports__["a"] = (PollsModel);
/***/ }),
/***/ "Cg3G":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/internals/collection-delete-all.js ***!
\*****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
// https://github.com/tc39/collection-methods
module.exports = function (/* ...elements */) {
var collection = anObject(this);
var remover = aFunction(collection['delete']);
var allDeleted = true;
var wasDeleted;
for (var k = 0, len = arguments.length; k < len; k++) {
wasDeleted = remover.call(collection, arguments[k]);
allDeleted = allDeleted && wasDeleted;
}
return !!allDeleted;
};
/***/ }),
/***/ "CjYj":
/*!*****************************************!*\
!*** ./node_modules/has-proto/index.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var test = {
__proto__: null,
foo: {}
};
var $Object = Object;
/** @type {import('.')} */
module.exports = function hasProto() {
// @ts-expect-error: TS errors on an inherited property for some reason
return { __proto__: test }.foo === test.foo
&& !(test instanceof $Object);
};
/***/ }),
/***/ "Co1j":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.is-superset-of.js ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.isSupersetOf` method
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSupersetOf
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
isSupersetOf: function isSupersetOf(iterable) {
var set = anObject(this);
var hasCheck = aFunction(set.has);
return !iterate(iterable, function (value) {
if (hasCheck.call(set, value) === false) return iterate.stop();
}).stopped;
}
});
/***/ }),
/***/ "CsgD":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.expm1.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "jrUv");
// `Math.expm1` method
// https://tc39.github.io/ecma262/#sec-math.expm1
$({ target: 'Math', stat: true, forced: expm1 != Math.expm1 }, { expm1: expm1 });
/***/ }),
/***/ "CyXQ":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/to-index.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
// `ToIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-toindex
module.exports = function (it) {
if (it === undefined) return 0;
var number = toInteger(it);
var length = toLength(number);
if (number !== length) throw RangeError('Wrong length or index');
return length;
};
/***/ }),
/***/ "D3zA":
/*!*********************************************!*\
!*** ./node_modules/function-bind/index.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var implementation = __webpack_require__(/*! ./implementation */ "aI7X");
module.exports = Function.prototype.bind || implementation;
/***/ }),
/***/ "DEfu":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/es.json.to-string-tag.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
// JSON[@@toStringTag] property
// https://tc39.github.io/ecma262/#sec-json-@@tostringtag
setToStringTag(global.JSON, 'JSON', true);
/***/ }),
/***/ "DMt2":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/string-pad.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/tc39/proposal-string-pad-start-end
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var repeat = __webpack_require__(/*! ../internals/string-repeat */ "EUja");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var ceil = Math.ceil;
// `String.prototype.{ padStart, padEnd }` methods implementation
var createMethod = function (IS_END) {
return function ($this, maxLength, fillString) {
var S = String(requireObjectCoercible($this));
var stringLength = S.length;
var fillStr = fillString === undefined ? ' ' : String(fillString);
var intMaxLength = toLength(maxLength);
var fillLen, stringFiller;
if (intMaxLength <= stringLength || fillStr == '') return S;
fillLen = intMaxLength - stringLength;
stringFiller = repeat.call(fillStr, ceil(fillLen / fillStr.length));
if (stringFiller.length > fillLen) stringFiller = stringFiller.slice(0, fillLen);
return IS_END ? S + stringFiller : stringFiller + S;
};
};
module.exports = {
// `String.prototype.padStart` method
// https://tc39.github.io/ecma262/#sec-string.prototype.padstart
start: createMethod(false),
// `String.prototype.padEnd` method
// https://tc39.github.io/ecma262/#sec-string.prototype.padend
end: createMethod(true)
};
/***/ }),
/***/ "DPsx":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/ie8-dom-define.js ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "zBJ4");
// Thank's IE8 for his funny defineProperty
module.exports = !DESCRIPTORS && !fails(function () {
return Object.defineProperty(createElement('div'), 'a', {
get: function () { return 7; }
}).a != 7;
});
/***/ }),
/***/ "DSFK":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js ***!
\*******************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayWithHoles; });
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
/***/ }),
/***/ "DSU0":
/*!****************************************!*\
!*** ./node_modules/es-errors/type.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @type {import('./type')} */
module.exports = TypeError;
/***/ }),
/***/ "DTth":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/native-url.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var ITERATOR = wellKnownSymbol('iterator');
module.exports = !fails(function () {
var url = new URL('b?a=1&b=2&c=3', 'http://a');
var searchParams = url.searchParams;
var result = '';
url.pathname = 'c%20d';
searchParams.forEach(function (value, key) {
searchParams['delete']('b');
result += key + value;
});
return (IS_PURE && !url.toJSON)
|| !searchParams.sort
|| url.href !== 'http://a/c%20d?a=1&c=3'
|| searchParams.get('c') !== '3'
|| String(new URLSearchParams('?a=1')) !== 'a=1'
|| !searchParams[ITERATOR]
// throws in Edge
|| new URL('https://a@b').username !== 'a'
|| new URLSearchParams(new URLSearchParams('a=b')).get('a') !== 'b'
// not punycoded in Edge
|| new URL('http://тест').host !== 'xn--e1aybc'
// not escaped in Chrome 62-
|| new URL('http://a#б').hash !== '#%D0%B1'
// fails in Chrome 66-
|| result !== 'a1c3'
// throws in Safari
|| new URL('http://x', undefined).host !== 'x';
});
/***/ }),
/***/ "DUzY":
/*!***************************************************************************************!*\
!*** ./node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js ***!
\***************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v17.0.2
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;
if("function"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x("react.element");c=x("react.portal");d=x("react.fragment");e=x("react.strict_mode");f=x("react.profiler");g=x("react.provider");h=x("react.context");k=x("react.forward_ref");l=x("react.suspense");m=x("react.suspense_list");n=x("react.memo");p=x("react.lazy");q=x("react.block");r=x("react.server.block");u=x("react.fundamental");v=x("react.debug_trace_mode");w=x("react.legacy_hidden")}
function y(a){if("object"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;
exports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};
exports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||"object"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};
exports.typeOf=y;
/***/ }),
/***/ "DhMN":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.string.match-all.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// TODO: Remove from `core-js@4`
__webpack_require__(/*! ./es.string.match-all */ "ofBz");
/***/ }),
/***/ "DrvE":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.promise.any.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "8GlL");
var perform = __webpack_require__(/*! ../internals/perform */ "5mdu");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var PROMISE_ANY_ERROR = 'No one promise resolved';
// `Promise.any` method
// https://github.com/tc39/proposal-promise-any
$({ target: 'Promise', stat: true }, {
any: function any(iterable) {
var C = this;
var capability = newPromiseCapabilityModule.f(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var promiseResolve = aFunction(C.resolve);
var errors = [];
var counter = 0;
var remaining = 1;
var alreadyResolved = false;
iterate(iterable, function (promise) {
var index = counter++;
var alreadyRejected = false;
errors.push(undefined);
remaining++;
promiseResolve.call(C, promise).then(function (value) {
if (alreadyRejected || alreadyResolved) return;
alreadyResolved = true;
resolve(value);
}, function (e) {
if (alreadyRejected || alreadyResolved) return;
alreadyRejected = true;
errors[index] = e;
--remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));
});
});
--remaining || reject(new (getBuiltIn('AggregateError'))(errors, PROMISE_ANY_ERROR));
});
if (result.error) reject(result.value);
return capability.promise;
}
});
/***/ }),
/***/ "E+IA":
/*!************************************************!*\
!*** ./node_modules/hash.js/lib/hash/sha/1.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ "w8CP");
var common = __webpack_require__(/*! ../common */ "7ckf");
var shaCommon = __webpack_require__(/*! ./common */ "qlaj");
var rotl32 = utils.rotl32;
var sum32 = utils.sum32;
var sum32_5 = utils.sum32_5;
var ft_1 = shaCommon.ft_1;
var BlockHash = common.BlockHash;
var sha1_K = [
0x5A827999, 0x6ED9EBA1,
0x8F1BBCDC, 0xCA62C1D6
];
function SHA1() {
if (!(this instanceof SHA1))
return new SHA1();
BlockHash.call(this);
this.h = [
0x67452301, 0xefcdab89, 0x98badcfe,
0x10325476, 0xc3d2e1f0 ];
this.W = new Array(80);
}
utils.inherits(SHA1, BlockHash);
module.exports = SHA1;
SHA1.blockSize = 512;
SHA1.outSize = 160;
SHA1.hmacStrength = 80;
SHA1.padLength = 64;
SHA1.prototype._update = function _update(msg, start) {
var W = this.W;
for (var i = 0; i < 16; i++)
W[i] = msg[start + i];
for(; i < W.length; i++)
W[i] = rotl32(W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16], 1);
var a = this.h[0];
var b = this.h[1];
var c = this.h[2];
var d = this.h[3];
var e = this.h[4];
for (i = 0; i < W.length; i++) {
var s = ~~(i / 20);
var t = sum32_5(rotl32(a, 5), ft_1(s, b, c, d), e, W[i], sha1_K[s]);
e = d;
d = c;
c = rotl32(b, 30);
b = a;
a = t;
}
this.h[0] = sum32(this.h[0], a);
this.h[1] = sum32(this.h[1], b);
this.h[2] = sum32(this.h[2], c);
this.h[3] = sum32(this.h[3], d);
this.h[4] = sum32(this.h[4], e);
};
SHA1.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'big');
else
return utils.split32(this.h, 'big');
};
/***/ }),
/***/ "E5NM":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.string.big.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.big` method
// https://tc39.github.io/ecma262/#sec-string.prototype.big
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('big') }, {
big: function big() {
return createHTML(this, 'big', '', '');
}
});
/***/ }),
/***/ "E9XD":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.array.reduce.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "1Y/n").left;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var STRICT_METHOD = arrayMethodIsStrict('reduce');
var USES_TO_LENGTH = arrayMethodUsesToLength('reduce', { 1: 0 });
// `Array.prototype.reduce` method
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
$({ target: 'Array', proto: true, forced: !STRICT_METHOD || !USES_TO_LENGTH }, {
reduce: function reduce(callbackfn /* , initialValue */) {
return $reduce(this, callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "EAZv":
/*!**************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/InfoCircleOutlined.js ***!
\**************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var InfoCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z" } }] }, "name": "info-circle", "theme": "outlined" };
exports.default = InfoCircleOutlined;
/***/ }),
/***/ "ECub":
/*!*********************************************************!*\
!*** ./node_modules/antd/es/empty/index.js + 2 modules ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var context = __webpack_require__("H84U");
// EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules
var LocaleReceiver = __webpack_require__("YMnH");
// CONCATENATED MODULE: ./node_modules/antd/es/empty/empty.js
var empty_Empty = function Empty() {
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls;
var prefixCls = getPrefixCls('empty-img-default');
return /*#__PURE__*/react["createElement"]("svg", {
className: prefixCls,
width: "184",
height: "152",
viewBox: "0 0 184 152",
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/react["createElement"]("g", {
fill: "none",
fillRule: "evenodd"
}, /*#__PURE__*/react["createElement"]("g", {
transform: "translate(24 31.67)"
}, /*#__PURE__*/react["createElement"]("ellipse", {
className: "".concat(prefixCls, "-ellipse"),
cx: "67.797",
cy: "106.89",
rx: "67.797",
ry: "12.668"
}), /*#__PURE__*/react["createElement"]("path", {
className: "".concat(prefixCls, "-path-1"),
d: "M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z"
}), /*#__PURE__*/react["createElement"]("path", {
className: "".concat(prefixCls, "-path-2"),
d: "M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",
transform: "translate(13.56)"
}), /*#__PURE__*/react["createElement"]("path", {
className: "".concat(prefixCls, "-path-3"),
d: "M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z"
}), /*#__PURE__*/react["createElement"]("path", {
className: "".concat(prefixCls, "-path-4"),
d: "M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z"
})), /*#__PURE__*/react["createElement"]("path", {
className: "".concat(prefixCls, "-path-5"),
d: "M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z"
}), /*#__PURE__*/react["createElement"]("g", {
className: "".concat(prefixCls, "-g"),
transform: "translate(149.65 15.383)"
}, /*#__PURE__*/react["createElement"]("ellipse", {
cx: "20.654",
cy: "3.167",
rx: "2.849",
ry: "2.815"
}), /*#__PURE__*/react["createElement"]("path", {
d: "M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"
}))));
};
/* harmony default export */ var empty = (empty_Empty);
// CONCATENATED MODULE: ./node_modules/antd/es/empty/simple.js
var simple_Simple = function Simple() {
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls;
var prefixCls = getPrefixCls('empty-img-simple');
return /*#__PURE__*/react["createElement"]("svg", {
className: prefixCls,
width: "64",
height: "41",
viewBox: "0 0 64 41",
xmlns: "http://www.w3.org/2000/svg"
}, /*#__PURE__*/react["createElement"]("g", {
transform: "translate(0 1)",
fill: "none",
fillRule: "evenodd"
}, /*#__PURE__*/react["createElement"]("ellipse", {
className: "".concat(prefixCls, "-ellipse"),
cx: "32",
cy: "33",
rx: "32",
ry: "7"
}), /*#__PURE__*/react["createElement"]("g", {
className: "".concat(prefixCls, "-g"),
fillRule: "nonzero"
}, /*#__PURE__*/react["createElement"]("path", {
d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"
}), /*#__PURE__*/react["createElement"]("path", {
d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",
className: "".concat(prefixCls, "-path")
}))));
};
/* harmony default export */ var simple = (simple_Simple);
// CONCATENATED MODULE: ./node_modules/antd/es/empty/index.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var defaultEmptyImg = /*#__PURE__*/react["createElement"](empty, null);
var simpleEmptyImg = /*#__PURE__*/react["createElement"](simple, null);
var es_empty_Empty = function Empty(props) {
return /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], null, function (_ref) {
var getPrefixCls = _ref.getPrefixCls,
direction = _ref.direction;
var className = props.className,
customizePrefixCls = props.prefixCls,
_props$image = props.image,
image = _props$image === void 0 ? defaultEmptyImg : _props$image,
description = props.description,
children = props.children,
imageStyle = props.imageStyle,
restProps = __rest(props, ["className", "prefixCls", "image", "description", "children", "imageStyle"]);
return /*#__PURE__*/react["createElement"](LocaleReceiver["a" /* default */], {
componentName: "Empty"
}, function (locale) {
var _classNames;
var prefixCls = getPrefixCls('empty', customizePrefixCls);
var des = typeof description !== 'undefined' ? description : locale.description;
var alt = typeof des === 'string' ? des : 'empty';
var imageNode = null;
if (typeof image === 'string') {
imageNode = /*#__PURE__*/react["createElement"]("img", {
alt: alt,
src: image
});
} else {
imageNode = image;
}
return /*#__PURE__*/react["createElement"]("div", extends_default()({
className: classnames_default()(prefixCls, (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-normal"), image === simpleEmptyImg), defineProperty_default()(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className)
}, restProps), /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-image"),
style: imageStyle
}, imageNode), des && /*#__PURE__*/react["createElement"]("p", {
className: "".concat(prefixCls, "-description")
}, des), children && /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-footer")
}, children));
});
});
};
es_empty_Empty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg;
es_empty_Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg;
/* harmony default export */ var es_empty = __webpack_exports__["a"] = (es_empty_Empty);
/***/ }),
/***/ "EDT/":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.composite-symbol.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getCompositeKeyNode = __webpack_require__(/*! ../internals/composite-key */ "p5mE");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
// https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey
$({ global: true }, {
compositeSymbol: function compositeSymbol() {
if (arguments.length === 1 && typeof arguments[0] === 'string') return getBuiltIn('Symbol')['for'](arguments[0]);
return getCompositeKeyNode.apply(null, arguments).get('symbol', getBuiltIn('Symbol'));
}
});
/***/ }),
/***/ "EE3K":
/*!***************************************************!*\
!*** ./node_modules/rc-notification/es/Notice.js ***!
\***************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Notice; });
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "rePB");
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "1OyB");
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "vuIU");
/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "Ji7U");
/* harmony import */ var _babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/possibleConstructorReturn */ "md7G");
/* harmony import */ var _babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/getPrototypeOf */ "foSv");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-dom */ "i8i4");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! classnames */ "TSYQ");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_8__);
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function () { var Super = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = Object(_babel_runtime_helpers_esm_getPrototypeOf__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return Object(_babel_runtime_helpers_esm_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(this, result); }; }
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
var Notice = /*#__PURE__*/function (_Component) {
Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Notice, _Component);
var _super = _createSuper(Notice);
function Notice() {
var _this;
Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(this, Notice);
_this = _super.apply(this, arguments);
_this.closeTimer = null;
_this.close = function (e) {
if (e) {
e.stopPropagation();
}
_this.clearCloseTimer();
var onClose = _this.props.onClose;
if (onClose) {
onClose();
}
};
_this.startCloseTimer = function () {
if (_this.props.duration) {
_this.closeTimer = window.setTimeout(function () {
_this.close();
}, _this.props.duration * 1000);
}
};
_this.clearCloseTimer = function () {
if (_this.closeTimer) {
clearTimeout(_this.closeTimer);
_this.closeTimer = null;
}
};
return _this;
}
Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Notice, [{
key: "componentDidMount",
value: function componentDidMount() {
this.startCloseTimer();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
if (this.props.duration !== prevProps.duration || this.props.update) {
this.restartCloseTimer();
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.clearCloseTimer();
}
}, {
key: "restartCloseTimer",
value: function restartCloseTimer() {
this.clearCloseTimer();
this.startCloseTimer();
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var _this$props = this.props,
prefixCls = _this$props.prefixCls,
className = _this$props.className,
closable = _this$props.closable,
closeIcon = _this$props.closeIcon,
style = _this$props.style,
onClick = _this$props.onClick,
children = _this$props.children,
holder = _this$props.holder;
var componentClass = "".concat(prefixCls, "-notice");
var dataOrAriaAttributeProps = Object.keys(this.props).reduce(function (acc, key) {
if (key.substr(0, 5) === 'data-' || key.substr(0, 5) === 'aria-' || key === 'role') {
acc[key] = _this2.props[key];
}
return acc;
}, {});
var node = react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", Object.assign({
className: classnames__WEBPACK_IMPORTED_MODULE_8___default()(componentClass, className, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, "".concat(componentClass, "-closable"), closable)),
style: style,
onMouseEnter: this.clearCloseTimer,
onMouseLeave: this.startCloseTimer,
onClick: onClick
}, dataOrAriaAttributeProps), react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("div", {
className: "".concat(componentClass, "-content")
}, children), closable ? react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("a", {
tabIndex: 0,
onClick: this.close,
className: "".concat(componentClass, "-close")
}, closeIcon || react__WEBPACK_IMPORTED_MODULE_6___default.a.createElement("span", {
className: "".concat(componentClass, "-close-x")
})) : null);
if (holder) {
return react_dom__WEBPACK_IMPORTED_MODULE_7___default.a.createPortal(node, holder);
}
return node;
}
}]);
return Notice;
}(react__WEBPACK_IMPORTED_MODULE_6__["Component"]);
Notice.defaultProps = {
onClose: function onClose() {},
duration: 1.5,
style: {
right: '50%'
}
};
/***/ }),
/***/ "ENF9":
/*!*****************************************************!*\
!*** ./node_modules/core-js/modules/es.weak-map.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "4syw");
var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "8YOa");
var collection = __webpack_require__(/*! ../internals/collection */ "bWFh");
var collectionWeak = __webpack_require__(/*! ../internals/collection-weak */ "rKzb");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var enforceIternalState = __webpack_require__(/*! ../internals/internal-state */ "afO8").enforce;
var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "f5p1");
var IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;
var isExtensible = Object.isExtensible;
var InternalWeakMap;
var wrapper = function (init) {
return function WeakMap() {
return init(this, arguments.length ? arguments[0] : undefined);
};
};
// `WeakMap` constructor
// https://tc39.github.io/ecma262/#sec-weakmap-constructor
var $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak);
// IE11 WeakMap frozen keys fix
// We can't use feature detection because it crash some old IE builds
// https://github.com/zloirock/core-js/issues/485
if (NATIVE_WEAK_MAP && IS_IE11) {
InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);
InternalMetadataModule.REQUIRED = true;
var WeakMapPrototype = $WeakMap.prototype;
var nativeDelete = WeakMapPrototype['delete'];
var nativeHas = WeakMapPrototype.has;
var nativeGet = WeakMapPrototype.get;
var nativeSet = WeakMapPrototype.set;
redefineAll(WeakMapPrototype, {
'delete': function (key) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceIternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
return nativeDelete.call(this, key) || state.frozen['delete'](key);
} return nativeDelete.call(this, key);
},
has: function has(key) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceIternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
return nativeHas.call(this, key) || state.frozen.has(key);
} return nativeHas.call(this, key);
},
get: function get(key) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceIternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key);
} return nativeGet.call(this, key);
},
set: function set(key, value) {
if (isObject(key) && !isExtensible(key)) {
var state = enforceIternalState(this);
if (!state.frozen) state.frozen = new InternalWeakMap();
nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value);
} else nativeSet.call(this, key, value);
return this;
}
});
}
/***/ }),
/***/ "ESPI":
/*!**************************************************************!*\
!*** ./node_modules/@ant-design/icons/InfoCircleOutlined.js ***!
\**************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _InfoCircleOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/InfoCircleOutlined */ "KtWR"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _InfoCircleOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "EUja":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/string-repeat.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
// `String.prototype.repeat` method implementation
// https://tc39.github.io/ecma262/#sec-string.prototype.repeat
module.exports = ''.repeat || function repeat(count) {
var str = String(requireObjectCoercible(this));
var result = '';
var n = toInteger(count);
if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions');
for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str;
return result;
};
/***/ }),
/***/ "EbDI":
/*!****************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/iterableToArray.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "EdiO":
/*!******************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
\******************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
}
module.exports = _arrayLikeToArray;
/***/ }),
/***/ "Em2t":
/*!***********************************************!*\
!*** ./node_modules/lodash/_stringToArray.js ***!
\***********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var asciiToArray = __webpack_require__(/*! ./_asciiToArray */ "bahg"),
hasUnicode = __webpack_require__(/*! ./_hasUnicode */ "quyA"),
unicodeToArray = __webpack_require__(/*! ./_unicodeToArray */ "0JQy");
/**
* Converts `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function stringToArray(string) {
return hasUnicode(string)
? unicodeToArray(string)
: asciiToArray(string);
}
module.exports = stringToArray;
/***/ }),
/***/ "EnZy":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.split.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "14Sl");
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "ROdP");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "iqWW");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var callRegExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "FMNM");
var regexpExec = __webpack_require__(/*! ../internals/regexp-exec */ "kmMV");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var arrayPush = [].push;
var min = Math.min;
var MAX_UINT32 = 0xFFFFFFFF;
// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
var SUPPORTS_Y = !fails(function () { return !RegExp(MAX_UINT32, 'y'); });
// @@split logic
fixRegExpWellKnownSymbolLogic('split', 2, function (SPLIT, nativeSplit, maybeCallNative) {
var internalSplit;
if (
'abbc'.split(/(b)*/)[1] == 'c' ||
'test'.split(/(?:)/, -1).length != 4 ||
'ab'.split(/(?:ab)*/).length != 2 ||
'.'.split(/(.?)(.?)/).length != 4 ||
'.'.split(/()()/).length > 1 ||
''.split(/.?/).length
) {
// based on es5-shim implementation, need to rework it
internalSplit = function (separator, limit) {
var string = String(requireObjectCoercible(this));
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
if (lim === 0) return [];
if (separator === undefined) return [string];
// If `separator` is not a regex, use native split
if (!isRegExp(separator)) {
return nativeSplit.call(string, separator, lim);
}
var output = [];
var flags = (separator.ignoreCase ? 'i' : '') +
(separator.multiline ? 'm' : '') +
(separator.unicode ? 'u' : '') +
(separator.sticky ? 'y' : '');
var lastLastIndex = 0;
// Make `global` and avoid `lastIndex` issues by working with a copy
var separatorCopy = new RegExp(separator.source, flags + 'g');
var match, lastIndex, lastLength;
while (match = regexpExec.call(separatorCopy, string)) {
lastIndex = separatorCopy.lastIndex;
if (lastIndex > lastLastIndex) {
output.push(string.slice(lastLastIndex, match.index));
if (match.length > 1 && match.index < string.length) arrayPush.apply(output, match.slice(1));
lastLength = match[0].length;
lastLastIndex = lastIndex;
if (output.length >= lim) break;
}
if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop
}
if (lastLastIndex === string.length) {
if (lastLength || !separatorCopy.test('')) output.push('');
} else output.push(string.slice(lastLastIndex));
return output.length > lim ? output.slice(0, lim) : output;
};
// Chakra, V8
} else if ('0'.split(undefined, 0).length) {
internalSplit = function (separator, limit) {
return separator === undefined && limit === 0 ? [] : nativeSplit.call(this, separator, limit);
};
} else internalSplit = nativeSplit;
return [
// `String.prototype.split` method
// https://tc39.github.io/ecma262/#sec-string.prototype.split
function split(separator, limit) {
var O = requireObjectCoercible(this);
var splitter = separator == undefined ? undefined : separator[SPLIT];
return splitter !== undefined
? splitter.call(separator, O, limit)
: internalSplit.call(String(O), separator, limit);
},
// `RegExp.prototype[@@split]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@split
//
// NOTE: This cannot be properly polyfilled in engines that don't support
// the 'y' flag.
function (regexp, limit) {
var res = maybeCallNative(internalSplit, regexp, this, limit, internalSplit !== nativeSplit);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var C = speciesConstructor(rx, RegExp);
var unicodeMatching = rx.unicode;
var flags = (rx.ignoreCase ? 'i' : '') +
(rx.multiline ? 'm' : '') +
(rx.unicode ? 'u' : '') +
(SUPPORTS_Y ? 'y' : 'g');
// ^(? + rx + ) is needed, in combination with some S slicing, to
// simulate the 'y' flag.
var splitter = new C(SUPPORTS_Y ? rx : '^(?:' + rx.source + ')', flags);
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
if (lim === 0) return [];
if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : [];
var p = 0;
var q = 0;
var A = [];
while (q < S.length) {
splitter.lastIndex = SUPPORTS_Y ? q : 0;
var z = callRegExpExec(splitter, SUPPORTS_Y ? S : S.slice(q));
var e;
if (
z === null ||
(e = min(toLength(splitter.lastIndex + (SUPPORTS_Y ? 0 : q)), S.length)) === p
) {
q = advanceStringIndex(S, q, unicodeMatching);
} else {
A.push(S.slice(p, q));
if (A.length === lim) return A;
for (var i = 1; i <= z.length - 1; i++) {
A.push(z[i]);
if (A.length === lim) return A;
}
q = p = e;
}
}
A.push(S.slice(p));
return A;
}
];
}, !SUPPORTS_Y);
/***/ }),
/***/ "Ep9I":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/same-value.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
// `SameValue` abstract operation
// https://tc39.github.io/ecma262/#sec-samevalue
module.exports = Object.is || function is(x, y) {
// eslint-disable-next-line no-self-compare
return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;
};
/***/ }),
/***/ "Eqjn":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.define-getter.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var FORCED = __webpack_require__(/*! ../internals/object-prototype-accessors-forced */ "6x0u");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
// `Object.prototype.__defineGetter__` method
// https://tc39.github.io/ecma262/#sec-object.prototype.__defineGetter__
if (DESCRIPTORS) {
$({ target: 'Object', proto: true, forced: FORCED }, {
__defineGetter__: function __defineGetter__(P, getter) {
definePropertyModule.f(toObject(this), P, { get: aFunction(getter), enumerable: true, configurable: true });
}
});
}
/***/ }),
/***/ "ErOA":
/*!****************************!*\
!*** ./src/utils/fetch.ts ***!
\****************************/
/*! exports provided: parseParams, default, get, getqq, post, put, del */
/*! exports used: default, parseParams */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return parseParams; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return request; });
/* unused harmony export get */
/* unused harmony export getqq */
/* unused harmony export post */
/* unused harmony export put */
/* unused harmony export del */
/* harmony import */ var antd_es_message_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/message/style */ "miYZ");
/* harmony import */ var antd_es_message__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/message */ "tsqr");
/* harmony import */ var antd_es_modal_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd/es/modal/style */ "2qtc");
/* harmony import */ var antd_es_modal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd/es/modal */ "kLXV");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var antd_es_notification_style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd/es/notification/style */ "/xke");
/* harmony import */ var antd_es_notification__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd/es/notification */ "TeRw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var dva__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! dva */ "LpSC");
/* harmony import */ var dva__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(dva__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./env */ "m3rI");
/* harmony import */ var hash_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! hash.js */ "fZJM");
/* harmony import */ var hash_js__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(hash_js__WEBPACK_IMPORTED_MODULE_10__);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! umi */ "9kvl");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./util */ "1vsH");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var modalConfirm;
var codeMessage = {
200: '服务器成功返回请求的数据。',
201: '新建或修改数据成功。',
202: '一个请求已经进入后台排队(异步任务)。',
204: '删除数据成功。',
400: '发出的请求有错误,服务器没有进行新建或修改数据的操作。',
401: '用户没有权限(令牌、用户名、密码错误)。',
403: '用户得到授权,但是访问是被禁止的。',
404: '发出的请求针对的是不存在的记录,服务器没有进行操作。',
406: '请求的格式不可得。',
410: '请求的资源被永久删除,且不会再得到的。',
422: '当创建一个对象时,发生一个验证错误。',
500: '服务器发生错误,请检查服务器。',
502: '网关错误。',
503: '服务不可用,服务器暂时过载或维护。',
504: '网关超时。'
};
var checkStatus = /*#__PURE__*/function () {
var _ref = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(response, responseData) {
var errortext, text, resJson, error;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
if (!(response.status >= 200 && response.status < 300)) {
_context.next = 2;
break;
}
return _context.abrupt("return", response);
case 2:
errortext = codeMessage[response.status] || response.statusText;
resJson = response.json();
_context.next = 6;
return resJson.then(function (resolve, reject) {
setTimeout(function () {
var app = Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])();
// reportData(ENV.REPORT_SERVER + "/report/error", {
// code: resolve.code,
// status: response.status,
// message: resolve.message,
// requestData: { ...responseData, cookie: document.cookie },
// responseData: { ...response, ...resolve },
// user: app._store.getState().user.userInfo
// })
}, 400);
text = resolve.message;
antd_es_notification__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"].error({
style: {
wordBreak: 'break-all'
},
// duration: null,
message: resolve.message || "\u8BF7\u6C42\u9519\u8BEF ".concat(response.status, ": ").concat(response.message),
description: resolve.message ? '' : errortext
});
});
case 6:
error = new Error(errortext);
error.name = response.status;
error.response = response;
throw {
data: response,
code: response.status,
message: text || errortext
};
case 10:
case "end":
return _context.stop();
}
}, _callee);
}));
return function checkStatus(_x, _x2) {
return _ref.apply(this, arguments);
};
}();
var cachedSave = function cachedSave(response, hashcode) {
var contentType = response.headers.get('Content-Type');
if (contentType && contentType.match(/application\/json/i)) {
response.clone().text().then(function () {
// sessionStorage.setItem(hashcode, content)
// sessionStorage.setItem(`${hashcode}:timestamp`, Date.now())
});
}
return response;
};
var parseParams = function parseParams(param) {
param = param || {};
// param.domain = window.location.host
var paramStr = '';
var _loop = function _loop(_key) {
if (typeof param[_key] === 'object') {
if (Array.isArray(param[_key])) {
param[_key].forEach(function (element, k) {
paramStr += '&' + _key + "[]=" + element;
});
}
} else {
// if ((param[key]) || param[key] === 0)
paramStr += '&' + _key + '=' + param[_key];
}
};
for (var _key in param) {
_loop(_key);
}
return paramStr.substr(1);
};
function request(url, option, flag) {
var _user$eduUserInfo;
!option.method ? option.method = 'get' : '';
option.method = option.method.toUpperCase();
option.mode = 'cors';
var options = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, option);
// options.domain = window.location.host
var fingerprint = url + (options.body ? JSON.stringify(options.body) : '');
var hashcode = hash_js__WEBPACK_IMPORTED_MODULE_10___default.a.sha256().update(fingerprint).digest('hex');
var defaultOptions = {
credentials: 'include',
withCredentials: true
};
var newOptions = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, defaultOptions), options);
var eduHeader = {
'X-Edu-Signature': '47ceb295f3bf94da0b47e4876b7bbd59',
'X-Edu-Timestamp': '1724744339707',
'X-Edu-Type': 'pc'
};
if (newOptions.method === 'POST' || newOptions.method === 'PUT' || newOptions.method === 'PATCH' || newOptions.method === 'DELETE') {
if (!flag) {
newOptions.headers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({
Accept: 'application/json',
'Content-Type': 'application/json; charset=utf-8'
}, newOptions.headers);
newOptions.body = JSON.stringify(options.body);
} else {
newOptions.headers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, newOptions.headers);
newOptions.body = options.body;
}
}
if (newOptions.method == 'GET') {
newOptions.headers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({
Accept: 'application/json',
'Content-Type': 'application/json; charset=utf-8'
}, eduHeader), newOptions.headers);
url += '?' + parseParams(options.params);
}
var _getDvaApp$_store$get = Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get.user; // if(user?.eduUserInfo?.token){
// newOptions.headers={
// ...newOptions.headers,
// Authorization:user?.eduUserInfo?.token
// }
// }
// newOptions.headers.Authorization =
// 'Bearer 09cb06de7874a0cfae0608ba5126b3b30dcb5d2a'
var token = (user === null || user === void 0 ? void 0 : (_user$eduUserInfo = user.eduUserInfo) === null || _user$eduUserInfo === void 0 ? void 0 : _user$eduUserInfo.token) || Object(_util__WEBPACK_IMPORTED_MODULE_12__[/* getCookie */ "i"])("logintrustie");
if (token) {
newOptions.headers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, newOptions.headers), {}, {
Authorization: token
});
}
var expirys = options.expirys && 60;
/**
* @description: 枚举出请求数据格式类型
* @param {type} 枚举类型
* @return:
*/
var ContentType = /*#__PURE__*/function (ContentType) {
ContentType["json"] = "application/json;charset=UTF-8";
ContentType["form"] = "application/x-www-form-urlencoded; charset=UTF-8";
return ContentType;
}({});
/**
* @description: 枚举request请求的method方法
* @param {type} 枚举类型
* @return:
*/
var HttpMethod = /*#__PURE__*/function (HttpMethod) {
HttpMethod["get"] = "GET";
HttpMethod["post"] = "POST";
return HttpMethod;
}({});
/**
* @description: 声明请求头header的类型
* @param {type}
* @return:
*/
/**
* @description: 声明fetch请求参数配置
* @param {type}
* @return:
*/
// if (options.expirys !== false) {
// const cached = sessionStorage.getItem(hashcode)
// const whenCached = sessionStorage.getItem(`${hashcode}:timestamp`)
// if (cached !== null && whenCached !== null) {
// const age = (Date.now() - whenCached) / 1000
// if (age < expirys) {
// const response = new Response(new Blob([cached]))
// return response.json()
// }
// sessionStorage.removeItem(hashcode)
// sessionStorage.removeItem(`${hashcode}:timestamp`)
// }
// }
var downloadFile = /*#__PURE__*/function () {
var _ref2 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(response) {
var d, fileName, blob, a, url, filename;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return response.arrayBuffer();
case 2:
d = _context2.sent;
blob = new Blob([d]);
try {
fileName = response.headers.get('content-type').split(';')[1].replace('filename=', '');
} catch (e) {
fileName = 'userfiles.zip';
}
a = document.createElement('a');
url = window.URL.createObjectURL(blob);
filename = fileName;
a.href = url;
a.download = filename;
a.click();
window.URL.revokeObjectURL(url);
case 12:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return function downloadFile(_x3) {
return _ref2.apply(this, arguments);
};
}();
var prefixUrl = _env__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].API_SERVER;
if (window.ENV === 'dev') prefixUrl = '';
return dva__WEBPACK_IMPORTED_MODULE_8___default()(url.indexOf("https") > -1 ? url : prefixUrl + url, newOptions).then(function (response) {
return checkStatus(response, Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({
url: url.indexOf("https") > -1 ? url : _env__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].API_SERVER + url
}, newOptions));
}).then(function (response) {
return cachedSave(response, hashcode);
}).then( /*#__PURE__*/function () {
var _ref3 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(response) {
var d, _newOptions$params, _newOptions$body;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
if (!(response.status === 204)) {
_context3.next = 2;
break;
}
return _context3.abrupt("return", response.text());
case 2:
if (!(response.headers.get('content-type').indexOf("application/json") > -1)) {
_context3.next = 8;
break;
}
_context3.next = 5;
return response.json();
case 5:
d = _context3.sent;
_context3.next = 12;
break;
case 8:
downloadFile(response);
_context3.next = 11;
return response.arrayBuffer();
case 11:
d = _context3.sent;
case 12:
try {
if (d.status === 401 && (!((_newOptions$params = newOptions.params) === null || _newOptions$params === void 0 ? void 0 : _newOptions$params.hidePopLogin) || !((_newOptions$body = newOptions.body) === null || _newOptions$body === void 0 ? void 0 : _newOptions$body.hidePopLogin))) {
Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.dispatch({
type: 'user/showPopLogin',
payload: {
showPopLogin: true,
showClosable: true
}
});
}
if (d.status === 402) {
if (localStorage.getItem('addinfo') === '2') {
//弹窗 填充信息
Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.dispatch({
type: 'shixunHomeworks/setActionTabs',
payload: {
key: '填充信息弹窗'
}
});
} else {
modalConfirm = modalConfirm || antd_es_modal__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].confirm({
visible: false,
okText: "确定",
cancelText: "取消"
});
modalConfirm.update({
centered: true,
visible: true,
title: "提示",
content: "您需要去完善您的个人资料,才能使用此功能",
okText: "立即完善",
cancelText: "稍后完善",
onOk: function onOk() {
umi__WEBPACK_IMPORTED_MODULE_11__[/* history */ "c"].push('/account/profile/edit');
}
});
}
}
} catch (e) {
console.log("fetcherr", e);
}
handleHttpStatus(d, url);
return _context3.abrupt("return", d);
case 15:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return function (_x4) {
return _ref3.apply(this, arguments);
};
}()).catch(function (e) {
try {
var status = e.code;
if (status === 401) {
Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.dispatch({
type: 'user/showPopLogin',
payload: {
showPopLogin: true,
showClosable: true
}
});
}
handleHttpStatus(e, url);
return e;
} catch (e) {}
});
}
var historyFlag = false;
var errorFlag = false;
var handleHttpStatus = function handleHttpStatus(e, url) {
if ((e.status == -1 || e.status == -2 || e.status > 400) && e.status != 403 && !errorFlag) {
errorFlag = true;
setTimeout(function () {
return errorFlag = false;
}, 500);
antd_es_message__WEBPACK_IMPORTED_MODULE_1__[/* default */ "b"].warn({
content: e.message,
key: "message-key"
});
}
var mapping = {
403: '/403',
404: '/404',
500: '/500'
};
if (mapping[e.status] && !historyFlag) {
var _getDvaApp$_store$get2 = Object(umi__WEBPACK_IMPORTED_MODULE_11__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get2.user;
var userInfo = user.userInfo;
if (window.location.pathname.indexOf("/users") > -1 && document.domain === "kepukehuan.educoder.net") alert(e.status + ":" + (userInfo === null || userInfo === void 0 ? void 0 : userInfo.id) + "---" + url);
historyFlag = true;
setTimeout(function () {
return historyFlag = false;
}, 500);
if (e.status === 403) {
umi__WEBPACK_IMPORTED_MODULE_11__[/* history */ "c"].replace(mapping[e.status]);
} else {
umi__WEBPACK_IMPORTED_MODULE_11__[/* history */ "c"].replace(mapping[e.status]);
}
sessionStorage.setItem('errorStatus', JSON.stringify(e));
}
};
function get(url, params) {
return request("/api/".concat(url), {
method: 'Get',
params: params || {}
});
}
function getqq(url, params) {
return request("/".concat(url), {
method: 'Get',
params: params
});
}
function post(url, params) {
return request("/api/".concat(url), {
method: 'Post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, params)
});
}
function put(url, params) {
return request("/api/".concat(url), {
method: 'Put',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, params)
});
}
function del(url) {
return request("/api/".concat(url), {
method: 'delete'
});
}
/***/ }),
/***/ "Ew+T":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/web.immediate.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var task = __webpack_require__(/*! ../internals/task */ "LPSS");
var FORCED = !global.setImmediate || !global.clearImmediate;
// http://w3c.github.io/setImmediate/
$({ global: true, bind: true, enumerable: true, forced: FORCED }, {
// `setImmediate` method
// http://w3c.github.io/setImmediate/#si-setImmediate
setImmediate: task.set,
// `clearImmediate` method
// http://w3c.github.io/setImmediate/#si-clearImmediate
clearImmediate: task.clear
});
/***/ }),
/***/ "ExA7":
/*!*********************************************!*\
!*** ./node_modules/lodash/isObjectLike.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
module.exports = isObjectLike;
/***/ }),
/***/ "F8JR":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/array-for-each.js ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "tycR").forEach;
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var STRICT_METHOD = arrayMethodIsStrict('forEach');
var USES_TO_LENGTH = arrayMethodUsesToLength('forEach');
// `Array.prototype.forEach` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
module.exports = (!STRICT_METHOD || !USES_TO_LENGTH) ? function forEach(callbackfn /* , thisArg */) {
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
} : [].forEach;
/***/ }),
/***/ "FAml":
/*!***************************************!*\
!*** ./node_modules/es-errors/ref.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @type {import('./ref')} */
module.exports = ReferenceError;
/***/ }),
/***/ "FDzp":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.int32-array.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj");
// `Int32Array` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Int32', function (init) {
return function Int32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "FF6l":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/array-copy-within.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var min = Math.min;
// `Array.prototype.copyWithin` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) {
var O = toObject(this);
var len = toLength(O.length);
var to = toAbsoluteIndex(target, len);
var from = toAbsoluteIndex(start, len);
var end = arguments.length > 2 ? arguments[2] : undefined;
var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
var inc = 1;
if (from < to && to < from + count) {
inc = -1;
from += count - 1;
to += count - 1;
}
while (count-- > 0) {
if (from in O) O[to] = O[from];
else delete O[to];
to += inc;
from += inc;
} return O;
};
/***/ }),
/***/ "FIfw":
/*!****************************************************!*\
!*** ./node_modules/antd/es/grid/style/index.less ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "FMNM":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/regexp-exec-abstract.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(/*! ./classof-raw */ "xrYK");
var regexpExec = __webpack_require__(/*! ./regexp-exec */ "kmMV");
// `RegExpExec` abstract operation
// https://tc39.github.io/ecma262/#sec-regexpexec
module.exports = function (R, S) {
var exec = R.exec;
if (typeof exec === 'function') {
var result = exec.call(R, S);
if (typeof result !== 'object') {
throw TypeError('RegExp exec method returned something other than an Object or null');
}
return result;
}
if (classof(R) !== 'RegExp') {
throw TypeError('RegExp#exec called on incompatible receiver');
}
return regexpExec.call(R, S);
};
/***/ }),
/***/ "FMtG":
/*!******************************************************************!*\
!*** ./node_modules/@umijs/plugin-model/lib/helpers/constant.js ***!
\******************************************************************/
/*! no static exports found */
/*! exports used: UmiContext */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.UmiContext = void 0;
var _react = _interopRequireDefault(__webpack_require__(/*! react */ "q1tI"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var UmiContext = _react.default.createContext({});
exports.UmiContext = UmiContext;
/***/ }),
/***/ "FUNW":
/*!********************************************************************************************!*\
!*** ./node_modules/react-router/node_modules/mini-create-react-context/dist/esm/index.js ***!
\********************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module uses injected variables (global) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "dI71");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! prop-types */ "17x9");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
var MAX_SIGNED_31_BIT_INT = 1073741823;
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : {};
function getUniqueId() {
var key = '__global_unique_id__';
return commonjsGlobal[key] = (commonjsGlobal[key] || 0) + 1;
}
function objectIs(x, y) {
if (x === y) {
return x !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
function createEventEmitter(value) {
var handlers = [];
return {
on: function on(handler) {
handlers.push(handler);
},
off: function off(handler) {
handlers = handlers.filter(function (h) {
return h !== handler;
});
},
get: function get() {
return value;
},
set: function set(newValue, changedBits) {
value = newValue;
handlers.forEach(function (handler) {
return handler(value, changedBits);
});
}
};
}
function onlyChild(children) {
return Array.isArray(children) ? children[0] : children;
}
function createReactContext(defaultValue, calculateChangedBits) {
var _Provider$childContex, _Consumer$contextType;
var contextProp = '__create-react-context-' + getUniqueId() + '__';
var Provider = /*#__PURE__*/function (_Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Provider, _Component);
function Provider() {
var _this;
_this = _Component.apply(this, arguments) || this;
_this.emitter = createEventEmitter(_this.props.value);
return _this;
}
var _proto = Provider.prototype;
_proto.getChildContext = function getChildContext() {
var _ref;
return _ref = {}, _ref[contextProp] = this.emitter, _ref;
};
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
if (this.props.value !== nextProps.value) {
var oldValue = this.props.value;
var newValue = nextProps.value;
var changedBits;
if (objectIs(oldValue, newValue)) {
changedBits = 0;
} else {
changedBits = typeof calculateChangedBits === 'function' ? calculateChangedBits(oldValue, newValue) : MAX_SIGNED_31_BIT_INT;
if (false) {}
changedBits |= 0;
if (changedBits !== 0) {
this.emitter.set(nextProps.value, changedBits);
}
}
}
};
_proto.render = function render() {
return this.props.children;
};
return Provider;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
Provider.childContextTypes = (_Provider$childContex = {}, _Provider$childContex[contextProp] = prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object.isRequired, _Provider$childContex);
var Consumer = /*#__PURE__*/function (_Component2) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Consumer, _Component2);
function Consumer() {
var _this2;
_this2 = _Component2.apply(this, arguments) || this;
_this2.state = {
value: _this2.getValue()
};
_this2.onUpdate = function (newValue, changedBits) {
var observedBits = _this2.observedBits | 0;
if ((observedBits & changedBits) !== 0) {
_this2.setState({
value: _this2.getValue()
});
}
};
return _this2;
}
var _proto2 = Consumer.prototype;
_proto2.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
var observedBits = nextProps.observedBits;
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
};
_proto2.componentDidMount = function componentDidMount() {
if (this.context[contextProp]) {
this.context[contextProp].on(this.onUpdate);
}
var observedBits = this.props.observedBits;
this.observedBits = observedBits === undefined || observedBits === null ? MAX_SIGNED_31_BIT_INT : observedBits;
};
_proto2.componentWillUnmount = function componentWillUnmount() {
if (this.context[contextProp]) {
this.context[contextProp].off(this.onUpdate);
}
};
_proto2.getValue = function getValue() {
if (this.context[contextProp]) {
return this.context[contextProp].get();
} else {
return defaultValue;
}
};
_proto2.render = function render() {
return onlyChild(this.props.children)(this.state.value);
};
return Consumer;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]);
Consumer.contextTypes = (_Consumer$contextType = {}, _Consumer$contextType[contextProp] = prop_types__WEBPACK_IMPORTED_MODULE_2___default.a.object, _Consumer$contextType);
return {
Provider: Provider,
Consumer: Consumer
};
}
var index = react__WEBPACK_IMPORTED_MODULE_0___default.a.createContext || createReactContext;
/* harmony default export */ __webpack_exports__["a"] = (index);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "FZtP":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/modules/web.dom-collections.for-each.js ***!
\**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var DOMIterables = __webpack_require__(/*! ../internals/dom-iterables */ "/byt");
var forEach = __webpack_require__(/*! ../internals/array-for-each */ "F8JR");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
for (var COLLECTION_NAME in DOMIterables) {
var Collection = global[COLLECTION_NAME];
var CollectionPrototype = Collection && Collection.prototype;
// some Chrome versions have non-configurable methods on DOMTokenList
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
} catch (error) {
CollectionPrototype.forEach = forEach;
}
}
/***/ }),
/***/ "Ff2n":
/*!****************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js ***!
\****************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutProperties; });
/* harmony import */ var _objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "zLVn");
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = Object(_objectWithoutPropertiesLoose_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
/***/ }),
/***/ "FfOG":
/*!*********************************************!*\
!*** ./src/.umi-production/core/history.ts ***!
\*********************************************/
/*! exports provided: createHistory, setCreateHistoryOptions, history */
/*! exports used: createHistory, history */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createHistory; });
/* unused harmony export setCreateHistoryOptions */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return history; });
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_preset_built_in_node_modules_umijs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/preset-built-in/node_modules/@umijs/runtime */ "YS25");
// @ts-nocheck
var options = {
"basename": "/"
};
if (window.routerBase) {
options.basename = window.routerBase;
}
// remove initial history because of ssr
var history = Object({"NODE_ENV":"production"}).__IS_SERVER ? null : Object(D_projects_competitions_forgeplus_react_node_modules_umijs_preset_built_in_node_modules_umijs_runtime__WEBPACK_IMPORTED_MODULE_1__[/* createBrowserHistory */ "a"])(options);
var createHistory = function createHistory() {
var hotReload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (!hotReload) {
history = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_preset_built_in_node_modules_umijs_runtime__WEBPACK_IMPORTED_MODULE_1__[/* createBrowserHistory */ "a"])(options);
}
return history;
};
// 通常仅微前端场景需要调用这个 API
var setCreateHistoryOptions = function setCreateHistoryOptions() {
var newOpts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
options = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, options), newOpts);
};
/***/ }),
/***/ "Fghh":
/*!*************************************************************************!*\
!*** ./src/.umi-production/plugin-locale/localeExports.ts + 20 modules ***!
\*************************************************************************/
/*! exports provided: createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, RawIntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, localeInfo, addLocale, getIntl, setIntl, getLocale, getDirection, setLocale, formatMessage, getAllLocales */
/*! exports used: RawIntlProvider, getDirection, getIntl, getLocale, localeInfo, setIntl, setLocale */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-locale/locale.tsx because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/intl-locales-supported/dist/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/shallow-equal/objects/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/warning/warning.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ Provider; });
__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ localeInfo; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ localeExports_getIntl; });
__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ setIntl; });
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ localeExports_getLocale; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ getDirection; });
__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ localeExports_setLocale; });
// UNUSED EXPORTS: createIntl, FormattedDate, FormattedDateParts, FormattedDisplayName, FormattedHTMLMessage, FormattedList, FormattedMessage, FormattedNumber, FormattedNumberParts, FormattedPlural, FormattedRelativeTime, FormattedTime, FormattedTimeParts, IntlContext, IntlProvider, createIntlCache, defineMessages, injectIntl, useIntl, addLocale, formatMessage, getAllLocales
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("fWQN");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("mtLc");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js + 2 modules
var possibleConstructorReturn = __webpack_require__("Nsem");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
var isNativeReflectConstruct = __webpack_require__("cHpt");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
var getPrototypeOf = __webpack_require__("oZsa");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
var inherits = __webpack_require__("yKVA");
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("jrin");
// EXTERNAL MODULE: ./node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
var hoist_non_react_statics_cjs = __webpack_require__("2mql");
var hoist_non_react_statics_cjs_default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics_cjs);
// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/types.js
var TYPE;
(function (TYPE) {
/**
* Raw text
*/
TYPE[TYPE["literal"] = 0] = "literal";
/**
* Variable w/o any format, e.g `var` in `this is a {var}`
*/
TYPE[TYPE["argument"] = 1] = "argument";
/**
* Variable w/ number format
*/
TYPE[TYPE["number"] = 2] = "number";
/**
* Variable w/ date format
*/
TYPE[TYPE["date"] = 3] = "date";
/**
* Variable w/ time format
*/
TYPE[TYPE["time"] = 4] = "time";
/**
* Variable w/ select format
*/
TYPE[TYPE["select"] = 5] = "select";
/**
* Variable w/ plural format
*/
TYPE[TYPE["plural"] = 6] = "plural";
/**
* Only possible within plural argument.
* This is the `#` symbol that will be substituted with the count.
*/
TYPE[TYPE["pound"] = 7] = "pound";
})(TYPE || (TYPE = {}));
/**
* Type Guards
*/
function isLiteralElement(el) {
return el.type === TYPE.literal;
}
function isArgumentElement(el) {
return el.type === TYPE.argument;
}
function isNumberElement(el) {
return el.type === TYPE.number;
}
function isDateElement(el) {
return el.type === TYPE.date;
}
function isTimeElement(el) {
return el.type === TYPE.time;
}
function isSelectElement(el) {
return el.type === TYPE.select;
}
function isPluralElement(el) {
return el.type === TYPE.plural;
}
function isPoundElement(el) {
return el.type === TYPE.pound;
}
function isNumberSkeleton(el) {
return !!(el && typeof el === 'object' && el.type === 0 /* number */);
}
function isDateTimeSkeleton(el) {
return !!(el && typeof el === 'object' && el.type === 1 /* dateTime */);
}
function createLiteralElement(value) {
return {
type: TYPE.literal,
value: value,
};
}
function createNumberElement(value, style) {
return {
type: TYPE.number,
value: value,
style: style,
};
}
// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/parser.js
// tslint:disable:only-arrow-functions
// tslint:disable:object-literal-shorthand
// tslint:disable:trailing-comma
// tslint:disable:object-literal-sort-keys
// tslint:disable:one-variable-per-declaration
// tslint:disable:max-line-length
// tslint:disable:no-consecutive-blank-lines
// tslint:disable:align
var __extends = (undefined && undefined.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var __assign = (undefined && undefined.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
// Generated by PEG.js v. 0.10.0 (ts-pegjs plugin v. 0.2.6 )
//
// https://pegjs.org/ https://github.com/metadevpro/ts-pegjs
var SyntaxError = /** @class */ (function (_super) {
__extends(SyntaxError, _super);
function SyntaxError(message, expected, found, location) {
var _this = _super.call(this) || this;
_this.message = message;
_this.expected = expected;
_this.found = found;
_this.location = location;
_this.name = "SyntaxError";
if (typeof Error.captureStackTrace === "function") {
Error.captureStackTrace(_this, SyntaxError);
}
return _this;
}
SyntaxError.buildMessage = function (expected, found) {
function hex(ch) {
return ch.charCodeAt(0).toString(16).toUpperCase();
}
function literalEscape(s) {
return s
.replace(/\\/g, "\\\\")
.replace(/"/g, "\\\"")
.replace(/\0/g, "\\0")
.replace(/\t/g, "\\t")
.replace(/\n/g, "\\n")
.replace(/\r/g, "\\r")
.replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
.replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
}
function classEscape(s) {
return s
.replace(/\\/g, "\\\\")
.replace(/\]/g, "\\]")
.replace(/\^/g, "\\^")
.replace(/-/g, "\\-")
.replace(/\0/g, "\\0")
.replace(/\t/g, "\\t")
.replace(/\n/g, "\\n")
.replace(/\r/g, "\\r")
.replace(/[\x00-\x0F]/g, function (ch) { return "\\x0" + hex(ch); })
.replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { return "\\x" + hex(ch); });
}
function describeExpectation(expectation) {
switch (expectation.type) {
case "literal":
return "\"" + literalEscape(expectation.text) + "\"";
case "class":
var escapedParts = expectation.parts.map(function (part) {
return Array.isArray(part)
? classEscape(part[0]) + "-" + classEscape(part[1])
: classEscape(part);
});
return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]";
case "any":
return "any character";
case "end":
return "end of input";
case "other":
return expectation.description;
}
}
function describeExpected(expected1) {
var descriptions = expected1.map(describeExpectation);
var i;
var j;
descriptions.sort();
if (descriptions.length > 0) {
for (i = 1, j = 1; i < descriptions.length; i++) {
if (descriptions[i - 1] !== descriptions[i]) {
descriptions[j] = descriptions[i];
j++;
}
}
descriptions.length = j;
}
switch (descriptions.length) {
case 1:
return descriptions[0];
case 2:
return descriptions[0] + " or " + descriptions[1];
default:
return descriptions.slice(0, -1).join(", ")
+ ", or "
+ descriptions[descriptions.length - 1];
}
}
function describeFound(found1) {
return found1 ? "\"" + literalEscape(found1) + "\"" : "end of input";
}
return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";
};
return SyntaxError;
}(Error));
function peg$parse(input, options) {
options = options !== undefined ? options : {};
var peg$FAILED = {};
var peg$startRuleFunctions = { start: peg$parsestart };
var peg$startRuleFunction = peg$parsestart;
var peg$c0 = function (parts) {
return parts.join('');
};
var peg$c1 = function (messageText) {
return __assign({ type: TYPE.literal, value: messageText }, insertLocation());
};
var peg$c2 = "#";
var peg$c3 = peg$literalExpectation("#", false);
var peg$c4 = function () {
return __assign({ type: TYPE.pound }, insertLocation());
};
var peg$c5 = peg$otherExpectation("argumentElement");
var peg$c6 = "{";
var peg$c7 = peg$literalExpectation("{", false);
var peg$c8 = "}";
var peg$c9 = peg$literalExpectation("}", false);
var peg$c10 = function (value) {
return __assign({ type: TYPE.argument, value: value }, insertLocation());
};
var peg$c11 = peg$otherExpectation("numberSkeletonId");
var peg$c12 = /^['\/{}]/;
var peg$c13 = peg$classExpectation(["'", "/", "{", "}"], false, false);
var peg$c14 = peg$anyExpectation();
var peg$c15 = peg$otherExpectation("numberSkeletonTokenOption");
var peg$c16 = "/";
var peg$c17 = peg$literalExpectation("/", false);
var peg$c18 = function (option) { return option; };
var peg$c19 = peg$otherExpectation("numberSkeletonToken");
var peg$c20 = function (stem, options) {
return { stem: stem, options: options };
};
var peg$c21 = function (tokens) {
return __assign({ type: 0 /* number */, tokens: tokens }, insertLocation());
};
var peg$c22 = "::";
var peg$c23 = peg$literalExpectation("::", false);
var peg$c24 = function (skeleton) { return skeleton; };
var peg$c25 = function () { messageCtx.push('numberArgStyle'); return true; };
var peg$c26 = function (style) {
messageCtx.pop();
return style.replace(/\s*$/, '');
};
var peg$c27 = ",";
var peg$c28 = peg$literalExpectation(",", false);
var peg$c29 = "number";
var peg$c30 = peg$literalExpectation("number", false);
var peg$c31 = function (value, type, style) {
return __assign({ type: type === 'number' ? TYPE.number : type === 'date' ? TYPE.date : TYPE.time, style: style && style[2], value: value }, insertLocation());
};
var peg$c32 = "'";
var peg$c33 = peg$literalExpectation("'", false);
var peg$c34 = /^[^']/;
var peg$c35 = peg$classExpectation(["'"], true, false);
var peg$c36 = /^[^a-zA-Z'{}]/;
var peg$c37 = peg$classExpectation([["a", "z"], ["A", "Z"], "'", "{", "}"], true, false);
var peg$c38 = /^[a-zA-Z]/;
var peg$c39 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false);
var peg$c40 = function (pattern) {
return __assign({ type: 1 /* dateTime */, pattern: pattern }, insertLocation());
};
var peg$c41 = function () { messageCtx.push('dateOrTimeArgStyle'); return true; };
var peg$c42 = "date";
var peg$c43 = peg$literalExpectation("date", false);
var peg$c44 = "time";
var peg$c45 = peg$literalExpectation("time", false);
var peg$c46 = "plural";
var peg$c47 = peg$literalExpectation("plural", false);
var peg$c48 = "selectordinal";
var peg$c49 = peg$literalExpectation("selectordinal", false);
var peg$c50 = "offset:";
var peg$c51 = peg$literalExpectation("offset:", false);
var peg$c52 = function (value, pluralType, offset, options) {
return __assign({ type: TYPE.plural, pluralType: pluralType === 'plural' ? 'cardinal' : 'ordinal', value: value, offset: offset ? offset[2] : 0, options: options.reduce(function (all, _a) {
var id = _a.id, value = _a.value, optionLocation = _a.location;
if (id in all) {
error("Duplicate option \"" + id + "\" in plural element: \"" + text() + "\"", location());
}
all[id] = {
value: value,
location: optionLocation
};
return all;
}, {}) }, insertLocation());
};
var peg$c53 = "select";
var peg$c54 = peg$literalExpectation("select", false);
var peg$c55 = function (value, options) {
return __assign({ type: TYPE.select, value: value, options: options.reduce(function (all, _a) {
var id = _a.id, value = _a.value, optionLocation = _a.location;
if (id in all) {
error("Duplicate option \"" + id + "\" in select element: \"" + text() + "\"", location());
}
all[id] = {
value: value,
location: optionLocation
};
return all;
}, {}) }, insertLocation());
};
var peg$c56 = "=";
var peg$c57 = peg$literalExpectation("=", false);
var peg$c58 = function (id) { messageCtx.push('select'); return true; };
var peg$c59 = function (id, value) {
messageCtx.pop();
return __assign({ id: id,
value: value }, insertLocation());
};
var peg$c60 = function (id) { messageCtx.push('plural'); return true; };
var peg$c61 = function (id, value) {
messageCtx.pop();
return __assign({ id: id,
value: value }, insertLocation());
};
var peg$c62 = peg$otherExpectation("whitespace");
var peg$c63 = /^[\t-\r \x85\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/;
var peg$c64 = peg$classExpectation([["\t", "\r"], " ", "\x85", "\xA0", "\u1680", ["\u2000", "\u200A"], "\u2028", "\u2029", "\u202F", "\u205F", "\u3000"], false, false);
var peg$c65 = peg$otherExpectation("syntax pattern");
var peg$c66 = /^[!-\/:-@[-\^`{-~\xA1-\xA7\xA9\xAB\xAC\xAE\xB0\xB1\xB6\xBB\xBF\xD7\xF7\u2010-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u245F\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3020\u3030\uFD3E\uFD3F\uFE45\uFE46]/;
var peg$c67 = peg$classExpectation([["!", "/"], [":", "@"], ["[", "^"], "`", ["{", "~"], ["\xA1", "\xA7"], "\xA9", "\xAB", "\xAC", "\xAE", "\xB0", "\xB1", "\xB6", "\xBB", "\xBF", "\xD7", "\xF7", ["\u2010", "\u2027"], ["\u2030", "\u203E"], ["\u2041", "\u2053"], ["\u2055", "\u205E"], ["\u2190", "\u245F"], ["\u2500", "\u2775"], ["\u2794", "\u2BFF"], ["\u2E00", "\u2E7F"], ["\u3001", "\u3003"], ["\u3008", "\u3020"], "\u3030", "\uFD3E", "\uFD3F", "\uFE45", "\uFE46"], false, false);
var peg$c68 = peg$otherExpectation("optional whitespace");
var peg$c69 = peg$otherExpectation("number");
var peg$c70 = "-";
var peg$c71 = peg$literalExpectation("-", false);
var peg$c72 = function (negative, num) {
return num
? negative
? -num
: num
: 0;
};
var peg$c73 = peg$otherExpectation("apostrophe");
var peg$c74 = peg$otherExpectation("double apostrophes");
var peg$c75 = "''";
var peg$c76 = peg$literalExpectation("''", false);
var peg$c77 = function () { return "'"; };
var peg$c78 = function (escapedChar, quotedChars) {
return escapedChar + quotedChars.replace("''", "'");
};
var peg$c79 = function (x) {
return (x !== '{' &&
!(isInPluralOption() && x === '#') &&
!(isNestedMessageText() && x === '}'));
};
var peg$c80 = "\n";
var peg$c81 = peg$literalExpectation("\n", false);
var peg$c82 = function (x) {
return x === '{' || x === '}' || (isInPluralOption() && x === '#');
};
var peg$c83 = peg$otherExpectation("argNameOrNumber");
var peg$c84 = peg$otherExpectation("argNumber");
var peg$c85 = "0";
var peg$c86 = peg$literalExpectation("0", false);
var peg$c87 = function () { return 0; };
var peg$c88 = /^[1-9]/;
var peg$c89 = peg$classExpectation([["1", "9"]], false, false);
var peg$c90 = /^[0-9]/;
var peg$c91 = peg$classExpectation([["0", "9"]], false, false);
var peg$c92 = function (digits) {
return parseInt(digits.join(''), 10);
};
var peg$c93 = peg$otherExpectation("argName");
var peg$currPos = 0;
var peg$savedPos = 0;
var peg$posDetailsCache = [{ line: 1, column: 1 }];
var peg$maxFailPos = 0;
var peg$maxFailExpected = [];
var peg$silentFails = 0;
var peg$result;
if (options.startRule !== undefined) {
if (!(options.startRule in peg$startRuleFunctions)) {
throw new Error("Can't start parsing from rule \"" + options.startRule + "\".");
}
peg$startRuleFunction = peg$startRuleFunctions[options.startRule];
}
function text() {
return input.substring(peg$savedPos, peg$currPos);
}
function location() {
return peg$computeLocation(peg$savedPos, peg$currPos);
}
function expected(description, location1) {
location1 = location1 !== undefined
? location1
: peg$computeLocation(peg$savedPos, peg$currPos);
throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location1);
}
function error(message, location1) {
location1 = location1 !== undefined
? location1
: peg$computeLocation(peg$savedPos, peg$currPos);
throw peg$buildSimpleError(message, location1);
}
function peg$literalExpectation(text1, ignoreCase) {
return { type: "literal", text: text1, ignoreCase: ignoreCase };
}
function peg$classExpectation(parts, inverted, ignoreCase) {
return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };
}
function peg$anyExpectation() {
return { type: "any" };
}
function peg$endExpectation() {
return { type: "end" };
}
function peg$otherExpectation(description) {
return { type: "other", description: description };
}
function peg$computePosDetails(pos) {
var details = peg$posDetailsCache[pos];
var p;
if (details) {
return details;
}
else {
p = pos - 1;
while (!peg$posDetailsCache[p]) {
p--;
}
details = peg$posDetailsCache[p];
details = {
line: details.line,
column: details.column
};
while (p < pos) {
if (input.charCodeAt(p) === 10) {
details.line++;
details.column = 1;
}
else {
details.column++;
}
p++;
}
peg$posDetailsCache[pos] = details;
return details;
}
}
function peg$computeLocation(startPos, endPos) {
var startPosDetails = peg$computePosDetails(startPos);
var endPosDetails = peg$computePosDetails(endPos);
return {
start: {
offset: startPos,
line: startPosDetails.line,
column: startPosDetails.column
},
end: {
offset: endPos,
line: endPosDetails.line,
column: endPosDetails.column
}
};
}
function peg$fail(expected1) {
if (peg$currPos < peg$maxFailPos) {
return;
}
if (peg$currPos > peg$maxFailPos) {
peg$maxFailPos = peg$currPos;
peg$maxFailExpected = [];
}
peg$maxFailExpected.push(expected1);
}
function peg$buildSimpleError(message, location1) {
return new SyntaxError(message, [], "", location1);
}
function peg$buildStructuredError(expected1, found, location1) {
return new SyntaxError(SyntaxError.buildMessage(expected1, found), expected1, found, location1);
}
function peg$parsestart() {
var s0;
s0 = peg$parsemessage();
return s0;
}
function peg$parsemessage() {
var s0, s1;
s0 = [];
s1 = peg$parsemessageElement();
while (s1 !== peg$FAILED) {
s0.push(s1);
s1 = peg$parsemessageElement();
}
return s0;
}
function peg$parsemessageElement() {
var s0;
s0 = peg$parseliteralElement();
if (s0 === peg$FAILED) {
s0 = peg$parseargumentElement();
if (s0 === peg$FAILED) {
s0 = peg$parsesimpleFormatElement();
if (s0 === peg$FAILED) {
s0 = peg$parsepluralElement();
if (s0 === peg$FAILED) {
s0 = peg$parseselectElement();
if (s0 === peg$FAILED) {
s0 = peg$parsepoundElement();
}
}
}
}
}
return s0;
}
function peg$parsemessageText() {
var s0, s1, s2;
s0 = peg$currPos;
s1 = [];
s2 = peg$parsedoubleApostrophes();
if (s2 === peg$FAILED) {
s2 = peg$parsequotedString();
if (s2 === peg$FAILED) {
s2 = peg$parseunquotedString();
}
}
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$parsedoubleApostrophes();
if (s2 === peg$FAILED) {
s2 = peg$parsequotedString();
if (s2 === peg$FAILED) {
s2 = peg$parseunquotedString();
}
}
}
}
else {
s1 = peg$FAILED;
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c0(s1);
}
s0 = s1;
return s0;
}
function peg$parseliteralElement() {
var s0, s1;
s0 = peg$currPos;
s1 = peg$parsemessageText();
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c1(s1);
}
s0 = s1;
return s0;
}
function peg$parsepoundElement() {
var s0, s1;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 35) {
s1 = peg$c2;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c3);
}
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c4();
}
s0 = s1;
return s0;
}
function peg$parseargumentElement() {
var s0, s1, s2, s3, s4, s5;
peg$silentFails++;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 123) {
s1 = peg$c6;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c7);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$parseargNameOrNumber();
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s5 = peg$c8;
peg$currPos++;
}
else {
s5 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c9);
}
}
if (s5 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c10(s3);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c5);
}
}
return s0;
}
function peg$parsenumberSkeletonId() {
var s0, s1, s2, s3, s4;
peg$silentFails++;
s0 = peg$currPos;
s1 = [];
s2 = peg$currPos;
s3 = peg$currPos;
peg$silentFails++;
s4 = peg$parsewhiteSpace();
if (s4 === peg$FAILED) {
if (peg$c12.test(input.charAt(peg$currPos))) {
s4 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c13);
}
}
}
peg$silentFails--;
if (s4 === peg$FAILED) {
s3 = undefined;
}
else {
peg$currPos = s3;
s3 = peg$FAILED;
}
if (s3 !== peg$FAILED) {
if (input.length > peg$currPos) {
s4 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c14);
}
}
if (s4 !== peg$FAILED) {
s3 = [s3, s4];
s2 = s3;
}
else {
peg$currPos = s2;
s2 = peg$FAILED;
}
}
else {
peg$currPos = s2;
s2 = peg$FAILED;
}
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$currPos;
s3 = peg$currPos;
peg$silentFails++;
s4 = peg$parsewhiteSpace();
if (s4 === peg$FAILED) {
if (peg$c12.test(input.charAt(peg$currPos))) {
s4 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c13);
}
}
}
peg$silentFails--;
if (s4 === peg$FAILED) {
s3 = undefined;
}
else {
peg$currPos = s3;
s3 = peg$FAILED;
}
if (s3 !== peg$FAILED) {
if (input.length > peg$currPos) {
s4 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c14);
}
}
if (s4 !== peg$FAILED) {
s3 = [s3, s4];
s2 = s3;
}
else {
peg$currPos = s2;
s2 = peg$FAILED;
}
}
else {
peg$currPos = s2;
s2 = peg$FAILED;
}
}
}
else {
s1 = peg$FAILED;
}
if (s1 !== peg$FAILED) {
s0 = input.substring(s0, peg$currPos);
}
else {
s0 = s1;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c11);
}
}
return s0;
}
function peg$parsenumberSkeletonTokenOption() {
var s0, s1, s2;
peg$silentFails++;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 47) {
s1 = peg$c16;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c17);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parsenumberSkeletonId();
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c18(s2);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c15);
}
}
return s0;
}
function peg$parsenumberSkeletonToken() {
var s0, s1, s2, s3, s4;
peg$silentFails++;
s0 = peg$currPos;
s1 = peg$parse_();
if (s1 !== peg$FAILED) {
s2 = peg$parsenumberSkeletonId();
if (s2 !== peg$FAILED) {
s3 = [];
s4 = peg$parsenumberSkeletonTokenOption();
while (s4 !== peg$FAILED) {
s3.push(s4);
s4 = peg$parsenumberSkeletonTokenOption();
}
if (s3 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c20(s2, s3);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c19);
}
}
return s0;
}
function peg$parsenumberSkeleton() {
var s0, s1, s2;
s0 = peg$currPos;
s1 = [];
s2 = peg$parsenumberSkeletonToken();
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$parsenumberSkeletonToken();
}
}
else {
s1 = peg$FAILED;
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c21(s1);
}
s0 = s1;
return s0;
}
function peg$parsenumberArgStyle() {
var s0, s1, s2;
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c22) {
s1 = peg$c22;
peg$currPos += 2;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c23);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parsenumberSkeleton();
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c24(s2);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
peg$savedPos = peg$currPos;
s1 = peg$c25();
if (s1) {
s1 = undefined;
}
else {
s1 = peg$FAILED;
}
if (s1 !== peg$FAILED) {
s2 = peg$parsemessageText();
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c26(s2);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
return s0;
}
function peg$parsenumberFormatElement() {
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 123) {
s1 = peg$c6;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c7);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$parseargNameOrNumber();
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s5 = peg$c27;
peg$currPos++;
}
else {
s5 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c28);
}
}
if (s5 !== peg$FAILED) {
s6 = peg$parse_();
if (s6 !== peg$FAILED) {
if (input.substr(peg$currPos, 6) === peg$c29) {
s7 = peg$c29;
peg$currPos += 6;
}
else {
s7 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c30);
}
}
if (s7 !== peg$FAILED) {
s8 = peg$parse_();
if (s8 !== peg$FAILED) {
s9 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 44) {
s10 = peg$c27;
peg$currPos++;
}
else {
s10 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c28);
}
}
if (s10 !== peg$FAILED) {
s11 = peg$parse_();
if (s11 !== peg$FAILED) {
s12 = peg$parsenumberArgStyle();
if (s12 !== peg$FAILED) {
s10 = [s10, s11, s12];
s9 = s10;
}
else {
peg$currPos = s9;
s9 = peg$FAILED;
}
}
else {
peg$currPos = s9;
s9 = peg$FAILED;
}
}
else {
peg$currPos = s9;
s9 = peg$FAILED;
}
if (s9 === peg$FAILED) {
s9 = null;
}
if (s9 !== peg$FAILED) {
s10 = peg$parse_();
if (s10 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s11 = peg$c8;
peg$currPos++;
}
else {
s11 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c9);
}
}
if (s11 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c31(s3, s7, s9);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
return s0;
}
function peg$parsedateTimeSkeletonLiteral() {
var s0, s1, s2, s3;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 39) {
s1 = peg$c32;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c33);
}
}
if (s1 !== peg$FAILED) {
s2 = [];
s3 = peg$parsedoubleApostrophes();
if (s3 === peg$FAILED) {
if (peg$c34.test(input.charAt(peg$currPos))) {
s3 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s3 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c35);
}
}
}
if (s3 !== peg$FAILED) {
while (s3 !== peg$FAILED) {
s2.push(s3);
s3 = peg$parsedoubleApostrophes();
if (s3 === peg$FAILED) {
if (peg$c34.test(input.charAt(peg$currPos))) {
s3 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s3 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c35);
}
}
}
}
}
else {
s2 = peg$FAILED;
}
if (s2 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 39) {
s3 = peg$c32;
peg$currPos++;
}
else {
s3 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c33);
}
}
if (s3 !== peg$FAILED) {
s1 = [s1, s2, s3];
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
if (s0 === peg$FAILED) {
s0 = [];
s1 = peg$parsedoubleApostrophes();
if (s1 === peg$FAILED) {
if (peg$c36.test(input.charAt(peg$currPos))) {
s1 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c37);
}
}
}
if (s1 !== peg$FAILED) {
while (s1 !== peg$FAILED) {
s0.push(s1);
s1 = peg$parsedoubleApostrophes();
if (s1 === peg$FAILED) {
if (peg$c36.test(input.charAt(peg$currPos))) {
s1 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c37);
}
}
}
}
}
else {
s0 = peg$FAILED;
}
}
return s0;
}
function peg$parsedateTimeSkeletonPattern() {
var s0, s1;
s0 = [];
if (peg$c38.test(input.charAt(peg$currPos))) {
s1 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c39);
}
}
if (s1 !== peg$FAILED) {
while (s1 !== peg$FAILED) {
s0.push(s1);
if (peg$c38.test(input.charAt(peg$currPos))) {
s1 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c39);
}
}
}
}
else {
s0 = peg$FAILED;
}
return s0;
}
function peg$parsedateTimeSkeleton() {
var s0, s1, s2, s3;
s0 = peg$currPos;
s1 = peg$currPos;
s2 = [];
s3 = peg$parsedateTimeSkeletonLiteral();
if (s3 === peg$FAILED) {
s3 = peg$parsedateTimeSkeletonPattern();
}
if (s3 !== peg$FAILED) {
while (s3 !== peg$FAILED) {
s2.push(s3);
s3 = peg$parsedateTimeSkeletonLiteral();
if (s3 === peg$FAILED) {
s3 = peg$parsedateTimeSkeletonPattern();
}
}
}
else {
s2 = peg$FAILED;
}
if (s2 !== peg$FAILED) {
s1 = input.substring(s1, peg$currPos);
}
else {
s1 = s2;
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c40(s1);
}
s0 = s1;
return s0;
}
function peg$parsedateOrTimeArgStyle() {
var s0, s1, s2;
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c22) {
s1 = peg$c22;
peg$currPos += 2;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c23);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parsedateTimeSkeleton();
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c24(s2);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
if (s0 === peg$FAILED) {
s0 = peg$currPos;
peg$savedPos = peg$currPos;
s1 = peg$c41();
if (s1) {
s1 = undefined;
}
else {
s1 = peg$FAILED;
}
if (s1 !== peg$FAILED) {
s2 = peg$parsemessageText();
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c26(s2);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
return s0;
}
function peg$parsedateOrTimeFormatElement() {
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 123) {
s1 = peg$c6;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c7);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$parseargNameOrNumber();
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s5 = peg$c27;
peg$currPos++;
}
else {
s5 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c28);
}
}
if (s5 !== peg$FAILED) {
s6 = peg$parse_();
if (s6 !== peg$FAILED) {
if (input.substr(peg$currPos, 4) === peg$c42) {
s7 = peg$c42;
peg$currPos += 4;
}
else {
s7 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c43);
}
}
if (s7 === peg$FAILED) {
if (input.substr(peg$currPos, 4) === peg$c44) {
s7 = peg$c44;
peg$currPos += 4;
}
else {
s7 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c45);
}
}
}
if (s7 !== peg$FAILED) {
s8 = peg$parse_();
if (s8 !== peg$FAILED) {
s9 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 44) {
s10 = peg$c27;
peg$currPos++;
}
else {
s10 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c28);
}
}
if (s10 !== peg$FAILED) {
s11 = peg$parse_();
if (s11 !== peg$FAILED) {
s12 = peg$parsedateOrTimeArgStyle();
if (s12 !== peg$FAILED) {
s10 = [s10, s11, s12];
s9 = s10;
}
else {
peg$currPos = s9;
s9 = peg$FAILED;
}
}
else {
peg$currPos = s9;
s9 = peg$FAILED;
}
}
else {
peg$currPos = s9;
s9 = peg$FAILED;
}
if (s9 === peg$FAILED) {
s9 = null;
}
if (s9 !== peg$FAILED) {
s10 = peg$parse_();
if (s10 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s11 = peg$c8;
peg$currPos++;
}
else {
s11 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c9);
}
}
if (s11 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c31(s3, s7, s9);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
return s0;
}
function peg$parsesimpleFormatElement() {
var s0;
s0 = peg$parsenumberFormatElement();
if (s0 === peg$FAILED) {
s0 = peg$parsedateOrTimeFormatElement();
}
return s0;
}
function peg$parsepluralElement() {
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 123) {
s1 = peg$c6;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c7);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$parseargNameOrNumber();
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s5 = peg$c27;
peg$currPos++;
}
else {
s5 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c28);
}
}
if (s5 !== peg$FAILED) {
s6 = peg$parse_();
if (s6 !== peg$FAILED) {
if (input.substr(peg$currPos, 6) === peg$c46) {
s7 = peg$c46;
peg$currPos += 6;
}
else {
s7 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c47);
}
}
if (s7 === peg$FAILED) {
if (input.substr(peg$currPos, 13) === peg$c48) {
s7 = peg$c48;
peg$currPos += 13;
}
else {
s7 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c49);
}
}
}
if (s7 !== peg$FAILED) {
s8 = peg$parse_();
if (s8 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s9 = peg$c27;
peg$currPos++;
}
else {
s9 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c28);
}
}
if (s9 !== peg$FAILED) {
s10 = peg$parse_();
if (s10 !== peg$FAILED) {
s11 = peg$currPos;
if (input.substr(peg$currPos, 7) === peg$c50) {
s12 = peg$c50;
peg$currPos += 7;
}
else {
s12 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c51);
}
}
if (s12 !== peg$FAILED) {
s13 = peg$parse_();
if (s13 !== peg$FAILED) {
s14 = peg$parsenumber();
if (s14 !== peg$FAILED) {
s12 = [s12, s13, s14];
s11 = s12;
}
else {
peg$currPos = s11;
s11 = peg$FAILED;
}
}
else {
peg$currPos = s11;
s11 = peg$FAILED;
}
}
else {
peg$currPos = s11;
s11 = peg$FAILED;
}
if (s11 === peg$FAILED) {
s11 = null;
}
if (s11 !== peg$FAILED) {
s12 = peg$parse_();
if (s12 !== peg$FAILED) {
s13 = [];
s14 = peg$parsepluralOption();
if (s14 !== peg$FAILED) {
while (s14 !== peg$FAILED) {
s13.push(s14);
s14 = peg$parsepluralOption();
}
}
else {
s13 = peg$FAILED;
}
if (s13 !== peg$FAILED) {
s14 = peg$parse_();
if (s14 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s15 = peg$c8;
peg$currPos++;
}
else {
s15 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c9);
}
}
if (s15 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c52(s3, s7, s11, s13);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
return s0;
}
function peg$parseselectElement() {
var s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 123) {
s1 = peg$c6;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c7);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parse_();
if (s2 !== peg$FAILED) {
s3 = peg$parseargNameOrNumber();
if (s3 !== peg$FAILED) {
s4 = peg$parse_();
if (s4 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s5 = peg$c27;
peg$currPos++;
}
else {
s5 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c28);
}
}
if (s5 !== peg$FAILED) {
s6 = peg$parse_();
if (s6 !== peg$FAILED) {
if (input.substr(peg$currPos, 6) === peg$c53) {
s7 = peg$c53;
peg$currPos += 6;
}
else {
s7 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c54);
}
}
if (s7 !== peg$FAILED) {
s8 = peg$parse_();
if (s8 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 44) {
s9 = peg$c27;
peg$currPos++;
}
else {
s9 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c28);
}
}
if (s9 !== peg$FAILED) {
s10 = peg$parse_();
if (s10 !== peg$FAILED) {
s11 = [];
s12 = peg$parseselectOption();
if (s12 !== peg$FAILED) {
while (s12 !== peg$FAILED) {
s11.push(s12);
s12 = peg$parseselectOption();
}
}
else {
s11 = peg$FAILED;
}
if (s11 !== peg$FAILED) {
s12 = peg$parse_();
if (s12 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s13 = peg$c8;
peg$currPos++;
}
else {
s13 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c9);
}
}
if (s13 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c55(s3, s11);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
return s0;
}
function peg$parsepluralRuleSelectValue() {
var s0, s1, s2, s3;
s0 = peg$currPos;
s1 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 61) {
s2 = peg$c56;
peg$currPos++;
}
else {
s2 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c57);
}
}
if (s2 !== peg$FAILED) {
s3 = peg$parsenumber();
if (s3 !== peg$FAILED) {
s2 = [s2, s3];
s1 = s2;
}
else {
peg$currPos = s1;
s1 = peg$FAILED;
}
}
else {
peg$currPos = s1;
s1 = peg$FAILED;
}
if (s1 !== peg$FAILED) {
s0 = input.substring(s0, peg$currPos);
}
else {
s0 = s1;
}
if (s0 === peg$FAILED) {
s0 = peg$parseargName();
}
return s0;
}
function peg$parseselectOption() {
var s0, s1, s2, s3, s4, s5, s6, s7;
s0 = peg$currPos;
s1 = peg$parse_();
if (s1 !== peg$FAILED) {
s2 = peg$parseargName();
if (s2 !== peg$FAILED) {
s3 = peg$parse_();
if (s3 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 123) {
s4 = peg$c6;
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c7);
}
}
if (s4 !== peg$FAILED) {
peg$savedPos = peg$currPos;
s5 = peg$c58(s2);
if (s5) {
s5 = undefined;
}
else {
s5 = peg$FAILED;
}
if (s5 !== peg$FAILED) {
s6 = peg$parsemessage();
if (s6 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s7 = peg$c8;
peg$currPos++;
}
else {
s7 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c9);
}
}
if (s7 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c59(s2, s6);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
return s0;
}
function peg$parsepluralOption() {
var s0, s1, s2, s3, s4, s5, s6, s7;
s0 = peg$currPos;
s1 = peg$parse_();
if (s1 !== peg$FAILED) {
s2 = peg$parsepluralRuleSelectValue();
if (s2 !== peg$FAILED) {
s3 = peg$parse_();
if (s3 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 123) {
s4 = peg$c6;
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c7);
}
}
if (s4 !== peg$FAILED) {
peg$savedPos = peg$currPos;
s5 = peg$c60(s2);
if (s5) {
s5 = undefined;
}
else {
s5 = peg$FAILED;
}
if (s5 !== peg$FAILED) {
s6 = peg$parsemessage();
if (s6 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 125) {
s7 = peg$c8;
peg$currPos++;
}
else {
s7 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c9);
}
}
if (s7 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c61(s2, s6);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
return s0;
}
function peg$parsewhiteSpace() {
var s0, s1;
peg$silentFails++;
if (peg$c63.test(input.charAt(peg$currPos))) {
s0 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s0 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c64);
}
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c62);
}
}
return s0;
}
function peg$parsepatternSyntax() {
var s0, s1;
peg$silentFails++;
if (peg$c66.test(input.charAt(peg$currPos))) {
s0 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s0 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c67);
}
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c65);
}
}
return s0;
}
function peg$parse_() {
var s0, s1, s2;
peg$silentFails++;
s0 = peg$currPos;
s1 = [];
s2 = peg$parsewhiteSpace();
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$parsewhiteSpace();
}
if (s1 !== peg$FAILED) {
s0 = input.substring(s0, peg$currPos);
}
else {
s0 = s1;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c68);
}
}
return s0;
}
function peg$parsenumber() {
var s0, s1, s2;
peg$silentFails++;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 45) {
s1 = peg$c70;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c71);
}
}
if (s1 === peg$FAILED) {
s1 = null;
}
if (s1 !== peg$FAILED) {
s2 = peg$parseargNumber();
if (s2 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c72(s1, s2);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c69);
}
}
return s0;
}
function peg$parseapostrophe() {
var s0, s1;
peg$silentFails++;
if (input.charCodeAt(peg$currPos) === 39) {
s0 = peg$c32;
peg$currPos++;
}
else {
s0 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c33);
}
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c73);
}
}
return s0;
}
function peg$parsedoubleApostrophes() {
var s0, s1;
peg$silentFails++;
s0 = peg$currPos;
if (input.substr(peg$currPos, 2) === peg$c75) {
s1 = peg$c75;
peg$currPos += 2;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c76);
}
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c77();
}
s0 = s1;
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c74);
}
}
return s0;
}
function peg$parsequotedString() {
var s0, s1, s2, s3, s4, s5;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 39) {
s1 = peg$c32;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c33);
}
}
if (s1 !== peg$FAILED) {
s2 = peg$parseescapedChar();
if (s2 !== peg$FAILED) {
s3 = peg$currPos;
s4 = [];
if (input.substr(peg$currPos, 2) === peg$c75) {
s5 = peg$c75;
peg$currPos += 2;
}
else {
s5 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c76);
}
}
if (s5 === peg$FAILED) {
if (peg$c34.test(input.charAt(peg$currPos))) {
s5 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s5 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c35);
}
}
}
while (s5 !== peg$FAILED) {
s4.push(s5);
if (input.substr(peg$currPos, 2) === peg$c75) {
s5 = peg$c75;
peg$currPos += 2;
}
else {
s5 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c76);
}
}
if (s5 === peg$FAILED) {
if (peg$c34.test(input.charAt(peg$currPos))) {
s5 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s5 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c35);
}
}
}
}
if (s4 !== peg$FAILED) {
s3 = input.substring(s3, peg$currPos);
}
else {
s3 = s4;
}
if (s3 !== peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 39) {
s4 = peg$c32;
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c33);
}
}
if (s4 === peg$FAILED) {
s4 = null;
}
if (s4 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c78(s2, s3);
s0 = s1;
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
}
else {
peg$currPos = s0;
s0 = peg$FAILED;
}
return s0;
}
function peg$parseunquotedString() {
var s0, s1, s2, s3;
s0 = peg$currPos;
s1 = peg$currPos;
if (input.length > peg$currPos) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s2 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c14);
}
}
if (s2 !== peg$FAILED) {
peg$savedPos = peg$currPos;
s3 = peg$c79(s2);
if (s3) {
s3 = undefined;
}
else {
s3 = peg$FAILED;
}
if (s3 !== peg$FAILED) {
s2 = [s2, s3];
s1 = s2;
}
else {
peg$currPos = s1;
s1 = peg$FAILED;
}
}
else {
peg$currPos = s1;
s1 = peg$FAILED;
}
if (s1 === peg$FAILED) {
if (input.charCodeAt(peg$currPos) === 10) {
s1 = peg$c80;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c81);
}
}
}
if (s1 !== peg$FAILED) {
s0 = input.substring(s0, peg$currPos);
}
else {
s0 = s1;
}
return s0;
}
function peg$parseescapedChar() {
var s0, s1, s2, s3;
s0 = peg$currPos;
s1 = peg$currPos;
if (input.length > peg$currPos) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s2 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c14);
}
}
if (s2 !== peg$FAILED) {
peg$savedPos = peg$currPos;
s3 = peg$c82(s2);
if (s3) {
s3 = undefined;
}
else {
s3 = peg$FAILED;
}
if (s3 !== peg$FAILED) {
s2 = [s2, s3];
s1 = s2;
}
else {
peg$currPos = s1;
s1 = peg$FAILED;
}
}
else {
peg$currPos = s1;
s1 = peg$FAILED;
}
if (s1 !== peg$FAILED) {
s0 = input.substring(s0, peg$currPos);
}
else {
s0 = s1;
}
return s0;
}
function peg$parseargNameOrNumber() {
var s0, s1;
peg$silentFails++;
s0 = peg$currPos;
s1 = peg$parseargNumber();
if (s1 === peg$FAILED) {
s1 = peg$parseargName();
}
if (s1 !== peg$FAILED) {
s0 = input.substring(s0, peg$currPos);
}
else {
s0 = s1;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c83);
}
}
return s0;
}
function peg$parseargNumber() {
var s0, s1, s2, s3, s4;
peg$silentFails++;
s0 = peg$currPos;
if (input.charCodeAt(peg$currPos) === 48) {
s1 = peg$c85;
peg$currPos++;
}
else {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c86);
}
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c87();
}
s0 = s1;
if (s0 === peg$FAILED) {
s0 = peg$currPos;
s1 = peg$currPos;
if (peg$c88.test(input.charAt(peg$currPos))) {
s2 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s2 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c89);
}
}
if (s2 !== peg$FAILED) {
s3 = [];
if (peg$c90.test(input.charAt(peg$currPos))) {
s4 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c91);
}
}
while (s4 !== peg$FAILED) {
s3.push(s4);
if (peg$c90.test(input.charAt(peg$currPos))) {
s4 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c91);
}
}
}
if (s3 !== peg$FAILED) {
s2 = [s2, s3];
s1 = s2;
}
else {
peg$currPos = s1;
s1 = peg$FAILED;
}
}
else {
peg$currPos = s1;
s1 = peg$FAILED;
}
if (s1 !== peg$FAILED) {
peg$savedPos = s0;
s1 = peg$c92(s1);
}
s0 = s1;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c84);
}
}
return s0;
}
function peg$parseargName() {
var s0, s1, s2, s3, s4;
peg$silentFails++;
s0 = peg$currPos;
s1 = [];
s2 = peg$currPos;
s3 = peg$currPos;
peg$silentFails++;
s4 = peg$parsewhiteSpace();
if (s4 === peg$FAILED) {
s4 = peg$parsepatternSyntax();
}
peg$silentFails--;
if (s4 === peg$FAILED) {
s3 = undefined;
}
else {
peg$currPos = s3;
s3 = peg$FAILED;
}
if (s3 !== peg$FAILED) {
if (input.length > peg$currPos) {
s4 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c14);
}
}
if (s4 !== peg$FAILED) {
s3 = [s3, s4];
s2 = s3;
}
else {
peg$currPos = s2;
s2 = peg$FAILED;
}
}
else {
peg$currPos = s2;
s2 = peg$FAILED;
}
if (s2 !== peg$FAILED) {
while (s2 !== peg$FAILED) {
s1.push(s2);
s2 = peg$currPos;
s3 = peg$currPos;
peg$silentFails++;
s4 = peg$parsewhiteSpace();
if (s4 === peg$FAILED) {
s4 = peg$parsepatternSyntax();
}
peg$silentFails--;
if (s4 === peg$FAILED) {
s3 = undefined;
}
else {
peg$currPos = s3;
s3 = peg$FAILED;
}
if (s3 !== peg$FAILED) {
if (input.length > peg$currPos) {
s4 = input.charAt(peg$currPos);
peg$currPos++;
}
else {
s4 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c14);
}
}
if (s4 !== peg$FAILED) {
s3 = [s3, s4];
s2 = s3;
}
else {
peg$currPos = s2;
s2 = peg$FAILED;
}
}
else {
peg$currPos = s2;
s2 = peg$FAILED;
}
}
}
else {
s1 = peg$FAILED;
}
if (s1 !== peg$FAILED) {
s0 = input.substring(s0, peg$currPos);
}
else {
s0 = s1;
}
peg$silentFails--;
if (s0 === peg$FAILED) {
s1 = peg$FAILED;
if (peg$silentFails === 0) {
peg$fail(peg$c93);
}
}
return s0;
}
var messageCtx = ['root'];
function isNestedMessageText() {
return messageCtx.length > 1;
}
function isInPluralOption() {
return messageCtx[messageCtx.length - 1] === 'plural';
}
function insertLocation() {
return options && options.captureLocation ? {
location: location()
} : {};
}
peg$result = peg$startRuleFunction();
if (peg$result !== peg$FAILED && peg$currPos === input.length) {
return peg$result;
}
else {
if (peg$result !== peg$FAILED && peg$currPos < input.length) {
peg$fail(peg$endExpectation());
}
throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length
? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)
: peg$computeLocation(peg$maxFailPos, peg$maxFailPos));
}
}
var pegParse = peg$parse;
// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/normalize.js
var __spreadArrays = (undefined && undefined.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
var PLURAL_HASHTAG_REGEX = /(^|[^\\])#/g;
/**
* Whether to convert `#` in plural rule options
* to `{var, number}`
* @param el AST Element
* @param pluralStack current plural stack
*/
function normalizeHashtagInPlural(els) {
els.forEach(function (el) {
// If we're encountering a plural el
if (!isPluralElement(el) && !isSelectElement(el)) {
return;
}
// Go down the options and search for # in any literal element
Object.keys(el.options).forEach(function (id) {
var _a;
var opt = el.options[id];
// If we got a match, we have to split this
// and inject a NumberElement in the middle
var matchingLiteralElIndex = -1;
var literalEl = undefined;
for (var i = 0; i < opt.value.length; i++) {
var el_1 = opt.value[i];
if (isLiteralElement(el_1) && PLURAL_HASHTAG_REGEX.test(el_1.value)) {
matchingLiteralElIndex = i;
literalEl = el_1;
break;
}
}
if (literalEl) {
var newValue = literalEl.value.replace(PLURAL_HASHTAG_REGEX, "$1{" + el.value + ", number}");
var newEls = pegParse(newValue);
(_a = opt.value).splice.apply(_a, __spreadArrays([matchingLiteralElIndex, 1], newEls));
}
normalizeHashtagInPlural(opt.value);
});
});
}
// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/index.js
function parse(input, opts) {
var els = pegParse(input, opts);
if (!opts || opts.normalizeHashtagInPlural !== false) {
normalizeHashtagInPlural(els);
}
return els;
}
// CONCATENATED MODULE: ./node_modules/intl-format-cache/lib/index.js
/*
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License.
See the accompanying LICENSE file for terms.
*/
var lib_spreadArrays = (undefined && undefined.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
// -- Utilities ----------------------------------------------------------------
function getCacheId(inputs) {
return JSON.stringify(inputs.map(function (input) {
return input && typeof input === 'object' ? orderedProps(input) : input;
}));
}
function orderedProps(obj) {
return Object.keys(obj)
.sort()
.map(function (k) {
var _a;
return (_a = {}, _a[k] = obj[k], _a);
});
}
var memoizeFormatConstructor = function (FormatConstructor, cache) {
if (cache === void 0) { cache = {}; }
return function () {
var _a;
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
}
var cacheId = getCacheId(args);
var format = cacheId && cache[cacheId];
if (!format) {
format = new ((_a = FormatConstructor).bind.apply(_a, lib_spreadArrays([void 0], args)))();
if (cacheId) {
cache[cacheId] = format;
}
}
return format;
};
};
/* harmony default export */ var lib = (memoizeFormatConstructor);
// CONCATENATED MODULE: ./node_modules/intl-messageformat-parser/lib/skeleton.js
var skeleton_assign = (undefined && undefined.__assign) || function () {
skeleton_assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return skeleton_assign.apply(this, arguments);
};
/**
* https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* Credit: https://github.com/caridy/intl-datetimeformat-pattern/blob/master/index.js
* with some tweaks
*/
var DATE_TIME_REGEX = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
/**
* Parse Date time skeleton into Intl.DateTimeFormatOptions
* Ref: https://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
* @public
* @param skeleton skeleton string
*/
function parseDateTimeSkeleton(skeleton) {
var result = {};
skeleton.replace(DATE_TIME_REGEX, function (match) {
var len = match.length;
switch (match[0]) {
// Era
case 'G':
result.era = len === 4 ? 'long' : len === 5 ? 'narrow' : 'short';
break;
// Year
case 'y':
result.year = len === 2 ? '2-digit' : 'numeric';
break;
case 'Y':
case 'u':
case 'U':
case 'r':
throw new RangeError('`Y/u/U/r` (year) patterns are not supported, use `y` instead');
// Quarter
case 'q':
case 'Q':
throw new RangeError('`q/Q` (quarter) patterns are not supported');
// Month
case 'M':
case 'L':
result.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][len - 1];
break;
// Week
case 'w':
case 'W':
throw new RangeError('`w/W` (week) patterns are not supported');
case 'd':
result.day = ['numeric', '2-digit'][len - 1];
break;
case 'D':
case 'F':
case 'g':
throw new RangeError('`D/F/g` (day) patterns are not supported, use `d` instead');
// Weekday
case 'E':
result.weekday = len === 4 ? 'short' : len === 5 ? 'narrow' : 'short';
break;
case 'e':
if (len < 4) {
throw new RangeError('`e..eee` (weekday) patterns are not supported');
}
result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];
break;
case 'c':
if (len < 4) {
throw new RangeError('`c..ccc` (weekday) patterns are not supported');
}
result.weekday = ['short', 'long', 'narrow', 'short'][len - 4];
break;
// Period
case 'a': // AM, PM
result.hour12 = true;
break;
case 'b': // am, pm, noon, midnight
case 'B': // flexible day periods
throw new RangeError('`b/B` (period) patterns are not supported, use `a` instead');
// Hour
case 'h':
result.hourCycle = 'h12';
result.hour = ['numeric', '2-digit'][len - 1];
break;
case 'H':
result.hourCycle = 'h23';
result.hour = ['numeric', '2-digit'][len - 1];
break;
case 'K':
result.hourCycle = 'h11';
result.hour = ['numeric', '2-digit'][len - 1];
break;
case 'k':
result.hourCycle = 'h24';
result.hour = ['numeric', '2-digit'][len - 1];
break;
case 'j':
case 'J':
case 'C':
throw new RangeError('`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead');
// Minute
case 'm':
result.minute = ['numeric', '2-digit'][len - 1];
break;
// Second
case 's':
result.second = ['numeric', '2-digit'][len - 1];
break;
case 'S':
case 'A':
throw new RangeError('`S/A` (second) pattenrs are not supported, use `s` instead');
// Zone
case 'z': // 1..3, 4: specific non-location format
result.timeZoneName = len < 4 ? 'short' : 'long';
break;
case 'Z': // 1..3, 4, 5: The ISO8601 varios formats
case 'O': // 1, 4: miliseconds in day short, long
case 'v': // 1, 4: generic non-location format
case 'V': // 1, 2, 3, 4: time zone ID or city
case 'X': // 1, 2, 3, 4: The ISO8601 varios formats
case 'x': // 1, 2, 3, 4: The ISO8601 varios formats
throw new RangeError('`Z/O/v/V/X/x` (timeZone) pattenrs are not supported, use `z` instead');
}
return '';
});
return result;
}
function icuUnitToEcma(unit) {
return unit.replace(/^(.*?)-/, '');
}
var FRACTION_PRECISION_REGEX = /^\.(?:(0+)(\+|#+)?)?$/g;
var SIGNIFICANT_PRECISION_REGEX = /^(@+)?(\+|#+)?$/g;
function parseSignificantPrecision(str) {
var result = {};
str.replace(SIGNIFICANT_PRECISION_REGEX, function (_, g1, g2) {
// @@@ case
if (typeof g2 !== 'string') {
result.minimumSignificantDigits = g1.length;
result.maximumSignificantDigits = g1.length;
}
// @@@+ case
else if (g2 === '+') {
result.minimumSignificantDigits = g1.length;
}
// .### case
else if (g1[0] === '#') {
result.maximumSignificantDigits = g1.length;
}
// .@@## or .@@@ case
else {
result.minimumSignificantDigits = g1.length;
result.maximumSignificantDigits =
g1.length + (typeof g2 === 'string' ? g2.length : 0);
}
return '';
});
return result;
}
function parseSign(str) {
switch (str) {
case 'sign-auto':
return {
signDisplay: 'auto',
};
case 'sign-accounting':
return {
currencySign: 'accounting',
};
case 'sign-always':
return {
signDisplay: 'always',
};
case 'sign-accounting-always':
return {
signDisplay: 'always',
currencySign: 'accounting',
};
case 'sign-except-zero':
return {
signDisplay: 'exceptZero',
};
case 'sign-accounting-except-zero':
return {
signDisplay: 'exceptZero',
currencySign: 'accounting',
};
case 'sign-never':
return {
signDisplay: 'never',
};
}
}
function parseNotationOptions(opt) {
var result = {};
var signOpts = parseSign(opt);
if (signOpts) {
return signOpts;
}
return result;
}
/**
* https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#skeleton-stems-and-options
*/
function convertNumberSkeletonToNumberFormatOptions(tokens) {
var result = {};
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
var token = tokens_1[_i];
switch (token.stem) {
case 'percent':
result.style = 'percent';
continue;
case 'currency':
result.style = 'currency';
result.currency = token.options[0];
continue;
case 'group-off':
result.useGrouping = false;
continue;
case 'precision-integer':
result.maximumFractionDigits = 0;
continue;
case 'measure-unit':
result.style = 'unit';
result.unit = icuUnitToEcma(token.options[0]);
continue;
case 'compact-short':
result.notation = 'compact';
result.compactDisplay = 'short';
continue;
case 'compact-long':
result.notation = 'compact';
result.compactDisplay = 'long';
continue;
case 'scientific':
result = skeleton_assign(skeleton_assign(skeleton_assign({}, result), { notation: 'scientific' }), token.options.reduce(function (all, opt) { return (skeleton_assign(skeleton_assign({}, all), parseNotationOptions(opt))); }, {}));
continue;
case 'engineering':
result = skeleton_assign(skeleton_assign(skeleton_assign({}, result), { notation: 'engineering' }), token.options.reduce(function (all, opt) { return (skeleton_assign(skeleton_assign({}, all), parseNotationOptions(opt))); }, {}));
continue;
case 'notation-simple':
result.notation = 'standard';
continue;
// https://github.com/unicode-org/icu/blob/master/icu4c/source/i18n/unicode/unumberformatter.h
case 'unit-width-narrow':
result.currencyDisplay = 'narrowSymbol';
result.unitDisplay = 'narrow';
continue;
case 'unit-width-short':
result.currencyDisplay = 'code';
result.unitDisplay = 'short';
continue;
case 'unit-width-full-name':
result.currencyDisplay = 'name';
result.unitDisplay = 'long';
continue;
case 'unit-width-iso-code':
result.currencyDisplay = 'symbol';
continue;
}
// Precision
// https://github.com/unicode-org/icu/blob/master/docs/userguide/format_parse/numbers/skeletons.md#fraction-precision
if (FRACTION_PRECISION_REGEX.test(token.stem)) {
if (token.options.length > 1) {
throw new RangeError('Fraction-precision stems only accept a single optional option');
}
token.stem.replace(FRACTION_PRECISION_REGEX, function (match, g1, g2) {
// precision-integer case
if (match === '.') {
result.maximumFractionDigits = 0;
}
// .000+ case
else if (g2 === '+') {
result.minimumFractionDigits = g2.length;
}
// .### case
else if (g1[0] === '#') {
result.maximumFractionDigits = g1.length;
}
// .00## or .000 case
else {
result.minimumFractionDigits = g1.length;
result.maximumFractionDigits =
g1.length + (typeof g2 === 'string' ? g2.length : 0);
}
return '';
});
if (token.options.length) {
result = skeleton_assign(skeleton_assign({}, result), parseSignificantPrecision(token.options[0]));
}
continue;
}
if (SIGNIFICANT_PRECISION_REGEX.test(token.stem)) {
result = skeleton_assign(skeleton_assign({}, result), parseSignificantPrecision(token.stem));
continue;
}
var signOpts = parseSign(token.stem);
if (signOpts) {
result = skeleton_assign(skeleton_assign({}, result), signOpts);
}
}
return result;
}
// CONCATENATED MODULE: ./node_modules/intl-messageformat/lib/formatters.js
var formatters_extends = (undefined && undefined.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
var formatters_spreadArrays = (undefined && undefined.__spreadArrays) || function () {
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
for (var r = Array(s), k = 0, i = 0; i < il; i++)
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
r[k] = a[j];
return r;
};
var FormatError = /** @class */ (function (_super) {
formatters_extends(FormatError, _super);
function FormatError(msg, variableId) {
var _this = _super.call(this, msg) || this;
_this.variableId = variableId;
return _this;
}
return FormatError;
}(Error));
function mergeLiteral(parts) {
if (parts.length < 2) {
return parts;
}
return parts.reduce(function (all, part) {
var lastPart = all[all.length - 1];
if (!lastPart ||
lastPart.type !== 0 /* literal */ ||
part.type !== 0 /* literal */) {
all.push(part);
}
else {
lastPart.value += part.value;
}
return all;
}, []);
}
// TODO(skeleton): add skeleton support
function formatToParts(els, locales, formatters, formats, values, currentPluralValue,
// For debugging
originalMessage) {
// Hot path for straight simple msg translations
if (els.length === 1 && isLiteralElement(els[0])) {
return [
{
type: 0 /* literal */,
value: els[0].value,
},
];
}
var result = [];
for (var _i = 0, els_1 = els; _i < els_1.length; _i++) {
var el = els_1[_i];
// Exit early for string parts.
if (isLiteralElement(el)) {
result.push({
type: 0 /* literal */,
value: el.value,
});
continue;
}
// TODO: should this part be literal type?
// Replace `#` in plural rules with the actual numeric value.
if (isPoundElement(el)) {
if (typeof currentPluralValue === 'number') {
result.push({
type: 0 /* literal */,
value: formatters.getNumberFormat(locales).format(currentPluralValue),
});
}
continue;
}
var varName = el.value;
// Enforce that all required values are provided by the caller.
if (!(values && varName in values)) {
throw new FormatError("The intl string context variable \"" + varName + "\" was not provided to the string \"" + originalMessage + "\"");
}
var value = values[varName];
if (isArgumentElement(el)) {
if (!value || typeof value === 'string' || typeof value === 'number') {
value =
typeof value === 'string' || typeof value === 'number'
? String(value)
: '';
}
result.push({
type: 1 /* argument */,
value: value,
});
continue;
}
// Recursively format plural and select parts' option — which can be a
// nested pattern structure. The choosing of the option to use is
// abstracted-by and delegated-to the part helper object.
if (isDateElement(el)) {
var style = typeof el.style === 'string' ? formats.date[el.style] : undefined;
result.push({
type: 0 /* literal */,
value: formatters
.getDateTimeFormat(locales, style)
.format(value),
});
continue;
}
if (isTimeElement(el)) {
var style = typeof el.style === 'string'
? formats.time[el.style]
: isDateTimeSkeleton(el.style)
? parseDateTimeSkeleton(el.style.pattern)
: undefined;
result.push({
type: 0 /* literal */,
value: formatters
.getDateTimeFormat(locales, style)
.format(value),
});
continue;
}
if (isNumberElement(el)) {
var style = typeof el.style === 'string'
? formats.number[el.style]
: isNumberSkeleton(el.style)
? convertNumberSkeletonToNumberFormatOptions(el.style.tokens)
: undefined;
result.push({
type: 0 /* literal */,
value: formatters
.getNumberFormat(locales, style)
.format(value),
});
continue;
}
if (isSelectElement(el)) {
var opt = el.options[value] || el.options.other;
if (!opt) {
throw new RangeError("Invalid values for \"" + el.value + "\": \"" + value + "\". Options are \"" + Object.keys(el.options).join('", "') + "\"");
}
result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values));
continue;
}
if (isPluralElement(el)) {
var opt = el.options["=" + value];
if (!opt) {
if (!Intl.PluralRules) {
throw new FormatError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n");
}
var rule = formatters
.getPluralRules(locales, { type: el.pluralType })
.select(value - (el.offset || 0));
opt = el.options[rule] || el.options.other;
}
if (!opt) {
throw new RangeError("Invalid values for \"" + el.value + "\": \"" + value + "\". Options are \"" + Object.keys(el.options).join('", "') + "\"");
}
result.push.apply(result, formatToParts(opt.value, locales, formatters, formats, values, value - (el.offset || 0)));
continue;
}
}
return mergeLiteral(result);
}
function formatToString(els, locales, formatters, formats, values,
// For debugging
originalMessage) {
var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);
// Hot path for straight simple msg translations
if (parts.length === 1) {
return parts[0].value;
}
return parts.reduce(function (all, part) { return (all += part.value); }, '');
}
// Singleton
var domParser;
var TOKEN_DELIMITER = '@@';
var TOKEN_REGEX = /@@(\d+_\d+)@@/g;
var counter = 0;
function generateId() {
return Date.now() + "_" + ++counter;
}
function restoreRichPlaceholderMessage(text, objectParts) {
return text
.split(TOKEN_REGEX)
.filter(Boolean)
.map(function (c) { return (objectParts[c] != null ? objectParts[c] : c); })
.reduce(function (all, c) {
if (!all.length) {
all.push(c);
}
else if (typeof c === 'string' &&
typeof all[all.length - 1] === 'string') {
all[all.length - 1] += c;
}
else {
all.push(c);
}
return all;
}, []);
}
/**
* Not exhaustive, just for sanity check
*/
var SIMPLE_XML_REGEX = /(<([0-9a-zA-Z-_]*?)>(.*?)<\/([0-9a-zA-Z-_]*?)>)|(<[0-9a-zA-Z-_]*?\/>)/;
var TEMPLATE_ID = Date.now() + '@@';
var VOID_ELEMENTS = [
'area',
'base',
'br',
'col',
'embed',
'hr',
'img',
'input',
'link',
'meta',
'param',
'source',
'track',
'wbr',
];
function formatHTMLElement(el, objectParts, values) {
var tagName = el.tagName;
var outerHTML = el.outerHTML, textContent = el.textContent, childNodes = el.childNodes;
// Regular text
if (!tagName) {
return restoreRichPlaceholderMessage(textContent || '', objectParts);
}
tagName = tagName.toLowerCase();
var isVoidElement = ~VOID_ELEMENTS.indexOf(tagName);
var formatFnOrValue = values[tagName];
if (formatFnOrValue && isVoidElement) {
throw new FormatError(tagName + " is a self-closing tag and can not be used, please use another tag name.");
}
if (!childNodes.length) {
return [outerHTML];
}
var chunks = Array.prototype.slice.call(childNodes).reduce(function (all, child) {
return all.concat(formatHTMLElement(child, objectParts, values));
}, []);
// Legacy HTML
if (!formatFnOrValue) {
return formatters_spreadArrays(["<" + tagName + ">"], chunks, ["</" + tagName + ">"]);
}
// HTML Tag replacement
if (typeof formatFnOrValue === 'function') {
return [formatFnOrValue.apply(void 0, chunks)];
}
return [formatFnOrValue];
}
function formatHTMLMessage(els, locales, formatters, formats, values,
// For debugging
originalMessage) {
var parts = formatToParts(els, locales, formatters, formats, values, undefined, originalMessage);
var objectParts = {};
var formattedMessage = parts.reduce(function (all, part) {
if (part.type === 0 /* literal */) {
return (all += part.value);
}
var id = generateId();
objectParts[id] = part.value;
return (all += "" + TOKEN_DELIMITER + id + TOKEN_DELIMITER);
}, '');
// Not designed to filter out aggressively
if (!SIMPLE_XML_REGEX.test(formattedMessage)) {
return restoreRichPlaceholderMessage(formattedMessage, objectParts);
}
if (!values) {
throw new FormatError('Message has placeholders but no values was given');
}
if (typeof DOMParser === 'undefined') {
throw new FormatError('Cannot format XML message without DOMParser');
}
if (!domParser) {
domParser = new DOMParser();
}
var content = domParser
.parseFromString("<formatted-message id=\"" + TEMPLATE_ID + "\">" + formattedMessage + "</formatted-message>", 'text/html')
.getElementById(TEMPLATE_ID);
if (!content) {
throw new FormatError("Malformed HTML message " + formattedMessage);
}
var tagsToFormat = Object.keys(values).filter(function (varName) { return !!content.getElementsByTagName(varName).length; });
// No tags to format
if (!tagsToFormat.length) {
return restoreRichPlaceholderMessage(formattedMessage, objectParts);
}
var caseSensitiveTags = tagsToFormat.filter(function (tagName) { return tagName !== tagName.toLowerCase(); });
if (caseSensitiveTags.length) {
throw new FormatError("HTML tag must be lowercased but the following tags are not: " + caseSensitiveTags.join(', '));
}
// We're doing this since top node is `<formatted-message/>` which does not have a formatter
return Array.prototype.slice
.call(content.childNodes)
.reduce(function (all, child) { return all.concat(formatHTMLElement(child, objectParts, values)); }, []);
}
// CONCATENATED MODULE: ./node_modules/intl-messageformat/lib/core.js
/*
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License.
See the accompanying LICENSE file for terms.
*/
var core_assign = (undefined && undefined.__assign) || function () {
core_assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return core_assign.apply(this, arguments);
};
// -- MessageFormat --------------------------------------------------------
function mergeConfig(c1, c2) {
if (!c2) {
return c1;
}
return core_assign(core_assign(core_assign({}, (c1 || {})), (c2 || {})), Object.keys(c1).reduce(function (all, k) {
all[k] = core_assign(core_assign({}, c1[k]), (c2[k] || {}));
return all;
}, {}));
}
function mergeConfigs(defaultConfig, configs) {
if (!configs) {
return defaultConfig;
}
return Object.keys(defaultConfig).reduce(function (all, k) {
all[k] = mergeConfig(defaultConfig[k], configs[k]);
return all;
}, core_assign({}, defaultConfig));
}
function createDefaultFormatters(cache) {
if (cache === void 0) { cache = {
number: {},
dateTime: {},
pluralRules: {},
}; }
return {
getNumberFormat: lib(Intl.NumberFormat, cache.number),
getDateTimeFormat: lib(Intl.DateTimeFormat, cache.dateTime),
getPluralRules: lib(Intl.PluralRules, cache.pluralRules),
};
}
var core_IntlMessageFormat = /** @class */ (function () {
function IntlMessageFormat(message, locales, overrideFormats, opts) {
var _this = this;
if (locales === void 0) { locales = IntlMessageFormat.defaultLocale; }
this.formatterCache = {
number: {},
dateTime: {},
pluralRules: {},
};
this.format = function (values) {
return formatToString(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message);
};
this.formatToParts = function (values) {
return formatToParts(_this.ast, _this.locales, _this.formatters, _this.formats, values, undefined, _this.message);
};
this.formatHTMLMessage = function (values) {
return formatHTMLMessage(_this.ast, _this.locales, _this.formatters, _this.formats, values, _this.message);
};
this.resolvedOptions = function () { return ({
locale: Intl.NumberFormat.supportedLocalesOf(_this.locales)[0],
}); };
this.getAst = function () { return _this.ast; };
if (typeof message === 'string') {
this.message = message;
if (!IntlMessageFormat.__parse) {
throw new TypeError('IntlMessageFormat.__parse must be set to process `message` of type `string`');
}
// Parse string messages into an AST.
this.ast = IntlMessageFormat.__parse(message, {
normalizeHashtagInPlural: false,
});
}
else {
this.ast = message;
}
if (!Array.isArray(this.ast)) {
throw new TypeError('A message must be provided as a String or AST.');
}
// Creates a new object with the specified `formats` merged with the default
// formats.
this.formats = mergeConfigs(IntlMessageFormat.formats, overrideFormats);
// Defined first because it's used to build the format pattern.
this.locales = locales;
this.formatters =
(opts && opts.formatters) || createDefaultFormatters(this.formatterCache);
}
IntlMessageFormat.defaultLocale = new Intl.NumberFormat().resolvedOptions().locale;
IntlMessageFormat.__parse = parse;
// Default format options used as the prototype of the `formats` provided to the
// constructor. These are used when constructing the internal Intl.NumberFormat
// and Intl.DateTimeFormat instances.
IntlMessageFormat.formats = {
number: {
currency: {
style: 'currency',
},
percent: {
style: 'percent',
},
},
date: {
short: {
month: 'numeric',
day: 'numeric',
year: '2-digit',
},
medium: {
month: 'short',
day: 'numeric',
year: 'numeric',
},
long: {
month: 'long',
day: 'numeric',
year: 'numeric',
},
full: {
weekday: 'long',
month: 'long',
day: 'numeric',
year: 'numeric',
},
},
time: {
short: {
hour: 'numeric',
minute: 'numeric',
},
medium: {
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
},
long: {
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
timeZoneName: 'short',
},
full: {
hour: 'numeric',
minute: 'numeric',
second: 'numeric',
timeZoneName: 'short',
},
},
};
return IntlMessageFormat;
}());
/* harmony default export */ var core = (core_IntlMessageFormat);
// CONCATENATED MODULE: ./node_modules/intl-messageformat/lib/index.js
/*
Copyright (c) 2014, Yahoo! Inc. All rights reserved.
Copyrights licensed under the New BSD License.
See the accompanying LICENSE file for terms.
*/
/* harmony default export */ var intl_messageformat_lib = (core);
// CONCATENATED MODULE: ./node_modules/@formatjs/intl-utils/lib/invariant.js
function invariant(condition, message, Err) {
if (Err === void 0) { Err = Error; }
if (!condition) {
throw new Err(message);
}
}
//# sourceMappingURL=invariant.js.map
// CONCATENATED MODULE: ./node_modules/react-intl/lib/utils.js
/*
HTML escaping is the same as React's
(on purpose.) Therefore, it has the following Copyright and Licensing:
Copyright 2013-2014, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the LICENSE
file in the root directory of React's source tree.
*/
var ESCAPED_CHARS = {
38: '&amp;',
62: '&gt;',
60: '&lt;',
34: '&quot;',
39: '&#x27;'
};
var UNSAFE_CHARS_REGEX = /[&><"']/g;
function utils_escape(str) {
return ('' + str).replace(UNSAFE_CHARS_REGEX, function (match) {
return ESCAPED_CHARS[match.charCodeAt(0)];
});
}
function filterProps(props, whitelist) {
var defaults = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
return whitelist.reduce(function (filtered, name) {
if (name in props) {
filtered[name] = props[name];
} else if (name in defaults) {
filtered[name] = defaults[name];
}
return filtered;
}, {});
}
function invariantIntlContext(intl) {
invariant(intl, '[React Intl] Could not find required `intl` object. ' + '<IntlProvider> needs to exist in the component ancestry.');
}
function createError(message, exception) {
var eMsg = exception ? "\n".concat(exception.stack) : '';
return "[React Intl] ".concat(message).concat(eMsg);
}
function defaultErrorHandler(error) {
if (false) {}
}
var DEFAULT_INTL_CONFIG = {
formats: {},
messages: {},
timeZone: undefined,
textComponent: react["Fragment"],
defaultLocale: 'en',
defaultFormats: {},
onError: defaultErrorHandler
};
function createIntlCache() {
return {
dateTime: {},
number: {},
message: {},
relativeTime: {},
pluralRules: {},
list: {},
displayNames: {}
};
}
/**
* Create intl formatters and populate cache
* @param cache explicit cache to prevent leaking memory
*/
function createFormatters() {
var cache = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : createIntlCache();
var RelativeTimeFormat = Intl.RelativeTimeFormat;
var ListFormat = Intl.ListFormat;
var DisplayNames = Intl.DisplayNames;
return {
getDateTimeFormat: lib(Intl.DateTimeFormat, cache.dateTime),
getNumberFormat: lib(Intl.NumberFormat, cache.number),
getMessageFormat: lib(intl_messageformat_lib, cache.message),
getRelativeTimeFormat: lib(RelativeTimeFormat, cache.relativeTime),
getPluralRules: lib(Intl.PluralRules, cache.pluralRules),
getListFormat: lib(ListFormat, cache.list),
getDisplayNames: lib(DisplayNames, cache.displayNames)
};
}
function getNamedFormat(formats, type, name, onError) {
var formatType = formats && formats[type];
var format;
if (formatType) {
format = formatType[name];
}
if (format) {
return format;
}
onError(createError("No ".concat(type, " format named: ").concat(name)));
}
// CONCATENATED MODULE: ./node_modules/react-intl/lib/components/injectIntl.js
// Since rollup cannot deal with namespace being a function,
// this is to interop with TypeScript since `invariant`
// does not export a default
// https://github.com/rollup/rollup/issues/1267
var hoistNonReactStatics = hoist_non_react_statics_cjs_default.a || hoist_non_react_statics_cjs;
function getDisplayName(Component) {
return Component.displayName || Component.name || 'Component';
}
// TODO: We should provide initial value here
var IntlContext = react["createContext"](null);
var IntlConsumer = IntlContext.Consumer,
injectIntl_IntlProvider = IntlContext.Provider;
var Provider = injectIntl_IntlProvider;
var Context = IntlContext;
function injectIntl(WrappedComponent, options) {
var _ref = options || {},
_ref$intlPropName = _ref.intlPropName,
intlPropName = _ref$intlPropName === void 0 ? 'intl' : _ref$intlPropName,
_ref$forwardRef = _ref.forwardRef,
forwardRef = _ref$forwardRef === void 0 ? false : _ref$forwardRef,
_ref$enforceContext = _ref.enforceContext,
enforceContext = _ref$enforceContext === void 0 ? true : _ref$enforceContext;
var WithIntl = function WithIntl(props) {
return react["createElement"](IntlConsumer, null, function (intl) {
if (enforceContext) {
invariantIntlContext(intl);
}
return react["createElement"](WrappedComponent, Object.assign({}, props, Object(defineProperty["a" /* default */])({}, intlPropName, intl), {
ref: forwardRef ? props.forwardedRef : null
}));
});
};
WithIntl.displayName = "injectIntl(".concat(getDisplayName(WrappedComponent), ")");
WithIntl.WrappedComponent = WrappedComponent;
if (forwardRef) {
return hoistNonReactStatics(react["forwardRef"](function (props, ref) {
return react["createElement"](WithIntl, Object.assign({}, props, {
forwardedRef: ref
}));
}), WrappedComponent);
}
return hoistNonReactStatics(WithIntl, WrappedComponent);
}
// EXTERNAL MODULE: ./node_modules/intl-locales-supported/dist/index.js
var dist = __webpack_require__("kyWZ");
var dist_default = /*#__PURE__*/__webpack_require__.n(dist);
// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/number.js
var NUMBER_FORMAT_OPTIONS = ['localeMatcher', 'style', 'currency', 'currencyDisplay', 'unit', 'unitDisplay', 'useGrouping', 'minimumIntegerDigits', 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits',
// Unified NumberFormat (Stage 3 as of 10/22/19)
'compactDisplay', 'currencyDisplay', 'currencySign', 'notation', 'signDisplay', 'unit', 'unitDisplay'];
function getFormatter(_ref, getNumberFormat) {
var locale = _ref.locale,
formats = _ref.formats,
onError = _ref.onError;
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var format = options.format;
var defaults = format && getNamedFormat(formats, 'number', format, onError) || {};
var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults);
return getNumberFormat(locale, filteredOptions);
}
function formatNumber(config, getNumberFormat, value) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
try {
return getFormatter(config, getNumberFormat, options).format(value);
} catch (e) {
config.onError(createError('Error formatting number.', e));
}
return String(value);
}
function formatNumberToParts(config, getNumberFormat, value) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
try {
return getFormatter(config, getNumberFormat, options).formatToParts(value);
} catch (e) {
config.onError(createError('Error formatting number.', e));
}
return [];
}
// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/relativeTime.js
var RELATIVE_TIME_FORMAT_OPTIONS = ['numeric', 'style'];
function relativeTime_getFormatter(_ref, getRelativeTimeFormat) {
var locale = _ref.locale,
formats = _ref.formats,
onError = _ref.onError;
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var format = options.format;
var defaults = !!format && getNamedFormat(formats, 'relative', format, onError) || {};
var filteredOptions = filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults);
return getRelativeTimeFormat(locale, filteredOptions);
}
function formatRelativeTime(config, getRelativeTimeFormat, value, unit) {
var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
if (!unit) {
unit = 'second';
}
var RelativeTimeFormat = Intl.RelativeTimeFormat;
if (!RelativeTimeFormat) {
config.onError(createError("Intl.RelativeTimeFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-relativetimeformat\"\n"));
}
try {
return relativeTime_getFormatter(config, getRelativeTimeFormat, options).format(value, unit);
} catch (e) {
config.onError(createError('Error formatting relative time.', e));
}
return String(value);
}
// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/dateTime.js
/*
* Copyright 2015, Yahoo Inc.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/
var DATE_TIME_FORMAT_OPTIONS = ['localeMatcher', 'formatMatcher', 'timeZone', 'hour12', 'weekday', 'era', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeZoneName'];
function dateTime_getFormatter(_ref, type, getDateTimeFormat) {
var locale = _ref.locale,
formats = _ref.formats,
onError = _ref.onError,
timeZone = _ref.timeZone;
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var format = options.format;
var defaults = Object.assign(Object.assign({}, timeZone && {
timeZone: timeZone
}), format && getNamedFormat(formats, type, format, onError));
var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
if (type === 'time' && !filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second) {
// Add default formatting options if hour, minute, or second isn't defined.
filteredOptions = Object.assign(Object.assign({}, filteredOptions), {
hour: 'numeric',
minute: 'numeric'
});
}
return getDateTimeFormat(locale, filteredOptions);
}
function formatDate(config, getDateTimeFormat, value) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var date = typeof value === 'string' ? new Date(value || 0) : value;
try {
return dateTime_getFormatter(config, 'date', getDateTimeFormat, options).format(date);
} catch (e) {
config.onError(createError('Error formatting date.', e));
}
return String(date);
}
function formatTime(config, getDateTimeFormat, value) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var date = typeof value === 'string' ? new Date(value || 0) : value;
try {
return dateTime_getFormatter(config, 'time', getDateTimeFormat, options).format(date);
} catch (e) {
config.onError(createError('Error formatting time.', e));
}
return String(date);
}
function formatDateToParts(config, getDateTimeFormat, value) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var date = typeof value === 'string' ? new Date(value || 0) : value;
try {
return dateTime_getFormatter(config, 'date', getDateTimeFormat, options).formatToParts(date);
} catch (e) {
config.onError(createError('Error formatting date.', e));
}
return [];
}
function formatTimeToParts(config, getDateTimeFormat, value) {
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var date = typeof value === 'string' ? new Date(value || 0) : value;
try {
return dateTime_getFormatter(config, 'time', getDateTimeFormat, options).formatToParts(date);
} catch (e) {
config.onError(createError('Error formatting time.', e));
}
return [];
}
// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/plural.js
var PLURAL_FORMAT_OPTIONS = ['localeMatcher', 'type'];
function formatPlural(_ref, getPluralRules, value) {
var locale = _ref.locale,
onError = _ref.onError;
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
if (!Intl.PluralRules) {
onError(createError("Intl.PluralRules is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-pluralrules\"\n"));
}
var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);
try {
return getPluralRules(locale, filteredOptions).select(value);
} catch (e) {
onError(createError('Error formatting plural.', e));
}
return 'other';
}
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("oBTY");
// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/message.js
/*
* Copyright 2015, Yahoo Inc.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/
function setTimeZoneInOptions(opts, timeZone) {
return Object.keys(opts).reduce(function (all, k) {
all[k] = Object.assign({
timeZone: timeZone
}, opts[k]);
return all;
}, {});
}
function deepMergeOptions(opts1, opts2) {
var keys = Object.keys(Object.assign(Object.assign({}, opts1), opts2));
return keys.reduce(function (all, k) {
all[k] = Object.assign(Object.assign({}, opts1[k] || {}), opts2[k] || {});
return all;
}, {});
}
function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
if (!timeZone) {
return f1;
}
var mfFormats = intl_messageformat_lib.formats;
return Object.assign(Object.assign(Object.assign({}, mfFormats), f1), {
date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)),
time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone))
});
}
var message_prepareIntlMessageFormatHtmlOutput = function prepareIntlMessageFormatHtmlOutput(chunks) {
return react["createElement"].apply(react, [react["Fragment"], null].concat(Object(toConsumableArray["a" /* default */])(chunks)));
};
function message_formatMessage(_ref, state) {
var locale = _ref.locale,
formats = _ref.formats,
messages = _ref.messages,
defaultLocale = _ref.defaultLocale,
defaultFormats = _ref.defaultFormats,
onError = _ref.onError,
timeZone = _ref.timeZone;
var messageDescriptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
id: ''
};
var values = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var id = messageDescriptor.id,
defaultMessage = messageDescriptor.defaultMessage; // `id` is a required field of a Message Descriptor.
invariant(!!id, '[React Intl] An `id` must be provided to format a message.');
var message = messages && messages[String(id)];
formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
var formattedMessageParts = [];
if (message) {
try {
var formatter = state.getMessageFormat(message, locale, formats, {
formatters: state
});
formattedMessageParts = formatter.formatHTMLMessage(values);
} catch (e) {
onError(createError("Error formatting message: \"".concat(id, "\" for locale: \"").concat(locale, "\"") + (defaultMessage ? ', using default message as fallback.' : ''), e));
}
} else {
// This prevents warnings from littering the console in development
// when no `messages` are passed into the <IntlProvider> for the
// default locale, and a default message is in the source.
if (!defaultMessage || locale && locale.toLowerCase() !== defaultLocale.toLowerCase()) {
onError(createError("Missing message: \"".concat(id, "\" for locale: \"").concat(locale, "\"") + (defaultMessage ? ', using default message as fallback.' : '')));
}
}
if (!formattedMessageParts.length && defaultMessage) {
try {
var _formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats);
formattedMessageParts = _formatter.formatHTMLMessage(values);
} catch (e) {
onError(createError("Error formatting the default message for: \"".concat(id, "\""), e));
}
}
if (!formattedMessageParts.length) {
onError(createError("Cannot format message: \"".concat(id, "\", ") + "using message ".concat(message || defaultMessage ? 'source' : 'id', " as fallback.")));
if (typeof message === 'string') {
return message || defaultMessage || String(id);
}
return defaultMessage || String(id);
}
if (formattedMessageParts.length === 1 && typeof formattedMessageParts[0] === 'string') {
return formattedMessageParts[0] || defaultMessage || String(id);
}
return message_prepareIntlMessageFormatHtmlOutput(formattedMessageParts);
}
function message_formatHTMLMessage(config, state) {
var messageDescriptor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
id: ''
};
var rawValues = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
// Process all the values before they are used when formatting the ICU
// Message string. Since the formatted message might be injected via
// `innerHTML`, all String-based values need to be HTML-escaped.
var escapedValues = Object.keys(rawValues).reduce(function (escaped, name) {
var value = rawValues[name];
escaped[name] = typeof value === 'string' ? utils_escape(value) : value;
return escaped;
}, {});
return message_formatMessage(config, state, messageDescriptor, escapedValues);
}
// EXTERNAL MODULE: ./node_modules/shallow-equal/objects/index.js
var objects = __webpack_require__("6koa");
var objects_default = /*#__PURE__*/__webpack_require__.n(objects);
// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/list.js
var LIST_FORMAT_OPTIONS = ['localeMatcher', 'type', 'style'];
var now = Date.now();
function generateToken(i) {
return "".concat(now, "_").concat(i, "_").concat(now);
}
function formatList(_ref, getListFormat, values) {
var locale = _ref.locale,
onError = _ref.onError;
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var ListFormat = Intl.ListFormat;
if (!ListFormat) {
onError(createError("Intl.ListFormat is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-listformat\"\n"));
}
var filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS);
try {
var richValues = {};
var serializedValues = values.map(function (v, i) {
if (typeof v === 'object') {
var id = generateToken(i);
richValues[id] = v;
return id;
}
return String(v);
});
if (!Object.keys(richValues).length) {
return getListFormat(locale, filteredOptions).format(serializedValues);
}
var parts = getListFormat(locale, filteredOptions).formatToParts(serializedValues);
return parts.reduce(function (all, el) {
var val = el.value;
if (richValues[val]) {
all.push(richValues[val]);
} else if (typeof all[all.length - 1] === 'string') {
all[all.length - 1] += val;
} else {
all.push(val);
}
return all;
}, []);
} catch (e) {
onError(createError('Error formatting list.', e));
}
return values;
}
// CONCATENATED MODULE: ./node_modules/react-intl/lib/formatters/displayName.js
var DISPLAY_NAMES_OPTONS = ['localeMatcher', 'style', 'type', 'fallback'];
function formatDisplayName(_ref, getDisplayNames, value) {
var locale = _ref.locale,
onError = _ref.onError;
var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var DisplayNames = Intl.DisplayNames;
if (!DisplayNames) {
onError(createError("Intl.DisplayNames is not available in this environment.\nTry polyfilling it using \"@formatjs/intl-displaynames\"\n"));
}
var filteredOptions = filterProps(options, DISPLAY_NAMES_OPTONS);
try {
return getDisplayNames(locale, filteredOptions).of(value);
} catch (e) {
onError(createError('Error formatting display name.', e));
}
}
// CONCATENATED MODULE: ./node_modules/react-intl/lib/components/provider.js
function _callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, Object(isNativeReflectConstruct["a" /* default */])() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
/*
* Copyright 2015, Yahoo Inc.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/
var shallowEquals = objects_default.a || objects;
function processIntlConfig(config) {
return {
locale: config.locale,
timeZone: config.timeZone,
formats: config.formats,
textComponent: config.textComponent,
messages: config.messages,
defaultLocale: config.defaultLocale,
defaultFormats: config.defaultFormats,
onError: config.onError
};
}
/**
* Create intl object
* @param config intl config
* @param cache cache for formatter instances to prevent memory leak
*/
function createIntl(config, cache) {
var formatters = createFormatters(cache);
var resolvedConfig = Object.assign(Object.assign({}, DEFAULT_INTL_CONFIG), config);
if (!resolvedConfig.locale || !dist_default()(resolvedConfig.locale)) {
var locale = resolvedConfig.locale,
defaultLocale = resolvedConfig.defaultLocale,
onError = resolvedConfig.onError;
if (typeof onError === 'function') {
onError(createError("Missing locale data for locale: \"".concat(locale, "\". ") + "Using default locale: \"".concat(defaultLocale, "\" as fallback.")));
}
// Since there's no registered locale data for `locale`, this will
// fallback to the `defaultLocale` to make sure things can render.
// The `messages` are overridden to the `defaultProps` empty object
// to maintain referential equality across re-renders. It's assumed
// each <FormattedMessage> contains a `defaultMessage` prop.
resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';
}
return Object.assign(Object.assign({}, resolvedConfig), {
formatters: formatters,
formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat),
formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat),
formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat),
formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat),
formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat),
formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat),
formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules),
formatMessage: message_formatMessage.bind(null, resolvedConfig, formatters),
formatHTMLMessage: message_formatHTMLMessage.bind(null, resolvedConfig, formatters),
formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat),
formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames)
});
}
var provider_IntlProvider = /*#__PURE__*/function (_React$PureComponent) {
function IntlProvider() {
var _this;
Object(classCallCheck["a" /* default */])(this, IntlProvider);
_this = _callSuper(this, IntlProvider, arguments);
_this.cache = createIntlCache();
_this.state = {
cache: _this.cache,
intl: createIntl(processIntlConfig(_this.props), _this.cache),
prevConfig: processIntlConfig(_this.props)
};
return _this;
}
Object(inherits["a" /* default */])(IntlProvider, _React$PureComponent);
return Object(createClass["a" /* default */])(IntlProvider, [{
key: "render",
value: function render() {
invariantIntlContext(this.state.intl);
return react["createElement"](Provider, {
value: this.state.intl
}, this.props.children);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, _ref) {
var prevConfig = _ref.prevConfig,
cache = _ref.cache;
var config = processIntlConfig(props);
if (!shallowEquals(prevConfig, config)) {
return {
intl: createIntl(config, cache),
prevConfig: config
};
}
return null;
}
}]);
}(react["PureComponent"]);
provider_IntlProvider.displayName = 'IntlProvider';
provider_IntlProvider.defaultProps = DEFAULT_INTL_CONFIG;
// EXTERNAL MODULE: ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js
var index_esm = __webpack_require__("rlch");
// EXTERNAL MODULE: ./src/.umi-production/plugin-locale/locale.tsx
var plugin_locale_locale = __webpack_require__("ZW6p");
// EXTERNAL MODULE: ./node_modules/warning/warning.js
var warning = __webpack_require__("2W6z");
var warning_default = /*#__PURE__*/__webpack_require__.n(warning);
// EXTERNAL MODULE: ./src/.umi-production/core/umiExports.ts + 19 modules
var umiExports = __webpack_require__("9kvl");
// CONCATENATED MODULE: ./src/.umi-production/plugin-locale/localeExports.ts
// @ts-nocheck
// @ts-ignore
var g_intl;
var useLocalStorage = true;
var localeInfo = {};
/**
* 增加一个新的国际化语言
* @param name 语言的 key
* @param messages 对应的枚举对象
* @param extraLocale momentLocale, antd 国际化
*/
var addLocale = function addLocale(name, messages, extraLocales) {
var _localeInfo$name, _name$split;
if (!name) {
return;
}
// 可以合并
var mergeMessages = ((_localeInfo$name = localeInfo[name]) === null || _localeInfo$name === void 0 ? void 0 : _localeInfo$name.messages) ? Object.assign({}, localeInfo[name].messages, messages) : messages;
var _ref = extraLocales || {},
momentLocale = _ref.momentLocale,
antd = _ref.antd;
localeInfo[name] = {
messages: mergeMessages,
locale: (_name$split = name.split('-')) === null || _name$split === void 0 ? void 0 : _name$split.join('-'),
momentLocale: momentLocale,
antd: antd
};
};
/**
* 获取当前的 intl 对象,可以在 node 中使用
* @param locale 需要切换的语言类型
* @param changeIntl 是否不使用 g_intl
* @returns IntlShape
*/
var localeExports_getIntl = function getIntl(locale, changeIntl) {
// 如果全局的 g_intl 存在,且不是 setIntl 调用
if (g_intl && !changeIntl && !locale) {
return g_intl;
}
// 如果存在于 localeInfo 中
if (locale && localeInfo[locale]) {
return createIntl(localeInfo[locale]);
}
// 不存在需要一个报错提醒
warning_default()(!locale || !!localeInfo[locale], "The current popular language does not exist, please check the locales folder!");
// 使用 zh-CN
if (localeInfo["zh-CN"]) return createIntl(localeInfo["zh-CN"]);
// 如果还没有,返回一个空的
return createIntl({
locale: "zh-CN",
messages: {}
});
};
/**
* 切换全局的 intl 的设置
* @param locale 语言的key
*/
var setIntl = function setIntl(locale) {
g_intl = localeExports_getIntl(locale, true);
};
/**
* 获取当前选择的语言
* @returns string
*/
var localeExports_getLocale = function getLocale() {
var runtimeLocale = umiExports["d" /* plugin */].applyPlugins({
key: 'locale',
type: index_esm["a" /* ApplyPluginsType */].modify,
initialValue: {}
});
// runtime getLocale for user define
if (typeof (runtimeLocale === null || runtimeLocale === void 0 ? void 0 : runtimeLocale.getLocale) === 'function') {
return runtimeLocale.getLocale();
}
// please clear localStorage if you change the baseSeparator config
// because changing will break the app
var lang = typeof localStorage !== 'undefined' && useLocalStorage ? window.localStorage.getItem('umi_locale') : '';
// support baseNavigator, default true
var browserLang;
var isNavigatorLanguageValid = typeof navigator !== 'undefined' && typeof navigator.language === 'string';
browserLang = isNavigatorLanguageValid ? navigator.language.split('-').join('-') : '';
return lang || browserLang || "zh-CN";
};
/**
* 获取当前选择的方向
* @returns string
*/
var getDirection = function getDirection() {
var lang = localeExports_getLocale();
// array with all prefixs for rtl langueges ex: ar-EG , he-IL
var rtlLangs = ['he', 'ar', 'fa', 'ku'];
var direction = rtlLangs.filter(function (lng) {
return lang.startsWith(lng);
}).length ? 'rtl' : 'ltr';
return direction;
};
/**
* 切换语言
* @param lang 语言的 key
* @param realReload 是否刷新页面,默认刷新
* @returns string
*/
var localeExports_setLocale = function setLocale(lang) {
var realReload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var localeExp = new RegExp("^([a-z]{2})-?([A-Z]{2})?$");
var runtimeLocale = umiExports["d" /* plugin */].applyPlugins({
key: 'locale',
type: index_esm["a" /* ApplyPluginsType */].modify,
initialValue: {}
});
if (typeof (runtimeLocale === null || runtimeLocale === void 0 ? void 0 : runtimeLocale.setLocale) === 'function') {
runtimeLocale.setLocale({
lang: lang,
realReload: realReload,
updater: function updater() {
var updateLang = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : lang;
return plugin_locale_locale["d" /* event */].emit(plugin_locale_locale["a" /* LANG_CHANGE_EVENT */], updateLang);
}
});
return;
}
if (lang !== undefined && !localeExp.test(lang)) {
// for reset when lang === undefined
throw new Error('setLocale lang format error');
}
if (localeExports_getLocale() !== lang) {
if (typeof window.localStorage !== 'undefined' && useLocalStorage) {
window.localStorage.setItem('umi_locale', lang || '');
}
setIntl(lang);
if (realReload) {
window.location.reload();
} else {
plugin_locale_locale["d" /* event */].emit(plugin_locale_locale["a" /* LANG_CHANGE_EVENT */], lang);
// chrome 不支持这个事件。所以人肉触发一下
if (window.dispatchEvent) {
var _event = new Event('languagechange');
window.dispatchEvent(_event);
}
}
}
};
var firstWaring = true;
/**
* intl.formatMessage 的语法糖
* @deprecated 使用此 api 会造成切换语言的时候无法自动刷新,请使用 useIntl 或 injectIntl
* @param descriptor { id : string, defaultMessage : string }
* @param values { [key:string] : string }
* @returns string
*/
var localeExports_formatMessage = function formatMessage(descriptor, values) {
if (firstWaring) {
warning_default()(false, "Using this API will cause automatic refresh when switching languages, please use useIntl or injectIntl.\n\n\u4F7F\u7528\u6B64 api \u4F1A\u9020\u6210\u5207\u6362\u8BED\u8A00\u7684\u65F6\u5019\u65E0\u6CD5\u81EA\u52A8\u5237\u65B0\uFF0C\u8BF7\u4F7F\u7528 useIntl \u6216 injectIntl\u3002\n\nhttp://j.mp/37Fkd5Q\n ");
firstWaring = false;
}
return g_intl.formatMessage(descriptor, values);
};
/**
* 获取语言列表
* @returns string[]
*/
var getAllLocales = function getAllLocales() {
return Object.keys(localeInfo);
};
/***/ }),
/***/ "FhTr":
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/RightOutlined.js ***!
\*********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var RightOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z" } }] }, "name": "right", "theme": "outlined" };
exports.default = RightOutlined;
/***/ }),
/***/ "FoZm":
/*!************************************!*\
!*** ./node_modules/intl/index.js ***!
\************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {// Expose `IntlPolyfill` as global to add locale data into runtime later on.
global.IntlPolyfill = __webpack_require__(/*! ./lib/core.js */ "fL0r");
// Require all locale data for `Intl`. This module will be
// ignored when bundling for the browser with Browserify/Webpack.
__webpack_require__(/*! ./locale-data/complete.js */ 1);
// hack to export the polyfill as global Intl if needed
if (!global.Intl) {
global.Intl = global.IntlPolyfill;
global.IntlPolyfill.__applyLocaleSensitivePrototypes();
}
// providing an idiomatic api for the nodejs version of this module
module.exports = global.IntlPolyfill;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "FpZJ":
/*!*******************************************!*\
!*** ./node_modules/has-symbols/shams.js ***!
\*******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint complexity: [2, 18], max-statements: [2, 33] */
module.exports = function hasSymbols() {
if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
if (typeof Symbol.iterator === 'symbol') { return true; }
var obj = {};
var sym = Symbol('test');
var symObj = Object(sym);
if (typeof sym === 'string') { return false; }
if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
// temp disabled per https://github.com/ljharb/object.assign/issues/17
// if (sym instanceof Symbol) { return false; }
// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
// if (!(symObj instanceof Symbol)) { return false; }
// if (typeof Symbol.prototype.toString !== 'function') { return false; }
// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
var symVal = 42;
obj[sym] = symVal;
for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
var syms = Object.getOwnPropertySymbols(obj);
if (syms.length !== 1 || syms[0] !== sym) { return false; }
if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
if (typeof Object.getOwnPropertyDescriptor === 'function') {
var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
}
return true;
};
/***/ }),
/***/ "Fwt+":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.subarray.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.subarray` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.subarray
exportTypedArrayMethod('subarray', function subarray(begin, end) {
var O = aTypedArray(this);
var length = O.length;
var beginIndex = toAbsoluteIndex(begin, length);
return new (speciesConstructor(O, O.constructor))(
O.buffer,
O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT,
toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
);
});
/***/ }),
/***/ "FzKp":
/*!*****************************************************!*\
!*** ./src/models/classrooms/boards.ts + 1 modules ***!
\*****************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/boards.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function boards_getBoardsCategoryList(_x) {
return _getBoardsCategoryList.apply(this, arguments);
}
function _getBoardsCategoryList() {
_getBoardsCategoryList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/courses/board_list.json", {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getBoardsCategoryList.apply(this, arguments);
}
function boards_getBoardsDetail(_x2) {
return _getBoardsDetail.apply(this, arguments);
}
function _getBoardsDetail() {
_getBoardsDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.boardId, ".json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getBoardsDetail.apply(this, arguments);
}
function boards_setTopping(_x3) {
return _setTopping.apply(this, arguments);
}
function _setTopping() {
_setTopping = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.id, "/sticky_top.json"), {
method: 'put',
body: {
course_id: params.coursesId
}
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _setTopping.apply(this, arguments);
}
function boards_escTopping(_x4) {
return _escTopping.apply(this, arguments);
}
function _escTopping() {
_escTopping = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.id, "/sticky_top.json"), {
method: 'put',
body: {
course_id: params.coursesId
}
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _escTopping.apply(this, arguments);
}
function boards_getReplyList(_x5) {
return _getReplyList.apply(this, arguments);
}
function _getReplyList() {
_getReplyList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.boardId, "/reply_list.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getReplyList.apply(this, arguments);
}
function boards_createReply(_x6) {
return _createReply.apply(this, arguments);
}
function _createReply() {
_createReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/messages/".concat(params.boardId, "/reply.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _createReply.apply(this, arguments);
}
function boards_replyLike(_x7) {
return _replyLike.apply(this, arguments);
}
function _replyLike() {
_replyLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/like.json", {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _replyLike.apply(this, arguments);
}
function boards_replyUnLike(_x8) {
return _replyUnLike.apply(this, arguments);
}
function _replyUnLike() {
_replyUnLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/unlike.json", {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _replyUnLike.apply(this, arguments);
}
function boards_deleteReply(_x9) {
return _deleteReply.apply(this, arguments);
}
function _deleteReply() {
_deleteReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/commons/delete.json", {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _deleteReply.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/classrooms/boards.ts
function boards_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ boards_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var BoardsModel = {
namespace: 'boards',
state: {
name: '讨论',
loading: true,
// 题库
actionTabs: {},
boardsDetail: {},
boardsCategoryList: {}
},
effects: {
getBoardsCategoryList: function getBoardsCategoryList(_ref, _ref2) {
var payload = _ref.payload,
callback = _ref.callback;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee() {
var response;
return boards_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(boards_getBoardsCategoryList, payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
boardsCategoryList: Object(objectSpread2["a" /* default */])({}, response.data)
}
});
case 5:
return _context.abrupt("return", response.data);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
// 讨论详情
getBoardsDetail: function getBoardsDetail(_ref3, _ref4) {
var payload = _ref3.payload,
callback = _ref3.callback;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee2() {
var response;
return boards_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(boards_getBoardsDetail, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
boardsDetail: Object(objectSpread2["a" /* default */])({}, response.data)
}
});
case 5:
return _context2.abrupt("return", response.data);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
// 讨论置顶
setTopping: function setTopping(_ref5, _ref6) {
var payload = _ref5.payload,
callback = _ref5.callback;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee3() {
return boards_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(boards_setTopping, payload);
case 2:
return _context3.abrupt("return", _context3.sent);
case 3:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
// 讨论取消置顶
escTopping: function escTopping(_ref7, _ref8) {
var payload = _ref7.payload,
callback = _ref7.callback;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee4() {
return boards_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(boards_escTopping, payload);
case 2:
return _context4.abrupt("return", _context4.sent);
case 3:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
// 讨论回复列表
getReplyList: function getReplyList(_ref9, _ref10) {
var payload = _ref9.payload,
callback = _ref9.callback;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee5() {
var response;
return boards_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(boards_getReplyList, payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return put({
type: 'save',
payload: {
replyList: Object(objectSpread2["a" /* default */])({}, response.data)
}
});
case 5:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
// 讨论创建回复
createReply: function createReply(_ref11, _ref12) {
var payload = _ref11.payload,
callback = _ref11.callback;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee6() {
return boards_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(boards_createReply, payload);
case 2:
return _context6.abrupt("return", _context6.sent);
case 3:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
// 讨论回复点赞
replyLike: function replyLike(_ref13, _ref14) {
var payload = _ref13.payload,
callback = _ref13.callback;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee7() {
return boards_regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(boards_replyLike, payload);
case 2:
return _context7.abrupt("return", _context7.sent);
case 3:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
// 讨论回复取消点赞
replyUnLike: function replyUnLike(_ref15, _ref16) {
var payload = _ref15.payload,
callback = _ref15.callback;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee8() {
return boards_regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(boards_replyUnLike, payload);
case 2:
return _context8.abrupt("return", _context8.sent);
case 3:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
// 讨论回复删除
deleteReply: function deleteReply(_ref17, _ref18) {
var payload = _ref17.payload,
callback = _ref17.callback;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee9() {
return boards_regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(boards_deleteReply, payload);
case 2:
return _context9.abrupt("return", _context9.sent);
case 3:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref19, _ref20) {
var payload = _ref19.payload;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/boards_regeneratorRuntime().mark(function _callee10() {
return boards_regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context10.stop();
}
}, _callee10);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref21) {
var dispatch = _ref21.dispatch,
history = _ref21.history;
}
}
};
/* harmony default export */ var boards = __webpack_exports__["a"] = (BoardsModel);
/***/ }),
/***/ "G+G9":
/*!**********************************!*\
!*** ./src/models/user/index.ts ***!
\**********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */ "PpiC");
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! umi */ "9kvl");
/* harmony import */ var _service_user__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/service/user */ "jb+D");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var UserModel = {
namespace: 'user',
state: {
name: '用户登录模块',
//是否显示登录弹窗false不显示true显示
showPopLogin: false,
// 是否显示被关闭按钮
showClosable: false,
// 用户信息
userInfo: {},
eduUserInfo: {},
navigationInfo: {},
loading: true,
actionTabs: {
key: '',
params: {},
phone: ''
}
},
effects: {
login: function login(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var to, params, response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
to = payload.to, params = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(payload, ["to"]);
_context.next = 3;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* LoginIn */ "g"], params);
case 3:
response = _context.sent;
if (!response.status) {
try {
if (to) {
umi__WEBPACK_IMPORTED_MODULE_2__[/* history */ "c"].replace(to);
} else {
location.reload();
}
} catch (e) {}
}
case 5:
case "end":
return _context.stop();
}
}, _callee);
})();
},
showPopLogin: function showPopLogin(_ref3, _ref4) {
var payload = _ref3.payload;
var put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return put({
type: 'save',
payload: {
showPopLogin: payload.showPopLogin,
showClosable: payload.showClosable
}
});
case 2:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
GetCount: function GetCount(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getCount */ "k"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload));
case 2:
response = _context3.sent;
return _context3.abrupt("return", response);
case 4:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
ForgeLogin: function ForgeLogin(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var to, response;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
to = payload.to;
_context4.next = 3;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* ForgeLogin */ "c"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload));
case 3:
response = _context4.sent;
if (!response.status) {
try {
if (to) {
umi__WEBPACK_IMPORTED_MODULE_2__[/* history */ "c"].replace(to);
} else {
location.reload();
}
} catch (e) {}
}
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
getUserInfo: function getUserInfo(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var response;
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getUserInfo */ "x"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload), {}, {
debug: "admin"
}));
case 2:
response = _context5.sent;
localStorage.userInfo = JSON.stringify(response);
_context5.next = 6;
return put({
type: 'save',
payload: {
userInfo: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 6:
return _context5.abrupt("return", response);
case 7:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
getEducoderUserInfo: function getEducoderUserInfo(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var response;
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getEducoderUserInfo */ "m"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload));
case 2:
response = _context6.sent;
_context6.next = 5;
return put({
type: 'save',
payload: {
eduUserInfo: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context6.abrupt("return", response);
case 6:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
ForgeGetZoneList: function ForgeGetZoneList(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var response;
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getZoneList */ "A"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload));
case 2:
response = _context7.sent;
return _context7.abrupt("return", response);
case 4:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
getNavigationInfo: function getNavigationInfo(_ref15, _ref16) {
var payload = _ref15.payload;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
var response;
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* getNavigationInfo */ "q"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload));
case 2:
response = _context8.sent;
_context8.next = 5;
return put({
type: 'save',
payload: {
navigationInfo: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
setActionTabs: function setActionTabs(_ref17, _ref18) {
var payload = _ref17.payload;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
ForgeCheckName: function ForgeCheckName(_ref19, _ref20) {
var payload = _ref19.payload;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
var response;
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* ForgeCheckName */ "b"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload));
case 2:
response = _context10.sent;
return _context10.abrupt("return", response);
case 4:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
ForgeCheckEmail: function ForgeCheckEmail(_ref21, _ref22) {
var payload = _ref21.payload;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
var response;
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* ForgeCheckEmail */ "a"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload));
case 2:
response = _context11.sent;
return _context11.abrupt("return", response);
case 4:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
ForgeSaveUserInfo: function ForgeSaveUserInfo(_ref23, _ref24) {
var payload = _ref23.payload;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
var response;
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_3__[/* ForgeSaveUserInfo */ "e"], Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload));
case 2:
response = _context12.sent;
return _context12.abrupt("return", response);
case 4:
case "end":
return _context12.stop();
}
}, _callee12);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
} // 启用 immer 之后
// save(state, action) {
// state.name = action.payload;
// },
}
};
/* harmony default export */ __webpack_exports__["a"] = (UserModel);
/***/ }),
/***/ "G+Rx":
/*!************************************************!*\
!*** ./node_modules/core-js/internals/html.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
module.exports = getBuiltIn('document', 'documentElement');
/***/ }),
/***/ "G/JM":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.own-keys.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "Vu81");
// `Reflect.ownKeys` method
// https://tc39.github.io/ecma262/#sec-reflect.ownkeys
$({ target: 'Reflect', stat: true }, {
ownKeys: ownKeys
});
/***/ }),
/***/ "GC2F":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/to-offset.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toPositiveInteger = __webpack_require__(/*! ../internals/to-positive-integer */ "+M1K");
module.exports = function (it, BYTES) {
var offset = toPositiveInteger(it);
if (offset % BYTES) throw RangeError('Wrong offset');
return offset;
};
/***/ }),
/***/ "GKVU":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.anchor.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.anchor` method
// https://tc39.github.io/ecma262/#sec-string.prototype.anchor
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('anchor') }, {
anchor: function anchor(name) {
return createHTML(this, 'a', 'name', name);
}
});
/***/ }),
/***/ "GNNt":
/*!*************************************************************!*\
!*** ./node_modules/antd/es/config-provider/style/index.js ***!
\*************************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index.less */ "k/Y0");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_0__);
/***/ }),
/***/ "GRPF":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.fontsize.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.fontsize` method
// https://tc39.github.io/ecma262/#sec-string.prototype.fontsize
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontsize') }, {
fontsize: function fontsize(size) {
return createHTML(this, 'font', 'size', size);
}
});
/***/ }),
/***/ "GSrb":
/*!***************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/CheckCircleOutlined.js ***!
\***************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var CheckCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z" } }, { "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }] }, "name": "check-circle", "theme": "outlined" };
exports.default = CheckCircleOutlined;
/***/ }),
/***/ "GXvd":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.species.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.species` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.species
defineWellKnownSymbol('species');
/***/ }),
/***/ "GarU":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/an-instance.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = function (it, Constructor, name) {
if (!(it instanceof Constructor)) {
throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');
} return it;
};
/***/ }),
/***/ "GoyQ":
/*!*****************************************!*\
!*** ./node_modules/lodash/isObject.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
module.exports = isObject;
/***/ }),
/***/ "H+LF":
/*!*****************************************************!*\
!*** ./node_modules/core-js/modules/es.weak-set.js ***!
\*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var collection = __webpack_require__(/*! ../internals/collection */ "bWFh");
var collectionWeak = __webpack_require__(/*! ../internals/collection-weak */ "rKzb");
// `WeakSet` constructor
// https://tc39.github.io/ecma262/#sec-weakset-constructor
collection('WeakSet', function (init) {
return function WeakSet() { return init(this, arguments.length ? arguments[0] : undefined); };
}, collectionWeak);
/***/ }),
/***/ "H4Hi":
/*!****************************************!*\
!*** ./src/layouts/index.less?modules ***!
\****************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
module.exports = {"loading":"loading___Pj8IT","layoutMainClass":"layoutMainClass___Z79Lq"};
/***/ }),
/***/ "H4fg":
/*!*******************************************************!*\
!*** ./node_modules/rc-pagination/es/locale/en_US.js ***!
\*******************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
// Options.jsx
items_per_page: '/ page',
jump_to: 'Go to',
jump_to_confirm: 'confirm',
page: '',
// Pagination.jsx
prev_page: 'Previous Page',
next_page: 'Next Page',
prev_5: 'Previous 5 Pages',
next_5: 'Next 5 Pages',
prev_3: 'Previous 3 Pages',
next_3: 'Next 3 Pages'
});
/***/ }),
/***/ "H7XF":
/*!*****************************************!*\
!*** ./node_modules/base64-js/index.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.byteLength = byteLength
exports.toByteArray = toByteArray
exports.fromByteArray = fromByteArray
var lookup = []
var revLookup = []
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
for (var i = 0, len = code.length; i < len; ++i) {
lookup[i] = code[i]
revLookup[code.charCodeAt(i)] = i
}
// Support decoding URL-safe base64 strings, as Node.js does.
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
revLookup['-'.charCodeAt(0)] = 62
revLookup['_'.charCodeAt(0)] = 63
function getLens (b64) {
var len = b64.length
if (len % 4 > 0) {
throw new Error('Invalid string. Length must be a multiple of 4')
}
// Trim off extra bytes after placeholder bytes are found
// See: https://github.com/beatgammit/base64-js/issues/42
var validLen = b64.indexOf('=')
if (validLen === -1) validLen = len
var placeHoldersLen = validLen === len
? 0
: 4 - (validLen % 4)
return [validLen, placeHoldersLen]
}
// base64 is 4/3 + up to two characters of the original data
function byteLength (b64) {
var lens = getLens(b64)
var validLen = lens[0]
var placeHoldersLen = lens[1]
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
}
function _byteLength (b64, validLen, placeHoldersLen) {
return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
}
function toByteArray (b64) {
var tmp
var lens = getLens(b64)
var validLen = lens[0]
var placeHoldersLen = lens[1]
var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))
var curByte = 0
// if there are placeholders, only get up to the last complete 4 chars
var len = placeHoldersLen > 0
? validLen - 4
: validLen
var i
for (i = 0; i < len; i += 4) {
tmp =
(revLookup[b64.charCodeAt(i)] << 18) |
(revLookup[b64.charCodeAt(i + 1)] << 12) |
(revLookup[b64.charCodeAt(i + 2)] << 6) |
revLookup[b64.charCodeAt(i + 3)]
arr[curByte++] = (tmp >> 16) & 0xFF
arr[curByte++] = (tmp >> 8) & 0xFF
arr[curByte++] = tmp & 0xFF
}
if (placeHoldersLen === 2) {
tmp =
(revLookup[b64.charCodeAt(i)] << 2) |
(revLookup[b64.charCodeAt(i + 1)] >> 4)
arr[curByte++] = tmp & 0xFF
}
if (placeHoldersLen === 1) {
tmp =
(revLookup[b64.charCodeAt(i)] << 10) |
(revLookup[b64.charCodeAt(i + 1)] << 4) |
(revLookup[b64.charCodeAt(i + 2)] >> 2)
arr[curByte++] = (tmp >> 8) & 0xFF
arr[curByte++] = tmp & 0xFF
}
return arr
}
function tripletToBase64 (num) {
return lookup[num >> 18 & 0x3F] +
lookup[num >> 12 & 0x3F] +
lookup[num >> 6 & 0x3F] +
lookup[num & 0x3F]
}
function encodeChunk (uint8, start, end) {
var tmp
var output = []
for (var i = start; i < end; i += 3) {
tmp =
((uint8[i] << 16) & 0xFF0000) +
((uint8[i + 1] << 8) & 0xFF00) +
(uint8[i + 2] & 0xFF)
output.push(tripletToBase64(tmp))
}
return output.join('')
}
function fromByteArray (uint8) {
var tmp
var len = uint8.length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
var parts = []
var maxChunkLength = 16383 // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))
}
// pad the end with zeros, but make sure to not forget the extra bytes
if (extraBytes === 1) {
tmp = uint8[len - 1]
parts.push(
lookup[tmp >> 2] +
lookup[(tmp << 4) & 0x3F] +
'=='
)
} else if (extraBytes === 2) {
tmp = (uint8[len - 2] << 8) + uint8[len - 1]
parts.push(
lookup[tmp >> 10] +
lookup[(tmp >> 4) & 0x3F] +
lookup[(tmp << 2) & 0x3F] +
'='
)
}
return parts.join('')
}
/***/ }),
/***/ "H84U":
/*!*********************************************************************!*\
!*** ./node_modules/antd/es/config-provider/context.js + 1 modules ***!
\*********************************************************************/
/*! exports provided: ConfigContext, ConfigConsumer, withConfigConsumer */
/*! exports used: ConfigConsumer, ConfigContext */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/empty/index.js because of ./src/pages/Competitions/Entered/Enteredmodel/DownStudents.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ ConfigContext; });
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ ConfigConsumer; });
// UNUSED EXPORTS: withConfigConsumer
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/antd/es/empty/index.js + 2 modules
var empty = __webpack_require__("ECub");
// CONCATENATED MODULE: ./node_modules/antd/es/config-provider/renderEmpty.js
var renderEmpty_renderEmpty = function renderEmpty(componentName) {
return /*#__PURE__*/react["createElement"](ConfigConsumer, null, function (_ref) {
var getPrefixCls = _ref.getPrefixCls;
var prefix = getPrefixCls('empty');
switch (componentName) {
case 'Table':
case 'List':
return /*#__PURE__*/react["createElement"](empty["a" /* default */], {
image: empty["a" /* default */].PRESENTED_IMAGE_SIMPLE
});
case 'Select':
case 'TreeSelect':
case 'Cascader':
case 'Transfer':
case 'Mentions':
return /*#__PURE__*/react["createElement"](empty["a" /* default */], {
image: empty["a" /* default */].PRESENTED_IMAGE_SIMPLE,
className: "".concat(prefix, "-small")
});
default:
return /*#__PURE__*/react["createElement"](empty["a" /* default */], null);
}
});
};
/* harmony default export */ var config_provider_renderEmpty = (renderEmpty_renderEmpty);
// CONCATENATED MODULE: ./node_modules/antd/es/config-provider/context.js
var ConfigContext = /*#__PURE__*/react["createContext"]({
// We provide a default function for Context without provider
getPrefixCls: function getPrefixCls(suffixCls, customizePrefixCls) {
if (customizePrefixCls) return customizePrefixCls;
return suffixCls ? "ant-".concat(suffixCls) : 'ant';
},
renderEmpty: config_provider_renderEmpty
});
var ConfigConsumer = ConfigContext.Consumer;
function withConfigConsumer(config) {
return function withConfigConsumerFunc(Component) {
// Wrap with ConfigConsumer. Since we need compatible with react 15, be care when using ref methods
var SFC = function SFC(props) {
return /*#__PURE__*/react["createElement"](ConfigConsumer, null, function (configProps) {
var basicPrefixCls = config.prefixCls;
var getPrefixCls = configProps.getPrefixCls;
var customizePrefixCls = props.prefixCls;
var prefixCls = getPrefixCls(basicPrefixCls, customizePrefixCls);
return /*#__PURE__*/react["createElement"](Component, extends_default()({}, configProps, props, {
prefixCls: prefixCls
}));
});
};
var cons = Component.constructor;
var name = cons && cons.displayName || Component.name || 'Component';
SFC.displayName = "withConfigConsumer(".concat(name, ")");
return SFC;
};
}
/***/ }),
/***/ "HAuM":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/a-function.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = function (it) {
if (typeof it != 'function') {
throw TypeError(String(it) + ' is not a function');
} return it;
};
/***/ }),
/***/ "HBuW":
/*!********************************!*\
!*** ./src/service/shixuns.ts ***!
\********************************/
/*! exports provided: getShixunsList, getShixunsMenus, getShixunsDetail, getRightData, getChallengesData, execJupyter, execShixun, openChallenge, challengeMoveUp, challengeMoveDown, cancelCollect, collect, searchUserCourses, sendToCourse, cancelRelease, cancelPublic, applyPublic, release, getNewShixunsData, deleteAttachment, applyShixunMirror, submitShixuns, getShixunsJupyterLab, getAuditSituationData, updateAuditSituation, getCollaboratorsData, addCollaborator, addTeachGroupMember, getChangeManager, changeManager, deleteCollaborators, getRankingList, getSettingsData, getMirrorScript, getScriptContent, getCustomScript, updateSettingBasicInfo, getShixunQuote, deleteShixun, permanentClose, getDepartments, updatePermissionSetting, updateLearnSetting, updateSetting, getSetData, deleteDataSet, getChallengesNew, addChallengesNew, getChallengePractice, updateChallengesNew, getQuestionList, updateChallenges, deleteChallengesNew, getChallengesEdit, getChallengesAnswer, updateChallengesAnswer, addChallengesQuestion, updateChallengesQuestion, deleteChallengesQuestion, upChallengesQuestion, downChallengesQuestion, getEditChallengesQuestion, deleteGitFile, moveGitFile, getRepository, getSecretRepository, addRepositoryFile, getRepositoryCommit, getFileContent, updateRepositoryFile, uploadGitFolder, resetMyGame, getInfoWithTPM, getTimeInfoWithTPM, resetWithTPM, saveWithTPM, activeWithTPM, getForkList, updateCollaboratorEditable, setSecretDir, getEnvironmentData, getEnvironmentDetail, createRepository, createSecretRepository, existExercise, getMirrorApplies, mirrorAppliesPublish, mirrorAppliesOpenVnc, mirrorAppliesOpenWebssh, mirrorAppliesSaveImage, mirrorAppliesDeleteImage, mirrorAppliesExtendVnc, mirrorAppliesResetVncLink, getTaskPass, getInfoWithJupyterLab, updateJupyterLabSetting */
/*! exports used: addCollaborator, addRepositoryFile, addTeachGroupMember, applyPublic, applyShixunMirror, cancelCollect, cancelPublic, cancelRelease, challengeMoveDown, challengeMoveUp, changeManager, collect, deleteAttachment, deleteCollaborators, deleteDataSet, deleteGitFile, deleteShixun, execJupyter, execShixun, getAuditSituationData, getChallengesData, getChallengesEdit, getChallengesNew, getChangeManager, getCollaboratorsData, getCustomScript, getDepartments, getEditChallengesQuestion, getEnvironmentData, getFileContent, getInfoWithJupyterLab, getMirrorApplies, getMirrorScript, getNewShixunsData, getRankingList, getRepository, getRepositoryCommit, getRightData, getScriptContent, getSecretRepository, getSetData, getSettingsData, getShixunQuote, getShixunsDetail, getShixunsJupyterLab, getShixunsList, getShixunsMenus, moveGitFile, openChallenge, permanentClose, release, searchUserCourses, sendToCourse, submitShixuns, updateAuditSituation, updateCollaboratorEditable, updateLearnSetting, updatePermissionSetting, updateRepositoryFile, updateSetting, updateSettingBasicInfo, uploadGitFolder */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return getShixunsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return getShixunsMenus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return getShixunsDetail; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return getRightData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getChallengesData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return execJupyter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return execShixun; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return openChallenge; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return challengeMoveUp; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return challengeMoveDown; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return cancelCollect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return collect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return searchUserCourses; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ab", function() { return sendToCourse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return cancelRelease; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return cancelPublic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return applyPublic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return release; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return getNewShixunsData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return deleteAttachment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return applyShixunMirror; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bb", function() { return submitShixuns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return getShixunsJupyterLab; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getAuditSituationData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cb", function() { return updateAuditSituation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return getCollaboratorsData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addCollaborator; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return addTeachGroupMember; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getChangeManager; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return changeManager; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return deleteCollaborators; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return getRankingList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return getSettingsData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return getMirrorScript; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return getScriptContent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return getCustomScript; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ib", function() { return updateSettingBasicInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return getShixunQuote; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return deleteShixun; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return permanentClose; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return getDepartments; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fb", function() { return updatePermissionSetting; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "eb", function() { return updateLearnSetting; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hb", function() { return updateSetting; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return getSetData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return deleteDataSet; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getChallengesNew; });
/* unused harmony export addChallengesNew */
/* unused harmony export getChallengePractice */
/* unused harmony export updateChallengesNew */
/* unused harmony export getQuestionList */
/* unused harmony export updateChallenges */
/* unused harmony export deleteChallengesNew */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getChallengesEdit; });
/* unused harmony export getChallengesAnswer */
/* unused harmony export updateChallengesAnswer */
/* unused harmony export addChallengesQuestion */
/* unused harmony export updateChallengesQuestion */
/* unused harmony export deleteChallengesQuestion */
/* unused harmony export upChallengesQuestion */
/* unused harmony export downChallengesQuestion */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return getEditChallengesQuestion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return deleteGitFile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return moveGitFile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return getRepository; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return getSecretRepository; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return addRepositoryFile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return getRepositoryCommit; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return getFileContent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "gb", function() { return updateRepositoryFile; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "jb", function() { return uploadGitFolder; });
/* unused harmony export resetMyGame */
/* unused harmony export getInfoWithTPM */
/* unused harmony export getTimeInfoWithTPM */
/* unused harmony export resetWithTPM */
/* unused harmony export saveWithTPM */
/* unused harmony export activeWithTPM */
/* unused harmony export getForkList */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "db", function() { return updateCollaboratorEditable; });
/* unused harmony export setSecretDir */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return getEnvironmentData; });
/* unused harmony export getEnvironmentDetail */
/* unused harmony export createRepository */
/* unused harmony export createSecretRepository */
/* unused harmony export existExercise */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return getMirrorApplies; });
/* unused harmony export mirrorAppliesPublish */
/* unused harmony export mirrorAppliesOpenVnc */
/* unused harmony export mirrorAppliesOpenWebssh */
/* unused harmony export mirrorAppliesSaveImage */
/* unused harmony export mirrorAppliesDeleteImage */
/* unused harmony export mirrorAppliesExtendVnc */
/* unused harmony export mirrorAppliesResetVncLink */
/* unused harmony export getTaskPass */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return getInfoWithJupyterLab; });
/* unused harmony export updateJupyterLabSetting */
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
//实训首页列表
function getShixunsList(_x) {
return _getShixunsList.apply(this, arguments);
}
// 获取实训首页菜单
function _getShixunsList() {
_getShixunsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/shixuns.json', {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getShixunsList.apply(this, arguments);
}
function getShixunsMenus(_x2) {
return _getShixunsMenus.apply(this, arguments);
}
//获取实训详情
function _getShixunsMenus() {
_getShixunsMenus = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/disciplines.json', {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
source: "shixun"
}, params || {})
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getShixunsMenus.apply(this, arguments);
}
function getShixunsDetail(_x3) {
return _getShixunsDetail.apply(this, arguments);
}
// 获取右侧数据
function _getShixunsDetail() {
_getShixunsDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, ".json"), {
method: 'Get'
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getShixunsDetail.apply(this, arguments);
}
function getRightData(_x4) {
return _getRightData.apply(this, arguments);
}
// 获取挑战数据
function _getRightData() {
_getRightData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/show_right.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getRightData.apply(this, arguments);
}
function getChallengesData(_x5) {
return _getChallengesData.apply(this, arguments);
}
function _getChallengesData() {
_getChallengesData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getChallengesData.apply(this, arguments);
}
function execJupyter(_x6) {
return _execJupyter.apply(this, arguments);
}
function _execJupyter() {
_execJupyter = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/jupyter_exec.json").concat(params.reset ? "?reset=".concat(params.reset) : ''), {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _execJupyter.apply(this, arguments);
}
function execShixun(_x7) {
return _execShixun.apply(this, arguments);
}
function _execShixun() {
_execShixun = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/shixun_exec.json").concat(params.reset ? "?reset=".concat(params.reset) : ''), {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _execShixun.apply(this, arguments);
}
function openChallenge(_x8) {
return _openChallenge.apply(this, arguments);
}
function _openChallenge() {
_openChallenge = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(params.url, {
method: 'Get'
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _openChallenge.apply(this, arguments);
}
function challengeMoveUp(_x9) {
return _challengeMoveUp.apply(this, arguments);
}
function _challengeMoveUp() {
_challengeMoveUp = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.shixun_identifier, "/challenges/").concat(params.challenge_id, "/index_up.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _challengeMoveUp.apply(this, arguments);
}
function challengeMoveDown(_x10) {
return _challengeMoveDown.apply(this, arguments);
}
function _challengeMoveDown() {
_challengeMoveDown = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.shixun_identifier, "/challenges/").concat(params.challenge_id, "/index_down.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _challengeMoveDown.apply(this, arguments);
}
function cancelCollect(_x11) {
return _cancelCollect.apply(this, arguments);
}
function _cancelCollect() {
_cancelCollect = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/collections/cancel.json", {
method: 'Delete',
body: {
container_id: params.container_id,
container_type: params.container_type
}
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _cancelCollect.apply(this, arguments);
}
function collect(_x12) {
return _collect.apply(this, arguments);
}
function _collect() {
_collect = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/collections.json", {
method: 'Post',
body: {
container_id: params.container_id,
container_type: params.container_type
}
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _collect.apply(this, arguments);
}
function searchUserCourses(_x13) {
return _searchUserCourses.apply(this, arguments);
}
function _searchUserCourses() {
_searchUserCourses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
var _ref, id;
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_ref = params || {}, id = _ref.id;
return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(id, "/search_user_courses.json"), {
method: 'Get',
params: params
}));
case 2:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _searchUserCourses.apply(this, arguments);
}
function sendToCourse(_x14) {
return _sendToCourse.apply(this, arguments);
}
function _sendToCourse() {
_sendToCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
var _ref2, id, course_id;
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_ref2 = params || {}, id = _ref2.id, course_id = _ref2.course_id;
return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(id, "/send_to_course.json"), {
method: 'Post',
body: {
course_id: course_id
}
}));
case 2:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _sendToCourse.apply(this, arguments);
}
function cancelRelease(_x15) {
return _cancelRelease.apply(this, arguments);
}
function _cancelRelease() {
_cancelRelease = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/cancel_publish.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _cancelRelease.apply(this, arguments);
}
function cancelPublic(_x16) {
return _cancelPublic.apply(this, arguments);
}
function _cancelPublic() {
_cancelPublic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/cancel_apply_public.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _cancelPublic.apply(this, arguments);
}
function applyPublic(_x17) {
return _applyPublic.apply(this, arguments);
}
function _applyPublic() {
_applyPublic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/apply_public.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _applyPublic.apply(this, arguments);
}
function release(_x18) {
return _release.apply(this, arguments);
}
function _release() {
_release = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/publish.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _release.apply(this, arguments);
}
function getNewShixunsData(_x19) {
return _getNewShixunsData.apply(this, arguments);
}
function _getNewShixunsData() {
_getNewShixunsData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/jupyter_new.json", {
method: 'Get'
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _getNewShixunsData.apply(this, arguments);
}
function deleteAttachment(_x20) {
return _deleteAttachment.apply(this, arguments);
}
function _deleteAttachment() {
_deleteAttachment = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/attachments/".concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _deleteAttachment.apply(this, arguments);
}
function applyShixunMirror(_x21) {
return _applyShixunMirror.apply(this, arguments);
}
function _applyShixunMirror() {
_applyShixunMirror = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/apply_shixun_mirror.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _applyShixunMirror.apply(this, arguments);
}
function submitShixuns(_x22) {
return _submitShixuns.apply(this, arguments);
}
function _submitShixuns() {
_submitShixuns = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _submitShixuns.apply(this, arguments);
}
function getShixunsJupyterLab(_x23) {
return _getShixunsJupyterLab.apply(this, arguments);
}
function _getShixunsJupyterLab() {
_getShixunsJupyterLab = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/jupyter_lab_new.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _getShixunsJupyterLab.apply(this, arguments);
}
function getAuditSituationData(_x24) {
return _getAuditSituationData.apply(this, arguments);
}
function _getAuditSituationData() {
_getAuditSituationData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/review_newest_record.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _getAuditSituationData.apply(this, arguments);
}
function updateAuditSituation(_x25) {
return _updateAuditSituation.apply(this, arguments);
}
function _updateAuditSituation() {
_updateAuditSituation = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/review_shixun.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _updateAuditSituation.apply(this, arguments);
}
function getCollaboratorsData(_x26) {
return _getCollaboratorsData.apply(this, arguments);
}
function _getCollaboratorsData() {
_getCollaboratorsData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/collaborators.json"), {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _getCollaboratorsData.apply(this, arguments);
}
function addCollaborator(_x27) {
return _addCollaborator.apply(this, arguments);
}
function _addCollaborator() {
_addCollaborator = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/shixun_members_added.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _addCollaborator.apply(this, arguments);
}
function addTeachGroupMember(_x28) {
return _addTeachGroupMember.apply(this, arguments);
}
function _addTeachGroupMember() {
_addTeachGroupMember = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
return _context28.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.identifier, "/add_members_group.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context28.stop();
}
}, _callee28);
}));
return _addTeachGroupMember.apply(this, arguments);
}
function getChangeManager(_x29) {
return _getChangeManager.apply(this, arguments);
}
function _getChangeManager() {
_getChangeManager = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
return _context29.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/change_manager.json"), {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context29.stop();
}
}, _callee29);
}));
return _getChangeManager.apply(this, arguments);
}
function changeManager(_x30) {
return _changeManager.apply(this, arguments);
}
function _changeManager() {
_changeManager = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
return _context30.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/change_manager.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context30.stop();
}
}, _callee30);
}));
return _changeManager.apply(this, arguments);
}
function deleteCollaborators(_x31) {
return _deleteCollaborators.apply(this, arguments);
}
function _deleteCollaborators() {
_deleteCollaborators = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(params) {
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
return _context31.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/collaborators_delete.json?user_id=").concat(params.userId), {
method: 'delete'
}));
case 1:
case "end":
return _context31.stop();
}
}, _callee31);
}));
return _deleteCollaborators.apply(this, arguments);
}
function getRankingList(_x32) {
return _getRankingList.apply(this, arguments);
}
function _getRankingList() {
_getRankingList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) {
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
return _context32.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/ranking_list.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context32.stop();
}
}, _callee32);
}));
return _getRankingList.apply(this, arguments);
}
function getSettingsData(_x33) {
return _getSettingsData.apply(this, arguments);
}
function _getSettingsData() {
_getSettingsData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
return _context33.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/settings.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context33.stop();
}
}, _callee33);
}));
return _getSettingsData.apply(this, arguments);
}
function getMirrorScript(_x34) {
return _getMirrorScript.apply(this, arguments);
}
function _getMirrorScript() {
_getMirrorScript = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(params) {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
return _context34.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/get_mirror_script.json?mirror_id=".concat(params.mirror_id), {
method: 'Get'
}));
case 1:
case "end":
return _context34.stop();
}
}, _callee34);
}));
return _getMirrorScript.apply(this, arguments);
}
function getScriptContent(_x35) {
return _getScriptContent.apply(this, arguments);
}
function _getScriptContent() {
_getScriptContent = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(params) {
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
return _context35.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/get_script_contents.json"), {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context35.stop();
}
}, _callee35);
}));
return _getScriptContent.apply(this, arguments);
}
function getCustomScript(_x36) {
return _getCustomScript.apply(this, arguments);
}
function _getCustomScript() {
_getCustomScript = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(params) {
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
return _context36.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/get_custom_script.json"), {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context36.stop();
}
}, _callee36);
}));
return _getCustomScript.apply(this, arguments);
}
function updateSettingBasicInfo(_x37) {
return _updateSettingBasicInfo.apply(this, arguments);
}
function _updateSettingBasicInfo() {
_updateSettingBasicInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(params) {
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
while (1) switch (_context37.prev = _context37.next) {
case 0:
return _context37.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_for_jupyter.json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context37.stop();
}
}, _callee37);
}));
return _updateSettingBasicInfo.apply(this, arguments);
}
function getShixunQuote(_x38) {
return _getShixunQuote.apply(this, arguments);
}
function _getShixunQuote() {
_getShixunQuote = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(params) {
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
while (1) switch (_context38.prev = _context38.next) {
case 0:
return _context38.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/shixun_quotes.json"), {
method: 'Get'
}));
case 1:
case "end":
return _context38.stop();
}
}, _callee38);
}));
return _getShixunQuote.apply(this, arguments);
}
function deleteShixun(_x39) {
return _deleteShixun.apply(this, arguments);
}
function _deleteShixun() {
_deleteShixun = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(params) {
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
while (1) switch (_context39.prev = _context39.next) {
case 0:
return _context39.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context39.stop();
}
}, _callee39);
}));
return _deleteShixun.apply(this, arguments);
}
function permanentClose(_x40) {
return _permanentClose.apply(this, arguments);
}
function _permanentClose() {
_permanentClose = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(params) {
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
while (1) switch (_context40.prev = _context40.next) {
case 0:
return _context40.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/close.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context40.stop();
}
}, _callee40);
}));
return _permanentClose.apply(this, arguments);
}
function getDepartments(_x41) {
return _getDepartments.apply(this, arguments);
}
function _getDepartments() {
_getDepartments = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(params) {
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
while (1) switch (_context41.prev = _context41.next) {
case 0:
return _context41.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/departments.json", {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context41.stop();
}
}, _callee41);
}));
return _getDepartments.apply(this, arguments);
}
function updatePermissionSetting(_x42) {
return _updatePermissionSetting.apply(this, arguments);
}
function _updatePermissionSetting() {
_updatePermissionSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(params) {
return _regeneratorRuntime().wrap(function _callee42$(_context42) {
while (1) switch (_context42.prev = _context42.next) {
case 0:
return _context42.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_permission_setting.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context42.stop();
}
}, _callee42);
}));
return _updatePermissionSetting.apply(this, arguments);
}
function updateLearnSetting(_x43) {
return _updateLearnSetting.apply(this, arguments);
}
function _updateLearnSetting() {
_updateLearnSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(params) {
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
while (1) switch (_context43.prev = _context43.next) {
case 0:
return _context43.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_learn_setting.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context43.stop();
}
}, _callee43);
}));
return _updateLearnSetting.apply(this, arguments);
}
function updateSetting(_x44) {
return _updateSetting.apply(this, arguments);
}
function _updateSetting() {
_updateSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(params) {
return _regeneratorRuntime().wrap(function _callee44$(_context44) {
while (1) switch (_context44.prev = _context44.next) {
case 0:
return _context44.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_setting"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context44.stop();
}
}, _callee44);
}));
return _updateSetting.apply(this, arguments);
}
function getSetData(_x45) {
return _getSetData.apply(this, arguments);
}
function _getSetData() {
_getSetData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(params) {
return _regeneratorRuntime().wrap(function _callee45$(_context45) {
while (1) switch (_context45.prev = _context45.next) {
case 0:
return _context45.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/get_data_sets.json"), {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context45.stop();
}
}, _callee45);
}));
return _getSetData.apply(this, arguments);
}
function deleteDataSet(_x46) {
return _deleteDataSet.apply(this, arguments);
}
function _deleteDataSet() {
_deleteDataSet = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46(params) {
return _regeneratorRuntime().wrap(function _callee46$(_context46) {
while (1) switch (_context46.prev = _context46.next) {
case 0:
return _context46.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/destroy_data_sets.json"), {
method: 'Delete',
body: {
id: params.deleteId
}
}));
case 1:
case "end":
return _context46.stop();
}
}, _callee46);
}));
return _deleteDataSet.apply(this, arguments);
}
function getChallengesNew(_x47) {
return _getChallengesNew.apply(this, arguments);
}
function _getChallengesNew() {
_getChallengesNew = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47(params) {
return _regeneratorRuntime().wrap(function _callee47$(_context47) {
while (1) switch (_context47.prev = _context47.next) {
case 0:
return _context47.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/new.json"), {
method: 'get'
}));
case 1:
case "end":
return _context47.stop();
}
}, _callee47);
}));
return _getChallengesNew.apply(this, arguments);
}
function addChallengesNew(_x48) {
return _addChallengesNew.apply(this, arguments);
}
function _addChallengesNew() {
_addChallengesNew = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48(params) {
return _regeneratorRuntime().wrap(function _callee48$(_context48) {
while (1) switch (_context48.prev = _context48.next) {
case 0:
return _context48.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.identifier, "/challenges.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context48.stop();
}
}, _callee48);
}));
return _addChallengesNew.apply(this, arguments);
}
function getChallengePractice(_x49) {
return _getChallengePractice.apply(this, arguments);
}
function _getChallengePractice() {
_getChallengePractice = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(params) {
return _regeneratorRuntime().wrap(function _callee49$(_context49) {
while (1) switch (_context49.prev = _context49.next) {
case 0:
return _context49.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengeId, "/edit.json?tab=").concat(params.tab), {
method: 'get'
}));
case 1:
case "end":
return _context49.stop();
}
}, _callee49);
}));
return _getChallengePractice.apply(this, arguments);
}
function updateChallengesNew(_x50) {
return _updateChallengesNew.apply(this, arguments);
}
function _updateChallengesNew() {
_updateChallengesNew = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(params) {
return _regeneratorRuntime().wrap(function _callee50$(_context50) {
while (1) switch (_context50.prev = _context50.next) {
case 0:
return _context50.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, ".json"), {
method: 'put',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context50.stop();
}
}, _callee50);
}));
return _updateChallengesNew.apply(this, arguments);
}
function getQuestionList(_x51) {
return _getQuestionList.apply(this, arguments);
}
function _getQuestionList() {
_getQuestionList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(params) {
return _regeneratorRuntime().wrap(function _callee51$(_context51) {
while (1) switch (_context51.prev = _context51.next) {
case 0:
return _context51.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/choose_questions.json"), {
method: 'get'
}));
case 1:
case "end":
return _context51.stop();
}
}, _callee51);
}));
return _getQuestionList.apply(this, arguments);
}
function updateChallenges(_x52) {
return _updateChallenges.apply(this, arguments);
}
function _updateChallenges() {
_updateChallenges = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(params) {
return _regeneratorRuntime().wrap(function _callee52$(_context52) {
while (1) switch (_context52.prev = _context52.next) {
case 0:
return _context52.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/move_position.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context52.stop();
}
}, _callee52);
}));
return _updateChallenges.apply(this, arguments);
}
function deleteChallengesNew(_x53) {
return _deleteChallengesNew.apply(this, arguments);
}
function _deleteChallengesNew() {
_deleteChallengesNew = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(params) {
return _regeneratorRuntime().wrap(function _callee53$(_context53) {
while (1) switch (_context53.prev = _context53.next) {
case 0:
return _context53.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, ".json"), {
method: 'delete',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context53.stop();
}
}, _callee53);
}));
return _deleteChallengesNew.apply(this, arguments);
}
function getChallengesEdit(_x54) {
return _getChallengesEdit.apply(this, arguments);
}
function _getChallengesEdit() {
_getChallengesEdit = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54(params) {
return _regeneratorRuntime().wrap(function _callee54$(_context54) {
while (1) switch (_context54.prev = _context54.next) {
case 0:
return _context54.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/edit.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context54.stop();
}
}, _callee54);
}));
return _getChallengesEdit.apply(this, arguments);
}
function getChallengesAnswer(_x55) {
return _getChallengesAnswer.apply(this, arguments);
}
function _getChallengesAnswer() {
_getChallengesAnswer = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55(params) {
return _regeneratorRuntime().wrap(function _callee55$(_context55) {
while (1) switch (_context55.prev = _context55.next) {
case 0:
return _context55.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengeId, "/answer.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context55.stop();
}
}, _callee55);
}));
return _getChallengesAnswer.apply(this, arguments);
}
function updateChallengesAnswer(_x56) {
return _updateChallengesAnswer.apply(this, arguments);
}
function _updateChallengesAnswer() {
_updateChallengesAnswer = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56(params) {
return _regeneratorRuntime().wrap(function _callee56$(_context56) {
while (1) switch (_context56.prev = _context56.next) {
case 0:
return _context56.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengeId, "/crud_answer.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context56.stop();
}
}, _callee56);
}));
return _updateChallengesAnswer.apply(this, arguments);
}
function addChallengesQuestion(_x57) {
return _addChallengesQuestion.apply(this, arguments);
}
function _addChallengesQuestion() {
_addChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee57(params) {
return _regeneratorRuntime().wrap(function _callee57$(_context57) {
while (1) switch (_context57.prev = _context57.next) {
case 0:
return _context57.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/create_choose_question.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context57.stop();
}
}, _callee57);
}));
return _addChallengesQuestion.apply(this, arguments);
}
function updateChallengesQuestion(_x58) {
return _updateChallengesQuestion.apply(this, arguments);
}
function _updateChallengesQuestion() {
_updateChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee58(params) {
return _regeneratorRuntime().wrap(function _callee58$(_context58) {
while (1) switch (_context58.prev = _context58.next) {
case 0:
return _context58.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/update_choose_question.json?choose_id=").concat(params.questionId), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context58.stop();
}
}, _callee58);
}));
return _updateChallengesQuestion.apply(this, arguments);
}
function deleteChallengesQuestion(_x59) {
return _deleteChallengesQuestion.apply(this, arguments);
}
function _deleteChallengesQuestion() {
_deleteChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee59(params) {
return _regeneratorRuntime().wrap(function _callee59$(_context59) {
while (1) switch (_context59.prev = _context59.next) {
case 0:
return _context59.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/destroy_challenge_choose.json"), {
method: 'Delete',
body: {
choose_id: params.questionId
}
}));
case 1:
case "end":
return _context59.stop();
}
}, _callee59);
}));
return _deleteChallengesQuestion.apply(this, arguments);
}
function upChallengesQuestion(_x60) {
return _upChallengesQuestion.apply(this, arguments);
}
function _upChallengesQuestion() {
_upChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee60(params) {
return _regeneratorRuntime().wrap(function _callee60$(_context60) {
while (1) switch (_context60.prev = _context60.next) {
case 0:
return _context60.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/choose_question_up_position.json"), {
method: 'post',
body: {
challenge_choose_id: params.questionId
}
}));
case 1:
case "end":
return _context60.stop();
}
}, _callee60);
}));
return _upChallengesQuestion.apply(this, arguments);
}
function downChallengesQuestion(_x61) {
return _downChallengesQuestion.apply(this, arguments);
}
function _downChallengesQuestion() {
_downChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee61(params) {
return _regeneratorRuntime().wrap(function _callee61$(_context61) {
while (1) switch (_context61.prev = _context61.next) {
case 0:
return _context61.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/choose_question_down_position.json"), {
method: 'post',
body: {
challenge_choose_id: params.questionId
}
}));
case 1:
case "end":
return _context61.stop();
}
}, _callee61);
}));
return _downChallengesQuestion.apply(this, arguments);
}
function getEditChallengesQuestion(_x62) {
return _getEditChallengesQuestion.apply(this, arguments);
}
function _getEditChallengesQuestion() {
_getEditChallengesQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee62(params) {
return _regeneratorRuntime().wrap(function _callee62$(_context62) {
while (1) switch (_context62.prev = _context62.next) {
case 0:
return _context62.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/edit_choose_question.json?choose_id=").concat(params.questionId), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context62.stop();
}
}, _callee62);
}));
return _getEditChallengesQuestion.apply(this, arguments);
}
function deleteGitFile(_x63) {
return _deleteGitFile.apply(this, arguments);
}
function _deleteGitFile() {
_deleteGitFile = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee63(params) {
return _regeneratorRuntime().wrap(function _callee63$(_context63) {
while (1) switch (_context63.prev = _context63.next) {
case 0:
return _context63.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/delete_git_file.json"), {
method: 'Delete',
body: params
}));
case 1:
case "end":
return _context63.stop();
}
}, _callee63);
}));
return _deleteGitFile.apply(this, arguments);
}
function moveGitFile(_x64) {
return _moveGitFile.apply(this, arguments);
}
function _moveGitFile() {
_moveGitFile = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee64(params) {
return _regeneratorRuntime().wrap(function _callee64$(_context64) {
while (1) switch (_context64.prev = _context64.next) {
case 0:
return _context64.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/mv_file.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context64.stop();
}
}, _callee64);
}));
return _moveGitFile.apply(this, arguments);
}
function getRepository(_x65) {
return _getRepository.apply(this, arguments);
}
function _getRepository() {
_getRepository = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee65(params) {
return _regeneratorRuntime().wrap(function _callee65$(_context65) {
while (1) switch (_context65.prev = _context65.next) {
case 0:
return _context65.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/repository.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context65.stop();
}
}, _callee65);
}));
return _getRepository.apply(this, arguments);
}
function getSecretRepository(_x66) {
return _getSecretRepository.apply(this, arguments);
}
function _getSecretRepository() {
_getSecretRepository = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee66(params) {
return _regeneratorRuntime().wrap(function _callee66$(_context66) {
while (1) switch (_context66.prev = _context66.next) {
case 0:
return _context66.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/secret_repository.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context66.stop();
}
}, _callee66);
}));
return _getSecretRepository.apply(this, arguments);
}
function addRepositoryFile(_x67) {
return _addRepositoryFile.apply(this, arguments);
}
function _addRepositoryFile() {
_addRepositoryFile = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee67(params) {
return _regeneratorRuntime().wrap(function _callee67$(_context67) {
while (1) switch (_context67.prev = _context67.next) {
case 0:
return _context67.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/add_file.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context67.stop();
}
}, _callee67);
}));
return _addRepositoryFile.apply(this, arguments);
}
function getRepositoryCommit(_x68) {
return _getRepositoryCommit.apply(this, arguments);
}
function _getRepositoryCommit() {
_getRepositoryCommit = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee68(params) {
return _regeneratorRuntime().wrap(function _callee68$(_context68) {
while (1) switch (_context68.prev = _context68.next) {
case 0:
return _context68.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/commits.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context68.stop();
}
}, _callee68);
}));
return _getRepositoryCommit.apply(this, arguments);
}
function getFileContent(_x69) {
return _getFileContent.apply(this, arguments);
}
function _getFileContent() {
_getFileContent = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee69(params) {
return _regeneratorRuntime().wrap(function _callee69$(_context69) {
while (1) switch (_context69.prev = _context69.next) {
case 0:
return _context69.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/file_content.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context69.stop();
}
}, _callee69);
}));
return _getFileContent.apply(this, arguments);
}
function updateRepositoryFile(_x70) {
return _updateRepositoryFile.apply(this, arguments);
}
function _updateRepositoryFile() {
_updateRepositoryFile = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee70(params) {
return _regeneratorRuntime().wrap(function _callee70$(_context70) {
while (1) switch (_context70.prev = _context70.next) {
case 0:
return _context70.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_file.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context70.stop();
}
}, _callee70);
}));
return _updateRepositoryFile.apply(this, arguments);
}
function uploadGitFolder(_x71) {
return _uploadGitFolder.apply(this, arguments);
}
function _uploadGitFolder() {
_uploadGitFolder = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71(params) {
return _regeneratorRuntime().wrap(function _callee71$(_context71) {
while (1) switch (_context71.prev = _context71.next) {
case 0:
return _context71.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/upload_git_folder.json"), {
method: 'post',
body: {
path: params.path,
secret_repository: params.secret_repository
}
}));
case 1:
case "end":
return _context71.stop();
}
}, _callee71);
}));
return _uploadGitFolder.apply(this, arguments);
}
function resetMyGame(_x72) {
return _resetMyGame.apply(this, arguments);
}
function _resetMyGame() {
_resetMyGame = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee72(params) {
return _regeneratorRuntime().wrap(function _callee72$(_context72) {
while (1) switch (_context72.prev = _context72.next) {
case 0:
return _context72.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/".concat(params.url), {
method: 'Get'
}));
case 1:
case "end":
return _context72.stop();
}
}, _callee72);
}));
return _resetMyGame.apply(this, arguments);
}
function getInfoWithTPM(_x73) {
return _getInfoWithTPM.apply(this, arguments);
}
function _getInfoWithTPM() {
_getInfoWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee73(params) {
return _regeneratorRuntime().wrap(function _callee73$(_context73) {
while (1) switch (_context73.prev = _context73.next) {
case 0:
return _context73.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/get_info_with_tpm.json", {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context73.stop();
}
}, _callee73);
}));
return _getInfoWithTPM.apply(this, arguments);
}
function getTimeInfoWithTPM(_x74) {
return _getTimeInfoWithTPM.apply(this, arguments);
}
function _getTimeInfoWithTPM() {
_getTimeInfoWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee74(params) {
return _regeneratorRuntime().wrap(function _callee74$(_context74) {
while (1) switch (_context74.prev = _context74.next) {
case 0:
return _context74.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/timeinfo_with_tpm.json", {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context74.stop();
}
}, _callee74);
}));
return _getTimeInfoWithTPM.apply(this, arguments);
}
function resetWithTPM(_x75) {
return _resetWithTPM.apply(this, arguments);
}
function _resetWithTPM() {
_resetWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee75(params) {
return _regeneratorRuntime().wrap(function _callee75$(_context75) {
while (1) switch (_context75.prev = _context75.next) {
case 0:
return _context75.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/reset_with_tpm.json", {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context75.stop();
}
}, _callee75);
}));
return _resetWithTPM.apply(this, arguments);
}
function saveWithTPM(_x76) {
return _saveWithTPM.apply(this, arguments);
}
function _saveWithTPM() {
_saveWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76(params) {
return _regeneratorRuntime().wrap(function _callee76$(_context76) {
while (1) switch (_context76.prev = _context76.next) {
case 0:
return _context76.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/save_with_tpm.json", {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context76.stop();
}
}, _callee76);
}));
return _saveWithTPM.apply(this, arguments);
}
function activeWithTPM(_x77) {
return _activeWithTPM.apply(this, arguments);
}
function _activeWithTPM() {
_activeWithTPM = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77(params) {
return _regeneratorRuntime().wrap(function _callee77$(_context77) {
while (1) switch (_context77.prev = _context77.next) {
case 0:
return _context77.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/active_with_tpm.json", {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context77.stop();
}
}, _callee77);
}));
return _activeWithTPM.apply(this, arguments);
}
function getForkList(_x78) {
return _getForkList.apply(this, arguments);
}
function _getForkList() {
_getForkList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee78(params) {
return _regeneratorRuntime().wrap(function _callee78$(_context78) {
while (1) switch (_context78.prev = _context78.next) {
case 0:
return _context78.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/fork_list.json"), {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context78.stop();
}
}, _callee78);
}));
return _getForkList.apply(this, arguments);
}
function updateCollaboratorEditable(_x79) {
return _updateCollaboratorEditable.apply(this, arguments);
}
function _updateCollaboratorEditable() {
_updateCollaboratorEditable = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee79(params) {
return _regeneratorRuntime().wrap(function _callee79$(_context79) {
while (1) switch (_context79.prev = _context79.next) {
case 0:
return _context79.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.identifier, "/change_editable.json"), {
method: 'put',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context79.stop();
}
}, _callee79);
}));
return _updateCollaboratorEditable.apply(this, arguments);
}
function setSecretDir(_x80) {
return _setSecretDir.apply(this, arguments);
}
//获取环境数据
function _setSecretDir() {
_setSecretDir = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80(params) {
return _regeneratorRuntime().wrap(function _callee80$(_context80) {
while (1) switch (_context80.prev = _context80.next) {
case 0:
return _context80.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/set_secret_dir.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context80.stop();
}
}, _callee80);
}));
return _setSecretDir.apply(this, arguments);
}
function getEnvironmentData(_x81) {
return _getEnvironmentData.apply(this, arguments);
}
//环境的具体信息
function _getEnvironmentData() {
_getEnvironmentData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee81(params) {
return _regeneratorRuntime().wrap(function _callee81$(_context81) {
while (1) switch (_context81.prev = _context81.next) {
case 0:
return _context81.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/new.json", {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context81.stop();
}
}, _callee81);
}));
return _getEnvironmentData.apply(this, arguments);
}
function getEnvironmentDetail(_x82) {
return _getEnvironmentDetail.apply(this, arguments);
}
function _getEnvironmentDetail() {
_getEnvironmentDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee82(params) {
return _regeneratorRuntime().wrap(function _callee82$(_context82) {
while (1) switch (_context82.prev = _context82.next) {
case 0:
return _context82.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/environment_info", {
method: 'Get',
params: params
}));
case 1:
case "end":
return _context82.stop();
}
}, _callee82);
}));
return _getEnvironmentDetail.apply(this, arguments);
}
function createRepository(_x83) {
return _createRepository.apply(this, arguments);
}
function _createRepository() {
_createRepository = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee83(params) {
return _regeneratorRuntime().wrap(function _callee83$(_context83) {
while (1) switch (_context83.prev = _context83.next) {
case 0:
return _context83.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/init_repository.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context83.stop();
}
}, _callee83);
}));
return _createRepository.apply(this, arguments);
}
function createSecretRepository(_x84) {
return _createSecretRepository.apply(this, arguments);
}
// 检查实训是否在考试中
function _createSecretRepository() {
_createSecretRepository = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee84(params) {
return _regeneratorRuntime().wrap(function _callee84$(_context84) {
while (1) switch (_context84.prev = _context84.next) {
case 0:
return _context84.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_secret_repository.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context84.stop();
}
}, _callee84);
}));
return _createSecretRepository.apply(this, arguments);
}
function existExercise(_x85) {
return _existExercise.apply(this, arguments);
}
function _existExercise() {
_existExercise = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee85(params) {
return _regeneratorRuntime().wrap(function _callee85$(_context85) {
while (1) switch (_context85.prev = _context85.next) {
case 0:
return _context85.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/exist_exercise.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context85.stop();
}
}, _callee85);
}));
return _existExercise.apply(this, arguments);
}
function getMirrorApplies(_x86) {
return _getMirrorApplies.apply(this, arguments);
}
function _getMirrorApplies() {
_getMirrorApplies = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee86(params) {
return _regeneratorRuntime().wrap(function _callee86$(_context86) {
while (1) switch (_context86.prev = _context86.next) {
case 0:
return _context86.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, ".json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context86.stop();
}
}, _callee86);
}));
return _getMirrorApplies.apply(this, arguments);
}
function mirrorAppliesPublish(_x87) {
return _mirrorAppliesPublish.apply(this, arguments);
}
function _mirrorAppliesPublish() {
_mirrorAppliesPublish = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee87(params) {
return _regeneratorRuntime().wrap(function _callee87$(_context87) {
while (1) switch (_context87.prev = _context87.next) {
case 0:
return _context87.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/publish.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context87.stop();
}
}, _callee87);
}));
return _mirrorAppliesPublish.apply(this, arguments);
}
function mirrorAppliesOpenVnc(_x88) {
return _mirrorAppliesOpenVnc.apply(this, arguments);
}
function _mirrorAppliesOpenVnc() {
_mirrorAppliesOpenVnc = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee88(params) {
return _regeneratorRuntime().wrap(function _callee88$(_context88) {
while (1) switch (_context88.prev = _context88.next) {
case 0:
return _context88.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/open_vnc.json"), {
method: 'post',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context88.stop();
}
}, _callee88);
}));
return _mirrorAppliesOpenVnc.apply(this, arguments);
}
function mirrorAppliesOpenWebssh(_x89) {
return _mirrorAppliesOpenWebssh.apply(this, arguments);
}
function _mirrorAppliesOpenWebssh() {
_mirrorAppliesOpenWebssh = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee89(params) {
return _regeneratorRuntime().wrap(function _callee89$(_context89) {
while (1) switch (_context89.prev = _context89.next) {
case 0:
return _context89.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/open_webssh.json"), {
method: 'post',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context89.stop();
}
}, _callee89);
}));
return _mirrorAppliesOpenWebssh.apply(this, arguments);
}
function mirrorAppliesSaveImage(_x90) {
return _mirrorAppliesSaveImage.apply(this, arguments);
}
function _mirrorAppliesSaveImage() {
_mirrorAppliesSaveImage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee90(params) {
return _regeneratorRuntime().wrap(function _callee90$(_context90) {
while (1) switch (_context90.prev = _context90.next) {
case 0:
return _context90.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/save_image.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context90.stop();
}
}, _callee90);
}));
return _mirrorAppliesSaveImage.apply(this, arguments);
}
function mirrorAppliesDeleteImage(_x91) {
return _mirrorAppliesDeleteImage.apply(this, arguments);
}
function _mirrorAppliesDeleteImage() {
_mirrorAppliesDeleteImage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee91(params) {
return _regeneratorRuntime().wrap(function _callee91$(_context91) {
while (1) switch (_context91.prev = _context91.next) {
case 0:
return _context91.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/delete_image.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context91.stop();
}
}, _callee91);
}));
return _mirrorAppliesDeleteImage.apply(this, arguments);
}
function mirrorAppliesExtendVnc(_x92) {
return _mirrorAppliesExtendVnc.apply(this, arguments);
}
function _mirrorAppliesExtendVnc() {
_mirrorAppliesExtendVnc = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee92(params) {
return _regeneratorRuntime().wrap(function _callee92$(_context92) {
while (1) switch (_context92.prev = _context92.next) {
case 0:
return _context92.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/extend_vnc.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context92.stop();
}
}, _callee92);
}));
return _mirrorAppliesExtendVnc.apply(this, arguments);
}
function mirrorAppliesResetVncLink(_x93) {
return _mirrorAppliesResetVncLink.apply(this, arguments);
}
function _mirrorAppliesResetVncLink() {
_mirrorAppliesResetVncLink = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee93(params) {
return _regeneratorRuntime().wrap(function _callee93$(_context93) {
while (1) switch (_context93.prev = _context93.next) {
case 0:
return _context93.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/reset_vnc_link.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context93.stop();
}
}, _callee93);
}));
return _mirrorAppliesResetVncLink.apply(this, arguments);
}
function getTaskPass(_x94) {
return _getTaskPass.apply(this, arguments);
}
function _getTaskPass() {
_getTaskPass = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee94(params) {
return _regeneratorRuntime().wrap(function _callee94$(_context94) {
while (1) switch (_context94.prev = _context94.next) {
case 0:
return _context94.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/get_task_pass.json", {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context94.stop();
}
}, _callee94);
}));
return _getTaskPass.apply(this, arguments);
}
function getInfoWithJupyterLab(_x95) {
return _getInfoWithJupyterLab.apply(this, arguments);
}
function _getInfoWithJupyterLab() {
_getInfoWithJupyterLab = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee95(params) {
return _regeneratorRuntime().wrap(function _callee95$(_context95) {
while (1) switch (_context95.prev = _context95.next) {
case 0:
return _context95.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/jupyters/get_info_with_jupyter_lab.json", {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context95.stop();
}
}, _callee95);
}));
return _getInfoWithJupyterLab.apply(this, arguments);
}
function updateJupyterLabSetting(_x96) {
return _updateJupyterLabSetting.apply(this, arguments);
}
function _updateJupyterLabSetting() {
_updateJupyterLabSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee96(params) {
return _regeneratorRuntime().wrap(function _callee96$(_context96) {
while (1) switch (_context96.prev = _context96.next) {
case 0:
return _context96.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_jupyter_lab_setting.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context96.stop();
}
}, _callee96);
}));
return _updateJupyterLabSetting.apply(this, arguments);
}
/***/ }),
/***/ "HDXh":
/*!*********************************************************************!*\
!*** ./node_modules/node-libs-browser/node_modules/buffer/index.js ***!
\*********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <http://feross.org>
* @license MIT
*/
/* eslint-disable no-proto */
var base64 = __webpack_require__(/*! base64-js */ "H7XF")
var ieee754 = __webpack_require__(/*! ieee754 */ "kVK+")
var isArray = __webpack_require__(/*! isarray */ "49sm")
exports.Buffer = Buffer
exports.SlowBuffer = SlowBuffer
exports.INSPECT_MAX_BYTES = 50
/**
* If `Buffer.TYPED_ARRAY_SUPPORT`:
* === true Use Uint8Array implementation (fastest)
* === false Use Object implementation (most compatible, even IE6)
*
* Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,
* Opera 11.6+, iOS 4.2+.
*
* Due to various browser bugs, sometimes the Object implementation will be used even
* when the browser supports typed arrays.
*
* Note:
*
* - Firefox 4-29 lacks support for adding new properties to `Uint8Array` instances,
* See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9-10 is missing the `TypedArray.prototype.subarray` function.
*
* - IE10 has a broken `TypedArray.prototype.subarray` function which returns arrays of
* incorrect length in some situations.
* We detect these buggy browsers and set `Buffer.TYPED_ARRAY_SUPPORT` to `false` so they
* get the Object implementation, which is slower but behaves correctly.
*/
Buffer.TYPED_ARRAY_SUPPORT = global.TYPED_ARRAY_SUPPORT !== undefined
? global.TYPED_ARRAY_SUPPORT
: typedArraySupport()
/*
* Export kMaxLength after typed array support is determined.
*/
exports.kMaxLength = kMaxLength()
function typedArraySupport () {
try {
var arr = new Uint8Array(1)
arr.__proto__ = {__proto__: Uint8Array.prototype, foo: function () { return 42 }}
return arr.foo() === 42 && // typed array instances can be augmented
typeof arr.subarray === 'function' && // chrome 9-10 lack `subarray`
arr.subarray(1, 1).byteLength === 0 // ie10 has broken `subarray`
} catch (e) {
return false
}
}
function kMaxLength () {
return Buffer.TYPED_ARRAY_SUPPORT
? 0x7fffffff
: 0x3fffffff
}
function createBuffer (that, length) {
if (kMaxLength() < length) {
throw new RangeError('Invalid typed array length')
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = new Uint8Array(length)
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
if (that === null) {
that = new Buffer(length)
}
that.length = length
}
return that
}
/**
* The Buffer constructor returns instances of `Uint8Array` that have their
* prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of
* `Uint8Array`, so the returned instances will have all the node `Buffer` methods
* and the `Uint8Array` methods. Square bracket notation works as expected -- it
* returns a single octet.
*
* The `Uint8Array` prototype remains unmodified.
*/
function Buffer (arg, encodingOrOffset, length) {
if (!Buffer.TYPED_ARRAY_SUPPORT && !(this instanceof Buffer)) {
return new Buffer(arg, encodingOrOffset, length)
}
// Common case.
if (typeof arg === 'number') {
if (typeof encodingOrOffset === 'string') {
throw new Error(
'If encoding is specified then the first argument must be a string'
)
}
return allocUnsafe(this, arg)
}
return from(this, arg, encodingOrOffset, length)
}
Buffer.poolSize = 8192 // not used by this implementation
// TODO: Legacy, not needed anymore. Remove in next major version.
Buffer._augment = function (arr) {
arr.__proto__ = Buffer.prototype
return arr
}
function from (that, value, encodingOrOffset, length) {
if (typeof value === 'number') {
throw new TypeError('"value" argument must not be a number')
}
if (typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer) {
return fromArrayBuffer(that, value, encodingOrOffset, length)
}
if (typeof value === 'string') {
return fromString(that, value, encodingOrOffset)
}
return fromObject(that, value)
}
/**
* Functionally equivalent to Buffer(arg, encoding) but throws a TypeError
* if value is a number.
* Buffer.from(str[, encoding])
* Buffer.from(array)
* Buffer.from(buffer)
* Buffer.from(arrayBuffer[, byteOffset[, length]])
**/
Buffer.from = function (value, encodingOrOffset, length) {
return from(null, value, encodingOrOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
Buffer.prototype.__proto__ = Uint8Array.prototype
Buffer.__proto__ = Uint8Array
if (typeof Symbol !== 'undefined' && Symbol.species &&
Buffer[Symbol.species] === Buffer) {
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
Object.defineProperty(Buffer, Symbol.species, {
value: null,
configurable: true
})
}
}
function assertSize (size) {
if (typeof size !== 'number') {
throw new TypeError('"size" argument must be a number')
} else if (size < 0) {
throw new RangeError('"size" argument must not be negative')
}
}
function alloc (that, size, fill, encoding) {
assertSize(size)
if (size <= 0) {
return createBuffer(that, size)
}
if (fill !== undefined) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a start offset.
return typeof encoding === 'string'
? createBuffer(that, size).fill(fill, encoding)
: createBuffer(that, size).fill(fill)
}
return createBuffer(that, size)
}
/**
* Creates a new filled Buffer instance.
* alloc(size[, fill[, encoding]])
**/
Buffer.alloc = function (size, fill, encoding) {
return alloc(null, size, fill, encoding)
}
function allocUnsafe (that, size) {
assertSize(size)
that = createBuffer(that, size < 0 ? 0 : checked(size) | 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) {
for (var i = 0; i < size; ++i) {
that[i] = 0
}
}
return that
}
/**
* Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
* */
Buffer.allocUnsafe = function (size) {
return allocUnsafe(null, size)
}
/**
* Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
*/
Buffer.allocUnsafeSlow = function (size) {
return allocUnsafe(null, size)
}
function fromString (that, string, encoding) {
if (typeof encoding !== 'string' || encoding === '') {
encoding = 'utf8'
}
if (!Buffer.isEncoding(encoding)) {
throw new TypeError('"encoding" must be a valid string encoding')
}
var length = byteLength(string, encoding) | 0
that = createBuffer(that, length)
var actual = that.write(string, encoding)
if (actual !== length) {
// Writing a hex string, for example, that contains invalid characters will
// cause everything after the first invalid character to be ignored. (e.g.
// 'abxxcd' will be treated as 'ab')
that = that.slice(0, actual)
}
return that
}
function fromArrayLike (that, array) {
var length = array.length < 0 ? 0 : checked(array.length) | 0
that = createBuffer(that, length)
for (var i = 0; i < length; i += 1) {
that[i] = array[i] & 255
}
return that
}
function fromArrayBuffer (that, array, byteOffset, length) {
array.byteLength // this throws if `array` is not a valid ArrayBuffer
if (byteOffset < 0 || array.byteLength < byteOffset) {
throw new RangeError('\'offset\' is out of bounds')
}
if (array.byteLength < byteOffset + (length || 0)) {
throw new RangeError('\'length\' is out of bounds')
}
if (byteOffset === undefined && length === undefined) {
array = new Uint8Array(array)
} else if (length === undefined) {
array = new Uint8Array(array, byteOffset)
} else {
array = new Uint8Array(array, byteOffset, length)
}
if (Buffer.TYPED_ARRAY_SUPPORT) {
// Return an augmented `Uint8Array` instance, for best performance
that = array
that.__proto__ = Buffer.prototype
} else {
// Fallback: Return an object instance of the Buffer class
that = fromArrayLike(that, array)
}
return that
}
function fromObject (that, obj) {
if (Buffer.isBuffer(obj)) {
var len = checked(obj.length) | 0
that = createBuffer(that, len)
if (that.length === 0) {
return that
}
obj.copy(that, 0, 0, len)
return that
}
if (obj) {
if ((typeof ArrayBuffer !== 'undefined' &&
obj.buffer instanceof ArrayBuffer) || 'length' in obj) {
if (typeof obj.length !== 'number' || isnan(obj.length)) {
return createBuffer(that, 0)
}
return fromArrayLike(that, obj)
}
if (obj.type === 'Buffer' && isArray(obj.data)) {
return fromArrayLike(that, obj.data)
}
}
throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')
}
function checked (length) {
// Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if (length >= kMaxLength()) {
throw new RangeError('Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength().toString(16) + ' bytes')
}
return length | 0
}
function SlowBuffer (length) {
if (+length != length) { // eslint-disable-line eqeqeq
length = 0
}
return Buffer.alloc(+length)
}
Buffer.isBuffer = function isBuffer (b) {
return !!(b != null && b._isBuffer)
}
Buffer.compare = function compare (a, b) {
if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {
throw new TypeError('Arguments must be Buffers')
}
if (a === b) return 0
var x = a.length
var y = b.length
for (var i = 0, len = Math.min(x, y); i < len; ++i) {
if (a[i] !== b[i]) {
x = a[i]
y = b[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
Buffer.isEncoding = function isEncoding (encoding) {
switch (String(encoding).toLowerCase()) {
case 'hex':
case 'utf8':
case 'utf-8':
case 'ascii':
case 'latin1':
case 'binary':
case 'base64':
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return true
default:
return false
}
}
Buffer.concat = function concat (list, length) {
if (!isArray(list)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
if (list.length === 0) {
return Buffer.alloc(0)
}
var i
if (length === undefined) {
length = 0
for (i = 0; i < list.length; ++i) {
length += list[i].length
}
}
var buffer = Buffer.allocUnsafe(length)
var pos = 0
for (i = 0; i < list.length; ++i) {
var buf = list[i]
if (!Buffer.isBuffer(buf)) {
throw new TypeError('"list" argument must be an Array of Buffers')
}
buf.copy(buffer, pos)
pos += buf.length
}
return buffer
}
function byteLength (string, encoding) {
if (Buffer.isBuffer(string)) {
return string.length
}
if (typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer.isView === 'function' &&
(ArrayBuffer.isView(string) || string instanceof ArrayBuffer)) {
return string.byteLength
}
if (typeof string !== 'string') {
string = '' + string
}
var len = string.length
if (len === 0) return 0
// Use a for loop to avoid recursion
var loweredCase = false
for (;;) {
switch (encoding) {
case 'ascii':
case 'latin1':
case 'binary':
return len
case 'utf8':
case 'utf-8':
case undefined:
return utf8ToBytes(string).length
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return len * 2
case 'hex':
return len >>> 1
case 'base64':
return base64ToBytes(string).length
default:
if (loweredCase) return utf8ToBytes(string).length // assume utf8
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.byteLength = byteLength
function slowToString (encoding, start, end) {
var loweredCase = false
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
// property of a typed array.
// This behaves neither like String nor Uint8Array in that we set start/end
// to their upper/lower bounds if the value passed is out of range.
// undefined is handled specially as per ECMA-262 6th Edition,
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
if (start === undefined || start < 0) {
start = 0
}
// Return early if start > this.length. Done here to prevent potential uint32
// coercion fail below.
if (start > this.length) {
return ''
}
if (end === undefined || end > this.length) {
end = this.length
}
if (end <= 0) {
return ''
}
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0
start >>>= 0
if (end <= start) {
return ''
}
if (!encoding) encoding = 'utf8'
while (true) {
switch (encoding) {
case 'hex':
return hexSlice(this, start, end)
case 'utf8':
case 'utf-8':
return utf8Slice(this, start, end)
case 'ascii':
return asciiSlice(this, start, end)
case 'latin1':
case 'binary':
return latin1Slice(this, start, end)
case 'base64':
return base64Slice(this, start, end)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return utf16leSlice(this, start, end)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = (encoding + '').toLowerCase()
loweredCase = true
}
}
}
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
// Buffer instances.
Buffer.prototype._isBuffer = true
function swap (b, n, m) {
var i = b[n]
b[n] = b[m]
b[m] = i
}
Buffer.prototype.swap16 = function swap16 () {
var len = this.length
if (len % 2 !== 0) {
throw new RangeError('Buffer size must be a multiple of 16-bits')
}
for (var i = 0; i < len; i += 2) {
swap(this, i, i + 1)
}
return this
}
Buffer.prototype.swap32 = function swap32 () {
var len = this.length
if (len % 4 !== 0) {
throw new RangeError('Buffer size must be a multiple of 32-bits')
}
for (var i = 0; i < len; i += 4) {
swap(this, i, i + 3)
swap(this, i + 1, i + 2)
}
return this
}
Buffer.prototype.swap64 = function swap64 () {
var len = this.length
if (len % 8 !== 0) {
throw new RangeError('Buffer size must be a multiple of 64-bits')
}
for (var i = 0; i < len; i += 8) {
swap(this, i, i + 7)
swap(this, i + 1, i + 6)
swap(this, i + 2, i + 5)
swap(this, i + 3, i + 4)
}
return this
}
Buffer.prototype.toString = function toString () {
var length = this.length | 0
if (length === 0) return ''
if (arguments.length === 0) return utf8Slice(this, 0, length)
return slowToString.apply(this, arguments)
}
Buffer.prototype.equals = function equals (b) {
if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')
if (this === b) return true
return Buffer.compare(this, b) === 0
}
Buffer.prototype.inspect = function inspect () {
var str = ''
var max = exports.INSPECT_MAX_BYTES
if (this.length > 0) {
str = this.toString('hex', 0, max).match(/.{2}/g).join(' ')
if (this.length > max) str += ' ... '
}
return '<Buffer ' + str + '>'
}
Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
if (!Buffer.isBuffer(target)) {
throw new TypeError('Argument must be a Buffer')
}
if (start === undefined) {
start = 0
}
if (end === undefined) {
end = target ? target.length : 0
}
if (thisStart === undefined) {
thisStart = 0
}
if (thisEnd === undefined) {
thisEnd = this.length
}
if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {
throw new RangeError('out of range index')
}
if (thisStart >= thisEnd && start >= end) {
return 0
}
if (thisStart >= thisEnd) {
return -1
}
if (start >= end) {
return 1
}
start >>>= 0
end >>>= 0
thisStart >>>= 0
thisEnd >>>= 0
if (this === target) return 0
var x = thisEnd - thisStart
var y = end - start
var len = Math.min(x, y)
var thisCopy = this.slice(thisStart, thisEnd)
var targetCopy = target.slice(start, end)
for (var i = 0; i < len; ++i) {
if (thisCopy[i] !== targetCopy[i]) {
x = thisCopy[i]
y = targetCopy[i]
break
}
}
if (x < y) return -1
if (y < x) return 1
return 0
}
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
// Empty buffer means no match
if (buffer.length === 0) return -1
// Normalize byteOffset
if (typeof byteOffset === 'string') {
encoding = byteOffset
byteOffset = 0
} else if (byteOffset > 0x7fffffff) {
byteOffset = 0x7fffffff
} else if (byteOffset < -0x80000000) {
byteOffset = -0x80000000
}
byteOffset = +byteOffset // Coerce to Number.
if (isNaN(byteOffset)) {
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
byteOffset = dir ? 0 : (buffer.length - 1)
}
// Normalize byteOffset: negative offsets start from the end of the buffer
if (byteOffset < 0) byteOffset = buffer.length + byteOffset
if (byteOffset >= buffer.length) {
if (dir) return -1
else byteOffset = buffer.length - 1
} else if (byteOffset < 0) {
if (dir) byteOffset = 0
else return -1
}
// Normalize val
if (typeof val === 'string') {
val = Buffer.from(val, encoding)
}
// Finally, search either indexOf (if dir is true) or lastIndexOf
if (Buffer.isBuffer(val)) {
// Special case: looking for empty string/buffer always fails
if (val.length === 0) {
return -1
}
return arrayIndexOf(buffer, val, byteOffset, encoding, dir)
} else if (typeof val === 'number') {
val = val & 0xFF // Search for a byte value [0-255]
if (Buffer.TYPED_ARRAY_SUPPORT &&
typeof Uint8Array.prototype.indexOf === 'function') {
if (dir) {
return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)
} else {
return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
}
}
return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
}
throw new TypeError('val must be string, number or Buffer')
}
function arrayIndexOf (arr, val, byteOffset, encoding, dir) {
var indexSize = 1
var arrLength = arr.length
var valLength = val.length
if (encoding !== undefined) {
encoding = String(encoding).toLowerCase()
if (encoding === 'ucs2' || encoding === 'ucs-2' ||
encoding === 'utf16le' || encoding === 'utf-16le') {
if (arr.length < 2 || val.length < 2) {
return -1
}
indexSize = 2
arrLength /= 2
valLength /= 2
byteOffset /= 2
}
}
function read (buf, i) {
if (indexSize === 1) {
return buf[i]
} else {
return buf.readUInt16BE(i * indexSize)
}
}
var i
if (dir) {
var foundIndex = -1
for (i = byteOffset; i < arrLength; i++) {
if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
if (foundIndex === -1) foundIndex = i
if (i - foundIndex + 1 === valLength) return foundIndex * indexSize
} else {
if (foundIndex !== -1) i -= i - foundIndex
foundIndex = -1
}
}
} else {
if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength
for (i = byteOffset; i >= 0; i--) {
var found = true
for (var j = 0; j < valLength; j++) {
if (read(arr, i + j) !== read(val, j)) {
found = false
break
}
}
if (found) return i
}
}
return -1
}
Buffer.prototype.includes = function includes (val, byteOffset, encoding) {
return this.indexOf(val, byteOffset, encoding) !== -1
}
Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, true)
}
Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {
return bidirectionalIndexOf(this, val, byteOffset, encoding, false)
}
function hexWrite (buf, string, offset, length) {
offset = Number(offset) || 0
var remaining = buf.length - offset
if (!length) {
length = remaining
} else {
length = Number(length)
if (length > remaining) {
length = remaining
}
}
// must be an even number of digits
var strLen = string.length
if (strLen % 2 !== 0) throw new TypeError('Invalid hex string')
if (length > strLen / 2) {
length = strLen / 2
}
for (var i = 0; i < length; ++i) {
var parsed = parseInt(string.substr(i * 2, 2), 16)
if (isNaN(parsed)) return i
buf[offset + i] = parsed
}
return i
}
function utf8Write (buf, string, offset, length) {
return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)
}
function asciiWrite (buf, string, offset, length) {
return blitBuffer(asciiToBytes(string), buf, offset, length)
}
function latin1Write (buf, string, offset, length) {
return asciiWrite(buf, string, offset, length)
}
function base64Write (buf, string, offset, length) {
return blitBuffer(base64ToBytes(string), buf, offset, length)
}
function ucs2Write (buf, string, offset, length) {
return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)
}
Buffer.prototype.write = function write (string, offset, length, encoding) {
// Buffer#write(string)
if (offset === undefined) {
encoding = 'utf8'
length = this.length
offset = 0
// Buffer#write(string, encoding)
} else if (length === undefined && typeof offset === 'string') {
encoding = offset
length = this.length
offset = 0
// Buffer#write(string, offset[, length][, encoding])
} else if (isFinite(offset)) {
offset = offset | 0
if (isFinite(length)) {
length = length | 0
if (encoding === undefined) encoding = 'utf8'
} else {
encoding = length
length = undefined
}
// legacy write(string, encoding, offset, length) - remove in v0.13
} else {
throw new Error(
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
)
}
var remaining = this.length - offset
if (length === undefined || length > remaining) length = remaining
if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {
throw new RangeError('Attempt to write outside buffer bounds')
}
if (!encoding) encoding = 'utf8'
var loweredCase = false
for (;;) {
switch (encoding) {
case 'hex':
return hexWrite(this, string, offset, length)
case 'utf8':
case 'utf-8':
return utf8Write(this, string, offset, length)
case 'ascii':
return asciiWrite(this, string, offset, length)
case 'latin1':
case 'binary':
return latin1Write(this, string, offset, length)
case 'base64':
// Warning: maxLength not taken into account in base64Write
return base64Write(this, string, offset, length)
case 'ucs2':
case 'ucs-2':
case 'utf16le':
case 'utf-16le':
return ucs2Write(this, string, offset, length)
default:
if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)
encoding = ('' + encoding).toLowerCase()
loweredCase = true
}
}
}
Buffer.prototype.toJSON = function toJSON () {
return {
type: 'Buffer',
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
function base64Slice (buf, start, end) {
if (start === 0 && end === buf.length) {
return base64.fromByteArray(buf)
} else {
return base64.fromByteArray(buf.slice(start, end))
}
}
function utf8Slice (buf, start, end) {
end = Math.min(buf.length, end)
var res = []
var i = start
while (i < end) {
var firstByte = buf[i]
var codePoint = null
var bytesPerSequence = (firstByte > 0xEF) ? 4
: (firstByte > 0xDF) ? 3
: (firstByte > 0xBF) ? 2
: 1
if (i + bytesPerSequence <= end) {
var secondByte, thirdByte, fourthByte, tempCodePoint
switch (bytesPerSequence) {
case 1:
if (firstByte < 0x80) {
codePoint = firstByte
}
break
case 2:
secondByte = buf[i + 1]
if ((secondByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)
if (tempCodePoint > 0x7F) {
codePoint = tempCodePoint
}
}
break
case 3:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)
if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {
codePoint = tempCodePoint
}
}
break
case 4:
secondByte = buf[i + 1]
thirdByte = buf[i + 2]
fourthByte = buf[i + 3]
if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {
tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)
if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {
codePoint = tempCodePoint
}
}
}
}
if (codePoint === null) {
// we did not generate a valid codePoint so insert a
// replacement char (U+FFFD) and advance only 1 byte
codePoint = 0xFFFD
bytesPerSequence = 1
} else if (codePoint > 0xFFFF) {
// encode to utf16 (surrogate pair dance)
codePoint -= 0x10000
res.push(codePoint >>> 10 & 0x3FF | 0xD800)
codePoint = 0xDC00 | codePoint & 0x3FF
}
res.push(codePoint)
i += bytesPerSequence
}
return decodeCodePointsArray(res)
}
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX_ARGUMENTS_LENGTH = 0x1000
function decodeCodePointsArray (codePoints) {
var len = codePoints.length
if (len <= MAX_ARGUMENTS_LENGTH) {
return String.fromCharCode.apply(String, codePoints) // avoid extra slice()
}
// Decode in chunks to avoid "call stack size exceeded".
var res = ''
var i = 0
while (i < len) {
res += String.fromCharCode.apply(
String,
codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)
)
}
return res
}
function asciiSlice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i] & 0x7F)
}
return ret
}
function latin1Slice (buf, start, end) {
var ret = ''
end = Math.min(buf.length, end)
for (var i = start; i < end; ++i) {
ret += String.fromCharCode(buf[i])
}
return ret
}
function hexSlice (buf, start, end) {
var len = buf.length
if (!start || start < 0) start = 0
if (!end || end < 0 || end > len) end = len
var out = ''
for (var i = start; i < end; ++i) {
out += toHex(buf[i])
}
return out
}
function utf16leSlice (buf, start, end) {
var bytes = buf.slice(start, end)
var res = ''
for (var i = 0; i < bytes.length; i += 2) {
res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256)
}
return res
}
Buffer.prototype.slice = function slice (start, end) {
var len = this.length
start = ~~start
end = end === undefined ? len : ~~end
if (start < 0) {
start += len
if (start < 0) start = 0
} else if (start > len) {
start = len
}
if (end < 0) {
end += len
if (end < 0) end = 0
} else if (end > len) {
end = len
}
if (end < start) end = start
var newBuf
if (Buffer.TYPED_ARRAY_SUPPORT) {
newBuf = this.subarray(start, end)
newBuf.__proto__ = Buffer.prototype
} else {
var sliceLen = end - start
newBuf = new Buffer(sliceLen, undefined)
for (var i = 0; i < sliceLen; ++i) {
newBuf[i] = this[i + start]
}
}
return newBuf
}
/*
* Need to make sure that buffer isn't trying to write out of bounds.
*/
function checkOffset (offset, ext, length) {
if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')
if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')
}
Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
return val
}
Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
checkOffset(offset, byteLength, this.length)
}
var val = this[offset + --byteLength]
var mul = 1
while (byteLength > 0 && (mul *= 0x100)) {
val += this[offset + --byteLength] * mul
}
return val
}
Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
return this[offset]
}
Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return this[offset] | (this[offset + 1] << 8)
}
Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
return (this[offset] << 8) | this[offset + 1]
}
Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ((this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16)) +
(this[offset + 3] * 0x1000000)
}
Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] * 0x1000000) +
((this[offset + 1] << 16) |
(this[offset + 2] << 8) |
this[offset + 3])
}
Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var val = this[offset]
var mul = 1
var i = 0
while (++i < byteLength && (mul *= 0x100)) {
val += this[offset + i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) checkOffset(offset, byteLength, this.length)
var i = byteLength
var mul = 1
var val = this[offset + --i]
while (i > 0 && (mul *= 0x100)) {
val += this[offset + --i] * mul
}
mul *= 0x80
if (val >= mul) val -= Math.pow(2, 8 * byteLength)
return val
}
Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) {
if (!noAssert) checkOffset(offset, 1, this.length)
if (!(this[offset] & 0x80)) return (this[offset])
return ((0xff - this[offset] + 1) * -1)
}
Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset] | (this[offset + 1] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 2, this.length)
var val = this[offset + 1] | (this[offset] << 8)
return (val & 0x8000) ? val | 0xFFFF0000 : val
}
Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset]) |
(this[offset + 1] << 8) |
(this[offset + 2] << 16) |
(this[offset + 3] << 24)
}
Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return (this[offset] << 24) |
(this[offset + 1] << 16) |
(this[offset + 2] << 8) |
(this[offset + 3])
}
Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, true, 23, 4)
}
Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 4, this.length)
return ieee754.read(this, offset, false, 23, 4)
}
Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, true, 52, 8)
}
Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {
if (!noAssert) checkOffset(offset, 8, this.length)
return ieee754.read(this, offset, false, 52, 8)
}
function checkInt (buf, value, offset, ext, max, min) {
if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance')
if (value > max || value < min) throw new RangeError('"value" argument is out of bounds')
if (offset + ext > buf.length) throw new RangeError('Index out of range')
}
Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var mul = 1
var i = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
byteLength = byteLength | 0
if (!noAssert) {
var maxBytes = Math.pow(2, 8 * byteLength) - 1
checkInt(this, value, offset, byteLength, maxBytes, 0)
}
var i = byteLength - 1
var mul = 1
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
this[offset + i] = (value / mul) & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
this[offset] = (value & 0xff)
return offset + 1
}
function objectWriteUInt16 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 2); i < j; ++i) {
buf[offset + i] = (value & (0xff << (8 * (littleEndian ? i : 1 - i)))) >>>
(littleEndian ? i : 1 - i) * 8
}
}
Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
function objectWriteUInt32 (buf, value, offset, littleEndian) {
if (value < 0) value = 0xffffffff + value + 1
for (var i = 0, j = Math.min(buf.length - offset, 4); i < j; ++i) {
buf[offset + i] = (value >>> (littleEndian ? i : 3 - i) * 8) & 0xff
}
}
Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset + 3] = (value >>> 24)
this[offset + 2] = (value >>> 16)
this[offset + 1] = (value >>> 8)
this[offset] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = 0
var mul = 1
var sub = 0
this[offset] = value & 0xFF
while (++i < byteLength && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) {
var limit = Math.pow(2, 8 * byteLength - 1)
checkInt(this, value, offset, byteLength, limit - 1, -limit)
}
var i = byteLength - 1
var mul = 1
var sub = 0
this[offset + i] = value & 0xFF
while (--i >= 0 && (mul *= 0x100)) {
if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {
sub = 1
}
this[offset + i] = ((value / mul) >> 0) - sub & 0xFF
}
return offset + byteLength
}
Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)
if (!Buffer.TYPED_ARRAY_SUPPORT) value = Math.floor(value)
if (value < 0) value = 0xff + value + 1
this[offset] = (value & 0xff)
return offset + 1
}
Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
} else {
objectWriteUInt16(this, value, offset, true)
}
return offset + 2
}
Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 8)
this[offset + 1] = (value & 0xff)
} else {
objectWriteUInt16(this, value, offset, false)
}
return offset + 2
}
Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value & 0xff)
this[offset + 1] = (value >>> 8)
this[offset + 2] = (value >>> 16)
this[offset + 3] = (value >>> 24)
} else {
objectWriteUInt32(this, value, offset, true)
}
return offset + 4
}
Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {
value = +value
offset = offset | 0
if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)
if (value < 0) value = 0xffffffff + value + 1
if (Buffer.TYPED_ARRAY_SUPPORT) {
this[offset] = (value >>> 24)
this[offset + 1] = (value >>> 16)
this[offset + 2] = (value >>> 8)
this[offset + 3] = (value & 0xff)
} else {
objectWriteUInt32(this, value, offset, false)
}
return offset + 4
}
function checkIEEE754 (buf, value, offset, ext, max, min) {
if (offset + ext > buf.length) throw new RangeError('Index out of range')
if (offset < 0) throw new RangeError('Index out of range')
}
function writeFloat (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)
}
ieee754.write(buf, value, offset, littleEndian, 23, 4)
return offset + 4
}
Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {
return writeFloat(this, value, offset, true, noAssert)
}
Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {
return writeFloat(this, value, offset, false, noAssert)
}
function writeDouble (buf, value, offset, littleEndian, noAssert) {
if (!noAssert) {
checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)
}
ieee754.write(buf, value, offset, littleEndian, 52, 8)
return offset + 8
}
Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {
return writeDouble(this, value, offset, true, noAssert)
}
Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {
return writeDouble(this, value, offset, false, noAssert)
}
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer.prototype.copy = function copy (target, targetStart, start, end) {
if (!start) start = 0
if (!end && end !== 0) end = this.length
if (targetStart >= target.length) targetStart = target.length
if (!targetStart) targetStart = 0
if (end > 0 && end < start) end = start
// Copy 0 bytes; we're done
if (end === start) return 0
if (target.length === 0 || this.length === 0) return 0
// Fatal error conditions
if (targetStart < 0) {
throw new RangeError('targetStart out of bounds')
}
if (start < 0 || start >= this.length) throw new RangeError('sourceStart out of bounds')
if (end < 0) throw new RangeError('sourceEnd out of bounds')
// Are we oob?
if (end > this.length) end = this.length
if (target.length - targetStart < end - start) {
end = target.length - targetStart + start
}
var len = end - start
var i
if (this === target && start < targetStart && targetStart < end) {
// descending copy from end
for (i = len - 1; i >= 0; --i) {
target[i + targetStart] = this[i + start]
}
} else if (len < 1000 || !Buffer.TYPED_ARRAY_SUPPORT) {
// ascending copy from start
for (i = 0; i < len; ++i) {
target[i + targetStart] = this[i + start]
}
} else {
Uint8Array.prototype.set.call(
target,
this.subarray(start, start + len),
targetStart
)
}
return len
}
// Usage:
// buffer.fill(number[, offset[, end]])
// buffer.fill(buffer[, offset[, end]])
// buffer.fill(string[, offset[, end]][, encoding])
Buffer.prototype.fill = function fill (val, start, end, encoding) {
// Handle string cases:
if (typeof val === 'string') {
if (typeof start === 'string') {
encoding = start
start = 0
end = this.length
} else if (typeof end === 'string') {
encoding = end
end = this.length
}
if (val.length === 1) {
var code = val.charCodeAt(0)
if (code < 256) {
val = code
}
}
if (encoding !== undefined && typeof encoding !== 'string') {
throw new TypeError('encoding must be a string')
}
if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {
throw new TypeError('Unknown encoding: ' + encoding)
}
} else if (typeof val === 'number') {
val = val & 255
}
// Invalid ranges are not set to a default, so can range check early.
if (start < 0 || this.length < start || this.length < end) {
throw new RangeError('Out of range index')
}
if (end <= start) {
return this
}
start = start >>> 0
end = end === undefined ? this.length : end >>> 0
if (!val) val = 0
var i
if (typeof val === 'number') {
for (i = start; i < end; ++i) {
this[i] = val
}
} else {
var bytes = Buffer.isBuffer(val)
? val
: utf8ToBytes(new Buffer(val, encoding).toString())
var len = bytes.length
for (i = 0; i < end - start; ++i) {
this[i + start] = bytes[i % len]
}
}
return this
}
// HELPER FUNCTIONS
// ================
var INVALID_BASE64_RE = /[^+\/0-9A-Za-z-_]/g
function base64clean (str) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim(str).replace(INVALID_BASE64_RE, '')
// Node converts strings with length < 2 to ''
if (str.length < 2) return ''
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while (str.length % 4 !== 0) {
str = str + '='
}
return str
}
function stringtrim (str) {
if (str.trim) return str.trim()
return str.replace(/^\s+|\s+$/g, '')
}
function toHex (n) {
if (n < 16) return '0' + n.toString(16)
return n.toString(16)
}
function utf8ToBytes (string, units) {
units = units || Infinity
var codePoint
var length = string.length
var leadSurrogate = null
var bytes = []
for (var i = 0; i < length; ++i) {
codePoint = string.charCodeAt(i)
// is surrogate component
if (codePoint > 0xD7FF && codePoint < 0xE000) {
// last char was a lead
if (!leadSurrogate) {
// no lead yet
if (codePoint > 0xDBFF) {
// unexpected trail
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
} else if (i + 1 === length) {
// unpaired lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
continue
}
// valid lead
leadSurrogate = codePoint
continue
}
// 2 leads in a row
if (codePoint < 0xDC00) {
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
leadSurrogate = codePoint
continue
}
// valid surrogate pair
codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000
} else if (leadSurrogate) {
// valid bmp char, but last char was a lead
if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)
}
leadSurrogate = null
// encode utf8
if (codePoint < 0x80) {
if ((units -= 1) < 0) break
bytes.push(codePoint)
} else if (codePoint < 0x800) {
if ((units -= 2) < 0) break
bytes.push(
codePoint >> 0x6 | 0xC0,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x10000) {
if ((units -= 3) < 0) break
bytes.push(
codePoint >> 0xC | 0xE0,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else if (codePoint < 0x110000) {
if ((units -= 4) < 0) break
bytes.push(
codePoint >> 0x12 | 0xF0,
codePoint >> 0xC & 0x3F | 0x80,
codePoint >> 0x6 & 0x3F | 0x80,
codePoint & 0x3F | 0x80
)
} else {
throw new Error('Invalid code point')
}
}
return bytes
}
function asciiToBytes (str) {
var byteArray = []
for (var i = 0; i < str.length; ++i) {
// Node's code seems to be doing this and not & 0x7F..
byteArray.push(str.charCodeAt(i) & 0xFF)
}
return byteArray
}
function utf16leToBytes (str, units) {
var c, hi, lo
var byteArray = []
for (var i = 0; i < str.length; ++i) {
if ((units -= 2) < 0) break
c = str.charCodeAt(i)
hi = c >> 8
lo = c % 256
byteArray.push(lo)
byteArray.push(hi)
}
return byteArray
}
function base64ToBytes (str) {
return base64.toByteArray(base64clean(str))
}
function blitBuffer (src, dst, offset, length) {
for (var i = 0; i < length; ++i) {
if ((i + offset >= dst.length) || (i >= src.length)) break
dst[i + offset] = src[i]
}
return i
}
function isnan (val) {
return val !== val // eslint-disable-line no-self-compare
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "HH4o":
/*!**************************************************************************!*\
!*** ./node_modules/core-js/internals/check-correctness-of-iteration.js ***!
\**************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var ITERATOR = wellKnownSymbol('iterator');
var SAFE_CLOSING = false;
try {
var called = 0;
var iteratorWithReturn = {
next: function () {
return { done: !!called++ };
},
'return': function () {
SAFE_CLOSING = true;
}
};
iteratorWithReturn[ITERATOR] = function () {
return this;
};
// eslint-disable-next-line no-throw-literal
Array.from(iteratorWithReturn, function () { throw 2; });
} catch (error) { /* empty */ }
module.exports = function (exec, SKIP_CLOSING) {
if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
var ITERATION_SUPPORT = false;
try {
var object = {};
object[ITERATOR] = function () {
return {
next: function () {
return { done: ITERATION_SUPPORT = true };
}
};
};
exec(object);
} catch (error) { /* empty */ }
return ITERATION_SUPPORT;
};
/***/ }),
/***/ "HNyW":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/engine-is-ios.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "NC/Y");
module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent);
/***/ }),
/***/ "HSsa":
/*!************************************************!*\
!*** ./node_modules/axios/lib/helpers/bind.js ***!
\************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return bind; });
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
};
}
/***/ }),
/***/ "HTfv":
/*!**************************************************************************!*\
!*** ./node_modules/antd/node_modules/rc-motion/es/index.js + 5 modules ***!
\**************************************************************************/
/*! exports provided: CSSMotionList, default */
/*! exports used: CSSMotionList, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* reexport */ es_CSSMotionList; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("VTBJ");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("1OyB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("vuIU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("JX7q");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("Ji7U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
var createSuper = __webpack_require__("LK+K");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("U8pU");
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
var findDOMNode = __webpack_require__("m+aA");
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__("c+Xe");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/raf/index.js
var raf = __webpack_require__("xEkU");
var raf_default = /*#__PURE__*/__webpack_require__.n(raf);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/util/motion.js
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement); // ================= Transition =================
// Event wrapper. Copy from react source code
function makePrefixMap(styleProp, eventName) {
var prefixes = {};
prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();
prefixes["Webkit".concat(styleProp)] = "webkit".concat(eventName);
prefixes["Moz".concat(styleProp)] = "moz".concat(eventName);
prefixes["ms".concat(styleProp)] = "MS".concat(eventName);
prefixes["O".concat(styleProp)] = "o".concat(eventName.toLowerCase());
return prefixes;
}
function getVendorPrefixes(domSupport, win) {
var prefixes = {
animationend: makePrefixMap('Animation', 'AnimationEnd'),
transitionend: makePrefixMap('Transition', 'TransitionEnd')
};
if (domSupport) {
if (!('AnimationEvent' in win)) {
delete prefixes.animationend.animation;
}
if (!('TransitionEvent' in win)) {
delete prefixes.transitionend.transition;
}
}
return prefixes;
}
var vendorPrefixes = getVendorPrefixes(canUseDOM, typeof window !== 'undefined' ? window : {});
var style = {};
if (canUseDOM) {
var _document$createEleme = document.createElement('div');
style = _document$createEleme.style;
}
var prefixedEventNames = {};
function getVendorPrefixedEventName(eventName) {
if (prefixedEventNames[eventName]) {
return prefixedEventNames[eventName];
}
var prefixMap = vendorPrefixes[eventName];
if (prefixMap) {
var stylePropList = Object.keys(prefixMap);
var len = stylePropList.length;
for (var i = 0; i < len; i += 1) {
var styleProp = stylePropList[i];
if (Object.prototype.hasOwnProperty.call(prefixMap, styleProp) && styleProp in style) {
prefixedEventNames[eventName] = prefixMap[styleProp];
return prefixedEventNames[eventName];
}
}
}
return '';
}
var animationEndName = getVendorPrefixedEventName('animationend');
var transitionEndName = getVendorPrefixedEventName('transitionend');
var supportTransition = !!(animationEndName && transitionEndName);
function getTransitionName(transitionName, transitionType) {
if (!transitionName) return null;
if (Object(esm_typeof["a" /* default */])(transitionName) === 'object') {
var type = transitionType.replace(/-\w/g, function (match) {
return match[1].toUpperCase();
});
return transitionName[type];
}
return "".concat(transitionName, "-").concat(transitionType);
}
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/interface.js
var STATUS_NONE = 'none';
var STATUS_APPEAR = 'appear';
var STATUS_ENTER = 'enter';
var STATUS_LEAVE = 'leave';
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/CSSMotion.js
/* eslint-disable react/default-props-match-prop-types, react/no-multi-comp, react/prop-types */
/**
* `transitionSupport` is used for none transition test case.
* Default we use browser transition event support check.
*/
function genCSSMotion(config) {
var transitionSupport = config;
var forwardRef = !!react["forwardRef"];
if (Object(esm_typeof["a" /* default */])(config) === 'object') {
transitionSupport = config.transitionSupport;
forwardRef = 'forwardRef' in config ? config.forwardRef : forwardRef;
}
function isSupportTransition(props) {
return !!(props.motionName && transitionSupport);
}
var CSSMotion = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(CSSMotion, _React$Component);
var _super = Object(createSuper["a" /* default */])(CSSMotion);
function CSSMotion() {
var _this;
Object(classCallCheck["a" /* default */])(this, CSSMotion);
_this = _super.apply(this, arguments);
_this.$cacheEle = null;
_this.node = null;
_this.raf = null;
_this.destroyed = false;
_this.deadlineId = null;
_this.state = {
status: STATUS_NONE,
statusActive: false,
newStatus: false,
statusStyle: null
};
_this.onDomUpdate = function () {
var _this$state = _this.state,
status = _this$state.status,
newStatus = _this$state.newStatus;
var _this$props = _this.props,
onAppearStart = _this$props.onAppearStart,
onEnterStart = _this$props.onEnterStart,
onLeaveStart = _this$props.onLeaveStart,
onAppearActive = _this$props.onAppearActive,
onEnterActive = _this$props.onEnterActive,
onLeaveActive = _this$props.onLeaveActive,
motionAppear = _this$props.motionAppear,
motionEnter = _this$props.motionEnter,
motionLeave = _this$props.motionLeave;
if (!isSupportTransition(_this.props)) {
return;
} // Event injection
var $ele = _this.getElement();
if (_this.$cacheEle !== $ele) {
_this.removeEventListener(_this.$cacheEle);
_this.addEventListener($ele);
_this.$cacheEle = $ele;
} // Init status
if (newStatus && status === STATUS_APPEAR && motionAppear) {
_this.updateStatus(onAppearStart, null, null, function () {
_this.updateActiveStatus(onAppearActive, STATUS_APPEAR);
});
} else if (newStatus && status === STATUS_ENTER && motionEnter) {
_this.updateStatus(onEnterStart, null, null, function () {
_this.updateActiveStatus(onEnterActive, STATUS_ENTER);
});
} else if (newStatus && status === STATUS_LEAVE && motionLeave) {
_this.updateStatus(onLeaveStart, null, null, function () {
_this.updateActiveStatus(onLeaveActive, STATUS_LEAVE);
});
}
};
_this.onMotionEnd = function (event) {
if (event && !event.deadline && event.target !== _this.getElement()) {
// event exists
// not initiated by deadline
// transitionend not fired by inner elements
return;
}
var _this$state2 = _this.state,
status = _this$state2.status,
statusActive = _this$state2.statusActive;
var _this$props2 = _this.props,
onAppearEnd = _this$props2.onAppearEnd,
onEnterEnd = _this$props2.onEnterEnd,
onLeaveEnd = _this$props2.onLeaveEnd;
if (status === STATUS_APPEAR && statusActive) {
_this.updateStatus(onAppearEnd, {
status: STATUS_NONE
}, event);
} else if (status === STATUS_ENTER && statusActive) {
_this.updateStatus(onEnterEnd, {
status: STATUS_NONE
}, event);
} else if (status === STATUS_LEAVE && statusActive) {
_this.updateStatus(onLeaveEnd, {
status: STATUS_NONE
}, event);
}
};
_this.setNodeRef = function (node) {
var internalRef = _this.props.internalRef;
_this.node = node;
Object(es_ref["b" /* fillRef */])(internalRef, node);
};
_this.getElement = function () {
try {
return Object(findDOMNode["a" /* default */])(_this.node || Object(assertThisInitialized["a" /* default */])(_this));
} catch (e) {
/**
* Fallback to cache element.
* This is only happen when `motionDeadline` trigger but element removed.
*/
return _this.$cacheEle;
}
};
_this.addEventListener = function ($ele) {
if (!$ele) return;
$ele.addEventListener(transitionEndName, _this.onMotionEnd);
$ele.addEventListener(animationEndName, _this.onMotionEnd);
};
_this.removeEventListener = function ($ele) {
if (!$ele) return;
$ele.removeEventListener(transitionEndName, _this.onMotionEnd);
$ele.removeEventListener(animationEndName, _this.onMotionEnd);
};
_this.updateStatus = function (styleFunc, additionalState, event, callback) {
var statusStyle = styleFunc ? styleFunc(_this.getElement(), event) : null;
if (statusStyle === false || _this.destroyed) return;
var nextStep;
if (callback) {
nextStep = function nextStep() {
_this.nextFrame(callback);
};
}
_this.setState(Object(objectSpread2["a" /* default */])({
statusStyle: Object(esm_typeof["a" /* default */])(statusStyle) === 'object' ? statusStyle : null,
newStatus: false
}, additionalState), nextStep); // Trigger before next frame & after `componentDidMount`
};
_this.updateActiveStatus = function (styleFunc, currentStatus) {
// `setState` use `postMessage` to trigger at the end of frame.
// Let's use requestAnimationFrame to update new state in next frame.
_this.nextFrame(function () {
var status = _this.state.status;
if (status !== currentStatus) return;
var motionDeadline = _this.props.motionDeadline;
_this.updateStatus(styleFunc, {
statusActive: true
});
if (motionDeadline > 0) {
_this.deadlineId = setTimeout(function () {
_this.onMotionEnd({
deadline: true
});
}, motionDeadline);
}
});
};
_this.nextFrame = function (func) {
_this.cancelNextFrame();
_this.raf = raf_default()(func);
};
_this.cancelNextFrame = function () {
if (_this.raf) {
raf_default.a.cancel(_this.raf);
_this.raf = null;
}
};
return _this;
}
Object(createClass["a" /* default */])(CSSMotion, [{
key: "componentDidMount",
value: function componentDidMount() {
this.onDomUpdate();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
this.onDomUpdate();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.destroyed = true;
this.removeEventListener(this.$cacheEle);
this.cancelNextFrame();
clearTimeout(this.deadlineId);
}
}, {
key: "render",
value: function render() {
var _classNames;
var _this$state3 = this.state,
status = _this$state3.status,
statusActive = _this$state3.statusActive,
statusStyle = _this$state3.statusStyle;
var _this$props3 = this.props,
children = _this$props3.children,
motionName = _this$props3.motionName,
visible = _this$props3.visible,
removeOnLeave = _this$props3.removeOnLeave,
leavedClassName = _this$props3.leavedClassName,
eventProps = _this$props3.eventProps;
if (!children) return null;
if (status === STATUS_NONE || !isSupportTransition(this.props)) {
if (visible) {
return children(Object(objectSpread2["a" /* default */])({}, eventProps), this.setNodeRef);
}
if (!removeOnLeave) {
return children(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, eventProps), {}, {
className: leavedClassName
}), this.setNodeRef);
}
return null;
}
return children(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, eventProps), {}, {
className: classnames_default()(getTransitionName(motionName, status), (_classNames = {}, Object(defineProperty["a" /* default */])(_classNames, getTransitionName(motionName, "".concat(status, "-active")), statusActive), Object(defineProperty["a" /* default */])(_classNames, motionName, typeof motionName === 'string'), _classNames)),
style: statusStyle
}), this.setNodeRef);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, _ref) {
var prevProps = _ref.prevProps,
prevStatus = _ref.status;
if (!isSupportTransition(props)) return {};
var visible = props.visible,
motionAppear = props.motionAppear,
motionEnter = props.motionEnter,
motionLeave = props.motionLeave,
motionLeaveImmediately = props.motionLeaveImmediately;
var newState = {
prevProps: props
}; // Clean up status if prop set to false
if (prevStatus === STATUS_APPEAR && !motionAppear || prevStatus === STATUS_ENTER && !motionEnter || prevStatus === STATUS_LEAVE && !motionLeave) {
newState.status = STATUS_NONE;
newState.statusActive = false;
newState.newStatus = false;
} // Appear
if (!prevProps && visible && motionAppear) {
newState.status = STATUS_APPEAR;
newState.statusActive = false;
newState.newStatus = true;
} // Enter
if (prevProps && !prevProps.visible && visible && motionEnter) {
newState.status = STATUS_ENTER;
newState.statusActive = false;
newState.newStatus = true;
} // Leave
if (prevProps && prevProps.visible && !visible && motionLeave || !prevProps && motionLeaveImmediately && !visible && motionLeave) {
newState.status = STATUS_LEAVE;
newState.statusActive = false;
newState.newStatus = true;
}
return newState;
}
}]);
return CSSMotion;
}(react["Component"]);
CSSMotion.defaultProps = {
visible: true,
motionEnter: true,
motionAppear: true,
motionLeave: true,
removeOnLeave: true
};
if (!forwardRef) {
return CSSMotion;
}
return react["forwardRef"](function (props, ref) {
return react["createElement"](CSSMotion, Object.assign({
internalRef: ref
}, props));
});
}
/* harmony default export */ var es_CSSMotion = (genCSSMotion(supportTransition));
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__("Ff2n");
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/util/diff.js
var STATUS_ADD = 'add';
var STATUS_KEEP = 'keep';
var STATUS_REMOVE = 'remove';
var STATUS_REMOVED = 'removed';
function wrapKeyToObject(key) {
var keyObj;
if (key && Object(esm_typeof["a" /* default */])(key) === 'object' && 'key' in key) {
keyObj = key;
} else {
keyObj = {
key: key
};
}
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, keyObj), {}, {
key: String(keyObj.key)
});
}
function parseKeys() {
var keys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
return keys.map(wrapKeyToObject);
}
function diffKeys() {
var prevKeys = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
var currentKeys = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
var list = [];
var currentIndex = 0;
var currentLen = currentKeys.length;
var prevKeyObjects = parseKeys(prevKeys);
var currentKeyObjects = parseKeys(currentKeys); // Check prev keys to insert or keep
prevKeyObjects.forEach(function (keyObj) {
var hit = false;
for (var i = currentIndex; i < currentLen; i += 1) {
var currentKeyObj = currentKeyObjects[i];
if (currentKeyObj.key === keyObj.key) {
// New added keys should add before current key
if (currentIndex < i) {
list = list.concat(currentKeyObjects.slice(currentIndex, i).map(function (obj) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, {
status: STATUS_ADD
});
}));
currentIndex = i;
}
list.push(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, currentKeyObj), {}, {
status: STATUS_KEEP
}));
currentIndex += 1;
hit = true;
break;
}
} // If not hit, it means key is removed
if (!hit) {
list.push(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, keyObj), {}, {
status: STATUS_REMOVE
}));
}
}); // Add rest to the list
if (currentIndex < currentLen) {
list = list.concat(currentKeyObjects.slice(currentIndex).map(function (obj) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, {
status: STATUS_ADD
});
}));
}
/**
* Merge same key when it remove and add again:
* [1 - add, 2 - keep, 1 - remove] -> [1 - keep, 2 - keep]
*/
var keys = {};
list.forEach(function (_ref) {
var key = _ref.key;
keys[key] = (keys[key] || 0) + 1;
});
var duplicatedKeys = Object.keys(keys).filter(function (key) {
return keys[key] > 1;
});
duplicatedKeys.forEach(function (matchKey) {
// Remove `STATUS_REMOVE` node.
list = list.filter(function (_ref2) {
var key = _ref2.key,
status = _ref2.status;
return key !== matchKey || status !== STATUS_REMOVE;
}); // Update `STATUS_ADD` to `STATUS_KEEP`
list.forEach(function (node) {
if (node.key === matchKey) {
// eslint-disable-next-line no-param-reassign
node.status = STATUS_KEEP;
}
});
});
return list;
}
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/CSSMotionList.js
/* eslint react/prop-types: 0 */
var MOTION_PROP_NAMES = ['eventProps', 'visible', 'children', 'motionName', 'motionAppear', 'motionEnter', 'motionLeave', 'motionLeaveImmediately', 'motionDeadline', 'removeOnLeave', 'leavedClassName', 'onAppearStart', 'onAppearActive', 'onAppearEnd', 'onEnterStart', 'onEnterActive', 'onEnterEnd', 'onLeaveStart', 'onLeaveActive', 'onLeaveEnd'];
function genCSSMotionList(transitionSupport) {
var CSSMotion = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : es_CSSMotion;
var CSSMotionList = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(CSSMotionList, _React$Component);
var _super = Object(createSuper["a" /* default */])(CSSMotionList);
function CSSMotionList() {
var _this;
Object(classCallCheck["a" /* default */])(this, CSSMotionList);
_this = _super.apply(this, arguments);
_this.state = {
keyEntities: []
};
_this.removeKey = function (removeKey) {
_this.setState(function (_ref) {
var keyEntities = _ref.keyEntities;
return {
keyEntities: keyEntities.map(function (entity) {
if (entity.key !== removeKey) return entity;
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, entity), {}, {
status: STATUS_REMOVED
});
})
};
});
};
return _this;
}
Object(createClass["a" /* default */])(CSSMotionList, [{
key: "render",
value: function render() {
var _this2 = this;
var keyEntities = this.state.keyEntities;
var _this$props = this.props,
component = _this$props.component,
children = _this$props.children,
restProps = Object(objectWithoutProperties["a" /* default */])(_this$props, ["component", "children"]);
var Component = component || react["Fragment"];
var motionProps = {};
MOTION_PROP_NAMES.forEach(function (prop) {
motionProps[prop] = restProps[prop];
delete restProps[prop];
});
delete restProps.keys;
return react["createElement"](Component, Object.assign({}, restProps), keyEntities.map(function (_ref2) {
var status = _ref2.status,
eventProps = Object(objectWithoutProperties["a" /* default */])(_ref2, ["status"]);
var visible = status === STATUS_ADD || status === STATUS_KEEP;
return react["createElement"](CSSMotion, Object.assign({}, motionProps, {
key: eventProps.key,
visible: visible,
eventProps: eventProps,
onLeaveEnd: function onLeaveEnd() {
if (motionProps.onLeaveEnd) {
motionProps.onLeaveEnd.apply(motionProps, arguments);
}
_this2.removeKey(eventProps.key);
}
}), children);
}));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(_ref3, _ref4) {
var keys = _ref3.keys;
var keyEntities = _ref4.keyEntities;
var parsedKeyObjects = parseKeys(keys); // Always as keep when motion not support
if (!transitionSupport) {
return {
keyEntities: parsedKeyObjects.map(function (obj) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, obj), {}, {
status: STATUS_KEEP
});
})
};
}
var mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);
var keyEntitiesLen = keyEntities.length;
return {
keyEntities: mixedKeyEntities.filter(function (entity) {
// IE 9 not support Array.prototype.find
var prevEntity = null;
for (var i = 0; i < keyEntitiesLen; i += 1) {
var currentEntity = keyEntities[i];
if (currentEntity.key === entity.key) {
prevEntity = currentEntity;
break;
}
} // Remove if already mark as removed
if (prevEntity && prevEntity.status === STATUS_REMOVED && entity.status === STATUS_REMOVE) {
return false;
}
return true;
})
};
}
}]);
return CSSMotionList;
}(react["Component"]);
CSSMotionList.defaultProps = {
component: 'div'
};
return CSSMotionList;
}
/* harmony default export */ var es_CSSMotionList = (genCSSMotionList(supportTransition));
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-motion/es/index.js
/* harmony default export */ var es = __webpack_exports__["b"] = (es_CSSMotion);
/***/ }),
/***/ "HYAF":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/require-object-coercible.js ***!
\********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
// `RequireObjectCoercible` abstract operation
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
module.exports = function (it) {
if (it == undefined) throw TypeError("Can't call method on " + it);
return it;
};
/***/ }),
/***/ "HaE+":
/*!*********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js ***!
\*********************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _asyncToGenerator; });
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
/***/ }),
/***/ "Hd5f":
/*!****************************************************************************!*\
!*** ./node_modules/core-js/internals/array-method-has-species-support.js ***!
\****************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "LQDL");
var SPECIES = wellKnownSymbol('species');
module.exports = function (METHOD_NAME) {
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/677
return V8_VERSION >= 51 || !fails(function () {
var array = [];
var constructor = array.constructor = {};
constructor[SPECIES] = function () {
return { foo: 1 };
};
return array[METHOD_NAME](Boolean).foo !== 1;
});
};
/***/ }),
/***/ "Hg0r":
/*!*********************************************************!*\
!*** ./node_modules/dva/dist/index.esm.js + 28 modules ***!
\*********************************************************/
/*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, connect, connectAdvanced, shallowEqual, useDispatch, useSelector, useStore, bindActionCreators, saga, router, routerRedux, fetch, default, dynamic, useHistory, useLocation, useParams, useRouteMatch */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toArray.js because of ./node_modules/antd/node_modules/rc-select/es/utils/valueUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/dva-core/node_modules/warning/browser.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/flatten/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/global/document.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/history-with-query/esm/history.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/invariant/browser.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/is-plain-object/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/prop-types/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-redux/es/index.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-router/esm/react-router.js because of ./node_modules/@umijs/renderer-react/node_modules/react-router-config/esm/react-router-config.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// UNUSED EXPORTS: createBrowserHistory, createHashHistory, createMemoryHistory, connect, connectAdvanced, shallowEqual, useDispatch, useSelector, useStore, bindActionCreators, saga, router, routerRedux, fetch, dynamic, useHistory, useLocation, useParams, useRouteMatch
// NAMESPACE OBJECT: ./node_modules/redux-saga/es/effects.js
var effects_namespaceObject = {};
__webpack_require__.r(effects_namespaceObject);
__webpack_require__.d(effects_namespaceObject, "take", function() { return io_take; });
__webpack_require__.d(effects_namespaceObject, "takem", function() { return takem; });
__webpack_require__.d(effects_namespaceObject, "put", function() { return io_put; });
__webpack_require__.d(effects_namespaceObject, "all", function() { return io_all; });
__webpack_require__.d(effects_namespaceObject, "race", function() { return io_race; });
__webpack_require__.d(effects_namespaceObject, "call", function() { return io_call; });
__webpack_require__.d(effects_namespaceObject, "apply", function() { return io_apply; });
__webpack_require__.d(effects_namespaceObject, "cps", function() { return cps; });
__webpack_require__.d(effects_namespaceObject, "fork", function() { return fork; });
__webpack_require__.d(effects_namespaceObject, "spawn", function() { return spawn; });
__webpack_require__.d(effects_namespaceObject, "join", function() { return join; });
__webpack_require__.d(effects_namespaceObject, "cancel", function() { return io_cancel; });
__webpack_require__.d(effects_namespaceObject, "select", function() { return io_select; });
__webpack_require__.d(effects_namespaceObject, "actionChannel", function() { return actionChannel; });
__webpack_require__.d(effects_namespaceObject, "cancelled", function() { return cancelled; });
__webpack_require__.d(effects_namespaceObject, "flush", function() { return io_flush; });
__webpack_require__.d(effects_namespaceObject, "getContext", function() { return getContext; });
__webpack_require__.d(effects_namespaceObject, "setContext", function() { return io_setContext; });
__webpack_require__.d(effects_namespaceObject, "takeEvery", function() { return io_helpers_takeEvery; });
__webpack_require__.d(effects_namespaceObject, "takeLatest", function() { return io_helpers_takeLatest; });
__webpack_require__.d(effects_namespaceObject, "throttle", function() { return io_helpers_throttle; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("VTBJ");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("U8pU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("KQm4");
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// EXTERNAL MODULE: ./node_modules/invariant/browser.js
var browser = __webpack_require__("QLaP");
var browser_default = /*#__PURE__*/__webpack_require__.n(browser);
// EXTERNAL MODULE: ./node_modules/history-with-query/esm/history.js + 2 modules
var esm_history = __webpack_require__("YS25");
// EXTERNAL MODULE: ./node_modules/global/document.js
var global_document = __webpack_require__("7zRj");
var document_default = /*#__PURE__*/__webpack_require__.n(global_document);
// EXTERNAL MODULE: ./node_modules/react-redux/es/index.js + 24 modules
var es = __webpack_require__("/MKj");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("rePB");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread.js
function _objectSpread(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? Object(arguments[i]) : {};
var ownKeys = Object.keys(source);
if (typeof Object.getOwnPropertySymbols === 'function') {
ownKeys.push.apply(ownKeys, Object.getOwnPropertySymbols(source).filter(function (sym) {
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
}));
}
ownKeys.forEach(function (key) {
Object(defineProperty["a" /* default */])(target, key, source[key]);
});
}
return target;
}
// CONCATENATED MODULE: ./node_modules/redux/es/redux.js
/**
* Adapted from React: https://github.com/facebook/react/blob/master/packages/shared/formatProdErrorMessage.js
*
* Do not require this module directly! Use normal throw error calls. These messages will be replaced with error codes
* during build.
* @param {number} code
*/
function formatProdErrorMessage(code) {
return "Minified Redux error #" + code + "; visit https://redux.js.org/Errors?code=" + code + " for the full message or " + 'use the non-minified dev environment for full errors. ';
}
// Inlined version of the `symbol-observable` polyfill
var $$observable = (function () {
return typeof Symbol === 'function' && Symbol.observable || '@@observable';
})();
/**
* These are private action types reserved by Redux.
* For any unknown actions, you must return the current state.
* If the current state is undefined, you must return the initial state.
* Do not reference these action types directly in your code.
*/
var randomString = function randomString() {
return Math.random().toString(36).substring(7).split('').join('.');
};
var ActionTypes = {
INIT: "@@redux/INIT" + randomString(),
REPLACE: "@@redux/REPLACE" + randomString(),
PROBE_UNKNOWN_ACTION: function PROBE_UNKNOWN_ACTION() {
return "@@redux/PROBE_UNKNOWN_ACTION" + randomString();
}
};
/**
* @param {any} obj The object to inspect.
* @returns {boolean} True if the argument appears to be a plain object.
*/
function isPlainObject(obj) {
if (typeof obj !== 'object' || obj === null) return false;
var proto = obj;
while (Object.getPrototypeOf(proto) !== null) {
proto = Object.getPrototypeOf(proto);
}
return Object.getPrototypeOf(obj) === proto;
}
// Inlined / shortened version of `kindOf` from https://github.com/jonschlinkert/kind-of
function miniKindOf(val) {
if (val === void 0) return 'undefined';
if (val === null) return 'null';
var type = typeof val;
switch (type) {
case 'boolean':
case 'string':
case 'number':
case 'symbol':
case 'function':
{
return type;
}
}
if (Array.isArray(val)) return 'array';
if (isDate(val)) return 'date';
if (isError(val)) return 'error';
var constructorName = ctorName(val);
switch (constructorName) {
case 'Symbol':
case 'Promise':
case 'WeakMap':
case 'WeakSet':
case 'Map':
case 'Set':
return constructorName;
} // other
return type.slice(8, -1).toLowerCase().replace(/\s/g, '');
}
function ctorName(val) {
return typeof val.constructor === 'function' ? val.constructor.name : null;
}
function isError(val) {
return val instanceof Error || typeof val.message === 'string' && val.constructor && typeof val.constructor.stackTraceLimit === 'number';
}
function isDate(val) {
if (val instanceof Date) return true;
return typeof val.toDateString === 'function' && typeof val.getDate === 'function' && typeof val.setDate === 'function';
}
function kindOf(val) {
var typeOfVal = typeof val;
if (false) {}
return typeOfVal;
}
/**
* @deprecated
*
* **We recommend using the `configureStore` method
* of the `@reduxjs/toolkit` package**, which replaces `createStore`.
*
* Redux Toolkit is our recommended approach for writing Redux logic today,
* including store setup, reducers, data fetching, and more.
*
* **For more details, please read this Redux docs page:**
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
*
* `configureStore` from Redux Toolkit is an improved version of `createStore` that
* simplifies setup and helps avoid common bugs.
*
* You should not be using the `redux` core package by itself today, except for learning purposes.
* The `createStore` method from the core `redux` package will not be removed, but we encourage
* all users to migrate to using Redux Toolkit for all Redux code.
*
* If you want to use `createStore` without this visual deprecation warning, use
* the `legacy_createStore` import instead:
*
* `import { legacy_createStore as createStore} from 'redux'`
*
*/
function redux_createStore(reducer, preloadedState, enhancer) {
var _ref2;
if (typeof preloadedState === 'function' && typeof enhancer === 'function' || typeof enhancer === 'function' && typeof arguments[3] === 'function') {
throw new Error( true ? formatProdErrorMessage(0) : undefined);
}
if (typeof preloadedState === 'function' && typeof enhancer === 'undefined') {
enhancer = preloadedState;
preloadedState = undefined;
}
if (typeof enhancer !== 'undefined') {
if (typeof enhancer !== 'function') {
throw new Error( true ? formatProdErrorMessage(1) : undefined);
}
return enhancer(redux_createStore)(reducer, preloadedState);
}
if (typeof reducer !== 'function') {
throw new Error( true ? formatProdErrorMessage(2) : undefined);
}
var currentReducer = reducer;
var currentState = preloadedState;
var currentListeners = [];
var nextListeners = currentListeners;
var isDispatching = false;
/**
* This makes a shallow copy of currentListeners so we can use
* nextListeners as a temporary list while dispatching.
*
* This prevents any bugs around consumers calling
* subscribe/unsubscribe in the middle of a dispatch.
*/
function ensureCanMutateNextListeners() {
if (nextListeners === currentListeners) {
nextListeners = currentListeners.slice();
}
}
/**
* Reads the state tree managed by the store.
*
* @returns {any} The current state tree of your application.
*/
function getState() {
if (isDispatching) {
throw new Error( true ? formatProdErrorMessage(3) : undefined);
}
return currentState;
}
/**
* Adds a change listener. It will be called any time an action is dispatched,
* and some part of the state tree may potentially have changed. You may then
* call `getState()` to read the current state tree inside the callback.
*
* You may call `dispatch()` from a change listener, with the following
* caveats:
*
* 1. The subscriptions are snapshotted just before every `dispatch()` call.
* If you subscribe or unsubscribe while the listeners are being invoked, this
* will not have any effect on the `dispatch()` that is currently in progress.
* However, the next `dispatch()` call, whether nested or not, will use a more
* recent snapshot of the subscription list.
*
* 2. The listener should not expect to see all state changes, as the state
* might have been updated multiple times during a nested `dispatch()` before
* the listener is called. It is, however, guaranteed that all subscribers
* registered before the `dispatch()` started will be called with the latest
* state by the time it exits.
*
* @param {Function} listener A callback to be invoked on every dispatch.
* @returns {Function} A function to remove this change listener.
*/
function subscribe(listener) {
if (typeof listener !== 'function') {
throw new Error( true ? formatProdErrorMessage(4) : undefined);
}
if (isDispatching) {
throw new Error( true ? formatProdErrorMessage(5) : undefined);
}
var isSubscribed = true;
ensureCanMutateNextListeners();
nextListeners.push(listener);
return function unsubscribe() {
if (!isSubscribed) {
return;
}
if (isDispatching) {
throw new Error( true ? formatProdErrorMessage(6) : undefined);
}
isSubscribed = false;
ensureCanMutateNextListeners();
var index = nextListeners.indexOf(listener);
nextListeners.splice(index, 1);
currentListeners = null;
};
}
/**
* Dispatches an action. It is the only way to trigger a state change.
*
* The `reducer` function, used to create the store, will be called with the
* current state tree and the given `action`. Its return value will
* be considered the **next** state of the tree, and the change listeners
* will be notified.
*
* The base implementation only supports plain object actions. If you want to
* dispatch a Promise, an Observable, a thunk, or something else, you need to
* wrap your store creating function into the corresponding middleware. For
* example, see the documentation for the `redux-thunk` package. Even the
* middleware will eventually dispatch plain object actions using this method.
*
* @param {Object} action A plain object representing “what changed”. It is
* a good idea to keep actions serializable so you can record and replay user
* sessions, or use the time travelling `redux-devtools`. An action must have
* a `type` property which may not be `undefined`. It is a good idea to use
* string constants for action types.
*
* @returns {Object} For convenience, the same action object you dispatched.
*
* Note that, if you use a custom middleware, it may wrap `dispatch()` to
* return something else (for example, a Promise you can await).
*/
function dispatch(action) {
if (!isPlainObject(action)) {
throw new Error( true ? formatProdErrorMessage(7) : undefined);
}
if (typeof action.type === 'undefined') {
throw new Error( true ? formatProdErrorMessage(8) : undefined);
}
if (isDispatching) {
throw new Error( true ? formatProdErrorMessage(9) : undefined);
}
try {
isDispatching = true;
currentState = currentReducer(currentState, action);
} finally {
isDispatching = false;
}
var listeners = currentListeners = nextListeners;
for (var i = 0; i < listeners.length; i++) {
var listener = listeners[i];
listener();
}
return action;
}
/**
* Replaces the reducer currently used by the store to calculate the state.
*
* You might need this if your app implements code splitting and you want to
* load some of the reducers dynamically. You might also need this if you
* implement a hot reloading mechanism for Redux.
*
* @param {Function} nextReducer The reducer for the store to use instead.
* @returns {void}
*/
function replaceReducer(nextReducer) {
if (typeof nextReducer !== 'function') {
throw new Error( true ? formatProdErrorMessage(10) : undefined);
}
currentReducer = nextReducer; // This action has a similiar effect to ActionTypes.INIT.
// Any reducers that existed in both the new and old rootReducer
// will receive the previous state. This effectively populates
// the new state tree with any relevant data from the old one.
dispatch({
type: ActionTypes.REPLACE
});
}
/**
* Interoperability point for observable/reactive libraries.
* @returns {observable} A minimal observable of state changes.
* For more information, see the observable proposal:
* https://github.com/tc39/proposal-observable
*/
function observable() {
var _ref;
var outerSubscribe = subscribe;
return _ref = {
/**
* The minimal observable subscription method.
* @param {Object} observer Any object that can be used as an observer.
* The observer object should have a `next` method.
* @returns {subscription} An object with an `unsubscribe` method that can
* be used to unsubscribe the observable from the store, and prevent further
* emission of values from the observable.
*/
subscribe: function subscribe(observer) {
if (typeof observer !== 'object' || observer === null) {
throw new Error( true ? formatProdErrorMessage(11) : undefined);
}
function observeState() {
if (observer.next) {
observer.next(getState());
}
}
observeState();
var unsubscribe = outerSubscribe(observeState);
return {
unsubscribe: unsubscribe
};
}
}, _ref[$$observable] = function () {
return this;
}, _ref;
} // When a store is created, an "INIT" action is dispatched so that every
// reducer returns their initial state. This effectively populates
// the initial state tree.
dispatch({
type: ActionTypes.INIT
});
return _ref2 = {
dispatch: dispatch,
subscribe: subscribe,
getState: getState,
replaceReducer: replaceReducer
}, _ref2[$$observable] = observable, _ref2;
}
/**
* Creates a Redux store that holds the state tree.
*
* **We recommend using `configureStore` from the
* `@reduxjs/toolkit` package**, which replaces `createStore`:
* **https://redux.js.org/introduction/why-rtk-is-redux-today**
*
* The only way to change the data in the store is to call `dispatch()` on it.
*
* There should only be a single store in your app. To specify how different
* parts of the state tree respond to actions, you may combine several reducers
* into a single reducer function by using `combineReducers`.
*
* @param {Function} reducer A function that returns the next state tree, given
* the current state tree and the action to handle.
*
* @param {any} [preloadedState] The initial state. You may optionally specify it
* to hydrate the state from the server in universal apps, or to restore a
* previously serialized user session.
* If you use `combineReducers` to produce the root reducer function, this must be
* an object with the same shape as `combineReducers` keys.
*
* @param {Function} [enhancer] The store enhancer. You may optionally specify it
* to enhance the store with third-party capabilities such as middleware,
* time travel, persistence, etc. The only store enhancer that ships with Redux
* is `applyMiddleware()`.
*
* @returns {Store} A Redux store that lets you read the state, dispatch actions
* and subscribe to changes.
*/
var legacy_createStore = redux_createStore;
/**
* Prints a warning in the console if it exists.
*
* @param {String} message The warning message.
* @returns {void}
*/
function warning(message) {
/* eslint-disable no-console */
if (typeof console !== 'undefined' && typeof console.error === 'function') {
console.error(message);
}
/* eslint-enable no-console */
try {
// This error was thrown as a convenience so that if you enable
// "break on all exceptions" in your console,
// it would pause the execution at this line.
throw new Error(message);
} catch (e) {} // eslint-disable-line no-empty
}
function getUnexpectedStateShapeWarningMessage(inputState, reducers, action, unexpectedKeyCache) {
var reducerKeys = Object.keys(reducers);
var argumentName = action && action.type === ActionTypes.INIT ? 'preloadedState argument passed to createStore' : 'previous state received by the reducer';
if (reducerKeys.length === 0) {
return 'Store does not have a valid reducer. Make sure the argument passed ' + 'to combineReducers is an object whose values are reducers.';
}
if (!isPlainObject(inputState)) {
return "The " + argumentName + " has unexpected type of \"" + kindOf(inputState) + "\". Expected argument to be an object with the following " + ("keys: \"" + reducerKeys.join('", "') + "\"");
}
var unexpectedKeys = Object.keys(inputState).filter(function (key) {
return !reducers.hasOwnProperty(key) && !unexpectedKeyCache[key];
});
unexpectedKeys.forEach(function (key) {
unexpectedKeyCache[key] = true;
});
if (action && action.type === ActionTypes.REPLACE) return;
if (unexpectedKeys.length > 0) {
return "Unexpected " + (unexpectedKeys.length > 1 ? 'keys' : 'key') + " " + ("\"" + unexpectedKeys.join('", "') + "\" found in " + argumentName + ". ") + "Expected to find one of the known reducer keys instead: " + ("\"" + reducerKeys.join('", "') + "\". Unexpected keys will be ignored.");
}
}
function assertReducerShape(reducers) {
Object.keys(reducers).forEach(function (key) {
var reducer = reducers[key];
var initialState = reducer(undefined, {
type: ActionTypes.INIT
});
if (typeof initialState === 'undefined') {
throw new Error( true ? formatProdErrorMessage(12) : undefined);
}
if (typeof reducer(undefined, {
type: ActionTypes.PROBE_UNKNOWN_ACTION()
}) === 'undefined') {
throw new Error( true ? formatProdErrorMessage(13) : undefined);
}
});
}
/**
* Turns an object whose values are different reducer functions, into a single
* reducer function. It will call every child reducer, and gather their results
* into a single state object, whose keys correspond to the keys of the passed
* reducer functions.
*
* @param {Object} reducers An object whose values correspond to different
* reducer functions that need to be combined into one. One handy way to obtain
* it is to use ES6 `import * as reducers` syntax. The reducers may never return
* undefined for any action. Instead, they should return their initial state
* if the state passed to them was undefined, and the current state for any
* unrecognized action.
*
* @returns {Function} A reducer function that invokes every reducer inside the
* passed object, and builds a state object with the same shape.
*/
function combineReducers(reducers) {
var reducerKeys = Object.keys(reducers);
var finalReducers = {};
for (var i = 0; i < reducerKeys.length; i++) {
var key = reducerKeys[i];
if (false) {}
if (typeof reducers[key] === 'function') {
finalReducers[key] = reducers[key];
}
}
var finalReducerKeys = Object.keys(finalReducers); // This is used to make sure we don't warn about the same
// keys multiple times.
var unexpectedKeyCache;
if (false) {}
var shapeAssertionError;
try {
assertReducerShape(finalReducers);
} catch (e) {
shapeAssertionError = e;
}
return function combination(state, action) {
if (state === void 0) {
state = {};
}
if (shapeAssertionError) {
throw shapeAssertionError;
}
if (false) { var warningMessage; }
var hasChanged = false;
var nextState = {};
for (var _i = 0; _i < finalReducerKeys.length; _i++) {
var _key = finalReducerKeys[_i];
var reducer = finalReducers[_key];
var previousStateForKey = state[_key];
var nextStateForKey = reducer(previousStateForKey, action);
if (typeof nextStateForKey === 'undefined') {
var actionType = action && action.type;
throw new Error( true ? formatProdErrorMessage(14) : undefined);
}
nextState[_key] = nextStateForKey;
hasChanged = hasChanged || nextStateForKey !== previousStateForKey;
}
hasChanged = hasChanged || finalReducerKeys.length !== Object.keys(state).length;
return hasChanged ? nextState : state;
};
}
function bindActionCreator(actionCreator, dispatch) {
return function () {
return dispatch(actionCreator.apply(this, arguments));
};
}
/**
* Turns an object whose values are action creators, into an object with the
* same keys, but with every function wrapped into a `dispatch` call so they
* may be invoked directly. This is just a convenience method, as you can call
* `store.dispatch(MyActionCreators.doSomething())` yourself just fine.
*
* For convenience, you can also pass an action creator as the first argument,
* and get a dispatch wrapped function in return.
*
* @param {Function|Object} actionCreators An object whose values are action
* creator functions. One handy way to obtain it is to use ES6 `import * as`
* syntax. You may also pass a single function.
*
* @param {Function} dispatch The `dispatch` function available on your Redux
* store.
*
* @returns {Function|Object} The object mimicking the original object, but with
* every action creator wrapped into the `dispatch` call. If you passed a
* function as `actionCreators`, the return value will also be a single
* function.
*/
function bindActionCreators(actionCreators, dispatch) {
if (typeof actionCreators === 'function') {
return bindActionCreator(actionCreators, dispatch);
}
if (typeof actionCreators !== 'object' || actionCreators === null) {
throw new Error( true ? formatProdErrorMessage(16) : undefined);
}
var boundActionCreators = {};
for (var key in actionCreators) {
var actionCreator = actionCreators[key];
if (typeof actionCreator === 'function') {
boundActionCreators[key] = bindActionCreator(actionCreator, dispatch);
}
}
return boundActionCreators;
}
/**
* Composes single-argument functions from right to left. The rightmost
* function can take multiple arguments as it provides the signature for
* the resulting composite function.
*
* @param {...Function} funcs The functions to compose.
* @returns {Function} A function obtained by composing the argument functions
* from right to left. For example, compose(f, g, h) is identical to doing
* (...args) => f(g(h(...args))).
*/
function compose() {
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
funcs[_key] = arguments[_key];
}
if (funcs.length === 0) {
return function (arg) {
return arg;
};
}
if (funcs.length === 1) {
return funcs[0];
}
return funcs.reduce(function (a, b) {
return function () {
return a(b.apply(void 0, arguments));
};
});
}
/**
* Creates a store enhancer that applies middleware to the dispatch method
* of the Redux store. This is handy for a variety of tasks, such as expressing
* asynchronous actions in a concise manner, or logging every action payload.
*
* See `redux-thunk` package as an example of the Redux middleware.
*
* Because middleware is potentially asynchronous, this should be the first
* store enhancer in the composition chain.
*
* Note that each middleware will be given the `dispatch` and `getState` functions
* as named arguments.
*
* @param {...Function} middlewares The middleware chain to be applied.
* @returns {Function} A store enhancer applying the middleware.
*/
function applyMiddleware() {
for (var _len = arguments.length, middlewares = new Array(_len), _key = 0; _key < _len; _key++) {
middlewares[_key] = arguments[_key];
}
return function (createStore) {
return function () {
var store = createStore.apply(void 0, arguments);
var _dispatch = function dispatch() {
throw new Error( true ? formatProdErrorMessage(15) : undefined);
};
var middlewareAPI = {
getState: store.getState,
dispatch: function dispatch() {
return _dispatch.apply(void 0, arguments);
}
};
var chain = middlewares.map(function (middleware) {
return middleware(middlewareAPI);
});
_dispatch = compose.apply(void 0, chain)(store.dispatch);
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, store), {}, {
dispatch: _dispatch
});
};
};
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/utils.js
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var sym = function sym(id) {
return '@@redux-saga/' + id;
};
var TASK = /*#__PURE__*/sym('TASK');
var HELPER = /*#__PURE__*/sym('HELPER');
var MATCH = /*#__PURE__*/sym('MATCH');
var CANCEL = /*#__PURE__*/sym('CANCEL_PROMISE');
var SAGA_ACTION = /*#__PURE__*/sym('SAGA_ACTION');
var SELF_CANCELLATION = /*#__PURE__*/sym('SELF_CANCELLATION');
var konst = function konst(v) {
return function () {
return v;
};
};
var kTrue = /*#__PURE__*/konst(true);
var kFalse = /*#__PURE__*/konst(false);
var utils_noop = function noop() {};
var ident = function ident(v) {
return v;
};
function check(value, predicate, error) {
if (!predicate(value)) {
utils_log('error', 'uncaught at check', error);
throw new Error(error);
}
}
var utils_hasOwnProperty = Object.prototype.hasOwnProperty;
function hasOwn(object, property) {
return is.notUndef(object) && utils_hasOwnProperty.call(object, property);
}
var is = {
undef: function undef(v) {
return v === null || v === undefined;
},
notUndef: function notUndef(v) {
return v !== null && v !== undefined;
},
func: function func(f) {
return typeof f === 'function';
},
number: function number(n) {
return typeof n === 'number';
},
string: function string(s) {
return typeof s === 'string';
},
array: Array.isArray,
object: function object(obj) {
return obj && !is.array(obj) && (typeof obj === 'undefined' ? 'undefined' : _typeof(obj)) === 'object';
},
promise: function promise(p) {
return p && is.func(p.then);
},
iterator: function iterator(it) {
return it && is.func(it.next) && is.func(it.throw);
},
iterable: function iterable(it) {
return it && is.func(Symbol) ? is.func(it[Symbol.iterator]) : is.array(it);
},
task: function task(t) {
return t && t[TASK];
},
observable: function observable(ob) {
return ob && is.func(ob.subscribe);
},
buffer: function buffer(buf) {
return buf && is.func(buf.isEmpty) && is.func(buf.take) && is.func(buf.put);
},
pattern: function pattern(pat) {
return pat && (is.string(pat) || (typeof pat === 'undefined' ? 'undefined' : _typeof(pat)) === 'symbol' || is.func(pat) || is.array(pat));
},
channel: function channel(ch) {
return ch && is.func(ch.take) && is.func(ch.close);
},
helper: function helper(it) {
return it && it[HELPER];
},
stringableFunc: function stringableFunc(f) {
return is.func(f) && hasOwn(f, 'toString');
}
};
var object = {
assign: function assign(target, source) {
for (var i in source) {
if (hasOwn(source, i)) {
target[i] = source[i];
}
}
}
};
function remove(array, item) {
var index = array.indexOf(item);
if (index >= 0) {
array.splice(index, 1);
}
}
var array = {
from: function from(obj) {
var arr = Array(obj.length);
for (var i in obj) {
if (hasOwn(obj, i)) {
arr[i] = obj[i];
}
}
return arr;
}
};
function deferred() {
var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var def = _extends({}, props);
var promise = new Promise(function (resolve, reject) {
def.resolve = resolve;
def.reject = reject;
});
def.promise = promise;
return def;
}
function arrayOfDeffered(length) {
var arr = [];
for (var i = 0; i < length; i++) {
arr.push(deferred());
}
return arr;
}
function utils_delay(ms) {
var val = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
var timeoutId = void 0;
var promise = new Promise(function (resolve) {
timeoutId = setTimeout(function () {
return resolve(val);
}, ms);
});
promise[CANCEL] = function () {
return clearTimeout(timeoutId);
};
return promise;
}
function createMockTask() {
var _ref;
var running = true;
var _result = void 0,
_error = void 0;
return _ref = {}, _ref[TASK] = true, _ref.isRunning = function isRunning() {
return running;
}, _ref.result = function result() {
return _result;
}, _ref.error = function error() {
return _error;
}, _ref.setRunning = function setRunning(b) {
return running = b;
}, _ref.setResult = function setResult(r) {
return _result = r;
}, _ref.setError = function setError(e) {
return _error = e;
}, _ref;
}
function autoInc() {
var seed = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
return function () {
return ++seed;
};
}
var uid = /*#__PURE__*/autoInc();
var kThrow = function kThrow(err) {
throw err;
};
var kReturn = function kReturn(value) {
return { value: value, done: true };
};
function makeIterator(next) {
var thro = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : kThrow;
var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
var isHelper = arguments[3];
var iterator = { name: name, next: next, throw: thro, return: kReturn };
if (isHelper) {
iterator[HELPER] = true;
}
if (typeof Symbol !== 'undefined') {
iterator[Symbol.iterator] = function () {
return iterator;
};
}
return iterator;
}
/**
Print error in a useful way whether in a browser environment
(with expandable error stack traces), or in a node.js environment
(text-only log output)
**/
function utils_log(level, message) {
var error = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
/*eslint-disable no-console*/
if (typeof window === 'undefined') {
console.log('redux-saga ' + level + ': ' + message + '\n' + (error && error.stack || error));
} else {
console[level](message, error);
}
}
function deprecate(fn, deprecationWarning) {
return function () {
if (false) {}
return fn.apply(undefined, arguments);
};
}
var updateIncentive = function updateIncentive(deprecated, preferred) {
return deprecated + ' has been deprecated in favor of ' + preferred + ', please update your code';
};
var internalErr = function internalErr(err) {
return new Error('\n redux-saga: Error checking hooks detected an inconsistent state. This is likely a bug\n in redux-saga code and not yours. Thanks for reporting this in the project\'s github repo.\n Error: ' + err + '\n');
};
var createSetContextWarning = function createSetContextWarning(ctx, props) {
return (ctx ? ctx + '.' : '') + 'setContext(props): argument ' + props + ' is not a plain object';
};
var wrapSagaDispatch = function wrapSagaDispatch(dispatch) {
return function (action) {
return dispatch(Object.defineProperty(action, SAGA_ACTION, { value: true }));
};
};
var cloneableGenerator = function cloneableGenerator(generatorFunc) {
return function () {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var history = [];
var gen = generatorFunc.apply(undefined, args);
return {
next: function next(arg) {
history.push(arg);
return gen.next(arg);
},
clone: function clone() {
var clonedGen = cloneableGenerator(generatorFunc).apply(undefined, args);
history.forEach(function (arg) {
return clonedGen.next(arg);
});
return clonedGen;
},
return: function _return(value) {
return gen.return(value);
},
throw: function _throw(exception) {
return gen.throw(exception);
}
};
};
};
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/buffers.js
var BUFFER_OVERFLOW = "Channel's Buffer overflow!";
var ON_OVERFLOW_THROW = 1;
var ON_OVERFLOW_DROP = 2;
var ON_OVERFLOW_SLIDE = 3;
var ON_OVERFLOW_EXPAND = 4;
var zeroBuffer = { isEmpty: kTrue, put: utils_noop, take: utils_noop };
function ringBuffer() {
var limit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 10;
var overflowAction = arguments[1];
var arr = new Array(limit);
var length = 0;
var pushIndex = 0;
var popIndex = 0;
var push = function push(it) {
arr[pushIndex] = it;
pushIndex = (pushIndex + 1) % limit;
length++;
};
var take = function take() {
if (length != 0) {
var it = arr[popIndex];
arr[popIndex] = null;
length--;
popIndex = (popIndex + 1) % limit;
return it;
}
};
var flush = function flush() {
var items = [];
while (length) {
items.push(take());
}
return items;
};
return {
isEmpty: function isEmpty() {
return length == 0;
},
put: function put(it) {
if (length < limit) {
push(it);
} else {
var doubledLimit = void 0;
switch (overflowAction) {
case ON_OVERFLOW_THROW:
throw new Error(BUFFER_OVERFLOW);
case ON_OVERFLOW_SLIDE:
arr[pushIndex] = it;
pushIndex = (pushIndex + 1) % limit;
popIndex = pushIndex;
break;
case ON_OVERFLOW_EXPAND:
doubledLimit = 2 * limit;
arr = flush();
length = arr.length;
pushIndex = arr.length;
popIndex = 0;
arr.length = doubledLimit;
limit = doubledLimit;
push(it);
break;
default:
// DROP
}
}
},
take: take,
flush: flush
};
}
var buffers = {
none: function none() {
return zeroBuffer;
},
fixed: function fixed(limit) {
return ringBuffer(limit, ON_OVERFLOW_THROW);
},
dropping: function dropping(limit) {
return ringBuffer(limit, ON_OVERFLOW_DROP);
},
sliding: function sliding(limit) {
return ringBuffer(limit, ON_OVERFLOW_SLIDE);
},
expanding: function expanding(initialSize) {
return ringBuffer(initialSize, ON_OVERFLOW_EXPAND);
}
};
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/scheduler.js
var queue = [];
/**
Variable to hold a counting semaphore
- Incrementing adds a lock and puts the scheduler in a `suspended` state (if it's not
already suspended)
- Decrementing releases a lock. Zero locks puts the scheduler in a `released` state. This
triggers flushing the queued tasks.
**/
var semaphore = 0;
/**
Executes a task 'atomically'. Tasks scheduled during this execution will be queued
and flushed after this task has finished (assuming the scheduler endup in a released
state).
**/
function exec(task) {
try {
suspend();
task();
} finally {
release();
}
}
/**
Executes or queues a task depending on the state of the scheduler (`suspended` or `released`)
**/
function asap(task) {
queue.push(task);
if (!semaphore) {
suspend();
scheduler_flush();
}
}
/**
Puts the scheduler in a `suspended` state. Scheduled tasks will be queued until the
scheduler is released.
**/
function suspend() {
semaphore++;
}
/**
Puts the scheduler in a `released` state.
**/
function release() {
semaphore--;
}
/**
Releases the current lock. Executes all queued tasks if the scheduler is in the released state.
**/
function scheduler_flush() {
release();
var task = void 0;
while (!semaphore && (task = queue.shift()) !== undefined) {
exec(task);
}
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/channel.js
var channel_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var CHANNEL_END_TYPE = '@@redux-saga/CHANNEL_END';
var END = { type: CHANNEL_END_TYPE };
var isEnd = function isEnd(a) {
return a && a.type === CHANNEL_END_TYPE;
};
function emitter() {
var subscribers = [];
function subscribe(sub) {
subscribers.push(sub);
return function () {
return remove(subscribers, sub);
};
}
function emit(item) {
var arr = subscribers.slice();
for (var i = 0, len = arr.length; i < len; i++) {
arr[i](item);
}
}
return {
subscribe: subscribe,
emit: emit
};
}
var INVALID_BUFFER = 'invalid buffer passed to channel factory function';
var UNDEFINED_INPUT_ERROR = 'Saga was provided with an undefined action';
if (false) {}
function channel_channel() {
var buffer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : buffers.fixed();
var closed = false;
var takers = [];
check(buffer, is.buffer, INVALID_BUFFER);
function checkForbiddenStates() {
if (closed && takers.length) {
throw internalErr('Cannot have a closed channel with pending takers');
}
if (takers.length && !buffer.isEmpty()) {
throw internalErr('Cannot have pending takers with non empty buffer');
}
}
function put(input) {
checkForbiddenStates();
check(input, is.notUndef, UNDEFINED_INPUT_ERROR);
if (closed) {
return;
}
if (!takers.length) {
return buffer.put(input);
}
for (var i = 0; i < takers.length; i++) {
var cb = takers[i];
if (!cb[MATCH] || cb[MATCH](input)) {
takers.splice(i, 1);
return cb(input);
}
}
}
function take(cb) {
checkForbiddenStates();
check(cb, is.func, "channel.take's callback must be a function");
if (closed && buffer.isEmpty()) {
cb(END);
} else if (!buffer.isEmpty()) {
cb(buffer.take());
} else {
takers.push(cb);
cb.cancel = function () {
return remove(takers, cb);
};
}
}
function flush(cb) {
checkForbiddenStates(); // TODO: check if some new state should be forbidden now
check(cb, is.func, "channel.flush' callback must be a function");
if (closed && buffer.isEmpty()) {
cb(END);
return;
}
cb(buffer.flush());
}
function close() {
checkForbiddenStates();
if (!closed) {
closed = true;
if (takers.length) {
var arr = takers;
takers = [];
for (var i = 0, len = arr.length; i < len; i++) {
arr[i](END);
}
}
}
}
return {
take: take,
put: put,
flush: flush,
close: close,
get __takers__() {
return takers;
},
get __closed__() {
return closed;
}
};
}
function eventChannel(subscribe) {
var buffer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : buffers.none();
var matcher = arguments[2];
/**
should be if(typeof matcher !== undefined) instead?
see PR #273 for a background discussion
**/
if (arguments.length > 2) {
check(matcher, is.func, 'Invalid match function passed to eventChannel');
}
var chan = channel_channel(buffer);
var close = function close() {
if (!chan.__closed__) {
if (unsubscribe) {
unsubscribe();
}
chan.close();
}
};
var unsubscribe = subscribe(function (input) {
if (isEnd(input)) {
close();
return;
}
if (matcher && !matcher(input)) {
return;
}
chan.put(input);
});
if (chan.__closed__) {
unsubscribe();
}
if (!is.func(unsubscribe)) {
throw new Error('in eventChannel: subscribe should return a function to unsubscribe');
}
return {
take: chan.take,
flush: chan.flush,
close: close
};
}
function channel_stdChannel(subscribe) {
var chan = eventChannel(function (cb) {
return subscribe(function (input) {
if (input[SAGA_ACTION]) {
cb(input);
return;
}
asap(function () {
return cb(input);
});
});
});
return channel_extends({}, chan, {
take: function take(cb, matcher) {
if (arguments.length > 1) {
check(matcher, is.func, "channel.take's matcher argument must be a function");
cb[MATCH] = matcher;
}
chan.take(cb);
}
});
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/io.js
var IO = /*#__PURE__*/sym('IO');
var TAKE = 'TAKE';
var PUT = 'PUT';
var ALL = 'ALL';
var RACE = 'RACE';
var CALL = 'CALL';
var CPS = 'CPS';
var FORK = 'FORK';
var JOIN = 'JOIN';
var io_CANCEL = 'CANCEL';
var SELECT = 'SELECT';
var ACTION_CHANNEL = 'ACTION_CHANNEL';
var CANCELLED = 'CANCELLED';
var FLUSH = 'FLUSH';
var GET_CONTEXT = 'GET_CONTEXT';
var SET_CONTEXT = 'SET_CONTEXT';
var TEST_HINT = '\n(HINT: if you are getting this errors in tests, consider using createMockTask from redux-saga/utils)';
var io_effect = function effect(type, payload) {
var _ref;
return _ref = {}, _ref[IO] = true, _ref[type] = payload, _ref;
};
var io_detach = function detach(eff) {
check(asEffect.fork(eff), is.object, 'detach(eff): argument must be a fork effect');
eff[FORK].detached = true;
return eff;
};
function io_take() {
var patternOrChannel = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '*';
if (arguments.length) {
check(arguments[0], is.notUndef, 'take(patternOrChannel): patternOrChannel is undefined');
}
if (is.pattern(patternOrChannel)) {
return io_effect(TAKE, { pattern: patternOrChannel });
}
if (is.channel(patternOrChannel)) {
return io_effect(TAKE, { channel: patternOrChannel });
}
throw new Error('take(patternOrChannel): argument ' + String(patternOrChannel) + ' is not valid channel or a valid pattern');
}
io_take.maybe = function () {
var eff = io_take.apply(undefined, arguments);
eff[TAKE].maybe = true;
return eff;
};
var takem = /*#__PURE__*/deprecate(io_take.maybe, /*#__PURE__*/updateIncentive('takem', 'take.maybe'));
function io_put(channel, action) {
if (arguments.length > 1) {
check(channel, is.notUndef, 'put(channel, action): argument channel is undefined');
check(channel, is.channel, 'put(channel, action): argument ' + channel + ' is not a valid channel');
check(action, is.notUndef, 'put(channel, action): argument action is undefined');
} else {
check(channel, is.notUndef, 'put(action): argument action is undefined');
action = channel;
channel = null;
}
return io_effect(PUT, { channel: channel, action: action });
}
io_put.resolve = function () {
var eff = io_put.apply(undefined, arguments);
eff[PUT].resolve = true;
return eff;
};
io_put.sync = /*#__PURE__*/deprecate(io_put.resolve, /*#__PURE__*/updateIncentive('put.sync', 'put.resolve'));
function io_all(effects) {
return io_effect(ALL, effects);
}
function io_race(effects) {
return io_effect(RACE, effects);
}
function getFnCallDesc(meth, fn, args) {
check(fn, is.notUndef, meth + ': argument fn is undefined');
var context = null;
if (is.array(fn)) {
var _fn = fn;
context = _fn[0];
fn = _fn[1];
} else if (fn.fn) {
var _fn2 = fn;
context = _fn2.context;
fn = _fn2.fn;
}
if (context && is.string(fn) && is.func(context[fn])) {
fn = context[fn];
}
check(fn, is.func, meth + ': argument ' + fn + ' is not a function');
return { context: context, fn: fn, args: args };
}
function io_call(fn) {
for (var _len = arguments.length, args = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
return io_effect(CALL, getFnCallDesc('call', fn, args));
}
function io_apply(context, fn) {
var args = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
return io_effect(CALL, getFnCallDesc('apply', { context: context, fn: fn }, args));
}
function cps(fn) {
for (var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
return io_effect(CPS, getFnCallDesc('cps', fn, args));
}
function fork(fn) {
for (var _len3 = arguments.length, args = Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
args[_key3 - 1] = arguments[_key3];
}
return io_effect(FORK, getFnCallDesc('fork', fn, args));
}
function spawn(fn) {
for (var _len4 = arguments.length, args = Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
args[_key4 - 1] = arguments[_key4];
}
return io_detach(fork.apply(undefined, [fn].concat(args)));
}
function join() {
for (var _len5 = arguments.length, tasks = Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
tasks[_key5] = arguments[_key5];
}
if (tasks.length > 1) {
return io_all(tasks.map(function (t) {
return join(t);
}));
}
var task = tasks[0];
check(task, is.notUndef, 'join(task): argument task is undefined');
check(task, is.task, 'join(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT);
return io_effect(JOIN, task);
}
function io_cancel() {
for (var _len6 = arguments.length, tasks = Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
tasks[_key6] = arguments[_key6];
}
if (tasks.length > 1) {
return io_all(tasks.map(function (t) {
return io_cancel(t);
}));
}
var task = tasks[0];
if (tasks.length === 1) {
check(task, is.notUndef, 'cancel(task): argument task is undefined');
check(task, is.task, 'cancel(task): argument ' + task + ' is not a valid Task object ' + TEST_HINT);
}
return io_effect(io_CANCEL, task || SELF_CANCELLATION);
}
function io_select(selector) {
for (var _len7 = arguments.length, args = Array(_len7 > 1 ? _len7 - 1 : 0), _key7 = 1; _key7 < _len7; _key7++) {
args[_key7 - 1] = arguments[_key7];
}
if (arguments.length === 0) {
selector = ident;
} else {
check(selector, is.notUndef, 'select(selector,[...]): argument selector is undefined');
check(selector, is.func, 'select(selector,[...]): argument ' + selector + ' is not a function');
}
return io_effect(SELECT, { selector: selector, args: args });
}
/**
channel(pattern, [buffer]) => creates an event channel for store actions
**/
function actionChannel(pattern, buffer) {
check(pattern, is.notUndef, 'actionChannel(pattern,...): argument pattern is undefined');
if (arguments.length > 1) {
check(buffer, is.notUndef, 'actionChannel(pattern, buffer): argument buffer is undefined');
check(buffer, is.buffer, 'actionChannel(pattern, buffer): argument ' + buffer + ' is not a valid buffer');
}
return io_effect(ACTION_CHANNEL, { pattern: pattern, buffer: buffer });
}
function cancelled() {
return io_effect(CANCELLED, {});
}
function io_flush(channel) {
check(channel, is.channel, 'flush(channel): argument ' + channel + ' is not valid channel');
return io_effect(FLUSH, channel);
}
function getContext(prop) {
check(prop, is.string, 'getContext(prop): argument ' + prop + ' is not a string');
return io_effect(GET_CONTEXT, prop);
}
function io_setContext(props) {
check(props, is.object, createSetContextWarning(null, props));
return io_effect(SET_CONTEXT, props);
}
var createAsEffectType = function createAsEffectType(type) {
return function (effect) {
return effect && effect[IO] && effect[type];
};
};
var asEffect = {
take: /*#__PURE__*/createAsEffectType(TAKE),
put: /*#__PURE__*/createAsEffectType(PUT),
all: /*#__PURE__*/createAsEffectType(ALL),
race: /*#__PURE__*/createAsEffectType(RACE),
call: /*#__PURE__*/createAsEffectType(CALL),
cps: /*#__PURE__*/createAsEffectType(CPS),
fork: /*#__PURE__*/createAsEffectType(FORK),
join: /*#__PURE__*/createAsEffectType(JOIN),
cancel: /*#__PURE__*/createAsEffectType(io_CANCEL),
select: /*#__PURE__*/createAsEffectType(SELECT),
actionChannel: /*#__PURE__*/createAsEffectType(ACTION_CHANNEL),
cancelled: /*#__PURE__*/createAsEffectType(CANCELLED),
flush: /*#__PURE__*/createAsEffectType(FLUSH),
getContext: /*#__PURE__*/createAsEffectType(GET_CONTEXT),
setContext: /*#__PURE__*/createAsEffectType(SET_CONTEXT)
};
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/proc.js
var proc_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var proc_typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
function _defineEnumerableProperties(obj, descs) { for (var key in descs) { var desc = descs[key]; desc.configurable = desc.enumerable = true; if ("value" in desc) desc.writable = true; Object.defineProperty(obj, key, desc); } return obj; }
var NOT_ITERATOR_ERROR = 'proc first argument (Saga function result) must be an iterator';
var CHANNEL_END = {
toString: function toString() {
return '@@redux-saga/CHANNEL_END';
}
};
var TASK_CANCEL = {
toString: function toString() {
return '@@redux-saga/TASK_CANCEL';
}
};
var matchers = {
wildcard: function wildcard() {
return kTrue;
},
default: function _default(pattern) {
return (typeof pattern === 'undefined' ? 'undefined' : proc_typeof(pattern)) === 'symbol' ? function (input) {
return input.type === pattern;
} : function (input) {
return input.type === String(pattern);
};
},
array: function array(patterns) {
return function (input) {
return patterns.some(function (p) {
return proc_matcher(p)(input);
});
};
},
predicate: function predicate(_predicate) {
return function (input) {
return _predicate(input);
};
}
};
function proc_matcher(pattern) {
// prettier-ignore
return (pattern === '*' ? matchers.wildcard : is.array(pattern) ? matchers.array : is.stringableFunc(pattern) ? matchers.default : is.func(pattern) ? matchers.predicate : matchers.default)(pattern);
}
/**
Used to track a parent task and its forks
In the new fork model, forked tasks are attached by default to their parent
We model this using the concept of Parent task && main Task
main task is the main flow of the current Generator, the parent tasks is the
aggregation of the main tasks + all its forked tasks.
Thus the whole model represents an execution tree with multiple branches (vs the
linear execution tree in sequential (non parallel) programming)
A parent tasks has the following semantics
- It completes if all its forks either complete or all cancelled
- If it's cancelled, all forks are cancelled as well
- It aborts if any uncaught error bubbles up from forks
- If it completes, the return value is the one returned by the main task
**/
function forkQueue(name, mainTask, cb) {
var tasks = [],
result = void 0,
completed = false;
addTask(mainTask);
function abort(err) {
cancelAll();
cb(err, true);
}
function addTask(task) {
tasks.push(task);
task.cont = function (res, isErr) {
if (completed) {
return;
}
remove(tasks, task);
task.cont = utils_noop;
if (isErr) {
abort(res);
} else {
if (task === mainTask) {
result = res;
}
if (!tasks.length) {
completed = true;
cb(result);
}
}
};
// task.cont.cancel = task.cancel
}
function cancelAll() {
if (completed) {
return;
}
completed = true;
tasks.forEach(function (t) {
t.cont = utils_noop;
t.cancel();
});
tasks = [];
}
return {
addTask: addTask,
cancelAll: cancelAll,
abort: abort,
getTasks: function getTasks() {
return tasks;
},
taskNames: function taskNames() {
return tasks.map(function (t) {
return t.name;
});
}
};
}
function createTaskIterator(_ref) {
var context = _ref.context,
fn = _ref.fn,
args = _ref.args;
if (is.iterator(fn)) {
return fn;
}
// catch synchronous failures; see #152 and #441
var result = void 0,
error = void 0;
try {
result = fn.apply(context, args);
} catch (err) {
error = err;
}
// i.e. a generator function returns an iterator
if (is.iterator(result)) {
return result;
}
// do not bubble up synchronous failures for detached forks
// instead create a failed task. See #152 and #441
return error ? makeIterator(function () {
throw error;
}) : makeIterator(function () {
var pc = void 0;
var eff = { done: false, value: result };
var ret = function ret(value) {
return { done: true, value: value };
};
return function (arg) {
if (!pc) {
pc = true;
return eff;
} else {
return ret(arg);
}
};
}());
}
var wrapHelper = function wrapHelper(helper) {
return { fn: helper };
};
function proc(iterator) {
var subscribe = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
return utils_noop;
};
var dispatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : utils_noop;
var getState = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : utils_noop;
var parentContext = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
var parentEffectId = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 0;
var name = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'anonymous';
var cont = arguments[8];
check(iterator, is.iterator, NOT_ITERATOR_ERROR);
var effectsString = '[...effects]';
var runParallelEffect = deprecate(runAllEffect, updateIncentive(effectsString, 'all(' + effectsString + ')'));
var sagaMonitor = options.sagaMonitor,
logger = options.logger,
onError = options.onError;
var log = logger || utils_log;
var logError = function logError(err) {
var message = err.sagaStack;
if (!message && err.stack) {
message = err.stack.split('\n')[0].indexOf(err.message) !== -1 ? err.stack : 'Error: ' + err.message + '\n' + err.stack;
}
log('error', 'uncaught at ' + name, message || err.message || err);
};
var stdChannel = channel_stdChannel(subscribe);
var taskContext = Object.create(parentContext);
/**
Tracks the current effect cancellation
Each time the generator progresses. calling runEffect will set a new value
on it. It allows propagating cancellation to child effects
**/
next.cancel = utils_noop;
/**
Creates a new task descriptor for this generator, We'll also create a main task
to track the main flow (besides other forked tasks)
**/
var task = newTask(parentEffectId, name, iterator, cont);
var mainTask = { name: name, cancel: cancelMain, isRunning: true };
var taskQueue = forkQueue(name, mainTask, end);
/**
cancellation of the main task. We'll simply resume the Generator with a Cancel
**/
function cancelMain() {
if (mainTask.isRunning && !mainTask.isCancelled) {
mainTask.isCancelled = true;
next(TASK_CANCEL);
}
}
/**
This may be called by a parent generator to trigger/propagate cancellation
cancel all pending tasks (including the main task), then end the current task.
Cancellation propagates down to the whole execution tree holded by this Parent task
It's also propagated to all joiners of this task and their execution tree/joiners
Cancellation is noop for terminated/Cancelled tasks tasks
**/
function cancel() {
/**
We need to check both Running and Cancelled status
Tasks can be Cancelled but still Running
**/
if (iterator._isRunning && !iterator._isCancelled) {
iterator._isCancelled = true;
taskQueue.cancelAll();
/**
Ending with a Never result will propagate the Cancellation to all joiners
**/
end(TASK_CANCEL);
}
}
/**
attaches cancellation logic to this task's continuation
this will permit cancellation to propagate down the call chain
**/
cont && (cont.cancel = cancel);
// tracks the running status
iterator._isRunning = true;
// kicks up the generator
next();
// then return the task descriptor to the caller
return task;
/**
This is the generator driver
It's a recursive async/continuation function which calls itself
until the generator terminates or throws
**/
function next(arg, isErr) {
// Preventive measure. If we end up here, then there is really something wrong
if (!mainTask.isRunning) {
throw new Error('Trying to resume an already finished generator');
}
try {
var result = void 0;
if (isErr) {
result = iterator.throw(arg);
} else if (arg === TASK_CANCEL) {
/**
getting TASK_CANCEL automatically cancels the main task
We can get this value here
- By cancelling the parent task manually
- By joining a Cancelled task
**/
mainTask.isCancelled = true;
/**
Cancels the current effect; this will propagate the cancellation down to any called tasks
**/
next.cancel();
/**
If this Generator has a `return` method then invokes it
This will jump to the finally block
**/
result = is.func(iterator.return) ? iterator.return(TASK_CANCEL) : { done: true, value: TASK_CANCEL };
} else if (arg === CHANNEL_END) {
// We get CHANNEL_END by taking from a channel that ended using `take` (and not `takem` used to trap End of channels)
result = is.func(iterator.return) ? iterator.return() : { done: true };
} else {
result = iterator.next(arg);
}
if (!result.done) {
runEffect(result.value, parentEffectId, '', next);
} else {
/**
This Generator has ended, terminate the main task and notify the fork queue
**/
mainTask.isMainRunning = false;
mainTask.cont && mainTask.cont(result.value);
}
} catch (error) {
if (mainTask.isCancelled) {
logError(error);
}
mainTask.isMainRunning = false;
mainTask.cont(error, true);
}
}
function end(result, isErr) {
iterator._isRunning = false;
stdChannel.close();
if (!isErr) {
iterator._result = result;
iterator._deferredEnd && iterator._deferredEnd.resolve(result);
} else {
if (result instanceof Error) {
Object.defineProperty(result, 'sagaStack', {
value: 'at ' + name + ' \n ' + (result.sagaStack || result.stack),
configurable: true
});
}
if (!task.cont) {
if (result instanceof Error && onError) {
onError(result);
} else {
logError(result);
}
}
iterator._error = result;
iterator._isAborted = true;
iterator._deferredEnd && iterator._deferredEnd.reject(result);
}
task.cont && task.cont(result, isErr);
task.joiners.forEach(function (j) {
return j.cb(result, isErr);
});
task.joiners = null;
}
function runEffect(effect, parentEffectId) {
var label = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : '';
var cb = arguments[3];
var effectId = uid();
sagaMonitor && sagaMonitor.effectTriggered({ effectId: effectId, parentEffectId: parentEffectId, label: label, effect: effect });
/**
completion callback and cancel callback are mutually exclusive
We can't cancel an already completed effect
And We can't complete an already cancelled effectId
**/
var effectSettled = void 0;
// Completion callback passed to the appropriate effect runner
function currCb(res, isErr) {
if (effectSettled) {
return;
}
effectSettled = true;
cb.cancel = utils_noop; // defensive measure
if (sagaMonitor) {
isErr ? sagaMonitor.effectRejected(effectId, res) : sagaMonitor.effectResolved(effectId, res);
}
cb(res, isErr);
}
// tracks down the current cancel
currCb.cancel = utils_noop;
// setup cancellation logic on the parent cb
cb.cancel = function () {
// prevents cancelling an already completed effect
if (effectSettled) {
return;
}
effectSettled = true;
/**
propagates cancel downward
catch uncaught cancellations errors; since we can no longer call the completion
callback, log errors raised during cancellations into the console
**/
try {
currCb.cancel();
} catch (err) {
logError(err);
}
currCb.cancel = utils_noop; // defensive measure
sagaMonitor && sagaMonitor.effectCancelled(effectId);
};
/**
each effect runner must attach its own logic of cancellation to the provided callback
it allows this generator to propagate cancellation downward.
ATTENTION! effect runners must setup the cancel logic by setting cb.cancel = [cancelMethod]
And the setup must occur before calling the callback
This is a sort of inversion of control: called async functions are responsible
for completing the flow by calling the provided continuation; while caller functions
are responsible for aborting the current flow by calling the attached cancel function
Library users can attach their own cancellation logic to promises by defining a
promise[CANCEL] method in their returned promises
ATTENTION! calling cancel must have no effect on an already completed or cancelled effect
**/
var data = void 0;
// prettier-ignore
return (
// Non declarative effect
is.promise(effect) ? resolvePromise(effect, currCb) : is.helper(effect) ? runForkEffect(wrapHelper(effect), effectId, currCb) : is.iterator(effect) ? resolveIterator(effect, effectId, name, currCb)
// declarative effects
: is.array(effect) ? runParallelEffect(effect, effectId, currCb) : (data = asEffect.take(effect)) ? runTakeEffect(data, currCb) : (data = asEffect.put(effect)) ? runPutEffect(data, currCb) : (data = asEffect.all(effect)) ? runAllEffect(data, effectId, currCb) : (data = asEffect.race(effect)) ? runRaceEffect(data, effectId, currCb) : (data = asEffect.call(effect)) ? runCallEffect(data, effectId, currCb) : (data = asEffect.cps(effect)) ? runCPSEffect(data, currCb) : (data = asEffect.fork(effect)) ? runForkEffect(data, effectId, currCb) : (data = asEffect.join(effect)) ? runJoinEffect(data, currCb) : (data = asEffect.cancel(effect)) ? runCancelEffect(data, currCb) : (data = asEffect.select(effect)) ? runSelectEffect(data, currCb) : (data = asEffect.actionChannel(effect)) ? runChannelEffect(data, currCb) : (data = asEffect.flush(effect)) ? runFlushEffect(data, currCb) : (data = asEffect.cancelled(effect)) ? runCancelledEffect(data, currCb) : (data = asEffect.getContext(effect)) ? runGetContextEffect(data, currCb) : (data = asEffect.setContext(effect)) ? runSetContextEffect(data, currCb) : /* anything else returned as is */currCb(effect)
);
}
function resolvePromise(promise, cb) {
var cancelPromise = promise[CANCEL];
if (is.func(cancelPromise)) {
cb.cancel = cancelPromise;
} else if (is.func(promise.abort)) {
cb.cancel = function () {
return promise.abort();
};
// TODO: add support for the fetch API, whenever they get around to
// adding cancel support
}
promise.then(cb, function (error) {
return cb(error, true);
});
}
function resolveIterator(iterator, effectId, name, cb) {
proc(iterator, subscribe, dispatch, getState, taskContext, options, effectId, name, cb);
}
function runTakeEffect(_ref2, cb) {
var channel = _ref2.channel,
pattern = _ref2.pattern,
maybe = _ref2.maybe;
channel = channel || stdChannel;
var takeCb = function takeCb(inp) {
return inp instanceof Error ? cb(inp, true) : isEnd(inp) && !maybe ? cb(CHANNEL_END) : cb(inp);
};
try {
channel.take(takeCb, proc_matcher(pattern));
} catch (err) {
return cb(err, true);
}
cb.cancel = takeCb.cancel;
}
function runPutEffect(_ref3, cb) {
var channel = _ref3.channel,
action = _ref3.action,
resolve = _ref3.resolve;
/**
Schedule the put in case another saga is holding a lock.
The put will be executed atomically. ie nested puts will execute after
this put has terminated.
**/
asap(function () {
var result = void 0;
try {
result = (channel ? channel.put : dispatch)(action);
} catch (error) {
// If we have a channel or `put.resolve` was used then bubble up the error.
if (channel || resolve) return cb(error, true);
logError(error);
}
if (resolve && is.promise(result)) {
resolvePromise(result, cb);
} else {
return cb(result);
}
});
// Put effects are non cancellables
}
function runCallEffect(_ref4, effectId, cb) {
var context = _ref4.context,
fn = _ref4.fn,
args = _ref4.args;
var result = void 0;
// catch synchronous failures; see #152
try {
result = fn.apply(context, args);
} catch (error) {
return cb(error, true);
}
return is.promise(result) ? resolvePromise(result, cb) : is.iterator(result) ? resolveIterator(result, effectId, fn.name, cb) : cb(result);
}
function runCPSEffect(_ref5, cb) {
var context = _ref5.context,
fn = _ref5.fn,
args = _ref5.args;
// CPS (ie node style functions) can define their own cancellation logic
// by setting cancel field on the cb
// catch synchronous failures; see #152
try {
var cpsCb = function cpsCb(err, res) {
return is.undef(err) ? cb(res) : cb(err, true);
};
fn.apply(context, args.concat(cpsCb));
if (cpsCb.cancel) {
cb.cancel = function () {
return cpsCb.cancel();
};
}
} catch (error) {
return cb(error, true);
}
}
function runForkEffect(_ref6, effectId, cb) {
var context = _ref6.context,
fn = _ref6.fn,
args = _ref6.args,
detached = _ref6.detached;
var taskIterator = createTaskIterator({ context: context, fn: fn, args: args });
try {
suspend();
var _task = proc(taskIterator, subscribe, dispatch, getState, taskContext, options, effectId, fn.name, detached ? null : utils_noop);
if (detached) {
cb(_task);
} else {
if (taskIterator._isRunning) {
taskQueue.addTask(_task);
cb(_task);
} else if (taskIterator._error) {
taskQueue.abort(taskIterator._error);
} else {
cb(_task);
}
}
} finally {
scheduler_flush();
}
// Fork effects are non cancellables
}
function runJoinEffect(t, cb) {
if (t.isRunning()) {
var joiner = { task: task, cb: cb };
cb.cancel = function () {
return remove(t.joiners, joiner);
};
t.joiners.push(joiner);
} else {
t.isAborted() ? cb(t.error(), true) : cb(t.result());
}
}
function runCancelEffect(taskToCancel, cb) {
if (taskToCancel === SELF_CANCELLATION) {
taskToCancel = task;
}
if (taskToCancel.isRunning()) {
taskToCancel.cancel();
}
cb();
// cancel effects are non cancellables
}
function runAllEffect(effects, effectId, cb) {
var keys = Object.keys(effects);
if (!keys.length) {
return cb(is.array(effects) ? [] : {});
}
var completedCount = 0;
var completed = void 0;
var results = {};
var childCbs = {};
function checkEffectEnd() {
if (completedCount === keys.length) {
completed = true;
cb(is.array(effects) ? array.from(proc_extends({}, results, { length: keys.length })) : results);
}
}
keys.forEach(function (key) {
var chCbAtKey = function chCbAtKey(res, isErr) {
if (completed) {
return;
}
if (isErr || isEnd(res) || res === CHANNEL_END || res === TASK_CANCEL) {
cb.cancel();
cb(res, isErr);
} else {
results[key] = res;
completedCount++;
checkEffectEnd();
}
};
chCbAtKey.cancel = utils_noop;
childCbs[key] = chCbAtKey;
});
cb.cancel = function () {
if (!completed) {
completed = true;
keys.forEach(function (key) {
return childCbs[key].cancel();
});
}
};
keys.forEach(function (key) {
return runEffect(effects[key], effectId, key, childCbs[key]);
});
}
function runRaceEffect(effects, effectId, cb) {
var completed = void 0;
var keys = Object.keys(effects);
var childCbs = {};
keys.forEach(function (key) {
var chCbAtKey = function chCbAtKey(res, isErr) {
if (completed) {
return;
}
if (isErr) {
// Race Auto cancellation
cb.cancel();
cb(res, true);
} else if (!isEnd(res) && res !== CHANNEL_END && res !== TASK_CANCEL) {
var _response;
cb.cancel();
completed = true;
var response = (_response = {}, _response[key] = res, _response);
cb(is.array(effects) ? [].slice.call(proc_extends({}, response, { length: keys.length })) : response);
}
};
chCbAtKey.cancel = utils_noop;
childCbs[key] = chCbAtKey;
});
cb.cancel = function () {
// prevents unnecessary cancellation
if (!completed) {
completed = true;
keys.forEach(function (key) {
return childCbs[key].cancel();
});
}
};
keys.forEach(function (key) {
if (completed) {
return;
}
runEffect(effects[key], effectId, key, childCbs[key]);
});
}
function runSelectEffect(_ref7, cb) {
var selector = _ref7.selector,
args = _ref7.args;
try {
var state = selector.apply(undefined, [getState()].concat(args));
cb(state);
} catch (error) {
cb(error, true);
}
}
function runChannelEffect(_ref8, cb) {
var pattern = _ref8.pattern,
buffer = _ref8.buffer;
var match = proc_matcher(pattern);
match.pattern = pattern;
cb(eventChannel(subscribe, buffer || buffers.fixed(), match));
}
function runCancelledEffect(data, cb) {
cb(!!mainTask.isCancelled);
}
function runFlushEffect(channel, cb) {
channel.flush(cb);
}
function runGetContextEffect(prop, cb) {
cb(taskContext[prop]);
}
function runSetContextEffect(props, cb) {
object.assign(taskContext, props);
cb();
}
function newTask(id, name, iterator, cont) {
var _done, _ref9, _mutatorMap;
iterator._deferredEnd = null;
return _ref9 = {}, _ref9[TASK] = true, _ref9.id = id, _ref9.name = name, _done = 'done', _mutatorMap = {}, _mutatorMap[_done] = _mutatorMap[_done] || {}, _mutatorMap[_done].get = function () {
if (iterator._deferredEnd) {
return iterator._deferredEnd.promise;
} else {
var def = deferred();
iterator._deferredEnd = def;
if (!iterator._isRunning) {
iterator._error ? def.reject(iterator._error) : def.resolve(iterator._result);
}
return def.promise;
}
}, _ref9.cont = cont, _ref9.joiners = [], _ref9.cancel = cancel, _ref9.isRunning = function isRunning() {
return iterator._isRunning;
}, _ref9.isCancelled = function isCancelled() {
return iterator._isCancelled;
}, _ref9.isAborted = function isAborted() {
return iterator._isAborted;
}, _ref9.result = function result() {
return iterator._result;
}, _ref9.error = function error() {
return iterator._error;
}, _ref9.setContext = function setContext(props) {
check(props, is.object, createSetContextWarning('task', props));
object.assign(taskContext, props);
}, _defineEnumerableProperties(_ref9, _mutatorMap), _ref9;
}
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/runSaga.js
var RUN_SAGA_SIGNATURE = 'runSaga(storeInterface, saga, ...args)';
var NON_GENERATOR_ERR = RUN_SAGA_SIGNATURE + ': saga argument must be a Generator function!';
function runSaga(storeInterface, saga) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
var iterator = void 0;
if (is.iterator(storeInterface)) {
if (false) {}
iterator = storeInterface;
storeInterface = saga;
} else {
check(saga, is.func, NON_GENERATOR_ERR);
iterator = saga.apply(undefined, args);
check(iterator, is.iterator, NON_GENERATOR_ERR);
}
var _storeInterface = storeInterface,
subscribe = _storeInterface.subscribe,
dispatch = _storeInterface.dispatch,
getState = _storeInterface.getState,
context = _storeInterface.context,
sagaMonitor = _storeInterface.sagaMonitor,
logger = _storeInterface.logger,
onError = _storeInterface.onError;
var effectId = uid();
if (sagaMonitor) {
// monitors are expected to have a certain interface, let's fill-in any missing ones
sagaMonitor.effectTriggered = sagaMonitor.effectTriggered || utils_noop;
sagaMonitor.effectResolved = sagaMonitor.effectResolved || utils_noop;
sagaMonitor.effectRejected = sagaMonitor.effectRejected || utils_noop;
sagaMonitor.effectCancelled = sagaMonitor.effectCancelled || utils_noop;
sagaMonitor.actionDispatched = sagaMonitor.actionDispatched || utils_noop;
sagaMonitor.effectTriggered({ effectId: effectId, root: true, parentEffectId: 0, effect: { root: true, saga: saga, args: args } });
}
var task = proc(iterator, subscribe, wrapSagaDispatch(dispatch), getState, context, { sagaMonitor: sagaMonitor, logger: logger, onError: onError }, effectId, saga.name);
if (sagaMonitor) {
sagaMonitor.effectResolved(effectId, task);
}
return task;
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/middleware.js
function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
function sagaMiddlewareFactory() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var _ref$context = _ref.context,
context = _ref$context === undefined ? {} : _ref$context,
options = _objectWithoutProperties(_ref, ['context']);
var sagaMonitor = options.sagaMonitor,
logger = options.logger,
onError = options.onError;
if (is.func(options)) {
if (true) {
throw new Error('Saga middleware no longer accept Generator functions. Use sagaMiddleware.run instead');
} else {}
}
if (logger && !is.func(logger)) {
throw new Error('`options.logger` passed to the Saga middleware is not a function!');
}
if (false) {}
if (onError && !is.func(onError)) {
throw new Error('`options.onError` passed to the Saga middleware is not a function!');
}
if (options.emitter && !is.func(options.emitter)) {
throw new Error('`options.emitter` passed to the Saga middleware is not a function!');
}
function sagaMiddleware(_ref2) {
var getState = _ref2.getState,
dispatch = _ref2.dispatch;
var sagaEmitter = emitter();
sagaEmitter.emit = (options.emitter || ident)(sagaEmitter.emit);
sagaMiddleware.run = runSaga.bind(null, {
context: context,
subscribe: sagaEmitter.subscribe,
dispatch: dispatch,
getState: getState,
sagaMonitor: sagaMonitor,
logger: logger,
onError: onError
});
return function (next) {
return function (action) {
if (sagaMonitor && sagaMonitor.actionDispatched) {
sagaMonitor.actionDispatched(action);
}
var result = next(action); // hit reducers
sagaEmitter.emit(action);
return result;
};
};
}
sagaMiddleware.run = function () {
throw new Error('Before running a Saga, you must mount the Saga middleware on the Store using applyMiddleware');
};
sagaMiddleware.setContext = function (props) {
check(props, is.object, createSetContextWarning('sagaMiddleware', props));
object.assign(context, props);
};
return sagaMiddleware;
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/fsmIterator.js
var done = { done: true, value: undefined };
var qEnd = {};
function safeName(patternOrChannel) {
if (is.channel(patternOrChannel)) {
return 'channel';
} else if (Array.isArray(patternOrChannel)) {
return String(patternOrChannel.map(function (entry) {
return String(entry);
}));
} else {
return String(patternOrChannel);
}
}
function fsmIterator(fsm, q0) {
var name = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'iterator';
var updateState = void 0,
qNext = q0;
function next(arg, error) {
if (qNext === qEnd) {
return done;
}
if (error) {
qNext = qEnd;
throw error;
} else {
updateState && updateState(arg);
var _fsm$qNext = fsm[qNext](),
q = _fsm$qNext[0],
output = _fsm$qNext[1],
_updateState = _fsm$qNext[2];
qNext = q;
updateState = _updateState;
return qNext === qEnd ? done : output;
}
}
return makeIterator(next, function (error) {
return next(null, error);
}, name, true);
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/takeEvery.js
function takeEvery(patternOrChannel, worker) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
var yTake = { done: false, value: io_take(patternOrChannel) };
var yFork = function yFork(ac) {
return { done: false, value: fork.apply(undefined, [worker].concat(args, [ac])) };
};
var action = void 0,
setAction = function setAction(ac) {
return action = ac;
};
return fsmIterator({
q1: function q1() {
return ['q2', yTake, setAction];
},
q2: function q2() {
return action === END ? [qEnd] : ['q1', yFork(action)];
}
}, 'q1', 'takeEvery(' + safeName(patternOrChannel) + ', ' + worker.name + ')');
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/takeLatest.js
function takeLatest(patternOrChannel, worker) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
var yTake = { done: false, value: io_take(patternOrChannel) };
var yFork = function yFork(ac) {
return { done: false, value: fork.apply(undefined, [worker].concat(args, [ac])) };
};
var yCancel = function yCancel(task) {
return { done: false, value: io_cancel(task) };
};
var task = void 0,
action = void 0;
var setTask = function setTask(t) {
return task = t;
};
var setAction = function setAction(ac) {
return action = ac;
};
return fsmIterator({
q1: function q1() {
return ['q2', yTake, setAction];
},
q2: function q2() {
return action === END ? [qEnd] : task ? ['q3', yCancel(task)] : ['q1', yFork(action), setTask];
},
q3: function q3() {
return ['q1', yFork(action), setTask];
}
}, 'q1', 'takeLatest(' + safeName(patternOrChannel) + ', ' + worker.name + ')');
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/throttle.js
function throttle(delayLength, pattern, worker) {
for (var _len = arguments.length, args = Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {
args[_key - 3] = arguments[_key];
}
var action = void 0,
channel = void 0;
var yActionChannel = { done: false, value: actionChannel(pattern, buffers.sliding(1)) };
var yTake = function yTake() {
return { done: false, value: io_take(channel) };
};
var yFork = function yFork(ac) {
return { done: false, value: fork.apply(undefined, [worker].concat(args, [ac])) };
};
var yDelay = { done: false, value: io_call(utils_delay, delayLength) };
var setAction = function setAction(ac) {
return action = ac;
};
var setChannel = function setChannel(ch) {
return channel = ch;
};
return fsmIterator({
q1: function q1() {
return ['q2', yActionChannel, setChannel];
},
q2: function q2() {
return ['q3', yTake(), setAction];
},
q3: function q3() {
return action === END ? [qEnd] : ['q4', yFork(action)];
},
q4: function q4() {
return ['q2', yDelay];
}
}, 'q1', 'throttle(' + safeName(pattern) + ', ' + worker.name + ')');
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/sagaHelpers/index.js
var deprecationWarning = function deprecationWarning(helperName) {
return 'import { ' + helperName + ' } from \'redux-saga\' has been deprecated in favor of import { ' + helperName + ' } from \'redux-saga/effects\'.\nThe latter will not work with yield*, as helper effects are wrapped automatically for you in fork effect.\nTherefore yield ' + helperName + ' will return task descriptor to your saga and execute next lines of code.';
};
var sagaHelpers_takeEvery = /*#__PURE__*/deprecate(takeEvery, /*#__PURE__*/deprecationWarning('takeEvery'));
var sagaHelpers_takeLatest = /*#__PURE__*/deprecate(takeLatest, /*#__PURE__*/deprecationWarning('takeLatest'));
var sagaHelpers_throttle = /*#__PURE__*/deprecate(throttle, /*#__PURE__*/deprecationWarning('throttle'));
// CONCATENATED MODULE: ./node_modules/redux-saga/es/internal/io-helpers.js
function io_helpers_takeEvery(patternOrChannel, worker) {
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
args[_key - 2] = arguments[_key];
}
return fork.apply(undefined, [takeEvery, patternOrChannel, worker].concat(args));
}
function io_helpers_takeLatest(patternOrChannel, worker) {
for (var _len2 = arguments.length, args = Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
args[_key2 - 2] = arguments[_key2];
}
return fork.apply(undefined, [takeLatest, patternOrChannel, worker].concat(args));
}
function io_helpers_throttle(ms, pattern, worker) {
for (var _len3 = arguments.length, args = Array(_len3 > 3 ? _len3 - 3 : 0), _key3 = 3; _key3 < _len3; _key3++) {
args[_key3 - 3] = arguments[_key3];
}
return fork.apply(undefined, [throttle, ms, pattern, worker].concat(args));
}
// CONCATENATED MODULE: ./node_modules/redux-saga/es/effects.js
// CONCATENATED MODULE: ./node_modules/redux-saga/es/utils.js
// CONCATENATED MODULE: ./node_modules/redux-saga/es/index.js
/* harmony default export */ var redux_saga_es = (sagaMiddlewareFactory);
// EXTERNAL MODULE: ./node_modules/is-plain-object/index.js
var is_plain_object = __webpack_require__("+0iv");
var is_plain_object_default = /*#__PURE__*/__webpack_require__.n(is_plain_object);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js
var toArray = __webpack_require__("T5bk");
// EXTERNAL MODULE: ./node_modules/dva-core/node_modules/warning/browser.js
var warning_browser = __webpack_require__("myn2");
var warning_browser_default = /*#__PURE__*/__webpack_require__.n(warning_browser);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("1OyB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("vuIU");
// EXTERNAL MODULE: ./node_modules/flatten/index.js
var flatten = __webpack_require__("QTEQ");
var flatten_default = /*#__PURE__*/__webpack_require__.n(flatten);
// EXTERNAL MODULE: ./node_modules/global/window.js
var global_window = __webpack_require__("vgmO");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("ODXe");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
var regenerator = __webpack_require__("o0o1");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
// CONCATENATED MODULE: ./node_modules/dva-core/dist/index.esm.js
var isArray = Array.isArray.bind(Array);
var isFunction = function isFunction(o) {
return typeof o === 'function';
};
var returnSelf = function returnSelf(m) {
return m;
};
var index_esm_noop = function noop() {};
var findIndex = function findIndex(array, predicate) {
for (var i = 0, length = array.length; i < length; i += 1) {
if (predicate(array[i], i)) return i;
}
return -1;
};
var utils = /*#__PURE__*/Object.freeze({
isPlainObject: is_plain_object_default.a,
isArray: isArray,
isFunction: isFunction,
returnSelf: returnSelf,
noop: index_esm_noop,
findIndex: findIndex
});
function checkModel(model, existModels) {
var namespace = model.namespace,
reducers = model.reducers,
effects = model.effects,
subscriptions = model.subscriptions; // namespace 必须被定义
browser_default()(namespace, "[app.model] namespace should be defined"); // 并且是字符串
browser_default()(typeof namespace === 'string', "[app.model] namespace should be string, but got ".concat(Object(esm_typeof["a" /* default */])(namespace))); // 并且唯一
browser_default()(!existModels.some(function (model) {
return model.namespace === namespace;
}), "[app.model] namespace should be unique"); // state 可以为任意值
// reducers 可以为空PlainObject 或者数组
if (reducers) {
browser_default()(is_plain_object_default()(reducers) || isArray(reducers), "[app.model] reducers should be plain object or array, but got ".concat(Object(esm_typeof["a" /* default */])(reducers))); // 数组的 reducers 必须是 [Object, Function] 的格式
browser_default()(!isArray(reducers) || is_plain_object_default()(reducers[0]) && isFunction(reducers[1]), "[app.model] reducers with array should be [Object, Function]");
} // effects 可以为空PlainObject
if (effects) {
browser_default()(is_plain_object_default()(effects), "[app.model] effects should be plain object, but got ".concat(Object(esm_typeof["a" /* default */])(effects)));
}
if (subscriptions) {
// subscriptions 可以为空PlainObject
browser_default()(is_plain_object_default()(subscriptions), "[app.model] subscriptions should be plain object, but got ".concat(Object(esm_typeof["a" /* default */])(subscriptions))); // subscription 必须为函数
browser_default()(isAllFunction(subscriptions), "[app.model] subscription should be function");
}
}
function isAllFunction(obj) {
return Object.keys(obj).every(function (key) {
return isFunction(obj[key]);
});
}
var NAMESPACE_SEP = '/';
function prefix(obj, namespace, type) {
return Object.keys(obj).reduce(function (memo, key) {
warning_browser_default()(key.indexOf("".concat(namespace).concat(NAMESPACE_SEP)) !== 0, "[prefixNamespace]: ".concat(type, " ").concat(key, " should not be prefixed with namespace ").concat(namespace));
var newKey = "".concat(namespace).concat(NAMESPACE_SEP).concat(key);
memo[newKey] = obj[key];
return memo;
}, {});
}
function prefixNamespace(model) {
var namespace = model.namespace,
reducers = model.reducers,
effects = model.effects;
if (reducers) {
if (isArray(reducers)) {
// 需要复制一份,不能直接修改 model.reducers[0], 会导致微前端场景下,重复添加前缀
var _reducers = Object(toArray["a" /* default */])(reducers),
reducer = _reducers[0],
rest = _reducers.slice(1);
model.reducers = [prefix(reducer, namespace, 'reducer')].concat(Object(toConsumableArray["a" /* default */])(rest));
} else {
model.reducers = prefix(reducers, namespace, 'reducer');
}
}
if (effects) {
model.effects = prefix(effects, namespace, 'effect');
}
return model;
}
var index_esm_hooks = ['onError', 'onStateChange', 'onAction', 'onHmr', 'onReducer', 'onEffect', 'extraReducers', 'extraEnhancers', '_handleActions'];
function filterHooks(obj) {
return Object.keys(obj).reduce(function (memo, key) {
if (index_esm_hooks.indexOf(key) > -1) {
memo[key] = obj[key];
}
return memo;
}, {});
}
var index_esm_Plugin =
/*#__PURE__*/
function () {
function Plugin() {
Object(classCallCheck["a" /* default */])(this, Plugin);
this._handleActions = null;
this.hooks = index_esm_hooks.reduce(function (memo, key) {
memo[key] = [];
return memo;
}, {});
}
Object(createClass["a" /* default */])(Plugin, [{
key: "use",
value: function use(plugin) {
browser_default()(is_plain_object_default()(plugin), 'plugin.use: plugin should be plain object');
var hooks = this.hooks;
for (var key in plugin) {
if (Object.prototype.hasOwnProperty.call(plugin, key)) {
browser_default()(hooks[key], "plugin.use: unknown plugin property: ".concat(key));
if (key === '_handleActions') {
this._handleActions = plugin[key];
} else if (key === 'extraEnhancers') {
hooks[key] = plugin[key];
} else {
hooks[key].push(plugin[key]);
}
}
}
}
}, {
key: "apply",
value: function apply(key, defaultHandler) {
var hooks = this.hooks;
var validApplyHooks = ['onError', 'onHmr'];
browser_default()(validApplyHooks.indexOf(key) > -1, "plugin.apply: hook ".concat(key, " cannot be applied"));
var fns = hooks[key];
return function () {
if (fns.length) {
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = fns[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var fn = _step.value;
fn.apply(void 0, arguments);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
} else if (defaultHandler) {
defaultHandler.apply(void 0, arguments);
}
};
}
}, {
key: "get",
value: function get(key) {
var hooks = this.hooks;
browser_default()(key in hooks, "plugin.get: hook ".concat(key, " cannot be got"));
if (key === 'extraReducers') {
return getExtraReducers(hooks[key]);
} else if (key === 'onReducer') {
return getOnReducer(hooks[key]);
} else {
return hooks[key];
}
}
}]);
return Plugin;
}();
function getExtraReducers(hook) {
var ret = {};
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator2 = hook[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var reducerObj = _step2.value;
ret = _objectSpread({}, ret, reducerObj);
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
return ret;
}
function getOnReducer(hook) {
return function (reducer) {
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
try {
for (var _iterator3 = hook[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
var reducerEnhancer = _step3.value;
reducer = reducerEnhancer(reducer);
}
} catch (err) {
_didIteratorError3 = true;
_iteratorError3 = err;
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
_iterator3.return();
}
} finally {
if (_didIteratorError3) {
throw _iteratorError3;
}
}
}
return reducer;
};
}
function index_esm_createStore (_ref) {
var reducers = _ref.reducers,
initialState = _ref.initialState,
plugin = _ref.plugin,
sagaMiddleware = _ref.sagaMiddleware,
promiseMiddleware = _ref.promiseMiddleware,
_ref$createOpts$setup = _ref.createOpts.setupMiddlewares,
setupMiddlewares = _ref$createOpts$setup === void 0 ? returnSelf : _ref$createOpts$setup;
// extra enhancers
var extraEnhancers = plugin.get('extraEnhancers');
browser_default()(isArray(extraEnhancers), "[app.start] extraEnhancers should be array, but got ".concat(Object(esm_typeof["a" /* default */])(extraEnhancers)));
var extraMiddlewares = plugin.get('onAction');
var middlewares = setupMiddlewares([promiseMiddleware, sagaMiddleware].concat(Object(toConsumableArray["a" /* default */])(flatten_default()(extraMiddlewares))));
var composeEnhancers = false ? undefined : compose;
var enhancers = [applyMiddleware.apply(void 0, Object(toConsumableArray["a" /* default */])(middlewares))].concat(Object(toConsumableArray["a" /* default */])(extraEnhancers));
return redux_createStore(reducers, initialState, composeEnhancers.apply(void 0, Object(toConsumableArray["a" /* default */])(enhancers)));
}
function prefixType(type, model) {
var prefixedType = "".concat(model.namespace).concat(NAMESPACE_SEP).concat(type);
var typeWithoutAffix = prefixedType.replace(/\/@@[^/]+?$/, '');
var reducer = Array.isArray(model.reducers) ? model.reducers[0][typeWithoutAffix] : model.reducers && model.reducers[typeWithoutAffix];
if (reducer || model.effects && model.effects[typeWithoutAffix]) {
return prefixedType;
}
return type;
}
function getSaga(effects$1, model, onError, onEffect) {
var opts = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
return (
/*#__PURE__*/
regenerator_default.a.mark(function _callee3() {
var key;
return regenerator_default.a.wrap(function _callee3$(_context3) {
while (1) {
switch (_context3.prev = _context3.next) {
case 0:
_context3.t0 = regenerator_default.a.keys(effects$1);
case 1:
if ((_context3.t1 = _context3.t0()).done) {
_context3.next = 7;
break;
}
key = _context3.t1.value;
if (!Object.prototype.hasOwnProperty.call(effects$1, key)) {
_context3.next = 5;
break;
}
return _context3.delegateYield(
/*#__PURE__*/
regenerator_default.a.mark(function _callee2() {
var watcher, task;
return regenerator_default.a.wrap(function _callee2$(_context2) {
while (1) {
switch (_context2.prev = _context2.next) {
case 0:
watcher = getWatcher(key, effects$1[key], model, onError, onEffect, opts);
_context2.next = 3;
return effects_namespaceObject.fork(watcher);
case 3:
task = _context2.sent;
_context2.next = 6;
return effects_namespaceObject.fork(
/*#__PURE__*/
regenerator_default.a.mark(function _callee() {
return regenerator_default.a.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return effects_namespaceObject.take("".concat(model.namespace, "/@@CANCEL_EFFECTS"));
case 2:
_context.next = 4;
return effects_namespaceObject.cancel(task);
case 4:
case "end":
return _context.stop();
}
}
}, _callee);
}));
case 6:
case "end":
return _context2.stop();
}
}
}, _callee2);
})(), "t2", 5);
case 5:
_context3.next = 1;
break;
case 7:
case "end":
return _context3.stop();
}
}
}, _callee3);
})
);
}
function getWatcher(key, _effect, model, onError, onEffect, opts) {
var _marked =
/*#__PURE__*/
regenerator_default.a.mark(sagaWithCatch);
var effect = _effect;
var type = 'takeEvery';
var ms;
var delayMs;
if (Array.isArray(_effect)) {
var _effect2 = Object(slicedToArray["a" /* default */])(_effect, 1);
effect = _effect2[0];
var _opts = _effect[1];
if (_opts && _opts.type) {
type = _opts.type;
if (type === 'throttle') {
browser_default()(_opts.ms, 'app.start: opts.ms should be defined if type is throttle');
ms = _opts.ms;
}
if (type === 'poll') {
browser_default()(_opts.delay, 'app.start: opts.delay should be defined if type is poll');
delayMs = _opts.delay;
}
}
browser_default()(['watcher', 'takeEvery', 'takeLatest', 'throttle', 'poll'].indexOf(type) > -1, 'app.start: effect type should be takeEvery, takeLatest, throttle, poll or watcher');
}
function noop() {}
function sagaWithCatch() {
var _len,
args,
_key,
_ref,
_ref$__dva_resolve,
resolve,
_ref$__dva_reject,
reject,
ret,
_args4 = arguments;
return regenerator_default.a.wrap(function sagaWithCatch$(_context4) {
while (1) {
switch (_context4.prev = _context4.next) {
case 0:
for (_len = _args4.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = _args4[_key];
}
_ref = args.length > 0 ? args[0] : {}, _ref$__dva_resolve = _ref.__dva_resolve, resolve = _ref$__dva_resolve === void 0 ? noop : _ref$__dva_resolve, _ref$__dva_reject = _ref.__dva_reject, reject = _ref$__dva_reject === void 0 ? noop : _ref$__dva_reject;
_context4.prev = 2;
_context4.next = 5;
return effects_namespaceObject.put({
type: "".concat(key).concat(NAMESPACE_SEP, "@@start")
});
case 5:
_context4.next = 7;
return effect.apply(void 0, Object(toConsumableArray["a" /* default */])(args.concat(createEffects(model, opts))));
case 7:
ret = _context4.sent;
_context4.next = 10;
return effects_namespaceObject.put({
type: "".concat(key).concat(NAMESPACE_SEP, "@@end")
});
case 10:
resolve(ret);
_context4.next = 17;
break;
case 13:
_context4.prev = 13;
_context4.t0 = _context4["catch"](2);
onError(_context4.t0, {
key: key,
effectArgs: args
});
if (!_context4.t0._dontReject) {
reject(_context4.t0);
}
case 17:
case "end":
return _context4.stop();
}
}
}, _marked, null, [[2, 13]]);
}
var sagaWithOnEffect = applyOnEffect(onEffect, sagaWithCatch, model, key);
switch (type) {
case 'watcher':
return sagaWithCatch;
case 'takeLatest':
return (
/*#__PURE__*/
regenerator_default.a.mark(function _callee4() {
return regenerator_default.a.wrap(function _callee4$(_context5) {
while (1) {
switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return effects_namespaceObject.takeLatest(key, sagaWithOnEffect);
case 2:
case "end":
return _context5.stop();
}
}
}, _callee4);
})
);
case 'throttle':
return (
/*#__PURE__*/
regenerator_default.a.mark(function _callee5() {
return regenerator_default.a.wrap(function _callee5$(_context6) {
while (1) {
switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return effects_namespaceObject.throttle(ms, key, sagaWithOnEffect);
case 2:
case "end":
return _context6.stop();
}
}
}, _callee5);
})
);
case 'poll':
return (
/*#__PURE__*/
regenerator_default.a.mark(function _callee6() {
var _marked2, delay, pollSagaWorker, call, take, race, action;
return regenerator_default.a.wrap(function _callee6$(_context8) {
while (1) {
switch (_context8.prev = _context8.next) {
case 0:
pollSagaWorker = function _ref3(sagaEffects, action) {
var call;
return regenerator_default.a.wrap(function pollSagaWorker$(_context7) {
while (1) {
switch (_context7.prev = _context7.next) {
case 0:
call = sagaEffects.call;
case 1:
_context7.next = 4;
return call(sagaWithOnEffect, action);
case 4:
_context7.next = 6;
return call(delay, delayMs);
case 6:
_context7.next = 1;
break;
case 8:
case "end":
return _context7.stop();
}
}
}, _marked2);
};
delay = function _ref2(timeout) {
return new Promise(function (resolve) {
return setTimeout(resolve, timeout);
});
};
_marked2 =
/*#__PURE__*/
regenerator_default.a.mark(pollSagaWorker);
call = effects_namespaceObject.call, take = effects_namespaceObject.take, race = effects_namespaceObject.race;
case 4:
_context8.next = 7;
return take("".concat(key, "-start"));
case 7:
action = _context8.sent;
_context8.next = 10;
return race([call(pollSagaWorker, effects_namespaceObject, action), take("".concat(key, "-stop"))]);
case 10:
_context8.next = 4;
break;
case 12:
case "end":
return _context8.stop();
}
}
}, _callee6);
})
);
default:
return (
/*#__PURE__*/
regenerator_default.a.mark(function _callee7() {
return regenerator_default.a.wrap(function _callee7$(_context9) {
while (1) {
switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return effects_namespaceObject.takeEvery(key, sagaWithOnEffect);
case 2:
case "end":
return _context9.stop();
}
}
}, _callee7);
})
);
}
}
function createEffects(model, opts) {
function assertAction(type, name) {
browser_default()(type, 'dispatch: action should be a plain Object with type');
var _opts$namespacePrefix = opts.namespacePrefixWarning,
namespacePrefixWarning = _opts$namespacePrefix === void 0 ? true : _opts$namespacePrefix;
if (namespacePrefixWarning) {
warning_browser_default()(type.indexOf("".concat(model.namespace).concat(NAMESPACE_SEP)) !== 0, "[".concat(name, "] ").concat(type, " should not be prefixed with namespace ").concat(model.namespace));
}
}
function put(action) {
var type = action.type;
assertAction(type, 'sagaEffects.put');
return effects_namespaceObject.put(_objectSpread({}, action, {
type: prefixType(type, model)
}));
} // The operator `put` doesn't block waiting the returned promise to resolve.
// Using `put.resolve` will wait until the promsie resolve/reject before resuming.
// It will be helpful to organize multi-effects in order,
// and increase the reusability by seperate the effect in stand-alone pieces.
// https://github.com/redux-saga/redux-saga/issues/336
function putResolve(action) {
var type = action.type;
assertAction(type, 'sagaEffects.put.resolve');
return effects_namespaceObject.put.resolve(_objectSpread({}, action, {
type: prefixType(type, model)
}));
}
put.resolve = putResolve;
function take(type) {
if (typeof type === 'string') {
assertAction(type, 'sagaEffects.take');
return effects_namespaceObject.take(prefixType(type, model));
} else if (Array.isArray(type)) {
return effects_namespaceObject.take(type.map(function (t) {
if (typeof t === 'string') {
assertAction(t, 'sagaEffects.take');
return prefixType(t, model);
}
return t;
}));
} else {
return effects_namespaceObject.take(type);
}
}
return _objectSpread({}, effects_namespaceObject, {
put: put,
take: take
});
}
function applyOnEffect(fns, effect, model, key) {
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = fns[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var fn = _step.value;
effect = fn(effect, effects_namespaceObject, model, key);
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
return effect;
}
function identify(value) {
return value;
}
function handleAction(actionType) {
var reducer = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : identify;
return function (state, action) {
var type = action.type;
browser_default()(type, 'dispatch: action should be a plain Object with type');
if (actionType === type) {
return reducer(state, action);
}
return state;
};
}
function reduceReducers() {
for (var _len = arguments.length, reducers = new Array(_len), _key = 0; _key < _len; _key++) {
reducers[_key] = arguments[_key];
}
return function (previous, current) {
return reducers.reduce(function (p, r) {
return r(p, current);
}, previous);
};
}
function handleActions(handlers, defaultState) {
var reducers = Object.keys(handlers).map(function (type) {
return handleAction(type, handlers[type]);
});
var reducer = reduceReducers.apply(void 0, Object(toConsumableArray["a" /* default */])(reducers));
return function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
var action = arguments.length > 1 ? arguments[1] : undefined;
return reducer(state, action);
};
}
function getReducer(reducers, state, handleActions$1) {
// Support reducer enhancer
// e.g. reducers: [realReducers, enhancer]
if (Array.isArray(reducers)) {
return reducers[1]((handleActions$1 || handleActions)(reducers[0], state));
} else {
return (handleActions$1 || handleActions)(reducers || {}, state);
}
}
function createPromiseMiddleware(app) {
return function () {
return function (next) {
return function (action) {
var type = action.type;
if (isEffect(type)) {
return new Promise(function (resolve, reject) {
next(_objectSpread({
__dva_resolve: resolve,
__dva_reject: reject
}, action));
});
} else {
return next(action);
}
};
};
};
function isEffect(type) {
if (!type || typeof type !== 'string') return false;
var _type$split = type.split(NAMESPACE_SEP),
_type$split2 = Object(slicedToArray["a" /* default */])(_type$split, 1),
namespace = _type$split2[0];
var model = app._models.filter(function (m) {
return m.namespace === namespace;
})[0];
if (model) {
if (model.effects && model.effects[type]) {
return true;
}
}
return false;
}
}
function prefixedDispatch(dispatch, model) {
return function (action) {
var type = action.type;
browser_default()(type, 'dispatch: action should be a plain Object with type');
warning_browser_default()(type.indexOf("".concat(model.namespace).concat(NAMESPACE_SEP)) !== 0, "dispatch: ".concat(type, " should not be prefixed with namespace ").concat(model.namespace));
return dispatch(_objectSpread({}, action, {
type: prefixType(type, model)
}));
};
}
function run(subs, model, app, onError) {
var funcs = [];
var nonFuncs = [];
for (var key in subs) {
if (Object.prototype.hasOwnProperty.call(subs, key)) {
var sub = subs[key];
var unlistener = sub({
dispatch: prefixedDispatch(app._store.dispatch, model),
history: app._history
}, onError);
if (isFunction(unlistener)) {
funcs.push(unlistener);
} else {
nonFuncs.push(key);
}
}
}
return {
funcs: funcs,
nonFuncs: nonFuncs
};
}
function unlisten(unlisteners, namespace) {
if (!unlisteners[namespace]) return;
var _unlisteners$namespac = unlisteners[namespace],
funcs = _unlisteners$namespac.funcs,
nonFuncs = _unlisteners$namespac.nonFuncs;
warning_browser_default()(nonFuncs.length === 0, "[app.unmodel] subscription should return unlistener function, check these subscriptions ".concat(nonFuncs.join(', ')));
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = funcs[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var unlistener = _step.value;
unlistener();
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
delete unlisteners[namespace];
}
var noop$1 = index_esm_noop,
findIndex$1 = findIndex; // Internal model to update global state when do unmodel
var dvaModel = {
namespace: '@@dva',
state: 0,
reducers: {
UPDATE: function UPDATE(state) {
return state + 1;
}
}
};
/**
* Create dva-core instance.
*
* @param hooksAndOpts
* @param createOpts
*/
function create() {
var hooksAndOpts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var createOpts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var initialReducer = createOpts.initialReducer,
_createOpts$setupApp = createOpts.setupApp,
setupApp = _createOpts$setupApp === void 0 ? noop$1 : _createOpts$setupApp;
var plugin = new index_esm_Plugin();
plugin.use(filterHooks(hooksAndOpts));
var app = {
_models: [prefixNamespace(_objectSpread({}, dvaModel))],
_store: null,
_plugin: plugin,
use: plugin.use.bind(plugin),
model: model,
start: start
};
return app;
/**
* Register model before app is started.
*
* @param m {Object} model to register
*/
function model(m) {
if (false) {}
var prefixedModel = prefixNamespace(_objectSpread({}, m));
app._models.push(prefixedModel);
return prefixedModel;
}
/**
* Inject model after app is started.
*
* @param createReducer
* @param onError
* @param unlisteners
* @param m
*/
function injectModel(createReducer, onError, unlisteners, m) {
m = model(m);
var store = app._store;
store.asyncReducers[m.namespace] = getReducer(m.reducers, m.state, plugin._handleActions);
store.replaceReducer(createReducer());
if (m.effects) {
store.runSaga(app._getSaga(m.effects, m, onError, plugin.get('onEffect'), hooksAndOpts));
}
if (m.subscriptions) {
unlisteners[m.namespace] = run(m.subscriptions, m, app, onError);
}
}
/**
* Unregister model.
*
* @param createReducer
* @param reducers
* @param unlisteners
* @param namespace
*
* Unexpected key warn problem:
* https://github.com/reactjs/redux/issues/1636
*/
function unmodel(createReducer, reducers, unlisteners, namespace) {
var store = app._store; // Delete reducers
delete store.asyncReducers[namespace];
delete reducers[namespace];
store.replaceReducer(createReducer());
store.dispatch({
type: '@@dva/UPDATE'
}); // Cancel effects
store.dispatch({
type: "".concat(namespace, "/@@CANCEL_EFFECTS")
}); // Unlisten subscrioptions
unlisten(unlisteners, namespace); // Delete model from app._models
app._models = app._models.filter(function (model) {
return model.namespace !== namespace;
});
}
/**
* Replace a model if it exsits, if not, add it to app
* Attention:
* - Only available after dva.start gets called
* - Will not check origin m is strict equal to the new one
* Useful for HMR
* @param createReducer
* @param reducers
* @param unlisteners
* @param onError
* @param m
*/
function replaceModel(createReducer, reducers, unlisteners, onError, m) {
var store = app._store;
var namespace = m.namespace;
var oldModelIdx = findIndex$1(app._models, function (model) {
return model.namespace === namespace;
});
if (~oldModelIdx) {
// Cancel effects
store.dispatch({
type: "".concat(namespace, "/@@CANCEL_EFFECTS")
}); // Delete reducers
delete store.asyncReducers[namespace];
delete reducers[namespace]; // Unlisten subscrioptions
unlisten(unlisteners, namespace); // Delete model from app._models
app._models.splice(oldModelIdx, 1);
} // add new version model to store
app.model(m);
store.dispatch({
type: '@@dva/UPDATE'
});
}
/**
* Start the app.
*
* @returns void
*/
function start() {
// Global error handler
var onError = function onError(err, extension) {
if (err) {
if (typeof err === 'string') err = new Error(err);
err.preventDefault = function () {
err._dontReject = true;
};
plugin.apply('onError', function (err) {
throw new Error(err.stack || err);
})(err, app._store.dispatch, extension);
}
};
var sagaMiddleware = redux_saga_es();
var promiseMiddleware = createPromiseMiddleware(app);
app._getSaga = getSaga.bind(null);
var sagas = [];
var reducers = _objectSpread({}, initialReducer);
var _iteratorNormalCompletion = true;
var _didIteratorError = false;
var _iteratorError = undefined;
try {
for (var _iterator = app._models[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var m = _step.value;
reducers[m.namespace] = getReducer(m.reducers, m.state, plugin._handleActions);
if (m.effects) {
sagas.push(app._getSaga(m.effects, m, onError, plugin.get('onEffect'), hooksAndOpts));
}
}
} catch (err) {
_didIteratorError = true;
_iteratorError = err;
} finally {
try {
if (!_iteratorNormalCompletion && _iterator.return != null) {
_iterator.return();
}
} finally {
if (_didIteratorError) {
throw _iteratorError;
}
}
}
var reducerEnhancer = plugin.get('onReducer');
var extraReducers = plugin.get('extraReducers');
browser_default()(Object.keys(extraReducers).every(function (key) {
return !(key in reducers);
}), "[app.start] extraReducers is conflict with other reducers, reducers list: ".concat(Object.keys(reducers).join(', '))); // Create store
app._store = index_esm_createStore({
reducers: createReducer(),
initialState: hooksAndOpts.initialState || {},
plugin: plugin,
createOpts: createOpts,
sagaMiddleware: sagaMiddleware,
promiseMiddleware: promiseMiddleware
});
var store = app._store; // Extend store
store.runSaga = sagaMiddleware.run;
store.asyncReducers = {}; // Execute listeners when state is changed
var listeners = plugin.get('onStateChange');
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
var _loop = function _loop() {
var listener = _step2.value;
store.subscribe(function () {
listener(store.getState());
});
};
for (var _iterator2 = listeners[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
_loop();
} // Run sagas
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return != null) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
sagas.forEach(sagaMiddleware.run); // Setup app
setupApp(app); // Run subscriptions
var unlisteners = {};
var _iteratorNormalCompletion3 = true;
var _didIteratorError3 = false;
var _iteratorError3 = undefined;
try {
for (var _iterator3 = this._models[Symbol.iterator](), _step3; !(_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done); _iteratorNormalCompletion3 = true) {
var _model = _step3.value;
if (_model.subscriptions) {
unlisteners[_model.namespace] = run(_model.subscriptions, _model, app, onError);
}
} // Setup app.model and app.unmodel
} catch (err) {
_didIteratorError3 = true;
_iteratorError3 = err;
} finally {
try {
if (!_iteratorNormalCompletion3 && _iterator3.return != null) {
_iterator3.return();
}
} finally {
if (_didIteratorError3) {
throw _iteratorError3;
}
}
}
app.model = injectModel.bind(app, createReducer, onError, unlisteners);
app.unmodel = unmodel.bind(app, createReducer, reducers, unlisteners);
app.replaceModel = replaceModel.bind(app, createReducer, reducers, unlisteners, onError);
/**
* Create global reducer for redux.
*
* @returns {Object}
*/
function createReducer() {
return reducerEnhancer(combineReducers(_objectSpread({}, reducers, extraReducers, app._store ? app._store.asyncReducers : {})));
}
}
}
// EXTERNAL MODULE: ./node_modules/react-router/esm/react-router.js
var react_router = __webpack_require__("Ty5D");
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
var prop_types = __webpack_require__("17x9");
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/actions.js
/**
* This action type will be dispatched when your history
* receives a location change.
*/
var LOCATION_CHANGE = '@@router/LOCATION_CHANGE';
var actions_onLocationChanged = function onLocationChanged(location, action) {
var isFirstRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
return {
type: LOCATION_CHANGE,
payload: {
location: location,
action: action,
isFirstRendering: isFirstRendering
}
};
};
/**
* This action type will be dispatched by the history actions below.
* If you're writing a middleware to watch for navigation events, be sure to
* look for actions of this type.
*/
var CALL_HISTORY_METHOD = '@@router/CALL_HISTORY_METHOD';
var updateLocation = function updateLocation(method) {
return function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return {
type: CALL_HISTORY_METHOD,
payload: {
method: method,
args: args
}
};
};
};
/**
* These actions correspond to the history API.
* The associated routerMiddleware will capture these events before they get to
* your reducer and reissue them as the matching function on your history.
*/
var push = updateLocation('push');
var replace = updateLocation('replace');
var go = updateLocation('go');
var goBack = updateLocation('goBack');
var goForward = updateLocation('goForward');
var routerActions = {
push: push,
replace: replace,
go: go,
goBack: goBack,
goForward: goForward
};
// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/selectors.js
function selectors_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { selectors_typeof = function _typeof(obj) { return typeof obj; }; } else { selectors_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return selectors_typeof(obj); }
var selectors_createSelectors = function createSelectors(structure) {
var getIn = structure.getIn,
toJS = structure.toJS;
var isRouter = function isRouter(value) {
return value != null && selectors_typeof(value) === 'object' && getIn(value, ['location']) && getIn(value, ['action']);
};
var getRouter = function getRouter(state) {
var router = toJS(getIn(state, ['router']));
if (!isRouter(router)) {
throw 'Could not find router reducer in state tree, it must be mounted under "router"';
}
return router;
};
var getLocation = function getLocation(state) {
return toJS(getIn(getRouter(state), ['location']));
};
var getAction = function getAction(state) {
return toJS(getIn(getRouter(state), ['action']));
};
var getSearch = function getSearch(state) {
return toJS(getIn(getRouter(state), ['location', 'search']));
};
var getHash = function getHash(state) {
return toJS(getIn(getRouter(state), ['location', 'hash']));
}; // It only makes sense to recalculate the `matchPath` whenever the pathname
// of the location changes. That's why `createMatchSelector` memoizes
// the latest result based on the location's pathname.
var createMatchSelector = function createMatchSelector(path) {
var lastPathname = null;
var lastMatch = null;
return function (state) {
var _ref = getLocation(state) || {},
pathname = _ref.pathname;
if (pathname === lastPathname) {
return lastMatch;
}
lastPathname = pathname;
var match = Object(react_router["i" /* matchPath */])(pathname, path);
if (!match || !lastMatch || match.url !== lastMatch.url) {
lastMatch = match;
}
return lastMatch;
};
};
return {
getLocation: getLocation,
getAction: getAction,
getRouter: getRouter,
getSearch: getSearch,
getHash: getHash,
createMatchSelector: createMatchSelector
};
};
/* harmony default export */ var selectors = (selectors_createSelectors);
// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/ConnectedRouter.js
function ConnectedRouter_typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ConnectedRouter_typeof = function _typeof(obj) { return typeof obj; }; } else { ConnectedRouter_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ConnectedRouter_typeof(obj); }
function ConnectedRouter_extends() { ConnectedRouter_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return ConnectedRouter_extends.apply(this, arguments); }
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
function _possibleConstructorReturn(self, call) { if (call && (ConnectedRouter_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
var ConnectedRouter_createConnectedRouter = function createConnectedRouter(structure) {
var _createSelectors = selectors(structure),
getLocation = _createSelectors.getLocation;
/*
* ConnectedRouter listens to a history object passed from props.
* When history is changed, it dispatches action to redux store.
* Then, store will pass props to component to render.
* This creates uni-directional flow from history->store->router->components.
*/
var ConnectedRouter =
/*#__PURE__*/
function (_PureComponent) {
_inherits(ConnectedRouter, _PureComponent);
function ConnectedRouter(props) {
var _this;
_classCallCheck(this, ConnectedRouter);
_this = _possibleConstructorReturn(this, _getPrototypeOf(ConnectedRouter).call(this, props));
var store = props.store,
history = props.history,
onLocationChanged = props.onLocationChanged;
_this.inTimeTravelling = false; // Subscribe to store changes to check if we are in time travelling
_this.unsubscribe = store.subscribe(function () {
// Extract store's location
var _getLocation = getLocation(store.getState()),
pathnameInStore = _getLocation.pathname,
searchInStore = _getLocation.search,
hashInStore = _getLocation.hash; // Extract history's location
var _history$location = history.location,
pathnameInHistory = _history$location.pathname,
searchInHistory = _history$location.search,
hashInHistory = _history$location.hash; // If we do time travelling, the location in store is changed but location in history is not changed
if (pathnameInHistory !== pathnameInStore || searchInHistory !== searchInStore || hashInHistory !== hashInStore) {
_this.inTimeTravelling = true; // Update history's location to match store's location
history.push({
pathname: pathnameInStore,
search: searchInStore,
hash: hashInStore
});
}
});
var handleLocationChange = function handleLocationChange(location, action) {
var isFirstRendering = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
// Dispatch onLocationChanged except when we're in time travelling
if (!_this.inTimeTravelling) {
onLocationChanged(location, action, isFirstRendering);
} else {
_this.inTimeTravelling = false;
}
}; // Listen to history changes
_this.unlisten = history.listen(handleLocationChange); // Dispatch a location change action for the initial location.
// This makes it backward-compatible with react-router-redux.
// But, we add `isFirstRendering` to `true` to prevent double-rendering.
handleLocationChange(history.location, history.action, true);
return _this;
}
_createClass(ConnectedRouter, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.unlisten();
this.unsubscribe();
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
history = _this$props.history,
children = _this$props.children;
return react_default.a.createElement(react_router["e" /* Router */], {
history: history
}, children);
}
}]);
return ConnectedRouter;
}(react["PureComponent"]);
ConnectedRouter.propTypes = {
store: prop_types_default.a.shape({
getState: prop_types_default.a.func.isRequired,
subscribe: prop_types_default.a.func.isRequired
}).isRequired,
history: prop_types_default.a.shape({
action: prop_types_default.a.string.isRequired,
listen: prop_types_default.a.func.isRequired,
location: prop_types_default.a.object.isRequired,
push: prop_types_default.a.func.isRequired
}).isRequired,
basename: prop_types_default.a.string,
children: prop_types_default.a.oneOfType([prop_types_default.a.func, prop_types_default.a.node]),
onLocationChanged: prop_types_default.a.func.isRequired
};
var mapDispatchToProps = function mapDispatchToProps(dispatch) {
return {
onLocationChanged: function onLocationChanged(location, action, isFirstRendering) {
return dispatch(actions_onLocationChanged(location, action, isFirstRendering));
}
};
};
var ConnectedRouterWithContext = function ConnectedRouterWithContext(props) {
var Context = props.context || es["b" /* ReactReduxContext */];
if (Context == null) {
throw 'Please upgrade to react-redux v6';
}
return react_default.a.createElement(Context.Consumer, null, function (_ref) {
var store = _ref.store;
return react_default.a.createElement(ConnectedRouter, ConnectedRouter_extends({
store: store
}, props));
});
};
ConnectedRouterWithContext.propTypes = {
context: prop_types_default.a.object
};
return Object(es["c" /* connect */])(null, mapDispatchToProps)(ConnectedRouterWithContext);
};
/* harmony default export */ var esm_ConnectedRouter = (ConnectedRouter_createConnectedRouter);
// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/reducer.js
var reducer_createConnectRouter = function createConnectRouter(structure) {
var fromJS = structure.fromJS,
merge = structure.merge;
var createRouterReducer = function createRouterReducer(history) {
var initialRouterState = fromJS({
location: history.location,
action: history.action
});
/*
* This reducer will update the state with the most recent location history
* has transitioned to.
*/
return function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialRouterState;
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
type = _ref.type,
payload = _ref.payload;
if (type === LOCATION_CHANGE) {
var location = payload.location,
action = payload.action,
isFirstRendering = payload.isFirstRendering; // Don't update the state ref for the first rendering
// to prevent the double-rendering issue on initilization
return isFirstRendering ? state : merge(state, {
location: fromJS(location),
action: action
});
}
return state;
};
};
return createRouterReducer;
};
/* harmony default export */ var esm_reducer = (reducer_createConnectRouter);
// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/structure/plain/getIn.js
/* Code from github.com/erikras/redux-form by Erik Rasmussen */
var getIn_getIn = function getIn(state, path) {
if (!state) {
return state;
}
var length = path.length;
if (!length) {
return undefined;
}
var result = state;
for (var i = 0; i < length && !!result; ++i) {
result = result[path[i]];
}
return result;
};
/* harmony default export */ var plain_getIn = (getIn_getIn);
// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/structure/plain/index.js
function plain_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var plain_structure = {
fromJS: function fromJS(value) {
return value;
},
getIn: plain_getIn,
merge: function merge(state, payload) {
return plain_objectSpread({}, state, payload);
},
toJS: function toJS(value) {
return value;
}
};
/* harmony default export */ var plain = (plain_structure);
// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/index.js
var connected_react_router_esm_ConnectedRouter =
/*#__PURE__*/
esm_ConnectedRouter(plain);
var connectRouter =
/*#__PURE__*/
esm_reducer(plain);
var esm_createSelectors =
/*#__PURE__*/
selectors(plain),
esm_getLocation = esm_createSelectors.getLocation,
esm_getAction = esm_createSelectors.getAction,
esm_getHash = esm_createSelectors.getHash,
esm_getSearch = esm_createSelectors.getSearch,
esm_createMatchSelector = esm_createSelectors.createMatchSelector;
// CONCATENATED MODULE: ./node_modules/connected-react-router/esm/middleware.js
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); }
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }
/**
* This middleware captures CALL_HISTORY_METHOD actions to redirect to the
* provided history object. This will prevent these actions from reaching your
* reducer or any middleware that comes after this one.
*/
var middleware_routerMiddleware = function routerMiddleware(history) {
return function (store) {
return function (next) {
return function (action) {
// eslint-disable-line no-unused-vars
if (action.type !== CALL_HISTORY_METHOD) {
return next(action);
}
var _action$payload = action.payload,
method = _action$payload.method,
args = _action$payload.args;
history[method].apply(history, _toConsumableArray(args));
};
};
};
};
/* harmony default export */ var middleware = (middleware_routerMiddleware);
// EXTERNAL MODULE: ./node_modules/isomorphic-fetch/fetch-npm-browserify.js
var fetch_npm_browserify = __webpack_require__("LpSC");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("Ji7U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
var createSuper = __webpack_require__("LK+K");
// CONCATENATED MODULE: ./node_modules/dva/dist/index.esm.js
var cached = {};
function registerModel(app, model) {
model = model.default || model;
if (!cached[model.namespace]) {
app.model(model);
cached[model.namespace] = 1;
}
}
var defaultLoadingComponent = function defaultLoadingComponent() {
return null;
};
function asyncComponent(config) {
var resolve = config.resolve;
return /*#__PURE__*/function (_Component) {
Object(inherits["a" /* default */])(DynamicComponent, _Component);
var _super = Object(createSuper["a" /* default */])(DynamicComponent);
function DynamicComponent() {
var _this;
Object(classCallCheck["a" /* default */])(this, DynamicComponent);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _super.call.apply(_super, [this].concat(args));
_this.LoadingComponent = config.LoadingComponent || defaultLoadingComponent;
_this.state = {
AsyncComponent: null
};
_this.load();
return _this;
}
Object(createClass["a" /* default */])(DynamicComponent, [{
key: "componentDidMount",
value: function componentDidMount() {
this.mounted = true;
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.mounted = false;
}
}, {
key: "load",
value: function load() {
var _this2 = this;
resolve().then(function (m) {
var AsyncComponent = m.default || m;
if (_this2.mounted) {
_this2.setState({
AsyncComponent: AsyncComponent
});
} else {
_this2.state.AsyncComponent = AsyncComponent; // eslint-disable-line
}
});
}
}, {
key: "render",
value: function render() {
var AsyncComponent = this.state.AsyncComponent;
var LoadingComponent = this.LoadingComponent;
if (AsyncComponent) return /*#__PURE__*/react_default.a.createElement(AsyncComponent, this.props);
return /*#__PURE__*/react_default.a.createElement(LoadingComponent, this.props);
}
}]);
return DynamicComponent;
}(react["Component"]);
}
function dynamic(config) {
var app = config.app,
resolveModels = config.models,
resolveComponent = config.component;
return asyncComponent(Object(objectSpread2["a" /* default */])({
resolve: config.resolve || function () {
var models = typeof resolveModels === 'function' ? resolveModels() : [];
var component = resolveComponent();
return new Promise(function (resolve) {
Promise.all([].concat(Object(toConsumableArray["a" /* default */])(models), [component])).then(function (ret) {
if (!models || !models.length) {
return resolve(ret[0]);
} else {
var len = models.length;
ret.slice(0, len).forEach(function (m) {
m = m.default || m;
if (!Array.isArray(m)) {
m = [m];
}
m.map(function (_) {
return registerModel(app, _);
});
});
resolve(ret[len]);
}
});
});
}
}, config));
}
dynamic.setDefaultLoadingComponent = function (LoadingComponent) {
defaultLoadingComponent = LoadingComponent;
};
var index_esm_connectRouter = connectRouter,
index_esm_routerMiddleware = middleware;
var index_esm_isFunction = utils.isFunction;
var useHistory = react_router["j" /* useHistory */],
useLocation = react_router["k" /* useLocation */],
useParams = react_router["l" /* useParams */],
useRouteMatch = react_router["m" /* useRouteMatch */];
function index () {
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var history = opts.history || Object(esm_history["b" /* createHashHistory */])();
var createOpts = {
initialReducer: {
router: index_esm_connectRouter(history)
},
setupMiddlewares: function setupMiddlewares(middlewares) {
return [index_esm_routerMiddleware(history)].concat(Object(toConsumableArray["a" /* default */])(middlewares));
},
setupApp: function setupApp(app) {
app._history = patchHistory(history);
}
};
var app = create(opts, createOpts);
var oldAppStart = app.start;
app.router = router;
app.start = start;
return app;
function router(router) {
browser_default()(index_esm_isFunction(router), "[app.router] router should be function, but got ".concat(Object(esm_typeof["a" /* default */])(router)));
app._router = router;
}
function start(container) {
// 允许 container 是字符串,然后用 querySelector 找元素
if (isString(container)) {
container = document_default.a.querySelector(container);
browser_default()(container, "[app.start] container ".concat(container, " not found"));
} // 并且是 HTMLElement
browser_default()(!container || isHTMLElement(container), "[app.start] container should be HTMLElement"); // 路由必须提前注册
browser_default()(app._router, "[app.start] router must be registered before app.start()");
if (!app._store) {
oldAppStart.call(app);
}
var store = app._store; // export _getProvider for HMR
// ref: https://github.com/dvajs/dva/issues/469
app._getProvider = getProvider.bind(null, store, app); // If has container, render; else, return react component
if (container) {
index_esm_render(container, store, app, app._router);
app._plugin.apply('onHmr')(index_esm_render.bind(null, container, store, app));
} else {
return getProvider(store, this, this._router);
}
}
}
function isHTMLElement(node) {
return Object(esm_typeof["a" /* default */])(node) === 'object' && node !== null && node.nodeType && node.nodeName;
}
function isString(str) {
return typeof str === 'string';
}
function getProvider(store, app, router) {
var DvaRoot = function DvaRoot(extraProps) {
return /*#__PURE__*/react_default.a.createElement(es["a" /* Provider */], {
store: store
}, router(Object(objectSpread2["a" /* default */])({
app: app,
history: app._history
}, extraProps)));
};
return DvaRoot;
}
function index_esm_render(container, store, app, router) {
var ReactDOM = __webpack_require__(/*! react-dom */ "i8i4"); // eslint-disable-line
ReactDOM.render(react_default.a.createElement(getProvider(store, app, router)), container);
}
function patchHistory(history) {
var oldListen = history.listen;
history.listen = function (callback) {
// TODO: refact this with modified ConnectedRouter
// Let ConnectedRouter to sync history to store first
// connected-react-router's version is locked since the check function may be broken
// min version of connected-react-router
// e.g.
// function (e, t) {
// var n = arguments.length > 2 && void 0 !== arguments[2] && arguments[2];
// r.inTimeTravelling ? r.inTimeTravelling = !1 : a(e, t, n)
// }
// ref: https://github.com/umijs/umi/issues/2693
var cbStr = callback.toString();
var isConnectedRouterHandler = callback.name === 'handleLocationChange' && cbStr.indexOf('onLocationChanged') > -1 || cbStr.indexOf('.inTimeTravelling') > -1 && cbStr.indexOf('.inTimeTravelling') > -1 && cbStr.indexOf('arguments[2]') > -1; // why add __isDvaPatch: true
// since it's a patch from dva, we need to identify it in the listen handlers
callback(history.location, history.action, {
__isDvaPatch: true
});
return oldListen.call(history, function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
if (isConnectedRouterHandler) {
callback.apply(void 0, args);
} else {
// Delay all listeners besides ConnectedRouter
setTimeout(function () {
callback.apply(void 0, args);
});
}
});
};
return history;
}
/* harmony default export */ var index_esm = __webpack_exports__["a"] = (index);
/***/ }),
/***/ "HiXI":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.trim-end.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $trimEnd = __webpack_require__(/*! ../internals/string-trim */ "WKiH").end;
var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "yNLB");
var FORCED = forcedStringTrimMethod('trimEnd');
var trimEnd = FORCED ? function trimEnd() {
return $trimEnd(this);
} : ''.trimEnd;
// `String.prototype.{ trimEnd, trimRight }` methods
// https://github.com/tc39/ecmascript-string-left-right-trim
$({ target: 'String', proto: true, forced: FORCED }, {
trimEnd: trimEnd,
trimRight: trimEnd
});
/***/ }),
/***/ "HsHA":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/math-log1p.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
var log = Math.log;
// `Math.log1p` method implementation
// https://tc39.github.io/ecma262/#sec-math.log1p
module.exports = Math.log1p || function log1p(x) {
return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : log(1 + x);
};
/***/ }),
/***/ "HyNC":
/*!*******************************************************************************************!*\
!*** ./node_modules/@umijs/preset-built-in/node_modules/@umijs/runtime/dist/index.esm.js ***!
\*******************************************************************************************/
/*! exports provided: Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, StaticRouter, Switch, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, __RouterContext, createBrowserHistory, createHashHistory, createMemoryHistory, ApplyPluginsType, Plugin, dynamic */
/*! exports used: ApplyPluginsType, Plugin, dynamic */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ApplyPluginsType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Plugin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return dynamic; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var use_subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! use-subscription */ "/ccO");
/* harmony import */ var use_subscription__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(use_subscription__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _toArray(arr) {
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _createForOfIteratorHelper(o) {
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
var i = 0;
var F = function () {};
return {
s: F,
n: function () {
if (i >= o.length) return {
done: true
};
return {
done: false,
value: o[i++]
};
},
e: function (e) {
throw e;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var it,
normalCompletion = true,
didErr = false,
err;
return {
s: function () {
it = o[Symbol.iterator]();
},
n: function () {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function (e) {
didErr = true;
err = e;
},
f: function () {
try {
if (!normalCompletion && it.return != null) it.return();
} finally {
if (didErr) throw err;
}
}
};
}
function assert(value, message) {
if (!value) throw new Error(message);
}
var ApplyPluginsType;
(function (ApplyPluginsType) {
ApplyPluginsType["compose"] = "compose";
ApplyPluginsType["modify"] = "modify";
ApplyPluginsType["event"] = "event";
})(ApplyPluginsType || (ApplyPluginsType = {}));
function _compose(_ref) {
var fns = _ref.fns,
args = _ref.args;
if (fns.length === 1) {
return fns[0];
}
var last = fns.pop();
return fns.reduce(function (a, b) {
return function () {
return b(a, args);
};
}, last);
}
function isPromiseLike(obj) {
return !!obj && _typeof(obj) === 'object' && typeof obj.then === 'function';
}
var Plugin = /*#__PURE__*/function () {
function Plugin(opts) {
_classCallCheck(this, Plugin);
this.hooks = {};
this.validKeys = (opts === null || opts === void 0 ? void 0 : opts.validKeys) || [];
}
_createClass(Plugin, [{
key: "register",
value: function register(plugin) {
var _this = this;
assert(!!plugin.apply, "register failed, plugin.apply must supplied");
assert(!!plugin.path, "register failed, plugin.path must supplied");
Object.keys(plugin.apply).forEach(function (key) {
assert(_this.validKeys.indexOf(key) > -1, "register failed, invalid key ".concat(key, " from plugin ").concat(plugin.path, "."));
if (!_this.hooks[key]) _this.hooks[key] = [];
_this.hooks[key] = _this.hooks[key].concat(plugin.apply[key]);
});
}
}, {
key: "getHooks",
value: function getHooks(keyWithDot) {
var _keyWithDot$split = keyWithDot.split('.'),
_keyWithDot$split2 = _toArray(_keyWithDot$split),
key = _keyWithDot$split2[0],
memberKeys = _keyWithDot$split2.slice(1);
var hooks = this.hooks[key] || [];
if (memberKeys.length) {
hooks = hooks.map(function (hook) {
try {
var ret = hook;
var _iterator = _createForOfIteratorHelper(memberKeys),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var memberKey = _step.value;
ret = ret[memberKey];
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return ret;
} catch (e) {
return null;
}
}).filter(Boolean);
}
return hooks;
}
}, {
key: "applyPlugins",
value: function applyPlugins(_ref2) {
var key = _ref2.key,
type = _ref2.type,
initialValue = _ref2.initialValue,
args = _ref2.args,
async = _ref2.async;
var hooks = this.getHooks(key) || [];
if (args) {
assert(_typeof(args) === 'object', "applyPlugins failed, args must be plain object.");
}
switch (type) {
case ApplyPluginsType.modify:
if (async) {
return hooks.reduce( /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(memo, hook) {
var ret;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
assert(typeof hook === 'function' || _typeof(hook) === 'object' || isPromiseLike(hook), "applyPlugins failed, all hooks for key ".concat(key, " must be function, plain object or Promise."));
if (!isPromiseLike(memo)) {
_context.next = 5;
break;
}
_context.next = 4;
return memo;
case 4:
memo = _context.sent;
case 5:
if (!(typeof hook === 'function')) {
_context.next = 16;
break;
}
ret = hook(memo, args);
if (!isPromiseLike(ret)) {
_context.next = 13;
break;
}
_context.next = 10;
return ret;
case 10:
return _context.abrupt("return", _context.sent);
case 13:
return _context.abrupt("return", ret);
case 14:
_context.next = 21;
break;
case 16:
if (!isPromiseLike(hook)) {
_context.next = 20;
break;
}
_context.next = 19;
return hook;
case 19:
hook = _context.sent;
case 20:
return _context.abrupt("return", _objectSpread2({}, memo, {}, hook));
case 21:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function (_x, _x2) {
return _ref3.apply(this, arguments);
};
}(), isPromiseLike(initialValue) ? initialValue : Promise.resolve(initialValue));
} else {
return hooks.reduce(function (memo, hook) {
assert(typeof hook === 'function' || _typeof(hook) === 'object', "applyPlugins failed, all hooks for key ".concat(key, " must be function or plain object."));
if (typeof hook === 'function') {
return hook(memo, args);
} else {
// TODO: deepmerge?
return _objectSpread2({}, memo, {}, hook);
}
}, initialValue);
}
case ApplyPluginsType.event:
return hooks.forEach(function (hook) {
assert(typeof hook === 'function', "applyPlugins failed, all hooks for key ".concat(key, " must be function."));
hook(args);
});
case ApplyPluginsType.compose:
return function () {
return _compose({
fns: hooks.concat(initialValue),
args: args
})();
};
}
}
}]);
return Plugin;
}();
var LoadableContext = Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(null);
var ALL_INITIALIZERS = [];
var READY_INITIALIZERS = [];
var initialized = false;
function load(loader) {
var promise = loader();
var state = {
loading: true,
loaded: null,
error: null
};
state.promise = promise.then(function (loaded) {
state.loading = false;
state.loaded = loaded;
return loaded;
}).catch(function (err) {
state.loading = false;
state.error = err;
throw err;
});
return state;
}
function loadMap(obj) {
var state = {
loading: false,
loaded: {},
error: null
};
var promises = [];
try {
Object.keys(obj).forEach(function (key) {
var result = load(obj[key]);
if (!result.loading) {
state.loaded[key] = result.loaded;
state.error = result.error;
} else {
state.loading = true;
}
promises.push(result.promise);
result.promise.then(function (res) {
state.loaded[key] = res;
}).catch(function (err) {
state.error = err;
});
});
} catch (err) {
state.error = err;
}
state.promise = Promise.all(promises).then(function (res) {
state.loading = false;
return res;
}).catch(function (err) {
state.loading = false;
throw err;
});
return state;
}
function resolve(obj) {
return obj && obj.__esModule ? obj.default : obj;
}
function render(loaded, props) {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(resolve(loaded), props);
}
function createLoadableComponent(loadFn, options) {
var opts = Object.assign({
loader: null,
loading: null,
delay: 200,
timeout: null,
render: render,
webpack: null,
modules: null
}, options);
var subscription = null;
function init() {
if (!subscription) {
var sub = new LoadableSubscription(loadFn, opts);
subscription = {
getCurrentValue: sub.getCurrentValue.bind(sub),
subscribe: sub.subscribe.bind(sub),
retry: sub.retry.bind(sub),
promise: sub.promise.bind(sub)
};
}
return subscription.promise();
} // Server only
if (typeof window === 'undefined') {
ALL_INITIALIZERS.push(init);
} // Client only
if (!initialized && typeof window !== 'undefined' && typeof opts.webpack === 'function') {
var moduleIds = opts.webpack();
READY_INITIALIZERS.push(function (ids) {
var _iterator = _createForOfIteratorHelper(moduleIds),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var moduleId = _step.value;
if (ids.indexOf(moduleId) !== -1) {
return init();
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
});
}
var LoadableComponent = function LoadableComponent(props, ref) {
init();
var context = react__WEBPACK_IMPORTED_MODULE_0___default.a.useContext(LoadableContext);
var state = Object(use_subscription__WEBPACK_IMPORTED_MODULE_1__["useSubscription"])(subscription);
react__WEBPACK_IMPORTED_MODULE_0___default.a.useImperativeHandle(ref, function () {
return {
retry: subscription.retry
};
});
if (context && Array.isArray(opts.modules)) {
opts.modules.forEach(function (moduleName) {
context(moduleName);
});
}
if (state.loading || state.error) {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(opts.loading, {
isLoading: state.loading,
pastDelay: state.pastDelay,
timedOut: state.timedOut,
error: state.error,
retry: subscription.retry
});
} else if (state.loaded) {
return opts.render(state.loaded, props);
} else {
return null;
}
};
var LoadableComponentWithRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.forwardRef(LoadableComponent); // add static method in React.forwardRef
// https://github.com/facebook/react/issues/17830
LoadableComponentWithRef.preload = function () {
return init();
};
LoadableComponentWithRef.displayName = 'LoadableComponent';
return LoadableComponentWithRef;
}
var LoadableSubscription = /*#__PURE__*/function () {
function LoadableSubscription(loadFn, opts) {
_classCallCheck(this, LoadableSubscription);
this._loadFn = loadFn;
this._opts = opts;
this._callbacks = new Set();
this._delay = null;
this._timeout = null;
this.retry();
}
_createClass(LoadableSubscription, [{
key: "promise",
value: function promise() {
return this._res.promise;
}
}, {
key: "retry",
value: function retry() {
var _this = this;
this._clearTimeouts();
this._res = this._loadFn(this._opts.loader);
this._state = {
pastDelay: false,
timedOut: false
};
var res = this._res,
opts = this._opts;
if (res.loading) {
if (typeof opts.delay === 'number') {
if (opts.delay === 0) {
this._state.pastDelay = true;
} else {
this._delay = setTimeout(function () {
_this._update({
pastDelay: true
});
}, opts.delay);
}
}
if (typeof opts.timeout === 'number') {
this._timeout = setTimeout(function () {
_this._update({
timedOut: true
});
}, opts.timeout);
}
}
this._res.promise.then(function () {
_this._update();
_this._clearTimeouts();
}) // eslint-disable-next-line handle-callback-err
.catch(function (err) {
_this._update();
_this._clearTimeouts();
});
this._update({});
}
}, {
key: "_update",
value: function _update(partial) {
this._state = _objectSpread2({}, this._state, {}, partial);
this._callbacks.forEach(function (callback) {
return callback();
});
}
}, {
key: "_clearTimeouts",
value: function _clearTimeouts() {
clearTimeout(this._delay);
clearTimeout(this._timeout);
}
}, {
key: "getCurrentValue",
value: function getCurrentValue() {
return _objectSpread2({}, this._state, {
error: this._res.error,
loaded: this._res.loaded,
loading: this._res.loading
});
}
}, {
key: "subscribe",
value: function subscribe(callback) {
var _this2 = this;
this._callbacks.add(callback);
return function () {
_this2._callbacks.delete(callback);
};
}
}]);
return LoadableSubscription;
}();
function Loadable(opts) {
return createLoadableComponent(load, opts);
}
function LoadableMap(opts) {
if (typeof opts.render !== 'function') {
throw new Error('LoadableMap requires a `render(loaded, props)` function');
}
return createLoadableComponent(loadMap, opts);
}
Loadable.Map = LoadableMap;
function flushInitializers(initializers, ids) {
var promises = [];
while (initializers.length) {
var init = initializers.pop();
promises.push(init(ids));
}
return Promise.all(promises).then(function () {
if (initializers.length) {
return flushInitializers(initializers, ids);
}
});
}
Loadable.preloadAll = function () {
return new Promise(function (resolve, reject) {
flushInitializers(ALL_INITIALIZERS).then(resolve, reject);
});
};
Loadable.preloadReady = function () {
var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
return new Promise(function (resolve) {
var res = function res() {
initialized = true;
return resolve();
}; // We always will resolve, errors should be handled within loading UIs.
flushInitializers(READY_INITIALIZERS, ids).then(res, res);
});
};
if (typeof window !== 'undefined') {
window.__NEXT_PRELOADREADY = Loadable.preloadReady;
}
function dynamic (opts) {
var loadableFn = Loadable;
var loadableOptions = {
loading: function loading(_ref) {
var error = _ref.error,
isLoading = _ref.isLoading;
if (false) {}
return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, "loading...");
}
}; // Support for direct import(),
// eg: dynamic(() => import('../hello-world'))
if (typeof opts === 'function') {
loadableOptions.loader = opts; // Support for having first argument being options,
// eg: dynamic({loader: import('../hello-world')})
} else if (_typeof(opts) === 'object') {
loadableOptions = _objectSpread2({}, loadableOptions, {}, opts);
} else {
throw new Error("Unexpect arguments ".concat(opts));
} // Support for passing options,
// eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>})
// loadableOptions = { ...loadableOptions, ...options };
return loadableFn(loadableOptions);
}
/***/ }),
/***/ "I+eb":
/*!**************************************************!*\
!*** ./node_modules/core-js/internals/export.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "zk60");
var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "6JNq");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "lMq5");
/*
options.target - name of the target object
options.global - target is the global object
options.stat - export as static methods of target
options.proto - export as prototype methods of target
options.real - real prototype method for the `pure` version
options.forced - export even if the native feature is available
options.bind - bind methods to the target, required for the `pure` version
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
options.unsafe - use the simple assignment of property instead of delete + defineProperty
options.sham - add a flag to not completely full polyfills
options.enumerable - export as enumerable property
options.noTargetGet - prevent calling a getter on target
*/
module.exports = function (options, source) {
var TARGET = options.target;
var GLOBAL = options.global;
var STATIC = options.stat;
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
if (GLOBAL) {
target = global;
} else if (STATIC) {
target = global[TARGET] || setGlobal(TARGET, {});
} else {
target = (global[TARGET] || {}).prototype;
}
if (target) for (key in source) {
sourceProperty = source[key];
if (options.noTargetGet) {
descriptor = getOwnPropertyDescriptor(target, key);
targetProperty = descriptor && descriptor.value;
} else targetProperty = target[key];
FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
// contained in target
if (!FORCED && targetProperty !== undefined) {
if (typeof sourceProperty === typeof targetProperty) continue;
copyConstructorProperties(sourceProperty, targetProperty);
}
// add a flag to not completely full polyfills
if (options.sham || (targetProperty && targetProperty.sham)) {
createNonEnumerableProperty(sourceProperty, 'sham', true);
}
// extend global
redefine(target, key, sourceProperty, options);
}
};
/***/ }),
/***/ "I1Gw":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.split.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.split` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.split
defineWellKnownSymbol('split');
/***/ }),
/***/ "I5X1":
/*!*******************************************************!*\
!*** ./src/.umi-production/plugin-model/useModel.tsx ***!
\*******************************************************/
/*! exports provided: useModel */
/*! exports used: useModel */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useModel; });
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@umijs/plugin-model/node_modules/fast-deep-equal/index.js */ "1WJl");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_lib_helpers_constant__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@umijs/plugin-model/lib/helpers/constant */ "FMtG");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_lib_helpers_constant__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_lib_helpers_constant__WEBPACK_IMPORTED_MODULE_3__);
// @ts-nocheck
// @ts-ignore
// @ts-ignore
function useModel(namespace, updater) {
var dispatcher = Object(react__WEBPACK_IMPORTED_MODULE_1__["useContext"])(D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_lib_helpers_constant__WEBPACK_IMPORTED_MODULE_3__["UmiContext"]);
var updaterRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(updater);
updaterRef.current = updater;
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])(function () {
return updaterRef.current ? updaterRef.current(dispatcher.data[namespace]) : dispatcher.data[namespace];
}),
_useState2 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(_useState, 2),
state = _useState2[0],
setState = _useState2[1];
var stateRef = Object(react__WEBPACK_IMPORTED_MODULE_1__["useRef"])(state);
stateRef.current = state;
Object(react__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () {
var handler = function handler(e) {
if (updater && updaterRef.current) {
var currentState = updaterRef.current(e);
var previousState = stateRef.current;
if (!D_projects_competitions_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2___default()(currentState, previousState)) {
setState(currentState);
}
} else {
setState(e);
}
};
try {
dispatcher.callbacks[namespace].add(handler);
} catch (e) {
dispatcher.callbacks[namespace] = new Set();
dispatcher.callbacks[namespace].add(handler);
}
return function () {
dispatcher.callbacks[namespace].delete(handler);
};
}, [namespace]);
return state;
}
;
/***/ }),
/***/ "I8vh":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/to-absolute-index.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var max = Math.max;
var min = Math.min;
// Helper for a popular repeating case of the spec:
// Let integer be ? ToInteger(index).
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
module.exports = function (index, length) {
var integer = toInteger(index);
return integer < 0 ? max(integer + length, 0) : min(integer, length);
};
/***/ }),
/***/ "I9xj":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/es.math.to-string-tag.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
// Math[@@toStringTag] property
// https://tc39.github.io/ecma262/#sec-math-@@tostringtag
setToStringTag(Math, 'Math', true);
/***/ }),
/***/ "IL/d":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.from.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(/*! ../internals/typed-array-constructors-require-wrappers */ "iqeF");
var exportTypedArrayStaticMethod = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC").exportTypedArrayStaticMethod;
var typedArrayFrom = __webpack_require__(/*! ../internals/typed-array-from */ "oHi+");
// `%TypedArray%.from` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.from
exportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS);
/***/ }),
/***/ "ITfd":
/*!***********************************************!*\
!*** ./node_modules/hash.js/lib/hash/hmac.js ***!
\***********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ./utils */ "w8CP");
var assert = __webpack_require__(/*! minimalistic-assert */ "2j6C");
function Hmac(hash, key, enc) {
if (!(this instanceof Hmac))
return new Hmac(hash, key, enc);
this.Hash = hash;
this.blockSize = hash.blockSize / 8;
this.outSize = hash.outSize / 8;
this.inner = null;
this.outer = null;
this._init(utils.toArray(key, enc));
}
module.exports = Hmac;
Hmac.prototype._init = function init(key) {
// Shorten key, if needed
if (key.length > this.blockSize)
key = new this.Hash().update(key).digest();
assert(key.length <= this.blockSize);
// Add padding to key
for (var i = key.length; i < this.blockSize; i++)
key.push(0);
for (i = 0; i < key.length; i++)
key[i] ^= 0x36;
this.inner = new this.Hash().update(key);
// 0x36 ^ 0x5c = 0x6a
for (i = 0; i < key.length; i++)
key[i] ^= 0x6a;
this.outer = new this.Hash().update(key);
};
Hmac.prototype.update = function update(msg, enc) {
this.inner.update(msg, enc);
return this;
};
Hmac.prototype.digest = function digest(enc) {
this.outer.update(this.inner.digest());
return this.outer.digest(enc);
};
/***/ }),
/***/ "IZzc":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.sort.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $sort = [].sort;
// `%TypedArray%.prototype.sort` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.sort
exportTypedArrayMethod('sort', function sort(comparefn) {
return $sort.call(aTypedArray(this), comparefn);
});
/***/ }),
/***/ "Ijbi":
/*!******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/arrayWithoutHoles.js ***!
\******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "WkPL");
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return arrayLikeToArray(arr);
}
module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "ImZN":
/*!***************************************************!*\
!*** ./node_modules/core-js/internals/iterate.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "6VoE");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "NaFW");
var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "m92n");
var Result = function (stopped, result) {
this.stopped = stopped;
this.result = result;
};
var iterate = module.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
var boundFunction = bind(fn, that, AS_ENTRIES ? 2 : 1);
var iterator, iterFn, index, length, result, next, step;
if (IS_ITERATOR) {
iterator = iterable;
} else {
iterFn = getIteratorMethod(iterable);
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
// optimisation for array iterators
if (isArrayIteratorMethod(iterFn)) {
for (index = 0, length = toLength(iterable.length); length > index; index++) {
result = AS_ENTRIES
? boundFunction(anObject(step = iterable[index])[0], step[1])
: boundFunction(iterable[index]);
if (result && result instanceof Result) return result;
} return new Result(false);
}
iterator = iterFn.call(iterable);
}
next = iterator.next;
while (!(step = next.call(iterator)).done) {
result = callWithSafeIterationClosing(iterator, boundFunction, step.value, AS_ENTRIES);
if (typeof result == 'object' && result && result instanceof Result) return result;
} return new Result(false);
};
iterate.stop = function (result) {
return new Result(true, result);
};
/***/ }),
/***/ "IxXR":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.strike.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.strike` method
// https://tc39.github.io/ecma262/#sec-string.prototype.strike
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, {
strike: function strike() {
return createHTML(this, 'strike', '', '');
}
});
/***/ }),
/***/ "J4zp":
/*!**************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/slicedToArray.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayWithHoles = __webpack_require__(/*! ./arrayWithHoles.js */ "wTVA");
var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit.js */ "m0LI");
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "ZhPi");
var nonIterableRest = __webpack_require__(/*! ./nonIterableRest.js */ "wkBT");
function _slicedToArray(arr, i) {
return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();
}
module.exports = _slicedToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "J84W":
/*!*************************************************************!*\
!*** ./node_modules/@ant-design/icons/CheckCircleFilled.js ***!
\*************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _CheckCircleFilled = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/CheckCircleFilled */ "bz9Y"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _CheckCircleFilled;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "JBy8":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-names.js ***!
\*************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var internalObjectKeys = __webpack_require__(/*! ../internals/object-keys-internal */ "yoRg");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "eDl+");
var hiddenKeys = enumBugKeys.concat('length', 'prototype');
// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
return internalObjectKeys(O, hiddenKeys);
};
/***/ }),
/***/ "JTJg":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.includes.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "WjRb");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "qxPZ");
// `String.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
includes: function includes(searchString /* , position = 0 */) {
return !!~String(requireObjectCoercible(this))
.indexOf(notARegExp(searchString), arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "JX7q":
/*!**************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js ***!
\**************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _assertThisInitialized; });
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
/***/ }),
/***/ "JaFt":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.reduce-right.js ***!
\*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $reduceRight = __webpack_require__(/*! ../internals/array-reduce */ "1Y/n").right;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.reduceRicht` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduceright
exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) {
return $reduceRight(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/***/ "JevA":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.number.parse-int.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var parseInt = __webpack_require__(/*! ../internals/number-parse-int */ "wg0c");
// `Number.parseInt` method
// https://tc39.github.io/ecma262/#sec-number.parseint
$({ target: 'Number', stat: true, forced: Number.parseInt != parseInt }, {
parseInt: parseInt
});
/***/ }),
/***/ "JfAA":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.regexp.to-string.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var flags = __webpack_require__(/*! ../internals/regexp-flags */ "rW0t");
var TO_STRING = 'toString';
var RegExpPrototype = RegExp.prototype;
var nativeToString = RegExpPrototype[TO_STRING];
var NOT_GENERIC = fails(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
// FF44- RegExp#toString has a wrong name
var INCORRECT_NAME = nativeToString.name != TO_STRING;
// `RegExp.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
if (NOT_GENERIC || INCORRECT_NAME) {
redefine(RegExp.prototype, TO_STRING, function toString() {
var R = anObject(this);
var p = String(R.source);
var rf = R.flags;
var f = String(rf === undefined && R instanceof RegExp && !('flags' in RegExpPrototype) ? flags.call(R) : rf);
return '/' + p + '/' + f;
}, { unsafe: true });
}
/***/ }),
/***/ "Ji7U":
/*!*************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/inherits.js ***!
\*************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inherits; });
/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "s4An");
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
Object.defineProperty(subClass, "prototype", {
writable: false
});
if (superClass) Object(_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(subClass, superClass);
}
/***/ }),
/***/ "JiZb":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/set-species.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var SPECIES = wellKnownSymbol('species');
module.exports = function (CONSTRUCTOR_NAME) {
var Constructor = getBuiltIn(CONSTRUCTOR_NAME);
var defineProperty = definePropertyModule.f;
if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) {
defineProperty(Constructor, SPECIES, {
configurable: true,
get: function () { return this; }
});
}
};
/***/ }),
/***/ "JwUS":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.reduce.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.reduce` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
reduce: function reduce(callbackfn /* , initialValue */) {
var set = anObject(this);
var iterator = getSetIterator(set);
var noInitial = arguments.length < 2;
var accumulator = noInitial ? undefined : arguments[1];
aFunction(callbackfn);
iterate(iterator, function (value) {
if (noInitial) {
noInitial = false;
accumulator = value;
} else {
accumulator = callbackfn(accumulator, value, value, set);
}
}, undefined, false, true);
if (noInitial) throw TypeError('Reduce of empty set with no initial value');
return accumulator;
}
});
/***/ }),
/***/ "JxQ3":
/*!**********************************************!*\
!*** ./node_modules/object-inspect/index.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var hasMap = typeof Map === 'function' && Map.prototype;
var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
var mapForEach = hasMap && Map.prototype.forEach;
var hasSet = typeof Set === 'function' && Set.prototype;
var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
var setForEach = hasSet && Set.prototype.forEach;
var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
var booleanValueOf = Boolean.prototype.valueOf;
var objectToString = Object.prototype.toString;
var functionToString = Function.prototype.toString;
var $match = String.prototype.match;
var $slice = String.prototype.slice;
var $replace = String.prototype.replace;
var $toUpperCase = String.prototype.toUpperCase;
var $toLowerCase = String.prototype.toLowerCase;
var $test = RegExp.prototype.test;
var $concat = Array.prototype.concat;
var $join = Array.prototype.join;
var $arrSlice = Array.prototype.slice;
var $floor = Math.floor;
var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
var gOPS = Object.getOwnPropertySymbols;
var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
// ie, `has-tostringtag/shams
var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
? Symbol.toStringTag
: null;
var isEnumerable = Object.prototype.propertyIsEnumerable;
var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
[].__proto__ === Array.prototype // eslint-disable-line no-proto
? function (O) {
return O.__proto__; // eslint-disable-line no-proto
}
: null
);
function addNumericSeparator(num, str) {
if (
num === Infinity
|| num === -Infinity
|| num !== num
|| (num && num > -1000 && num < 1000)
|| $test.call(/e/, str)
) {
return str;
}
var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
if (typeof num === 'number') {
var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
if (int !== num) {
var intStr = String(int);
var dec = $slice.call(str, intStr.length + 1);
return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
}
}
return $replace.call(str, sepRegex, '$&_');
}
var utilInspect = __webpack_require__(/*! ./util.inspect */ 2);
var inspectCustom = utilInspect.custom;
var inspectSymbol = isSymbol(inspectCustom) ? inspectCustom : null;
module.exports = function inspect_(obj, options, depth, seen) {
var opts = options || {};
if (has(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
throw new TypeError('option "quoteStyle" must be "single" or "double"');
}
if (
has(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
: opts.maxStringLength !== null
)
) {
throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
}
var customInspect = has(opts, 'customInspect') ? opts.customInspect : true;
if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
}
if (
has(opts, 'indent')
&& opts.indent !== null
&& opts.indent !== '\t'
&& !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
) {
throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
}
if (has(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
}
var numericSeparator = opts.numericSeparator;
if (typeof obj === 'undefined') {
return 'undefined';
}
if (obj === null) {
return 'null';
}
if (typeof obj === 'boolean') {
return obj ? 'true' : 'false';
}
if (typeof obj === 'string') {
return inspectString(obj, opts);
}
if (typeof obj === 'number') {
if (obj === 0) {
return Infinity / obj > 0 ? '0' : '-0';
}
var str = String(obj);
return numericSeparator ? addNumericSeparator(obj, str) : str;
}
if (typeof obj === 'bigint') {
var bigIntStr = String(obj) + 'n';
return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
}
var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
if (typeof depth === 'undefined') { depth = 0; }
if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
return isArray(obj) ? '[Array]' : '[Object]';
}
var indent = getIndent(opts, depth);
if (typeof seen === 'undefined') {
seen = [];
} else if (indexOf(seen, obj) >= 0) {
return '[Circular]';
}
function inspect(value, from, noIndent) {
if (from) {
seen = $arrSlice.call(seen);
seen.push(from);
}
if (noIndent) {
var newOpts = {
depth: opts.depth
};
if (has(opts, 'quoteStyle')) {
newOpts.quoteStyle = opts.quoteStyle;
}
return inspect_(value, newOpts, depth + 1, seen);
}
return inspect_(value, opts, depth + 1, seen);
}
if (typeof obj === 'function' && !isRegExp(obj)) { // in older engines, regexes are callable
var name = nameOf(obj);
var keys = arrObjKeys(obj, inspect);
return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
}
if (isSymbol(obj)) {
var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
}
if (isElement(obj)) {
var s = '<' + $toLowerCase.call(String(obj.nodeName));
var attrs = obj.attributes || [];
for (var i = 0; i < attrs.length; i++) {
s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
}
s += '>';
if (obj.childNodes && obj.childNodes.length) { s += '...'; }
s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
return s;
}
if (isArray(obj)) {
if (obj.length === 0) { return '[]'; }
var xs = arrObjKeys(obj, inspect);
if (indent && !singleLineValues(xs)) {
return '[' + indentedJoin(xs, indent) + ']';
}
return '[ ' + $join.call(xs, ', ') + ' ]';
}
if (isError(obj)) {
var parts = arrObjKeys(obj, inspect);
if (!('cause' in Error.prototype) && 'cause' in obj && !isEnumerable.call(obj, 'cause')) {
return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
}
if (parts.length === 0) { return '[' + String(obj) + ']'; }
return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
}
if (typeof obj === 'object' && customInspect) {
if (inspectSymbol && typeof obj[inspectSymbol] === 'function' && utilInspect) {
return utilInspect(obj, { depth: maxDepth - depth });
} else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
return obj.inspect();
}
}
if (isMap(obj)) {
var mapParts = [];
if (mapForEach) {
mapForEach.call(obj, function (value, key) {
mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
});
}
return collectionOf('Map', mapSize.call(obj), mapParts, indent);
}
if (isSet(obj)) {
var setParts = [];
if (setForEach) {
setForEach.call(obj, function (value) {
setParts.push(inspect(value, obj));
});
}
return collectionOf('Set', setSize.call(obj), setParts, indent);
}
if (isWeakMap(obj)) {
return weakCollectionOf('WeakMap');
}
if (isWeakSet(obj)) {
return weakCollectionOf('WeakSet');
}
if (isWeakRef(obj)) {
return weakCollectionOf('WeakRef');
}
if (isNumber(obj)) {
return markBoxed(inspect(Number(obj)));
}
if (isBigInt(obj)) {
return markBoxed(inspect(bigIntValueOf.call(obj)));
}
if (isBoolean(obj)) {
return markBoxed(booleanValueOf.call(obj));
}
if (isString(obj)) {
return markBoxed(inspect(String(obj)));
}
// note: in IE 8, sometimes `global !== window` but both are the prototypes of each other
/* eslint-env browser */
if (typeof window !== 'undefined' && obj === window) {
return '{ [object Window] }';
}
if (obj === global) {
return '{ [object globalThis] }';
}
if (!isDate(obj) && !isRegExp(obj)) {
var ys = arrObjKeys(obj, inspect);
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
var protoTag = obj instanceof Object ? '' : 'null prototype';
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
if (ys.length === 0) { return tag + '{}'; }
if (indent) {
return tag + '{' + indentedJoin(ys, indent) + '}';
}
return tag + '{ ' + $join.call(ys, ', ') + ' }';
}
return String(obj);
};
function wrapQuotes(s, defaultStyle, opts) {
var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
return quoteChar + s + quoteChar;
}
function quote(s) {
return $replace.call(String(s), /"/g, '&quot;');
}
function isArray(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
function isSymbol(obj) {
if (hasShammedSymbols) {
return obj && typeof obj === 'object' && obj instanceof Symbol;
}
if (typeof obj === 'symbol') {
return true;
}
if (!obj || typeof obj !== 'object' || !symToString) {
return false;
}
try {
symToString.call(obj);
return true;
} catch (e) {}
return false;
}
function isBigInt(obj) {
if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
return false;
}
try {
bigIntValueOf.call(obj);
return true;
} catch (e) {}
return false;
}
var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
function has(obj, key) {
return hasOwn.call(obj, key);
}
function toStr(obj) {
return objectToString.call(obj);
}
function nameOf(f) {
if (f.name) { return f.name; }
var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
if (m) { return m[1]; }
return null;
}
function indexOf(xs, x) {
if (xs.indexOf) { return xs.indexOf(x); }
for (var i = 0, l = xs.length; i < l; i++) {
if (xs[i] === x) { return i; }
}
return -1;
}
function isMap(x) {
if (!mapSize || !x || typeof x !== 'object') {
return false;
}
try {
mapSize.call(x);
try {
setSize.call(x);
} catch (s) {
return true;
}
return x instanceof Map; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isWeakMap(x) {
if (!weakMapHas || !x || typeof x !== 'object') {
return false;
}
try {
weakMapHas.call(x, weakMapHas);
try {
weakSetHas.call(x, weakSetHas);
} catch (s) {
return true;
}
return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isWeakRef(x) {
if (!weakRefDeref || !x || typeof x !== 'object') {
return false;
}
try {
weakRefDeref.call(x);
return true;
} catch (e) {}
return false;
}
function isSet(x) {
if (!setSize || !x || typeof x !== 'object') {
return false;
}
try {
setSize.call(x);
try {
mapSize.call(x);
} catch (m) {
return true;
}
return x instanceof Set; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isWeakSet(x) {
if (!weakSetHas || !x || typeof x !== 'object') {
return false;
}
try {
weakSetHas.call(x, weakSetHas);
try {
weakMapHas.call(x, weakMapHas);
} catch (s) {
return true;
}
return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
} catch (e) {}
return false;
}
function isElement(x) {
if (!x || typeof x !== 'object') { return false; }
if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
return true;
}
return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
}
function inspectString(str, opts) {
if (str.length > opts.maxStringLength) {
var remaining = str.length - opts.maxStringLength;
var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
}
// eslint-disable-next-line no-control-regex
var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
return wrapQuotes(s, 'single', opts);
}
function lowbyte(c) {
var n = c.charCodeAt(0);
var x = {
8: 'b',
9: 't',
10: 'n',
12: 'f',
13: 'r'
}[n];
if (x) { return '\\' + x; }
return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
}
function markBoxed(str) {
return 'Object(' + str + ')';
}
function weakCollectionOf(type) {
return type + ' { ? }';
}
function collectionOf(type, size, entries, indent) {
var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
return type + ' (' + size + ') {' + joinedEntries + '}';
}
function singleLineValues(xs) {
for (var i = 0; i < xs.length; i++) {
if (indexOf(xs[i], '\n') >= 0) {
return false;
}
}
return true;
}
function getIndent(opts, depth) {
var baseIndent;
if (opts.indent === '\t') {
baseIndent = '\t';
} else if (typeof opts.indent === 'number' && opts.indent > 0) {
baseIndent = $join.call(Array(opts.indent + 1), ' ');
} else {
return null;
}
return {
base: baseIndent,
prev: $join.call(Array(depth + 1), baseIndent)
};
}
function indentedJoin(xs, indent) {
if (xs.length === 0) { return ''; }
var lineJoiner = '\n' + indent.prev + indent.base;
return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
}
function arrObjKeys(obj, inspect) {
var isArr = isArray(obj);
var xs = [];
if (isArr) {
xs.length = obj.length;
for (var i = 0; i < obj.length; i++) {
xs[i] = has(obj, i) ? inspect(obj[i], obj) : '';
}
}
var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
var symMap;
if (hasShammedSymbols) {
symMap = {};
for (var k = 0; k < syms.length; k++) {
symMap['$' + syms[k]] = syms[k];
}
}
for (var key in obj) { // eslint-disable-line no-restricted-syntax
if (!has(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
// this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
continue; // eslint-disable-line no-restricted-syntax, no-continue
} else if ($test.call(/[^\w$]/, key)) {
xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
} else {
xs.push(key + ': ' + inspect(obj[key], obj));
}
}
if (typeof gOPS === 'function') {
for (var j = 0; j < syms.length; j++) {
if (isEnumerable.call(obj, syms[j])) {
xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
}
}
}
return xs;
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "KAsB":
/*!********************************************************!*\
!*** ./node_modules/antd/es/dropdown/style/index.less ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "KBXm":
/*!************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/EllipsisOutlined.js ***!
\************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var EllipsisOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, "name": "ellipsis", "theme": "outlined" };
exports.default = EllipsisOutlined;
/***/ }),
/***/ "KCY9":
/*!********************************************************!*\
!*** ./node_modules/antd/es/checkbox/style/index.less ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "KQm4":
/*!**********************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules ***!
\**********************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js because of ./node_modules/antd/node_modules/rc-select/es/utils/valueUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./node_modules/antd/node_modules/rc-select/es/utils/valueUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./node_modules/antd/node_modules/rc-select/es/utils/valueUtil.js */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = __webpack_require__("a3WO");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__("25BE");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("BsWD");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
}
/***/ }),
/***/ "KQxl":
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/components/AntdIcon.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var _slicedToArray2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "J4zp"));
var _defineProperty2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "lSNA"));
var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectWithoutProperties */ "QILm"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _classnames = _interopRequireDefault(__webpack_require__(/*! classnames */ "TSYQ"));
var _Context = _interopRequireDefault(__webpack_require__(/*! ./Context */ "Bgsj"));
var _IconBase = _interopRequireDefault(__webpack_require__(/*! ./IconBase */ "/qSt"));
var _twoTonePrimaryColor = __webpack_require__(/*! ./twoTonePrimaryColor */ "03hy");
var _utils = __webpack_require__(/*! ../utils */ "vmBS");
var _excluded = ["className", "icon", "spin", "rotate", "tabIndex", "onClick", "twoToneColor"];
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// Initial setting
// should move it to antd main repo?
(0, _twoTonePrimaryColor.setTwoToneColor)('#1890ff');
var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) {
var className = props.className,
icon = props.icon,
spin = props.spin,
rotate = props.rotate,
tabIndex = props.tabIndex,
onClick = props.onClick,
twoToneColor = props.twoToneColor,
restProps = (0, _objectWithoutProperties2.default)(props, _excluded);
var _React$useContext = React.useContext(_Context.default),
_React$useContext$pre = _React$useContext.prefixCls,
prefixCls = _React$useContext$pre === void 0 ? 'anticon' : _React$useContext$pre,
rootClassName = _React$useContext.rootClassName;
var classString = (0, _classnames.default)(rootClassName, prefixCls, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), className);
var iconTabIndex = tabIndex;
if (iconTabIndex === undefined && onClick) {
iconTabIndex = -1;
}
var svgStyle = rotate ? {
msTransform: "rotate(".concat(rotate, "deg)"),
transform: "rotate(".concat(rotate, "deg)")
} : undefined;
var _normalizeTwoToneColo = (0, _utils.normalizeTwoToneColors)(twoToneColor),
_normalizeTwoToneColo2 = (0, _slicedToArray2.default)(_normalizeTwoToneColo, 2),
primaryColor = _normalizeTwoToneColo2[0],
secondaryColor = _normalizeTwoToneColo2[1];
return /*#__PURE__*/React.createElement("span", (0, _objectSpread2.default)((0, _objectSpread2.default)({
role: "img",
"aria-label": icon.name
}, restProps), {}, {
ref: ref,
tabIndex: iconTabIndex,
onClick: onClick,
className: classString
}), /*#__PURE__*/React.createElement(_IconBase.default, {
icon: icon,
primaryColor: primaryColor,
secondaryColor: secondaryColor,
style: svgStyle
}));
});
Icon.displayName = 'AntdIcon';
Icon.getTwoToneColor = _twoTonePrimaryColor.getTwoToneColor;
Icon.setTwoToneColor = _twoTonePrimaryColor.setTwoToneColor;
var _default = exports.default = Icon;
/***/ }),
/***/ "KS4O":
/*!************************************************************!*\
!*** ./node_modules/@ant-design/css-animation/es/Event.js ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
var START_EVENT_NAME_MAP = {
transitionstart: {
transition: 'transitionstart',
WebkitTransition: 'webkitTransitionStart',
MozTransition: 'mozTransitionStart',
OTransition: 'oTransitionStart',
msTransition: 'MSTransitionStart'
},
animationstart: {
animation: 'animationstart',
WebkitAnimation: 'webkitAnimationStart',
MozAnimation: 'mozAnimationStart',
OAnimation: 'oAnimationStart',
msAnimation: 'MSAnimationStart'
}
};
var END_EVENT_NAME_MAP = {
transitionend: {
transition: 'transitionend',
WebkitTransition: 'webkitTransitionEnd',
MozTransition: 'mozTransitionEnd',
OTransition: 'oTransitionEnd',
msTransition: 'MSTransitionEnd'
},
animationend: {
animation: 'animationend',
WebkitAnimation: 'webkitAnimationEnd',
MozAnimation: 'mozAnimationEnd',
OAnimation: 'oAnimationEnd',
msAnimation: 'MSAnimationEnd'
}
};
var startEvents = [];
var endEvents = [];
function detectEvents() {
var testEl = document.createElement('div');
var style = testEl.style;
if (!('AnimationEvent' in window)) {
delete START_EVENT_NAME_MAP.animationstart.animation;
delete END_EVENT_NAME_MAP.animationend.animation;
}
if (!('TransitionEvent' in window)) {
delete START_EVENT_NAME_MAP.transitionstart.transition;
delete END_EVENT_NAME_MAP.transitionend.transition;
}
function process(EVENT_NAME_MAP, events) {
for (var baseEventName in EVENT_NAME_MAP) {
if (EVENT_NAME_MAP.hasOwnProperty(baseEventName)) {
var baseEvents = EVENT_NAME_MAP[baseEventName];
for (var styleName in baseEvents) {
if (styleName in style) {
events.push(baseEvents[styleName]);
break;
}
}
}
}
}
process(START_EVENT_NAME_MAP, startEvents);
process(END_EVENT_NAME_MAP, endEvents);
}
if (typeof window !== 'undefined' && typeof document !== 'undefined') {
detectEvents();
}
function addEventListener(node, eventName, eventListener) {
node.addEventListener(eventName, eventListener, false);
}
function removeEventListener(node, eventName, eventListener) {
node.removeEventListener(eventName, eventListener, false);
}
var TransitionEvents = {
// Start events
startEvents: startEvents,
addStartEventListener: function addStartEventListener(node, eventListener) {
if (startEvents.length === 0) {
window.setTimeout(eventListener, 0);
return;
}
startEvents.forEach(function (startEvent) {
addEventListener(node, startEvent, eventListener);
});
},
removeStartEventListener: function removeStartEventListener(node, eventListener) {
if (startEvents.length === 0) {
return;
}
startEvents.forEach(function (startEvent) {
removeEventListener(node, startEvent, eventListener);
});
},
// End events
endEvents: endEvents,
addEndEventListener: function addEndEventListener(node, eventListener) {
if (endEvents.length === 0) {
window.setTimeout(eventListener, 0);
return;
}
endEvents.forEach(function (endEvent) {
addEventListener(node, endEvent, eventListener);
});
},
removeEndEventListener: function removeEndEventListener(node, eventListener) {
if (endEvents.length === 0) {
return;
}
endEvents.forEach(function (endEvent) {
removeEventListener(node, endEvent, eventListener);
});
}
};
/* harmony default export */ __webpack_exports__["a"] = (TransitionEvents);
/***/ }),
/***/ "KVSy":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.slice.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $slice = [].slice;
var FORCED = fails(function () {
// eslint-disable-next-line no-undef
new Int8Array(1).slice();
});
// `%TypedArray%.prototype.slice` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.slice
exportTypedArrayMethod('slice', function slice(start, end) {
var list = $slice.call(aTypedArray(this), start, end);
var C = speciesConstructor(this, this.constructor);
var index = 0;
var length = list.length;
var result = new (aTypedArrayConstructor(C))(length);
while (length > index) result[index] = list[index++];
return result;
}, FORCED);
/***/ }),
/***/ "KW7l":
/*!*******************************************************!*\
!*** ./node_modules/rc-field-form/es/FieldContext.js ***!
\*******************************************************/
/*! exports provided: HOOK_MARK, default */
/*! exports used: HOOK_MARK, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return HOOK_MARK; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf");
var HOOK_MARK = 'RC_FORM_INTERNAL_HOOKS'; // eslint-disable-next-line @typescript-eslint/no-explicit-any
var warningFunc = function warningFunc() {
Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(false, 'Can not find FormContext. Please make sure you wrap Field under Form.');
};
var Context = react__WEBPACK_IMPORTED_MODULE_0__["createContext"]({
getFieldValue: warningFunc,
getFieldsValue: warningFunc,
getFieldError: warningFunc,
getFieldsError: warningFunc,
isFieldsTouched: warningFunc,
isFieldTouched: warningFunc,
isFieldValidating: warningFunc,
isFieldsValidating: warningFunc,
resetFields: warningFunc,
setFields: warningFunc,
setFieldsValue: warningFunc,
validateFields: warningFunc,
submit: warningFunc,
getInternalHooks: function getInternalHooks() {
warningFunc();
return {
dispatch: warningFunc,
registerField: warningFunc,
useSubscribe: warningFunc,
setInitialValues: warningFunc,
setCallbacks: warningFunc,
getFields: warningFunc,
setValidateMessages: warningFunc,
setPreserve: warningFunc
};
}
});
/* harmony default export */ __webpack_exports__["b"] = (Context);
/***/ }),
/***/ "KfNM":
/*!************************************************!*\
!*** ./node_modules/lodash/_objectToString.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
return nativeObjectToString.call(value);
}
module.exports = objectToString;
/***/ }),
/***/ "KhsS":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.match.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.match` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.match
defineWellKnownSymbol('match');
/***/ }),
/***/ "KpVd":
/*!********************************************************!*\
!*** ./node_modules/async-validator/dist-web/index.js ***!
\********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module uses injected variables (process) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
_setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _construct(Parent, args, Class) {
if (_isNativeReflectConstruct()) {
_construct = Reflect.construct;
} else {
_construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) _setPrototypeOf(instance, Class.prototype);
return instance;
};
}
return _construct.apply(null, arguments);
}
function _isNativeFunction(fn) {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
}
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
_wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !_isNativeFunction(Class)) return Class;
if (typeof Class !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class)) return _cache.get(Class);
_cache.set(Class, Wrapper);
}
function Wrapper() {
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
}
Wrapper.prototype = Object.create(Class.prototype, {
constructor: {
value: Wrapper,
enumerable: false,
writable: true,
configurable: true
}
});
return _setPrototypeOf(Wrapper, Class);
};
return _wrapNativeSuper(Class);
}
/* eslint no-console:0 */
var formatRegExp = /%[sdj%]/g;
var warning = function warning() {}; // don't print warning message when in production env or node runtime
if (typeof process !== 'undefined' && Object({"NODE_ENV":"production"}) && "production" !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {
warning = function warning(type, errors) {
if (typeof console !== 'undefined' && console.warn) {
if (errors.every(function (e) {
return typeof e === 'string';
})) {
console.warn(type, errors);
}
}
};
}
function convertFieldsError(errors) {
if (!errors || !errors.length) return null;
var fields = {};
errors.forEach(function (error) {
var field = error.field;
fields[field] = fields[field] || [];
fields[field].push(error);
});
return fields;
}
function format() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var i = 1;
var f = args[0];
var len = args.length;
if (typeof f === 'function') {
return f.apply(null, args.slice(1));
}
if (typeof f === 'string') {
var str = String(f).replace(formatRegExp, function (x) {
if (x === '%%') {
return '%';
}
if (i >= len) {
return x;
}
switch (x) {
case '%s':
return String(args[i++]);
case '%d':
return Number(args[i++]);
case '%j':
try {
return JSON.stringify(args[i++]);
} catch (_) {
return '[Circular]';
}
break;
default:
return x;
}
});
return str;
}
return f;
}
function isNativeStringType(type) {
return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'date' || type === 'pattern';
}
function isEmptyValue(value, type) {
if (value === undefined || value === null) {
return true;
}
if (type === 'array' && Array.isArray(value) && !value.length) {
return true;
}
if (isNativeStringType(type) && typeof value === 'string' && !value) {
return true;
}
return false;
}
function asyncParallelArray(arr, func, callback) {
var results = [];
var total = 0;
var arrLength = arr.length;
function count(errors) {
results.push.apply(results, errors);
total++;
if (total === arrLength) {
callback(results);
}
}
arr.forEach(function (a) {
func(a, count);
});
}
function asyncSerialArray(arr, func, callback) {
var index = 0;
var arrLength = arr.length;
function next(errors) {
if (errors && errors.length) {
callback(errors);
return;
}
var original = index;
index = index + 1;
if (original < arrLength) {
func(arr[original], next);
} else {
callback([]);
}
}
next([]);
}
function flattenObjArr(objArr) {
var ret = [];
Object.keys(objArr).forEach(function (k) {
ret.push.apply(ret, objArr[k]);
});
return ret;
}
var AsyncValidationError = /*#__PURE__*/function (_Error) {
_inheritsLoose(AsyncValidationError, _Error);
function AsyncValidationError(errors, fields) {
var _this;
_this = _Error.call(this, 'Async Validation Error') || this;
_this.errors = errors;
_this.fields = fields;
return _this;
}
return AsyncValidationError;
}( /*#__PURE__*/_wrapNativeSuper(Error));
function asyncMap(objArr, option, func, callback) {
if (option.first) {
var _pending = new Promise(function (resolve, reject) {
var next = function next(errors) {
callback(errors);
return errors.length ? reject(new AsyncValidationError(errors, convertFieldsError(errors))) : resolve();
};
var flattenArr = flattenObjArr(objArr);
asyncSerialArray(flattenArr, func, next);
});
_pending["catch"](function (e) {
return e;
});
return _pending;
}
var firstFields = option.firstFields || [];
if (firstFields === true) {
firstFields = Object.keys(objArr);
}
var objArrKeys = Object.keys(objArr);
var objArrLength = objArrKeys.length;
var total = 0;
var results = [];
var pending = new Promise(function (resolve, reject) {
var next = function next(errors) {
results.push.apply(results, errors);
total++;
if (total === objArrLength) {
callback(results);
return results.length ? reject(new AsyncValidationError(results, convertFieldsError(results))) : resolve();
}
};
if (!objArrKeys.length) {
callback(results);
resolve();
}
objArrKeys.forEach(function (key) {
var arr = objArr[key];
if (firstFields.indexOf(key) !== -1) {
asyncSerialArray(arr, func, next);
} else {
asyncParallelArray(arr, func, next);
}
});
});
pending["catch"](function (e) {
return e;
});
return pending;
}
function complementError(rule) {
return function (oe) {
if (oe && oe.message) {
oe.field = oe.field || rule.fullField;
return oe;
}
return {
message: typeof oe === 'function' ? oe() : oe,
field: oe.field || rule.fullField
};
};
}
function deepMerge(target, source) {
if (source) {
for (var s in source) {
if (source.hasOwnProperty(s)) {
var value = source[s];
if (typeof value === 'object' && typeof target[s] === 'object') {
target[s] = _extends({}, target[s], value);
} else {
target[s] = value;
}
}
}
}
return target;
}
/**
* Rule for validating required fields.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function required(rule, value, source, errors, options, type) {
if (rule.required && (!source.hasOwnProperty(rule.field) || isEmptyValue(value, type || rule.type))) {
errors.push(format(options.messages.required, rule.fullField));
}
}
/**
* Rule for validating whitespace.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function whitespace(rule, value, source, errors, options) {
if (/^\s+$/.test(value) || value === '') {
errors.push(format(options.messages.whitespace, rule.fullField));
}
}
/* eslint max-len:0 */
var pattern = {
// http://emailregex.com/
email: /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,
url: new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$", 'i'),
hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i
};
var types = {
integer: function integer(value) {
return types.number(value) && parseInt(value, 10) === value;
},
"float": function float(value) {
return types.number(value) && !types.integer(value);
},
array: function array(value) {
return Array.isArray(value);
},
regexp: function regexp(value) {
if (value instanceof RegExp) {
return true;
}
try {
return !!new RegExp(value);
} catch (e) {
return false;
}
},
date: function date(value) {
return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function' && !isNaN(value.getTime());
},
number: function number(value) {
if (isNaN(value)) {
return false;
}
return typeof value === 'number';
},
object: function object(value) {
return typeof value === 'object' && !types.array(value);
},
method: function method(value) {
return typeof value === 'function';
},
email: function email(value) {
return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;
},
url: function url(value) {
return typeof value === 'string' && !!value.match(pattern.url);
},
hex: function hex(value) {
return typeof value === 'string' && !!value.match(pattern.hex);
}
};
/**
* Rule for validating the type of a value.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function type(rule, value, source, errors, options) {
if (rule.required && value === undefined) {
required(rule, value, source, errors, options);
return;
}
var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];
var ruleType = rule.type;
if (custom.indexOf(ruleType) > -1) {
if (!types[ruleType](value)) {
errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
} // straight typeof check
} else if (ruleType && typeof value !== rule.type) {
errors.push(format(options.messages.types[ruleType], rule.fullField, rule.type));
}
}
/**
* Rule for validating minimum and maximum allowed values.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function range(rule, value, source, errors, options) {
var len = typeof rule.len === 'number';
var min = typeof rule.min === 'number';
var max = typeof rule.max === 'number'; // 正则匹配码点范围从U+010000一直到U+10FFFF的文字补充平面Supplementary Plane
var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
var val = value;
var key = null;
var num = typeof value === 'number';
var str = typeof value === 'string';
var arr = Array.isArray(value);
if (num) {
key = 'number';
} else if (str) {
key = 'string';
} else if (arr) {
key = 'array';
} // if the value is not of a supported type for range validation
// the validation rule rule should use the
// type property to also test for a particular type
if (!key) {
return false;
}
if (arr) {
val = value.length;
}
if (str) {
// 处理码点大于U+010000的文字length属性不准确的bug如"𠮷𠮷𠮷".lenght !== 3
val = value.replace(spRegexp, '_').length;
}
if (len) {
if (val !== rule.len) {
errors.push(format(options.messages[key].len, rule.fullField, rule.len));
}
} else if (min && !max && val < rule.min) {
errors.push(format(options.messages[key].min, rule.fullField, rule.min));
} else if (max && !min && val > rule.max) {
errors.push(format(options.messages[key].max, rule.fullField, rule.max));
} else if (min && max && (val < rule.min || val > rule.max)) {
errors.push(format(options.messages[key].range, rule.fullField, rule.min, rule.max));
}
}
var ENUM = 'enum';
/**
* Rule for validating a value exists in an enumerable list.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function enumerable(rule, value, source, errors, options) {
rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];
if (rule[ENUM].indexOf(value) === -1) {
errors.push(format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));
}
}
/**
* Rule for validating a regular expression pattern.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param source The source object being validated.
* @param errors An array of errors that this rule may add
* validation errors to.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function pattern$1(rule, value, source, errors, options) {
if (rule.pattern) {
if (rule.pattern instanceof RegExp) {
// if a RegExp instance is passed, reset `lastIndex` in case its `global`
// flag is accidentally set to `true`, which in a validation scenario
// is not necessary and the result might be misleading
rule.pattern.lastIndex = 0;
if (!rule.pattern.test(value)) {
errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
}
} else if (typeof rule.pattern === 'string') {
var _pattern = new RegExp(rule.pattern);
if (!_pattern.test(value)) {
errors.push(format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));
}
}
}
}
var rules = {
required: required,
whitespace: whitespace,
type: type,
range: range,
"enum": enumerable,
pattern: pattern$1
};
/**
* Performs validation for string types.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function string(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, 'string') && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options, 'string');
if (!isEmptyValue(value, 'string')) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
rules.pattern(rule, value, source, errors, options);
if (rule.whitespace === true) {
rules.whitespace(rule, value, source, errors, options);
}
}
}
callback(errors);
}
/**
* Validates a function.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function method(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== undefined) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
}
/**
* Validates a number.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function number(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (value === '') {
value = undefined;
}
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== undefined) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
}
}
callback(errors);
}
/**
* Validates a boolean.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function _boolean(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== undefined) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
}
/**
* Validates the regular expression type.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function regexp(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (!isEmptyValue(value)) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
}
/**
* Validates a number is an integer.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function integer(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== undefined) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
}
}
callback(errors);
}
/**
* Validates a number is a floating point number.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function floatFn(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== undefined) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
}
}
callback(errors);
}
/**
* Validates an array.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function array(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if ((value === undefined || value === null) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options, 'array');
if (value !== undefined && value !== null) {
rules.type(rule, value, source, errors, options);
rules.range(rule, value, source, errors, options);
}
}
callback(errors);
}
/**
* Validates an object.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function object(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== undefined) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
}
var ENUM$1 = 'enum';
/**
* Validates an enumerable list.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function enumerable$1(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (value !== undefined) {
rules[ENUM$1](rule, value, source, errors, options);
}
}
callback(errors);
}
/**
* Validates a regular expression pattern.
*
* Performs validation when a rule only contains
* a pattern property but is not declared as a string type.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function pattern$2(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, 'string') && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (!isEmptyValue(value, 'string')) {
rules.pattern(rule, value, source, errors, options);
}
}
callback(errors);
}
function date(rule, value, callback, source, options) {
// console.log('integer rule called %j', rule);
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field); // console.log('validate on %s value', value);
if (validate) {
if (isEmptyValue(value, 'date') && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
if (!isEmptyValue(value, 'date')) {
var dateObject;
if (value instanceof Date) {
dateObject = value;
} else {
dateObject = new Date(value);
}
rules.type(rule, dateObject, source, errors, options);
if (dateObject) {
rules.range(rule, dateObject.getTime(), source, errors, options);
}
}
}
callback(errors);
}
function required$1(rule, value, callback, source, options) {
var errors = [];
var type = Array.isArray(value) ? 'array' : typeof value;
rules.required(rule, value, source, errors, options, type);
callback(errors);
}
function type$1(rule, value, callback, source, options) {
var ruleType = rule.type;
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value, ruleType) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options, ruleType);
if (!isEmptyValue(value, ruleType)) {
rules.type(rule, value, source, errors, options);
}
}
callback(errors);
}
/**
* Performs validation for any type.
*
* @param rule The validation rule.
* @param value The value of the field on the source object.
* @param callback The callback function.
* @param source The source object being validated.
* @param options The validation options.
* @param options.messages The validation messages.
*/
function any(rule, value, callback, source, options) {
var errors = [];
var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);
if (validate) {
if (isEmptyValue(value) && !rule.required) {
return callback();
}
rules.required(rule, value, source, errors, options);
}
callback(errors);
}
var validators = {
string: string,
method: method,
number: number,
"boolean": _boolean,
regexp: regexp,
integer: integer,
"float": floatFn,
array: array,
object: object,
"enum": enumerable$1,
pattern: pattern$2,
date: date,
url: type$1,
hex: type$1,
email: type$1,
required: required$1,
any: any
};
function newMessages() {
return {
"default": 'Validation error on field %s',
required: '%s is required',
"enum": '%s must be one of %s',
whitespace: '%s cannot be empty',
date: {
format: '%s date %s is invalid for format %s',
parse: '%s date could not be parsed, %s is invalid ',
invalid: '%s date %s is invalid'
},
types: {
string: '%s is not a %s',
method: '%s is not a %s (function)',
array: '%s is not an %s',
object: '%s is not an %s',
number: '%s is not a %s',
date: '%s is not a %s',
"boolean": '%s is not a %s',
integer: '%s is not an %s',
"float": '%s is not a %s',
regexp: '%s is not a valid %s',
email: '%s is not a valid %s',
url: '%s is not a valid %s',
hex: '%s is not a valid %s'
},
string: {
len: '%s must be exactly %s characters',
min: '%s must be at least %s characters',
max: '%s cannot be longer than %s characters',
range: '%s must be between %s and %s characters'
},
number: {
len: '%s must equal %s',
min: '%s cannot be less than %s',
max: '%s cannot be greater than %s',
range: '%s must be between %s and %s'
},
array: {
len: '%s must be exactly %s in length',
min: '%s cannot be less than %s in length',
max: '%s cannot be greater than %s in length',
range: '%s must be between %s and %s in length'
},
pattern: {
mismatch: '%s value %s does not match pattern %s'
},
clone: function clone() {
var cloned = JSON.parse(JSON.stringify(this));
cloned.clone = this.clone;
return cloned;
}
};
}
var messages = newMessages();
/**
* Encapsulates a validation schema.
*
* @param descriptor An object declaring validation rules
* for this schema.
*/
function Schema(descriptor) {
this.rules = null;
this._messages = messages;
this.define(descriptor);
}
Schema.prototype = {
messages: function messages(_messages) {
if (_messages) {
this._messages = deepMerge(newMessages(), _messages);
}
return this._messages;
},
define: function define(rules) {
if (!rules) {
throw new Error('Cannot configure a schema with no rules');
}
if (typeof rules !== 'object' || Array.isArray(rules)) {
throw new Error('Rules must be an object');
}
this.rules = {};
var z;
var item;
for (z in rules) {
if (rules.hasOwnProperty(z)) {
item = rules[z];
this.rules[z] = Array.isArray(item) ? item : [item];
}
}
},
validate: function validate(source_, o, oc) {
var _this = this;
if (o === void 0) {
o = {};
}
if (oc === void 0) {
oc = function oc() {};
}
var source = source_;
var options = o;
var callback = oc;
if (typeof options === 'function') {
callback = options;
options = {};
}
if (!this.rules || Object.keys(this.rules).length === 0) {
if (callback) {
callback();
}
return Promise.resolve();
}
function complete(results) {
var i;
var errors = [];
var fields = {};
function add(e) {
if (Array.isArray(e)) {
var _errors;
errors = (_errors = errors).concat.apply(_errors, e);
} else {
errors.push(e);
}
}
for (i = 0; i < results.length; i++) {
add(results[i]);
}
if (!errors.length) {
errors = null;
fields = null;
} else {
fields = convertFieldsError(errors);
}
callback(errors, fields);
}
if (options.messages) {
var messages$1 = this.messages();
if (messages$1 === messages) {
messages$1 = newMessages();
}
deepMerge(messages$1, options.messages);
options.messages = messages$1;
} else {
options.messages = this.messages();
}
var arr;
var value;
var series = {};
var keys = options.keys || Object.keys(this.rules);
keys.forEach(function (z) {
arr = _this.rules[z];
value = source[z];
arr.forEach(function (r) {
var rule = r;
if (typeof rule.transform === 'function') {
if (source === source_) {
source = _extends({}, source);
}
value = source[z] = rule.transform(value);
}
if (typeof rule === 'function') {
rule = {
validator: rule
};
} else {
rule = _extends({}, rule);
}
rule.validator = _this.getValidationMethod(rule);
rule.field = z;
rule.fullField = rule.fullField || z;
rule.type = _this.getType(rule);
if (!rule.validator) {
return;
}
series[z] = series[z] || [];
series[z].push({
rule: rule,
value: value,
source: source,
field: z
});
});
});
var errorFields = {};
return asyncMap(series, options, function (data, doIt) {
var rule = data.rule;
var deep = (rule.type === 'object' || rule.type === 'array') && (typeof rule.fields === 'object' || typeof rule.defaultField === 'object');
deep = deep && (rule.required || !rule.required && data.value);
rule.field = data.field;
function addFullfield(key, schema) {
return _extends({}, schema, {
fullField: rule.fullField + "." + key
});
}
function cb(e) {
if (e === void 0) {
e = [];
}
var errors = e;
if (!Array.isArray(errors)) {
errors = [errors];
}
if (!options.suppressWarning && errors.length) {
Schema.warning('async-validator:', errors);
}
if (errors.length && rule.message !== undefined) {
errors = [].concat(rule.message);
}
errors = errors.map(complementError(rule));
if (options.first && errors.length) {
errorFields[rule.field] = 1;
return doIt(errors);
}
if (!deep) {
doIt(errors);
} else {
// if rule is required but the target object
// does not exist fail at the rule level and don't
// go deeper
if (rule.required && !data.value) {
if (rule.message !== undefined) {
errors = [].concat(rule.message).map(complementError(rule));
} else if (options.error) {
errors = [options.error(rule, format(options.messages.required, rule.field))];
}
return doIt(errors);
}
var fieldsSchema = {};
if (rule.defaultField) {
for (var k in data.value) {
if (data.value.hasOwnProperty(k)) {
fieldsSchema[k] = rule.defaultField;
}
}
}
fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);
for (var f in fieldsSchema) {
if (fieldsSchema.hasOwnProperty(f)) {
var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];
fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));
}
}
var schema = new Schema(fieldsSchema);
schema.messages(options.messages);
if (data.rule.options) {
data.rule.options.messages = options.messages;
data.rule.options.error = options.error;
}
schema.validate(data.value, data.rule.options || options, function (errs) {
var finalErrors = [];
if (errors && errors.length) {
finalErrors.push.apply(finalErrors, errors);
}
if (errs && errs.length) {
finalErrors.push.apply(finalErrors, errs);
}
doIt(finalErrors.length ? finalErrors : null);
});
}
}
var res;
if (rule.asyncValidator) {
res = rule.asyncValidator(rule, data.value, cb, data.source, options);
} else if (rule.validator) {
res = rule.validator(rule, data.value, cb, data.source, options);
if (res === true) {
cb();
} else if (res === false) {
cb(rule.message || rule.field + " fails");
} else if (res instanceof Array) {
cb(res);
} else if (res instanceof Error) {
cb(res.message);
}
}
if (res && res.then) {
res.then(function () {
return cb();
}, function (e) {
return cb(e);
});
}
}, function (results) {
complete(results);
});
},
getType: function getType(rule) {
if (rule.type === undefined && rule.pattern instanceof RegExp) {
rule.type = 'pattern';
}
if (typeof rule.validator !== 'function' && rule.type && !validators.hasOwnProperty(rule.type)) {
throw new Error(format('Unknown rule type %s', rule.type));
}
return rule.type || 'string';
},
getValidationMethod: function getValidationMethod(rule) {
if (typeof rule.validator === 'function') {
return rule.validator;
}
var keys = Object.keys(rule);
var messageIndex = keys.indexOf('message');
if (messageIndex !== -1) {
keys.splice(messageIndex, 1);
}
if (keys.length === 1 && keys[0] === 'required') {
return validators.required;
}
return validators[this.getType(rule)] || false;
}
};
Schema.register = function register(type, validator) {
if (typeof validator !== 'function') {
throw new Error('Cannot register a validator by type, validator is not a function');
}
validators[type] = validator;
};
Schema.warning = warning;
Schema.messages = messages;
Schema.validators = validators;
/* harmony default export */ __webpack_exports__["a"] = (Schema);
//# sourceMappingURL=index.js.map
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ "Q2Ig")))
/***/ }),
/***/ "Kqna":
/*!************************************!*\
!*** ./node_modules/gopd/index.js ***!
\************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "AM7I");
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
if ($gOPD) {
try {
$gOPD([], 'length');
} catch (e) {
// IE 8 has a broken gOPD
$gOPD = null;
}
}
module.exports = $gOPD;
/***/ }),
/***/ "KrxN":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.degrees.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var RAD_PER_DEG = 180 / Math.PI;
// `Math.degrees` method
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true }, {
degrees: function degrees(radians) {
return radians * RAD_PER_DEG;
}
});
/***/ }),
/***/ "KtWR":
/*!************************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/InfoCircleOutlined.js ***!
\************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _InfoCircleOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/InfoCircleOutlined */ "EAZv"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InfoCircleOutlined = function InfoCircleOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _InfoCircleOutlined.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(InfoCircleOutlined);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "KvGi":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.sign.js ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var sign = __webpack_require__(/*! ../internals/math-sign */ "90hW");
// `Math.sign` method
// https://tc39.github.io/ecma262/#sec-math.sign
$({ target: 'Math', stat: true }, {
sign: sign
});
/***/ }),
/***/ "Kwbf":
/*!********************************************!*\
!*** ./node_modules/rc-util/es/warning.js ***!
\********************************************/
/*! exports provided: preMessage, warning, note, resetWarned, call, warningOnce, noteOnce, default */
/*! exports used: default, noteOnce */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export preMessage */
/* unused harmony export warning */
/* unused harmony export note */
/* unused harmony export resetWarned */
/* unused harmony export call */
/* unused harmony export warningOnce */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return noteOnce; });
/* eslint-disable no-console */
var warned = {};
var preWarningFns = [];
/**
* Pre warning enable you to parse content before console.error.
* Modify to null will prevent warning.
*/
var preMessage = function preMessage(fn) {
preWarningFns.push(fn);
};
/**
* Warning if condition not match.
* @param valid Condition
* @param message Warning message
* @example
* ```js
* warning(false, 'some error'); // print some error
* warning(true, 'some error'); // print nothing
* warning(1 === 2, 'some error'); // print some error
* ```
*/
function warning(valid, message) {
if (false) { var finalMessage; }
}
/** @see Similar to {@link warning} */
function note(valid, message) {
if (false) { var finalMessage; }
}
function resetWarned() {
warned = {};
}
function call(method, valid, message) {
if (!valid && !warned[message]) {
method(false, message);
warned[message] = true;
}
}
/** @see Same as {@link warning}, but only warn once for the same message */
function warningOnce(valid, message) {
call(warning, valid, message);
}
/** @see Same as {@link warning}, but only warn once for the same message */
function noteOnce(valid, message) {
call(note, valid, message);
}
warningOnce.preMessage = preMessage;
warningOnce.resetWarned = resetWarned;
warningOnce.noteOnce = noteOnce;
/* harmony default export */ __webpack_exports__["a"] = (warningOnce);
/***/ }),
/***/ "KxBF":
/*!*******************************************!*\
!*** ./node_modules/lodash/_baseSlice.js ***!
\*******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/**
* The base implementation of `_.slice` without an iteratee call guard.
*
* @private
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function baseSlice(array, start, end) {
var index = -1,
length = array.length;
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : ((end - start) >>> 0);
start >>>= 0;
var result = Array(length);
while (++index < length) {
result[index] = array[index + start];
}
return result;
}
module.exports = baseSlice;
/***/ }),
/***/ "Kxld":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/es.object.is.js ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var is = __webpack_require__(/*! ../internals/same-value */ "Ep9I");
// `Object.is` method
// https://tc39.github.io/ecma262/#sec-object.is
$({ target: 'Object', stat: true }, {
is: is
});
/***/ }),
/***/ "Kz25":
/*!*************************************************!*\
!*** ./node_modules/core-js/modules/web.url.js ***!
\*************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
__webpack_require__(/*! ../modules/es.string.iterator */ "PKPk");
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var USE_NATIVE_URL = __webpack_require__(/*! ../internals/native-url */ "DTth");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "N+g0");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var assign = __webpack_require__(/*! ../internals/object-assign */ "YNrV");
var arrayFrom = __webpack_require__(/*! ../internals/array-from */ "TfTi");
var codeAt = __webpack_require__(/*! ../internals/string-multibyte */ "ZUd8").codeAt;
var toASCII = __webpack_require__(/*! ../internals/string-punycode-to-ascii */ "X7LM");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
var URLSearchParamsModule = __webpack_require__(/*! ../modules/web.url-search-params */ "mGGf");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var NativeURL = global.URL;
var URLSearchParams = URLSearchParamsModule.URLSearchParams;
var getInternalSearchParamsState = URLSearchParamsModule.getState;
var setInternalState = InternalStateModule.set;
var getInternalURLState = InternalStateModule.getterFor('URL');
var floor = Math.floor;
var pow = Math.pow;
var INVALID_AUTHORITY = 'Invalid authority';
var INVALID_SCHEME = 'Invalid scheme';
var INVALID_HOST = 'Invalid host';
var INVALID_PORT = 'Invalid port';
var ALPHA = /[A-Za-z]/;
var ALPHANUMERIC = /[\d+-.A-Za-z]/;
var DIGIT = /\d/;
var HEX_START = /^(0x|0X)/;
var OCT = /^[0-7]+$/;
var DEC = /^\d+$/;
var HEX = /^[\dA-Fa-f]+$/;
// eslint-disable-next-line no-control-regex
var FORBIDDEN_HOST_CODE_POINT = /[\u0000\u0009\u000A\u000D #%/:?@[\\]]/;
// eslint-disable-next-line no-control-regex
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT = /[\u0000\u0009\u000A\u000D #/:?@[\\]]/;
// eslint-disable-next-line no-control-regex
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE = /^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;
// eslint-disable-next-line no-control-regex
var TAB_AND_NEW_LINE = /[\u0009\u000A\u000D]/g;
var EOF;
var parseHost = function (url, input) {
var result, codePoints, index;
if (input.charAt(0) == '[') {
if (input.charAt(input.length - 1) != ']') return INVALID_HOST;
result = parseIPv6(input.slice(1, -1));
if (!result) return INVALID_HOST;
url.host = result;
// opaque host
} else if (!isSpecial(url)) {
if (FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT.test(input)) return INVALID_HOST;
result = '';
codePoints = arrayFrom(input);
for (index = 0; index < codePoints.length; index++) {
result += percentEncode(codePoints[index], C0ControlPercentEncodeSet);
}
url.host = result;
} else {
input = toASCII(input);
if (FORBIDDEN_HOST_CODE_POINT.test(input)) return INVALID_HOST;
result = parseIPv4(input);
if (result === null) return INVALID_HOST;
url.host = result;
}
};
var parseIPv4 = function (input) {
var parts = input.split('.');
var partsLength, numbers, index, part, radix, number, ipv4;
if (parts.length && parts[parts.length - 1] == '') {
parts.pop();
}
partsLength = parts.length;
if (partsLength > 4) return input;
numbers = [];
for (index = 0; index < partsLength; index++) {
part = parts[index];
if (part == '') return input;
radix = 10;
if (part.length > 1 && part.charAt(0) == '0') {
radix = HEX_START.test(part) ? 16 : 8;
part = part.slice(radix == 8 ? 1 : 2);
}
if (part === '') {
number = 0;
} else {
if (!(radix == 10 ? DEC : radix == 8 ? OCT : HEX).test(part)) return input;
number = parseInt(part, radix);
}
numbers.push(number);
}
for (index = 0; index < partsLength; index++) {
number = numbers[index];
if (index == partsLength - 1) {
if (number >= pow(256, 5 - partsLength)) return null;
} else if (number > 255) return null;
}
ipv4 = numbers.pop();
for (index = 0; index < numbers.length; index++) {
ipv4 += numbers[index] * pow(256, 3 - index);
}
return ipv4;
};
// eslint-disable-next-line max-statements
var parseIPv6 = function (input) {
var address = [0, 0, 0, 0, 0, 0, 0, 0];
var pieceIndex = 0;
var compress = null;
var pointer = 0;
var value, length, numbersSeen, ipv4Piece, number, swaps, swap;
var char = function () {
return input.charAt(pointer);
};
if (char() == ':') {
if (input.charAt(1) != ':') return;
pointer += 2;
pieceIndex++;
compress = pieceIndex;
}
while (char()) {
if (pieceIndex == 8) return;
if (char() == ':') {
if (compress !== null) return;
pointer++;
pieceIndex++;
compress = pieceIndex;
continue;
}
value = length = 0;
while (length < 4 && HEX.test(char())) {
value = value * 16 + parseInt(char(), 16);
pointer++;
length++;
}
if (char() == '.') {
if (length == 0) return;
pointer -= length;
if (pieceIndex > 6) return;
numbersSeen = 0;
while (char()) {
ipv4Piece = null;
if (numbersSeen > 0) {
if (char() == '.' && numbersSeen < 4) pointer++;
else return;
}
if (!DIGIT.test(char())) return;
while (DIGIT.test(char())) {
number = parseInt(char(), 10);
if (ipv4Piece === null) ipv4Piece = number;
else if (ipv4Piece == 0) return;
else ipv4Piece = ipv4Piece * 10 + number;
if (ipv4Piece > 255) return;
pointer++;
}
address[pieceIndex] = address[pieceIndex] * 256 + ipv4Piece;
numbersSeen++;
if (numbersSeen == 2 || numbersSeen == 4) pieceIndex++;
}
if (numbersSeen != 4) return;
break;
} else if (char() == ':') {
pointer++;
if (!char()) return;
} else if (char()) return;
address[pieceIndex++] = value;
}
if (compress !== null) {
swaps = pieceIndex - compress;
pieceIndex = 7;
while (pieceIndex != 0 && swaps > 0) {
swap = address[pieceIndex];
address[pieceIndex--] = address[compress + swaps - 1];
address[compress + --swaps] = swap;
}
} else if (pieceIndex != 8) return;
return address;
};
var findLongestZeroSequence = function (ipv6) {
var maxIndex = null;
var maxLength = 1;
var currStart = null;
var currLength = 0;
var index = 0;
for (; index < 8; index++) {
if (ipv6[index] !== 0) {
if (currLength > maxLength) {
maxIndex = currStart;
maxLength = currLength;
}
currStart = null;
currLength = 0;
} else {
if (currStart === null) currStart = index;
++currLength;
}
}
if (currLength > maxLength) {
maxIndex = currStart;
maxLength = currLength;
}
return maxIndex;
};
var serializeHost = function (host) {
var result, index, compress, ignore0;
// ipv4
if (typeof host == 'number') {
result = [];
for (index = 0; index < 4; index++) {
result.unshift(host % 256);
host = floor(host / 256);
} return result.join('.');
// ipv6
} else if (typeof host == 'object') {
result = '';
compress = findLongestZeroSequence(host);
for (index = 0; index < 8; index++) {
if (ignore0 && host[index] === 0) continue;
if (ignore0) ignore0 = false;
if (compress === index) {
result += index ? ':' : '::';
ignore0 = true;
} else {
result += host[index].toString(16);
if (index < 7) result += ':';
}
}
return '[' + result + ']';
} return host;
};
var C0ControlPercentEncodeSet = {};
var fragmentPercentEncodeSet = assign({}, C0ControlPercentEncodeSet, {
' ': 1, '"': 1, '<': 1, '>': 1, '`': 1
});
var pathPercentEncodeSet = assign({}, fragmentPercentEncodeSet, {
'#': 1, '?': 1, '{': 1, '}': 1
});
var userinfoPercentEncodeSet = assign({}, pathPercentEncodeSet, {
'/': 1, ':': 1, ';': 1, '=': 1, '@': 1, '[': 1, '\\': 1, ']': 1, '^': 1, '|': 1
});
var percentEncode = function (char, set) {
var code = codeAt(char, 0);
return code > 0x20 && code < 0x7F && !has(set, char) ? char : encodeURIComponent(char);
};
var specialSchemes = {
ftp: 21,
file: null,
http: 80,
https: 443,
ws: 80,
wss: 443
};
var isSpecial = function (url) {
return has(specialSchemes, url.scheme);
};
var includesCredentials = function (url) {
return url.username != '' || url.password != '';
};
var cannotHaveUsernamePasswordPort = function (url) {
return !url.host || url.cannotBeABaseURL || url.scheme == 'file';
};
var isWindowsDriveLetter = function (string, normalized) {
var second;
return string.length == 2 && ALPHA.test(string.charAt(0))
&& ((second = string.charAt(1)) == ':' || (!normalized && second == '|'));
};
var startsWithWindowsDriveLetter = function (string) {
var third;
return string.length > 1 && isWindowsDriveLetter(string.slice(0, 2)) && (
string.length == 2 ||
((third = string.charAt(2)) === '/' || third === '\\' || third === '?' || third === '#')
);
};
var shortenURLsPath = function (url) {
var path = url.path;
var pathSize = path.length;
if (pathSize && (url.scheme != 'file' || pathSize != 1 || !isWindowsDriveLetter(path[0], true))) {
path.pop();
}
};
var isSingleDot = function (segment) {
return segment === '.' || segment.toLowerCase() === '%2e';
};
var isDoubleDot = function (segment) {
segment = segment.toLowerCase();
return segment === '..' || segment === '%2e.' || segment === '.%2e' || segment === '%2e%2e';
};
// States:
var SCHEME_START = {};
var SCHEME = {};
var NO_SCHEME = {};
var SPECIAL_RELATIVE_OR_AUTHORITY = {};
var PATH_OR_AUTHORITY = {};
var RELATIVE = {};
var RELATIVE_SLASH = {};
var SPECIAL_AUTHORITY_SLASHES = {};
var SPECIAL_AUTHORITY_IGNORE_SLASHES = {};
var AUTHORITY = {};
var HOST = {};
var HOSTNAME = {};
var PORT = {};
var FILE = {};
var FILE_SLASH = {};
var FILE_HOST = {};
var PATH_START = {};
var PATH = {};
var CANNOT_BE_A_BASE_URL_PATH = {};
var QUERY = {};
var FRAGMENT = {};
// eslint-disable-next-line max-statements
var parseURL = function (url, input, stateOverride, base) {
var state = stateOverride || SCHEME_START;
var pointer = 0;
var buffer = '';
var seenAt = false;
var seenBracket = false;
var seenPasswordToken = false;
var codePoints, char, bufferCodePoints, failure;
if (!stateOverride) {
url.scheme = '';
url.username = '';
url.password = '';
url.host = null;
url.port = null;
url.path = [];
url.query = null;
url.fragment = null;
url.cannotBeABaseURL = false;
input = input.replace(LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE, '');
}
input = input.replace(TAB_AND_NEW_LINE, '');
codePoints = arrayFrom(input);
while (pointer <= codePoints.length) {
char = codePoints[pointer];
switch (state) {
case SCHEME_START:
if (char && ALPHA.test(char)) {
buffer += char.toLowerCase();
state = SCHEME;
} else if (!stateOverride) {
state = NO_SCHEME;
continue;
} else return INVALID_SCHEME;
break;
case SCHEME:
if (char && (ALPHANUMERIC.test(char) || char == '+' || char == '-' || char == '.')) {
buffer += char.toLowerCase();
} else if (char == ':') {
if (stateOverride && (
(isSpecial(url) != has(specialSchemes, buffer)) ||
(buffer == 'file' && (includesCredentials(url) || url.port !== null)) ||
(url.scheme == 'file' && !url.host)
)) return;
url.scheme = buffer;
if (stateOverride) {
if (isSpecial(url) && specialSchemes[url.scheme] == url.port) url.port = null;
return;
}
buffer = '';
if (url.scheme == 'file') {
state = FILE;
} else if (isSpecial(url) && base && base.scheme == url.scheme) {
state = SPECIAL_RELATIVE_OR_AUTHORITY;
} else if (isSpecial(url)) {
state = SPECIAL_AUTHORITY_SLASHES;
} else if (codePoints[pointer + 1] == '/') {
state = PATH_OR_AUTHORITY;
pointer++;
} else {
url.cannotBeABaseURL = true;
url.path.push('');
state = CANNOT_BE_A_BASE_URL_PATH;
}
} else if (!stateOverride) {
buffer = '';
state = NO_SCHEME;
pointer = 0;
continue;
} else return INVALID_SCHEME;
break;
case NO_SCHEME:
if (!base || (base.cannotBeABaseURL && char != '#')) return INVALID_SCHEME;
if (base.cannotBeABaseURL && char == '#') {
url.scheme = base.scheme;
url.path = base.path.slice();
url.query = base.query;
url.fragment = '';
url.cannotBeABaseURL = true;
state = FRAGMENT;
break;
}
state = base.scheme == 'file' ? FILE : RELATIVE;
continue;
case SPECIAL_RELATIVE_OR_AUTHORITY:
if (char == '/' && codePoints[pointer + 1] == '/') {
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
pointer++;
} else {
state = RELATIVE;
continue;
} break;
case PATH_OR_AUTHORITY:
if (char == '/') {
state = AUTHORITY;
break;
} else {
state = PATH;
continue;
}
case RELATIVE:
url.scheme = base.scheme;
if (char == EOF) {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
url.path = base.path.slice();
url.query = base.query;
} else if (char == '/' || (char == '\\' && isSpecial(url))) {
state = RELATIVE_SLASH;
} else if (char == '?') {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
url.path = base.path.slice();
url.query = '';
state = QUERY;
} else if (char == '#') {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
url.path = base.path.slice();
url.query = base.query;
url.fragment = '';
state = FRAGMENT;
} else {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
url.path = base.path.slice();
url.path.pop();
state = PATH;
continue;
} break;
case RELATIVE_SLASH:
if (isSpecial(url) && (char == '/' || char == '\\')) {
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
} else if (char == '/') {
state = AUTHORITY;
} else {
url.username = base.username;
url.password = base.password;
url.host = base.host;
url.port = base.port;
state = PATH;
continue;
} break;
case SPECIAL_AUTHORITY_SLASHES:
state = SPECIAL_AUTHORITY_IGNORE_SLASHES;
if (char != '/' || buffer.charAt(pointer + 1) != '/') continue;
pointer++;
break;
case SPECIAL_AUTHORITY_IGNORE_SLASHES:
if (char != '/' && char != '\\') {
state = AUTHORITY;
continue;
} break;
case AUTHORITY:
if (char == '@') {
if (seenAt) buffer = '%40' + buffer;
seenAt = true;
bufferCodePoints = arrayFrom(buffer);
for (var i = 0; i < bufferCodePoints.length; i++) {
var codePoint = bufferCodePoints[i];
if (codePoint == ':' && !seenPasswordToken) {
seenPasswordToken = true;
continue;
}
var encodedCodePoints = percentEncode(codePoint, userinfoPercentEncodeSet);
if (seenPasswordToken) url.password += encodedCodePoints;
else url.username += encodedCodePoints;
}
buffer = '';
} else if (
char == EOF || char == '/' || char == '?' || char == '#' ||
(char == '\\' && isSpecial(url))
) {
if (seenAt && buffer == '') return INVALID_AUTHORITY;
pointer -= arrayFrom(buffer).length + 1;
buffer = '';
state = HOST;
} else buffer += char;
break;
case HOST:
case HOSTNAME:
if (stateOverride && url.scheme == 'file') {
state = FILE_HOST;
continue;
} else if (char == ':' && !seenBracket) {
if (buffer == '') return INVALID_HOST;
failure = parseHost(url, buffer);
if (failure) return failure;
buffer = '';
state = PORT;
if (stateOverride == HOSTNAME) return;
} else if (
char == EOF || char == '/' || char == '?' || char == '#' ||
(char == '\\' && isSpecial(url))
) {
if (isSpecial(url) && buffer == '') return INVALID_HOST;
if (stateOverride && buffer == '' && (includesCredentials(url) || url.port !== null)) return;
failure = parseHost(url, buffer);
if (failure) return failure;
buffer = '';
state = PATH_START;
if (stateOverride) return;
continue;
} else {
if (char == '[') seenBracket = true;
else if (char == ']') seenBracket = false;
buffer += char;
} break;
case PORT:
if (DIGIT.test(char)) {
buffer += char;
} else if (
char == EOF || char == '/' || char == '?' || char == '#' ||
(char == '\\' && isSpecial(url)) ||
stateOverride
) {
if (buffer != '') {
var port = parseInt(buffer, 10);
if (port > 0xFFFF) return INVALID_PORT;
url.port = (isSpecial(url) && port === specialSchemes[url.scheme]) ? null : port;
buffer = '';
}
if (stateOverride) return;
state = PATH_START;
continue;
} else return INVALID_PORT;
break;
case FILE:
url.scheme = 'file';
if (char == '/' || char == '\\') state = FILE_SLASH;
else if (base && base.scheme == 'file') {
if (char == EOF) {
url.host = base.host;
url.path = base.path.slice();
url.query = base.query;
} else if (char == '?') {
url.host = base.host;
url.path = base.path.slice();
url.query = '';
state = QUERY;
} else if (char == '#') {
url.host = base.host;
url.path = base.path.slice();
url.query = base.query;
url.fragment = '';
state = FRAGMENT;
} else {
if (!startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
url.host = base.host;
url.path = base.path.slice();
shortenURLsPath(url);
}
state = PATH;
continue;
}
} else {
state = PATH;
continue;
} break;
case FILE_SLASH:
if (char == '/' || char == '\\') {
state = FILE_HOST;
break;
}
if (base && base.scheme == 'file' && !startsWithWindowsDriveLetter(codePoints.slice(pointer).join(''))) {
if (isWindowsDriveLetter(base.path[0], true)) url.path.push(base.path[0]);
else url.host = base.host;
}
state = PATH;
continue;
case FILE_HOST:
if (char == EOF || char == '/' || char == '\\' || char == '?' || char == '#') {
if (!stateOverride && isWindowsDriveLetter(buffer)) {
state = PATH;
} else if (buffer == '') {
url.host = '';
if (stateOverride) return;
state = PATH_START;
} else {
failure = parseHost(url, buffer);
if (failure) return failure;
if (url.host == 'localhost') url.host = '';
if (stateOverride) return;
buffer = '';
state = PATH_START;
} continue;
} else buffer += char;
break;
case PATH_START:
if (isSpecial(url)) {
state = PATH;
if (char != '/' && char != '\\') continue;
} else if (!stateOverride && char == '?') {
url.query = '';
state = QUERY;
} else if (!stateOverride && char == '#') {
url.fragment = '';
state = FRAGMENT;
} else if (char != EOF) {
state = PATH;
if (char != '/') continue;
} break;
case PATH:
if (
char == EOF || char == '/' ||
(char == '\\' && isSpecial(url)) ||
(!stateOverride && (char == '?' || char == '#'))
) {
if (isDoubleDot(buffer)) {
shortenURLsPath(url);
if (char != '/' && !(char == '\\' && isSpecial(url))) {
url.path.push('');
}
} else if (isSingleDot(buffer)) {
if (char != '/' && !(char == '\\' && isSpecial(url))) {
url.path.push('');
}
} else {
if (url.scheme == 'file' && !url.path.length && isWindowsDriveLetter(buffer)) {
if (url.host) url.host = '';
buffer = buffer.charAt(0) + ':'; // normalize windows drive letter
}
url.path.push(buffer);
}
buffer = '';
if (url.scheme == 'file' && (char == EOF || char == '?' || char == '#')) {
while (url.path.length > 1 && url.path[0] === '') {
url.path.shift();
}
}
if (char == '?') {
url.query = '';
state = QUERY;
} else if (char == '#') {
url.fragment = '';
state = FRAGMENT;
}
} else {
buffer += percentEncode(char, pathPercentEncodeSet);
} break;
case CANNOT_BE_A_BASE_URL_PATH:
if (char == '?') {
url.query = '';
state = QUERY;
} else if (char == '#') {
url.fragment = '';
state = FRAGMENT;
} else if (char != EOF) {
url.path[0] += percentEncode(char, C0ControlPercentEncodeSet);
} break;
case QUERY:
if (!stateOverride && char == '#') {
url.fragment = '';
state = FRAGMENT;
} else if (char != EOF) {
if (char == "'" && isSpecial(url)) url.query += '%27';
else if (char == '#') url.query += '%23';
else url.query += percentEncode(char, C0ControlPercentEncodeSet);
} break;
case FRAGMENT:
if (char != EOF) url.fragment += percentEncode(char, fragmentPercentEncodeSet);
break;
}
pointer++;
}
};
// `URL` constructor
// https://url.spec.whatwg.org/#url-class
var URLConstructor = function URL(url /* , base */) {
var that = anInstance(this, URLConstructor, 'URL');
var base = arguments.length > 1 ? arguments[1] : undefined;
var urlString = String(url);
var state = setInternalState(that, { type: 'URL' });
var baseState, failure;
if (base !== undefined) {
if (base instanceof URLConstructor) baseState = getInternalURLState(base);
else {
failure = parseURL(baseState = {}, String(base));
if (failure) throw TypeError(failure);
}
}
failure = parseURL(state, urlString, null, baseState);
if (failure) throw TypeError(failure);
var searchParams = state.searchParams = new URLSearchParams();
var searchParamsState = getInternalSearchParamsState(searchParams);
searchParamsState.updateSearchParams(state.query);
searchParamsState.updateURL = function () {
state.query = String(searchParams) || null;
};
if (!DESCRIPTORS) {
that.href = serializeURL.call(that);
that.origin = getOrigin.call(that);
that.protocol = getProtocol.call(that);
that.username = getUsername.call(that);
that.password = getPassword.call(that);
that.host = getHost.call(that);
that.hostname = getHostname.call(that);
that.port = getPort.call(that);
that.pathname = getPathname.call(that);
that.search = getSearch.call(that);
that.searchParams = getSearchParams.call(that);
that.hash = getHash.call(that);
}
};
var URLPrototype = URLConstructor.prototype;
var serializeURL = function () {
var url = getInternalURLState(this);
var scheme = url.scheme;
var username = url.username;
var password = url.password;
var host = url.host;
var port = url.port;
var path = url.path;
var query = url.query;
var fragment = url.fragment;
var output = scheme + ':';
if (host !== null) {
output += '//';
if (includesCredentials(url)) {
output += username + (password ? ':' + password : '') + '@';
}
output += serializeHost(host);
if (port !== null) output += ':' + port;
} else if (scheme == 'file') output += '//';
output += url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
if (query !== null) output += '?' + query;
if (fragment !== null) output += '#' + fragment;
return output;
};
var getOrigin = function () {
var url = getInternalURLState(this);
var scheme = url.scheme;
var port = url.port;
if (scheme == 'blob') try {
return new URL(scheme.path[0]).origin;
} catch (error) {
return 'null';
}
if (scheme == 'file' || !isSpecial(url)) return 'null';
return scheme + '://' + serializeHost(url.host) + (port !== null ? ':' + port : '');
};
var getProtocol = function () {
return getInternalURLState(this).scheme + ':';
};
var getUsername = function () {
return getInternalURLState(this).username;
};
var getPassword = function () {
return getInternalURLState(this).password;
};
var getHost = function () {
var url = getInternalURLState(this);
var host = url.host;
var port = url.port;
return host === null ? ''
: port === null ? serializeHost(host)
: serializeHost(host) + ':' + port;
};
var getHostname = function () {
var host = getInternalURLState(this).host;
return host === null ? '' : serializeHost(host);
};
var getPort = function () {
var port = getInternalURLState(this).port;
return port === null ? '' : String(port);
};
var getPathname = function () {
var url = getInternalURLState(this);
var path = url.path;
return url.cannotBeABaseURL ? path[0] : path.length ? '/' + path.join('/') : '';
};
var getSearch = function () {
var query = getInternalURLState(this).query;
return query ? '?' + query : '';
};
var getSearchParams = function () {
return getInternalURLState(this).searchParams;
};
var getHash = function () {
var fragment = getInternalURLState(this).fragment;
return fragment ? '#' + fragment : '';
};
var accessorDescriptor = function (getter, setter) {
return { get: getter, set: setter, configurable: true, enumerable: true };
};
if (DESCRIPTORS) {
defineProperties(URLPrototype, {
// `URL.prototype.href` accessors pair
// https://url.spec.whatwg.org/#dom-url-href
href: accessorDescriptor(serializeURL, function (href) {
var url = getInternalURLState(this);
var urlString = String(href);
var failure = parseURL(url, urlString);
if (failure) throw TypeError(failure);
getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
}),
// `URL.prototype.origin` getter
// https://url.spec.whatwg.org/#dom-url-origin
origin: accessorDescriptor(getOrigin),
// `URL.prototype.protocol` accessors pair
// https://url.spec.whatwg.org/#dom-url-protocol
protocol: accessorDescriptor(getProtocol, function (protocol) {
var url = getInternalURLState(this);
parseURL(url, String(protocol) + ':', SCHEME_START);
}),
// `URL.prototype.username` accessors pair
// https://url.spec.whatwg.org/#dom-url-username
username: accessorDescriptor(getUsername, function (username) {
var url = getInternalURLState(this);
var codePoints = arrayFrom(String(username));
if (cannotHaveUsernamePasswordPort(url)) return;
url.username = '';
for (var i = 0; i < codePoints.length; i++) {
url.username += percentEncode(codePoints[i], userinfoPercentEncodeSet);
}
}),
// `URL.prototype.password` accessors pair
// https://url.spec.whatwg.org/#dom-url-password
password: accessorDescriptor(getPassword, function (password) {
var url = getInternalURLState(this);
var codePoints = arrayFrom(String(password));
if (cannotHaveUsernamePasswordPort(url)) return;
url.password = '';
for (var i = 0; i < codePoints.length; i++) {
url.password += percentEncode(codePoints[i], userinfoPercentEncodeSet);
}
}),
// `URL.prototype.host` accessors pair
// https://url.spec.whatwg.org/#dom-url-host
host: accessorDescriptor(getHost, function (host) {
var url = getInternalURLState(this);
if (url.cannotBeABaseURL) return;
parseURL(url, String(host), HOST);
}),
// `URL.prototype.hostname` accessors pair
// https://url.spec.whatwg.org/#dom-url-hostname
hostname: accessorDescriptor(getHostname, function (hostname) {
var url = getInternalURLState(this);
if (url.cannotBeABaseURL) return;
parseURL(url, String(hostname), HOSTNAME);
}),
// `URL.prototype.port` accessors pair
// https://url.spec.whatwg.org/#dom-url-port
port: accessorDescriptor(getPort, function (port) {
var url = getInternalURLState(this);
if (cannotHaveUsernamePasswordPort(url)) return;
port = String(port);
if (port == '') url.port = null;
else parseURL(url, port, PORT);
}),
// `URL.prototype.pathname` accessors pair
// https://url.spec.whatwg.org/#dom-url-pathname
pathname: accessorDescriptor(getPathname, function (pathname) {
var url = getInternalURLState(this);
if (url.cannotBeABaseURL) return;
url.path = [];
parseURL(url, pathname + '', PATH_START);
}),
// `URL.prototype.search` accessors pair
// https://url.spec.whatwg.org/#dom-url-search
search: accessorDescriptor(getSearch, function (search) {
var url = getInternalURLState(this);
search = String(search);
if (search == '') {
url.query = null;
} else {
if ('?' == search.charAt(0)) search = search.slice(1);
url.query = '';
parseURL(url, search, QUERY);
}
getInternalSearchParamsState(url.searchParams).updateSearchParams(url.query);
}),
// `URL.prototype.searchParams` getter
// https://url.spec.whatwg.org/#dom-url-searchparams
searchParams: accessorDescriptor(getSearchParams),
// `URL.prototype.hash` accessors pair
// https://url.spec.whatwg.org/#dom-url-hash
hash: accessorDescriptor(getHash, function (hash) {
var url = getInternalURLState(this);
hash = String(hash);
if (hash == '') {
url.fragment = null;
return;
}
if ('#' == hash.charAt(0)) hash = hash.slice(1);
url.fragment = '';
parseURL(url, hash, FRAGMENT);
})
});
}
// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
redefine(URLPrototype, 'toJSON', function toJSON() {
return serializeURL.call(this);
}, { enumerable: true });
// `URL.prototype.toString` method
// https://url.spec.whatwg.org/#URL-stringification-behavior
redefine(URLPrototype, 'toString', function toString() {
return serializeURL.call(this);
}, { enumerable: true });
if (NativeURL) {
var nativeCreateObjectURL = NativeURL.createObjectURL;
var nativeRevokeObjectURL = NativeURL.revokeObjectURL;
// `URL.createObjectURL` method
// https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL
// eslint-disable-next-line no-unused-vars
if (nativeCreateObjectURL) redefine(URLConstructor, 'createObjectURL', function createObjectURL(blob) {
return nativeCreateObjectURL.apply(NativeURL, arguments);
});
// `URL.revokeObjectURL` method
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
// eslint-disable-next-line no-unused-vars
if (nativeRevokeObjectURL) redefine(URLConstructor, 'revokeObjectURL', function revokeObjectURL(url) {
return nativeRevokeObjectURL.apply(NativeURL, arguments);
});
}
setToStringTag(URLConstructor, 'URL');
$({ global: true, forced: !USE_NATIVE_URL, sham: !DESCRIPTORS }, {
URL: URLConstructor
});
/***/ }),
/***/ "Kz5y":
/*!**************************************!*\
!*** ./node_modules/lodash/_root.js ***!
\**************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ "WFqU");
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
module.exports = root;
/***/ }),
/***/ "L8im":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/@umijs/renderer-react/node_modules/use-subscription/cjs/use-subscription.production.min.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v1.4.1
* use-subscription.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var e=__webpack_require__(/*! object-assign */ "MgzW"),g=__webpack_require__(/*! react */ "q1tI");
exports.useSubscription=function(a){var c=a.getCurrentValue,d=a.subscribe,b=g.useState(function(){return{getCurrentValue:c,subscribe:d,value:c()}});a=b[0];var f=b[1];b=a.value;if(a.getCurrentValue!==c||a.subscribe!==d)b=c(),f({getCurrentValue:c,subscribe:d,value:b});g.useDebugValue(b);g.useEffect(function(){function b(){if(!a){var b=c();f(function(a){return a.getCurrentValue!==c||a.subscribe!==d||a.value===b?a:e({},a,{value:b})})}}var a=!1,h=d(b);b();return function(){a=!0;h()}},[c,d]);return b};
/***/ }),
/***/ "LK+K":
/*!****************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules ***!
\****************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./src/pages/Competitions/Entered/index.tsx */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _createSuper; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
var getPrototypeOf = __webpack_require__("foSv");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
function _isNativeReflectConstruct() {
try {
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
} catch (t) {}
return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {
return !!t;
})();
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
var possibleConstructorReturn = __webpack_require__("md7G");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js
function _createSuper(Derived) {
var hasNativeReflectConstruct = _isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = Object(getPrototypeOf["a" /* default */])(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = Object(getPrototypeOf["a" /* default */])(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return Object(possibleConstructorReturn["a" /* default */])(this, result);
};
}
/***/ }),
/***/ "LKBx":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.starts-with.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "WjRb");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "qxPZ");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var nativeStartsWith = ''.startsWith;
var min = Math.min;
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
// https://github.com/zloirock/core-js/pull/702
var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
return descriptor && !descriptor.writable;
}();
// `String.prototype.startsWith` method
// https://tc39.github.io/ecma262/#sec-string.prototype.startswith
$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
startsWith: function startsWith(searchString /* , position = 0 */) {
var that = String(requireObjectCoercible(this));
notARegExp(searchString);
var index = toLength(min(arguments.length > 1 ? arguments[1] : undefined, that.length));
var search = String(searchString);
return nativeStartsWith
? nativeStartsWith.call(that, search, index)
: that.slice(index, index + search.length) === search;
}
});
/***/ }),
/***/ "LPSS":
/*!************************************************!*\
!*** ./node_modules/core-js/internals/task.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var html = __webpack_require__(/*! ../internals/html */ "G+Rx");
var createElement = __webpack_require__(/*! ../internals/document-create-element */ "zBJ4");
var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "HNyW");
var location = global.location;
var set = global.setImmediate;
var clear = global.clearImmediate;
var process = global.process;
var MessageChannel = global.MessageChannel;
var Dispatch = global.Dispatch;
var counter = 0;
var queue = {};
var ONREADYSTATECHANGE = 'onreadystatechange';
var defer, channel, port;
var run = function (id) {
// eslint-disable-next-line no-prototype-builtins
if (queue.hasOwnProperty(id)) {
var fn = queue[id];
delete queue[id];
fn();
}
};
var runner = function (id) {
return function () {
run(id);
};
};
var listener = function (event) {
run(event.data);
};
var post = function (id) {
// old engines have not location.origin
global.postMessage(id + '', location.protocol + '//' + location.host);
};
// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
if (!set || !clear) {
set = function setImmediate(fn) {
var args = [];
var i = 1;
while (arguments.length > i) args.push(arguments[i++]);
queue[++counter] = function () {
// eslint-disable-next-line no-new-func
(typeof fn == 'function' ? fn : Function(fn)).apply(undefined, args);
};
defer(counter);
return counter;
};
clear = function clearImmediate(id) {
delete queue[id];
};
// Node.js 0.8-
if (classof(process) == 'process') {
defer = function (id) {
process.nextTick(runner(id));
};
// Sphere (JS game engine) Dispatch API
} else if (Dispatch && Dispatch.now) {
defer = function (id) {
Dispatch.now(runner(id));
};
// Browsers with MessageChannel, includes WebWorkers
// except iOS - https://github.com/zloirock/core-js/issues/624
} else if (MessageChannel && !IS_IOS) {
channel = new MessageChannel();
port = channel.port2;
channel.port1.onmessage = listener;
defer = bind(port.postMessage, port, 1);
// Browsers with postMessage, skip WebWorkers
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
} else if (
global.addEventListener &&
typeof postMessage == 'function' &&
!global.importScripts &&
!fails(post) &&
location.protocol !== 'file:'
) {
defer = post;
global.addEventListener('message', listener, false);
// IE8-
} else if (ONREADYSTATECHANGE in createElement('script')) {
defer = function (id) {
html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
html.removeChild(this);
run(id);
};
};
// Rest old browsers
} else {
defer = function (id) {
setTimeout(runner(id), 0);
};
}
}
module.exports = {
set: set,
clear: clear
};
/***/ }),
/***/ "LQ03":
/*!************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/createSuper.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var getPrototypeOf = __webpack_require__(/*! ./getPrototypeOf.js */ "Nsbk");
var isNativeReflectConstruct = __webpack_require__(/*! ./isNativeReflectConstruct.js */ "b48C");
var possibleConstructorReturn = __webpack_require__(/*! ./possibleConstructorReturn.js */ "a1gu");
function _createSuper(Derived) {
var hasNativeReflectConstruct = isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return possibleConstructorReturn(this, result);
};
}
module.exports = _createSuper, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "LQDL":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/engine-v8-version.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "NC/Y");
var process = global.process;
var versions = process && process.versions;
var v8 = versions && versions.v8;
var match, version;
if (v8) {
match = v8.split('.');
version = match[0] + match[1];
} else if (userAgent) {
match = userAgent.match(/Edge\/(\d+)/);
if (!match || match[1] >= 74) {
match = userAgent.match(/Chrome\/(\d+)/);
if (match) version = match[1];
}
}
module.exports = version && +version;
/***/ }),
/***/ "Lj8O":
/*!***********************************************!*\
!*** ./src/pages/metting/api.js + 39 modules ***!
\***********************************************/
/*! exports provided: getBaseInfo, getDocList, getSubAgenda, gethomePageDocList, getMemberList, getPartnerList, getOrganization, getDocDetail, getDirList */
/*! exports used: getBaseInfo, getDirList, getDocDetail, getDocList, getOrganization, getPartnerList, gethomePageDocList */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/metting/info.js because of ./src/pages/metting/organization/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/core/AxiosError.js because of ./node_modules/axios/lib/helpers/toFormData.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/helpers/bind.js because of ./node_modules/axios/lib/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/helpers/null.js because of ./node_modules/axios/lib/helpers/toFormData.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/helpers/toFormData.js (<- Module uses injected variables (Buffer)) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/axios/lib/utils.js (<- Module uses injected variables (global)) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ getBaseInfo; });
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ getDocList; });
__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ gethomePageDocList; });
__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ getPartnerList; });
__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ getOrganization; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ getDocDetail; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ getDirList; });
// UNUSED EXPORTS: getSubAgenda, getMemberList
// NAMESPACE OBJECT: ./node_modules/axios/lib/platform/common/utils.js
var utils_namespaceObject = {};
__webpack_require__.r(utils_namespaceObject);
__webpack_require__.d(utils_namespaceObject, "hasBrowserEnv", function() { return hasBrowserEnv; });
__webpack_require__.d(utils_namespaceObject, "hasStandardBrowserWebWorkerEnv", function() { return hasStandardBrowserWebWorkerEnv; });
__webpack_require__.d(utils_namespaceObject, "hasStandardBrowserEnv", function() { return hasStandardBrowserEnv; });
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js
var style = __webpack_require__("miYZ");
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
var es_message = __webpack_require__("tsqr");
// EXTERNAL MODULE: ./node_modules/axios/lib/utils.js
var utils = __webpack_require__("xTJ+");
// EXTERNAL MODULE: ./node_modules/axios/lib/helpers/bind.js
var bind = __webpack_require__("HSsa");
// EXTERNAL MODULE: ./node_modules/axios/lib/helpers/toFormData.js
var toFormData = __webpack_require__("5GeT");
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/AxiosURLSearchParams.js
/**
* It encodes a string by replacing all characters that are not in the unreserved set with
* their percent-encoded equivalents
*
* @param {string} str - The string to encode.
*
* @returns {string} The encoded string.
*/
function encode(str) {
const charMap = {
'!': '%21',
"'": '%27',
'(': '%28',
')': '%29',
'~': '%7E',
'%20': '+',
'%00': '\x00'
};
return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {
return charMap[match];
});
}
/**
* It takes a params object and converts it to a FormData object
*
* @param {Object<string, any>} params - The parameters to be converted to a FormData object.
* @param {Object<string, any>} options - The options object passed to the Axios constructor.
*
* @returns {void}
*/
function AxiosURLSearchParams(params, options) {
this._pairs = [];
params && Object(toFormData["a" /* default */])(params, this, options);
}
const AxiosURLSearchParams_prototype = AxiosURLSearchParams.prototype;
AxiosURLSearchParams_prototype.append = function append(name, value) {
this._pairs.push([name, value]);
};
AxiosURLSearchParams_prototype.toString = function toString(encoder) {
const _encode = encoder ? function(value) {
return encoder.call(this, value, encode);
} : encode;
return this._pairs.map(function each(pair) {
return _encode(pair[0]) + '=' + _encode(pair[1]);
}, '').join('&');
};
/* harmony default export */ var helpers_AxiosURLSearchParams = (AxiosURLSearchParams);
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/buildURL.js
/**
* It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their
* URI encoded counterparts
*
* @param {string} val The value to be encoded.
*
* @returns {string} The encoded value.
*/
function buildURL_encode(val) {
return encodeURIComponent(val).
replace(/%3A/gi, ':').
replace(/%24/g, '$').
replace(/%2C/gi, ',').
replace(/%20/g, '+').
replace(/%5B/gi, '[').
replace(/%5D/gi, ']');
}
/**
* Build a URL by appending params to the end
*
* @param {string} url The base of the url (e.g., http://www.google.com)
* @param {object} [params] The params to be appended
* @param {?object} options
*
* @returns {string} The formatted url
*/
function buildURL(url, params, options) {
/*eslint no-param-reassign:0*/
if (!params) {
return url;
}
const _encode = options && options.encode || buildURL_encode;
const serializeFn = options && options.serialize;
let serializedParams;
if (serializeFn) {
serializedParams = serializeFn(params, options);
} else {
serializedParams = utils["a" /* default */].isURLSearchParams(params) ?
params.toString() :
new helpers_AxiosURLSearchParams(params, options).toString(_encode);
}
if (serializedParams) {
const hashmarkIndex = url.indexOf("#");
if (hashmarkIndex !== -1) {
url = url.slice(0, hashmarkIndex);
}
url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
}
return url;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/core/InterceptorManager.js
class InterceptorManager_InterceptorManager {
constructor() {
this.handlers = [];
}
/**
* Add a new interceptor to the stack
*
* @param {Function} fulfilled The function to handle `then` for a `Promise`
* @param {Function} rejected The function to handle `reject` for a `Promise`
*
* @return {Number} An ID used to remove interceptor later
*/
use(fulfilled, rejected, options) {
this.handlers.push({
fulfilled,
rejected,
synchronous: options ? options.synchronous : false,
runWhen: options ? options.runWhen : null
});
return this.handlers.length - 1;
}
/**
* Remove an interceptor from the stack
*
* @param {Number} id The ID that was returned by `use`
*
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
*/
eject(id) {
if (this.handlers[id]) {
this.handlers[id] = null;
}
}
/**
* Clear all interceptors from the stack
*
* @returns {void}
*/
clear() {
if (this.handlers) {
this.handlers = [];
}
}
/**
* Iterate over all the registered interceptors
*
* This method is particularly useful for skipping over any
* interceptors that may have become `null` calling `eject`.
*
* @param {Function} fn The function to call for each interceptor
*
* @returns {void}
*/
forEach(fn) {
utils["a" /* default */].forEach(this.handlers, function forEachHandler(h) {
if (h !== null) {
fn(h);
}
});
}
}
/* harmony default export */ var core_InterceptorManager = (InterceptorManager_InterceptorManager);
// EXTERNAL MODULE: ./node_modules/axios/lib/core/AxiosError.js
var AxiosError = __webpack_require__("eRe6");
// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/transitional.js
/* harmony default export */ var defaults_transitional = ({
silentJSONParsing: true,
forcedJSONParsing: true,
clarifyTimeoutError: false
});
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/URLSearchParams.js
/* harmony default export */ var classes_URLSearchParams = (typeof URLSearchParams !== 'undefined' ? URLSearchParams : helpers_AxiosURLSearchParams);
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/FormData.js
/* harmony default export */ var classes_FormData = (typeof FormData !== 'undefined' ? FormData : null);
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/classes/Blob.js
/* harmony default export */ var classes_Blob = (typeof Blob !== 'undefined' ? Blob : null);
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/browser/index.js
/* harmony default export */ var browser = ({
isBrowser: true,
classes: {
URLSearchParams: classes_URLSearchParams,
FormData: classes_FormData,
Blob: classes_Blob
},
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
});
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/common/utils.js
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
/**
* Determine if we're running in a standard browser environment
*
* This allows axios to run in a web worker, and react-native.
* Both environments support XMLHttpRequest, but not fully standard globals.
*
* web workers:
* typeof window -> undefined
* typeof document -> undefined
*
* react-native:
* navigator.product -> 'ReactNative'
* nativescript
* navigator.product -> 'NativeScript' or 'NS'
*
* @returns {boolean}
*/
const hasStandardBrowserEnv = (
(product) => {
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
})(typeof navigator !== 'undefined' && navigator.product);
/**
* Determine if we're running in a standard browser webWorker environment
*
* Although the `isStandardBrowserEnv` method indicates that
* `allows axios to run in a web worker`, the WebWorker will still be
* filtered out due to its judgment standard
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
* This leads to a problem when axios post `FormData` in webWorker
*/
const hasStandardBrowserWebWorkerEnv = (() => {
return (
typeof WorkerGlobalScope !== 'undefined' &&
// eslint-disable-next-line no-undef
self instanceof WorkerGlobalScope &&
typeof self.importScripts === 'function'
);
})();
// CONCATENATED MODULE: ./node_modules/axios/lib/platform/index.js
/* harmony default export */ var platform = ({
...utils_namespaceObject,
...browser
});
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/toURLEncodedForm.js
function toURLEncodedForm(data, options) {
return Object(toFormData["a" /* default */])(data, new platform.classes.URLSearchParams(), Object.assign({
visitor: function(value, key, path, helpers) {
if (platform.isNode && utils["a" /* default */].isBuffer(value)) {
this.append(key, value.toString('base64'));
return false;
}
return helpers.defaultVisitor.apply(this, arguments);
}
}, options));
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/formDataToJSON.js
/**
* It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']
*
* @param {string} name - The name of the property to get.
*
* @returns An array of strings.
*/
function parsePropPath(name) {
// foo[x][y][z]
// foo.x.y.z
// foo-x-y-z
// foo x y z
return utils["a" /* default */].matchAll(/\w+|\[(\w*)]/g, name).map(match => {
return match[0] === '[]' ? '' : match[1] || match[0];
});
}
/**
* Convert an array to an object.
*
* @param {Array<any>} arr - The array to convert to an object.
*
* @returns An object with the same keys and values as the array.
*/
function arrayToObject(arr) {
const obj = {};
const keys = Object.keys(arr);
let i;
const len = keys.length;
let key;
for (i = 0; i < len; i++) {
key = keys[i];
obj[key] = arr[key];
}
return obj;
}
/**
* It takes a FormData object and returns a JavaScript object
*
* @param {string} formData The FormData object to convert to JSON.
*
* @returns {Object<string, any> | null} The converted object.
*/
function formDataToJSON(formData) {
function buildPath(path, value, target, index) {
let name = path[index++];
if (name === '__proto__') return true;
const isNumericKey = Number.isFinite(+name);
const isLast = index >= path.length;
name = !name && utils["a" /* default */].isArray(target) ? target.length : name;
if (isLast) {
if (utils["a" /* default */].hasOwnProp(target, name)) {
target[name] = [target[name], value];
} else {
target[name] = value;
}
return !isNumericKey;
}
if (!target[name] || !utils["a" /* default */].isObject(target[name])) {
target[name] = [];
}
const result = buildPath(path, value, target[name], index);
if (result && utils["a" /* default */].isArray(target[name])) {
target[name] = arrayToObject(target[name]);
}
return !isNumericKey;
}
if (utils["a" /* default */].isFormData(formData) && utils["a" /* default */].isFunction(formData.entries)) {
const obj = {};
utils["a" /* default */].forEachEntry(formData, (name, value) => {
buildPath(parsePropPath(name), value, obj, 0);
});
return obj;
}
return null;
}
/* harmony default export */ var helpers_formDataToJSON = (formDataToJSON);
// CONCATENATED MODULE: ./node_modules/axios/lib/defaults/index.js
/**
* It takes a string, tries to parse it, and if it fails, it returns the stringified version
* of the input
*
* @param {any} rawValue - The value to be stringified.
* @param {Function} parser - A function that parses a string into a JavaScript object.
* @param {Function} encoder - A function that takes a value and returns a string.
*
* @returns {string} A stringified version of the rawValue.
*/
function stringifySafely(rawValue, parser, encoder) {
if (utils["a" /* default */].isString(rawValue)) {
try {
(parser || JSON.parse)(rawValue);
return utils["a" /* default */].trim(rawValue);
} catch (e) {
if (e.name !== 'SyntaxError') {
throw e;
}
}
}
return (encoder || JSON.stringify)(rawValue);
}
const defaults = {
transitional: defaults_transitional,
adapter: ['xhr', 'http'],
transformRequest: [function transformRequest(data, headers) {
const contentType = headers.getContentType() || '';
const hasJSONContentType = contentType.indexOf('application/json') > -1;
const isObjectPayload = utils["a" /* default */].isObject(data);
if (isObjectPayload && utils["a" /* default */].isHTMLForm(data)) {
data = new FormData(data);
}
const isFormData = utils["a" /* default */].isFormData(data);
if (isFormData) {
return hasJSONContentType ? JSON.stringify(helpers_formDataToJSON(data)) : data;
}
if (utils["a" /* default */].isArrayBuffer(data) ||
utils["a" /* default */].isBuffer(data) ||
utils["a" /* default */].isStream(data) ||
utils["a" /* default */].isFile(data) ||
utils["a" /* default */].isBlob(data)
) {
return data;
}
if (utils["a" /* default */].isArrayBufferView(data)) {
return data.buffer;
}
if (utils["a" /* default */].isURLSearchParams(data)) {
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
return data.toString();
}
let isFileList;
if (isObjectPayload) {
if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {
return toURLEncodedForm(data, this.formSerializer).toString();
}
if ((isFileList = utils["a" /* default */].isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
const _FormData = this.env && this.env.FormData;
return Object(toFormData["a" /* default */])(
isFileList ? {'files[]': data} : data,
_FormData && new _FormData(),
this.formSerializer
);
}
}
if (isObjectPayload || hasJSONContentType ) {
headers.setContentType('application/json', false);
return stringifySafely(data);
}
return data;
}],
transformResponse: [function transformResponse(data) {
const transitional = this.transitional || defaults.transitional;
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
const JSONRequested = this.responseType === 'json';
if (data && utils["a" /* default */].isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
const silentJSONParsing = transitional && transitional.silentJSONParsing;
const strictJSONParsing = !silentJSONParsing && JSONRequested;
try {
return JSON.parse(data);
} catch (e) {
if (strictJSONParsing) {
if (e.name === 'SyntaxError') {
throw AxiosError["a" /* default */].from(e, AxiosError["a" /* default */].ERR_BAD_RESPONSE, this, null, this.response);
}
throw e;
}
}
}
return data;
}],
/**
* A timeout in milliseconds to abort a request. If set to 0 (default) a
* timeout is not created.
*/
timeout: 0,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
maxBodyLength: -1,
env: {
FormData: platform.classes.FormData,
Blob: platform.classes.Blob
},
validateStatus: function validateStatus(status) {
return status >= 200 && status < 300;
},
headers: {
common: {
'Accept': 'application/json, text/plain, */*',
'Content-Type': undefined
}
}
};
utils["a" /* default */].forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
defaults.headers[method] = {};
});
/* harmony default export */ var lib_defaults = (defaults);
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseHeaders.js
// RawAxiosHeaders whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
const ignoreDuplicateOf = utils["a" /* default */].toObjectSet([
'age', 'authorization', 'content-length', 'content-type', 'etag',
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
'referer', 'retry-after', 'user-agent'
]);
/**
* Parse headers into an object
*
* ```
* Date: Wed, 27 Aug 2014 08:58:49 GMT
* Content-Type: application/json
* Connection: keep-alive
* Transfer-Encoding: chunked
* ```
*
* @param {String} rawHeaders Headers needing to be parsed
*
* @returns {Object} Headers parsed into an object
*/
/* harmony default export */ var parseHeaders = (rawHeaders => {
const parsed = {};
let key;
let val;
let i;
rawHeaders && rawHeaders.split('\n').forEach(function parser(line) {
i = line.indexOf(':');
key = line.substring(0, i).trim().toLowerCase();
val = line.substring(i + 1).trim();
if (!key || (parsed[key] && ignoreDuplicateOf[key])) {
return;
}
if (key === 'set-cookie') {
if (parsed[key]) {
parsed[key].push(val);
} else {
parsed[key] = [val];
}
} else {
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
}
});
return parsed;
});
// CONCATENATED MODULE: ./node_modules/axios/lib/core/AxiosHeaders.js
const $internals = Symbol('internals');
function normalizeHeader(header) {
return header && String(header).trim().toLowerCase();
}
function normalizeValue(value) {
if (value === false || value == null) {
return value;
}
return utils["a" /* default */].isArray(value) ? value.map(normalizeValue) : String(value);
}
function parseTokens(str) {
const tokens = Object.create(null);
const tokensRE = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
let match;
while ((match = tokensRE.exec(str))) {
tokens[match[1]] = match[2];
}
return tokens;
}
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
if (utils["a" /* default */].isFunction(filter)) {
return filter.call(this, value, header);
}
if (isHeaderNameFilter) {
value = header;
}
if (!utils["a" /* default */].isString(value)) return;
if (utils["a" /* default */].isString(filter)) {
return value.indexOf(filter) !== -1;
}
if (utils["a" /* default */].isRegExp(filter)) {
return filter.test(value);
}
}
function formatHeader(header) {
return header.trim()
.toLowerCase().replace(/([a-z\d])(\w*)/g, (w, char, str) => {
return char.toUpperCase() + str;
});
}
function buildAccessors(obj, header) {
const accessorName = utils["a" /* default */].toCamelCase(' ' + header);
['get', 'set', 'has'].forEach(methodName => {
Object.defineProperty(obj, methodName + accessorName, {
value: function(arg1, arg2, arg3) {
return this[methodName].call(this, header, arg1, arg2, arg3);
},
configurable: true
});
});
}
class AxiosHeaders_AxiosHeaders {
constructor(headers) {
headers && this.set(headers);
}
set(header, valueOrRewrite, rewrite) {
const self = this;
function setHeader(_value, _header, _rewrite) {
const lHeader = normalizeHeader(_header);
if (!lHeader) {
throw new Error('header name must be a non-empty string');
}
const key = utils["a" /* default */].findKey(self, lHeader);
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
self[key || _header] = normalizeValue(_value);
}
}
const setHeaders = (headers, _rewrite) =>
utils["a" /* default */].forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
if (utils["a" /* default */].isPlainObject(header) || header instanceof this.constructor) {
setHeaders(header, valueOrRewrite)
} else if(utils["a" /* default */].isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
setHeaders(parseHeaders(header), valueOrRewrite);
} else {
header != null && setHeader(valueOrRewrite, header, rewrite);
}
return this;
}
get(header, parser) {
header = normalizeHeader(header);
if (header) {
const key = utils["a" /* default */].findKey(this, header);
if (key) {
const value = this[key];
if (!parser) {
return value;
}
if (parser === true) {
return parseTokens(value);
}
if (utils["a" /* default */].isFunction(parser)) {
return parser.call(this, value, key);
}
if (utils["a" /* default */].isRegExp(parser)) {
return parser.exec(value);
}
throw new TypeError('parser must be boolean|regexp|function');
}
}
}
has(header, matcher) {
header = normalizeHeader(header);
if (header) {
const key = utils["a" /* default */].findKey(this, header);
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
}
return false;
}
delete(header, matcher) {
const self = this;
let deleted = false;
function deleteHeader(_header) {
_header = normalizeHeader(_header);
if (_header) {
const key = utils["a" /* default */].findKey(self, _header);
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
delete self[key];
deleted = true;
}
}
}
if (utils["a" /* default */].isArray(header)) {
header.forEach(deleteHeader);
} else {
deleteHeader(header);
}
return deleted;
}
clear(matcher) {
const keys = Object.keys(this);
let i = keys.length;
let deleted = false;
while (i--) {
const key = keys[i];
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
delete this[key];
deleted = true;
}
}
return deleted;
}
normalize(format) {
const self = this;
const headers = {};
utils["a" /* default */].forEach(this, (value, header) => {
const key = utils["a" /* default */].findKey(headers, header);
if (key) {
self[key] = normalizeValue(value);
delete self[header];
return;
}
const normalized = format ? formatHeader(header) : String(header).trim();
if (normalized !== header) {
delete self[header];
}
self[normalized] = normalizeValue(value);
headers[normalized] = true;
});
return this;
}
concat(...targets) {
return this.constructor.concat(this, ...targets);
}
toJSON(asStrings) {
const obj = Object.create(null);
utils["a" /* default */].forEach(this, (value, header) => {
value != null && value !== false && (obj[header] = asStrings && utils["a" /* default */].isArray(value) ? value.join(', ') : value);
});
return obj;
}
[Symbol.iterator]() {
return Object.entries(this.toJSON())[Symbol.iterator]();
}
toString() {
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
}
get [Symbol.toStringTag]() {
return 'AxiosHeaders';
}
static from(thing) {
return thing instanceof this ? thing : new this(thing);
}
static concat(first, ...targets) {
const computed = new this(first);
targets.forEach((target) => computed.set(target));
return computed;
}
static accessor(header) {
const internals = this[$internals] = (this[$internals] = {
accessors: {}
});
const accessors = internals.accessors;
const prototype = this.prototype;
function defineAccessor(_header) {
const lHeader = normalizeHeader(_header);
if (!accessors[lHeader]) {
buildAccessors(prototype, _header);
accessors[lHeader] = true;
}
}
utils["a" /* default */].isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
return this;
}
}
AxiosHeaders_AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
// reserved names hotfix
utils["a" /* default */].reduceDescriptors(AxiosHeaders_AxiosHeaders.prototype, ({value}, key) => {
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
return {
get: () => value,
set(headerValue) {
this[mapped] = headerValue;
}
}
});
utils["a" /* default */].freezeMethods(AxiosHeaders_AxiosHeaders);
/* harmony default export */ var core_AxiosHeaders = (AxiosHeaders_AxiosHeaders);
// CONCATENATED MODULE: ./node_modules/axios/lib/core/transformData.js
/**
* Transform the data for a request or a response
*
* @param {Array|Function} fns A single function or Array of functions
* @param {?Object} response The response object
*
* @returns {*} The resulting transformed data
*/
function transformData(fns, response) {
const config = this || lib_defaults;
const context = response || config;
const headers = core_AxiosHeaders.from(context.headers);
let data = context.data;
utils["a" /* default */].forEach(fns, function transform(fn) {
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
});
headers.normalize();
return data;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/isCancel.js
function isCancel(value) {
return !!(value && value.__CANCEL__);
}
// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CanceledError.js
/**
* A `CanceledError` is an object that is thrown when an operation is canceled.
*
* @param {string=} message The message.
* @param {Object=} config The config.
* @param {Object=} request The request.
*
* @returns {CanceledError} The created error.
*/
function CanceledError(message, config, request) {
// eslint-disable-next-line no-eq-null,eqeqeq
AxiosError["a" /* default */].call(this, message == null ? 'canceled' : message, AxiosError["a" /* default */].ERR_CANCELED, config, request);
this.name = 'CanceledError';
}
utils["a" /* default */].inherits(CanceledError, AxiosError["a" /* default */], {
__CANCEL__: true
});
/* harmony default export */ var cancel_CanceledError = (CanceledError);
// EXTERNAL MODULE: ./node_modules/axios/lib/helpers/null.js
var helpers_null = __webpack_require__("RYHr");
// CONCATENATED MODULE: ./node_modules/axios/lib/core/settle.js
/**
* Resolve or reject a Promise based on response status.
*
* @param {Function} resolve A function that resolves the promise.
* @param {Function} reject A function that rejects the promise.
* @param {object} response The response.
*
* @returns {object} The response.
*/
function settle(resolve, reject, response) {
const validateStatus = response.config.validateStatus;
if (!response.status || !validateStatus || validateStatus(response.status)) {
resolve(response);
} else {
reject(new AxiosError["a" /* default */](
'Request failed with status code ' + response.status,
[AxiosError["a" /* default */].ERR_BAD_REQUEST, AxiosError["a" /* default */].ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
response.config,
response.request,
response
));
}
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/cookies.js
/* harmony default export */ var cookies = (platform.hasStandardBrowserEnv ?
// Standard browser envs support document.cookie
{
write(name, value, expires, path, domain, secure) {
const cookie = [name + '=' + encodeURIComponent(value)];
utils["a" /* default */].isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
utils["a" /* default */].isString(path) && cookie.push('path=' + path);
utils["a" /* default */].isString(domain) && cookie.push('domain=' + domain);
secure === true && cookie.push('secure');
document.cookie = cookie.join('; ');
},
read(name) {
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
return (match ? decodeURIComponent(match[3]) : null);
},
remove(name) {
this.write(name, '', Date.now() - 86400000);
}
}
:
// Non-standard browser env (web workers, react-native) lack needed support.
{
write() {},
read() {
return null;
},
remove() {}
});
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAbsoluteURL.js
/**
* Determines whether the specified URL is absolute
*
* @param {string} url The URL to test
*
* @returns {boolean} True if the specified URL is absolute, otherwise false
*/
function isAbsoluteURL(url) {
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
// by any combination of letters, digits, plus, period, or hyphen.
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/combineURLs.js
/**
* Creates a new URL by combining the specified URLs
*
* @param {string} baseURL The base URL
* @param {string} relativeURL The relative URL
*
* @returns {string} The combined URL
*/
function combineURLs(baseURL, relativeURL) {
return relativeURL
? baseURL.replace(/\/?\/$/, '') + '/' + relativeURL.replace(/^\/+/, '')
: baseURL;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/core/buildFullPath.js
/**
* Creates a new URL by combining the baseURL with the requestedURL,
* only when the requestedURL is not already an absolute URL.
* If the requestURL is absolute, this function returns the requestedURL untouched.
*
* @param {string} baseURL The base URL
* @param {string} requestedURL Absolute or relative URL to combine
*
* @returns {string} The combined full path
*/
function buildFullPath(baseURL, requestedURL) {
if (baseURL && !isAbsoluteURL(requestedURL)) {
return combineURLs(baseURL, requestedURL);
}
return requestedURL;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isURLSameOrigin.js
/* harmony default export */ var helpers_isURLSameOrigin = (platform.hasStandardBrowserEnv ?
// Standard browser envs have full support of the APIs needed to test
// whether the request URL is of the same origin as current location.
(function standardBrowserEnv() {
const msie = /(msie|trident)/i.test(navigator.userAgent);
const urlParsingNode = document.createElement('a');
let originURL;
/**
* Parse a URL to discover its components
*
* @param {String} url The URL to be parsed
* @returns {Object}
*/
function resolveURL(url) {
let href = url;
if (msie) {
// IE needs attribute set twice to normalize properties
urlParsingNode.setAttribute('href', href);
href = urlParsingNode.href;
}
urlParsingNode.setAttribute('href', href);
// urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
return {
href: urlParsingNode.href,
protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
host: urlParsingNode.host,
search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
hostname: urlParsingNode.hostname,
port: urlParsingNode.port,
pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
urlParsingNode.pathname :
'/' + urlParsingNode.pathname
};
}
originURL = resolveURL(window.location.href);
/**
* Determine if a URL shares the same origin as the current location
*
* @param {String} requestURL The URL to test
* @returns {boolean} True if URL shares the same origin, otherwise false
*/
return function isURLSameOrigin(requestURL) {
const parsed = (utils["a" /* default */].isString(requestURL)) ? resolveURL(requestURL) : requestURL;
return (parsed.protocol === originURL.protocol &&
parsed.host === originURL.host);
};
})() :
// Non standard browser envs (web workers, react-native) lack needed support.
(function nonStandardBrowserEnv() {
return function isURLSameOrigin() {
return true;
};
})());
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/parseProtocol.js
function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
return match && match[1] || '';
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/speedometer.js
/**
* Calculate data maxRate
* @param {Number} [samplesCount= 10]
* @param {Number} [min= 1000]
* @returns {Function}
*/
function speedometer(samplesCount, min) {
samplesCount = samplesCount || 10;
const bytes = new Array(samplesCount);
const timestamps = new Array(samplesCount);
let head = 0;
let tail = 0;
let firstSampleTS;
min = min !== undefined ? min : 1000;
return function push(chunkLength) {
const now = Date.now();
const startedAt = timestamps[tail];
if (!firstSampleTS) {
firstSampleTS = now;
}
bytes[head] = chunkLength;
timestamps[head] = now;
let i = tail;
let bytesCount = 0;
while (i !== head) {
bytesCount += bytes[i++];
i = i % samplesCount;
}
head = (head + 1) % samplesCount;
if (head === tail) {
tail = (tail + 1) % samplesCount;
}
if (now - firstSampleTS < min) {
return;
}
const passed = startedAt && now - startedAt;
return passed ? Math.round(bytesCount * 1000 / passed) : undefined;
};
}
/* harmony default export */ var helpers_speedometer = (speedometer);
// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/xhr.js
function progressEventReducer(listener, isDownloadStream) {
let bytesNotified = 0;
const _speedometer = helpers_speedometer(50, 250);
return e => {
const loaded = e.loaded;
const total = e.lengthComputable ? e.total : undefined;
const progressBytes = loaded - bytesNotified;
const rate = _speedometer(progressBytes);
const inRange = loaded <= total;
bytesNotified = loaded;
const data = {
loaded,
total,
progress: total ? (loaded / total) : undefined,
bytes: progressBytes,
rate: rate ? rate : undefined,
estimated: rate && total && inRange ? (total - loaded) / rate : undefined,
event: e
};
data[isDownloadStream ? 'download' : 'upload'] = true;
listener(data);
};
}
const isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';
/* harmony default export */ var xhr = (isXHRAdapterSupported && function (config) {
return new Promise(function dispatchXhrRequest(resolve, reject) {
let requestData = config.data;
const requestHeaders = core_AxiosHeaders.from(config.headers).normalize();
let {responseType, withXSRFToken} = config;
let onCanceled;
function done() {
if (config.cancelToken) {
config.cancelToken.unsubscribe(onCanceled);
}
if (config.signal) {
config.signal.removeEventListener('abort', onCanceled);
}
}
let contentType;
if (utils["a" /* default */].isFormData(requestData)) {
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
requestHeaders.setContentType(false); // Let the browser set it
} else if ((contentType = requestHeaders.getContentType()) !== false) {
// fix semicolon duplication issue for ReactNative FormData implementation
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
}
}
let request = new XMLHttpRequest();
// HTTP basic authentication
if (config.auth) {
const username = config.auth.username || '';
const password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
requestHeaders.set('Authorization', 'Basic ' + btoa(username + ':' + password));
}
const fullPath = buildFullPath(config.baseURL, config.url);
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
// Set the request timeout in MS
request.timeout = config.timeout;
function onloadend() {
if (!request) {
return;
}
// Prepare the response
const responseHeaders = core_AxiosHeaders.from(
'getAllResponseHeaders' in request && request.getAllResponseHeaders()
);
const responseData = !responseType || responseType === 'text' || responseType === 'json' ?
request.responseText : request.response;
const response = {
data: responseData,
status: request.status,
statusText: request.statusText,
headers: responseHeaders,
config,
request
};
settle(function _resolve(value) {
resolve(value);
done();
}, function _reject(err) {
reject(err);
done();
}, response);
// Clean up request
request = null;
}
if ('onloadend' in request) {
// Use onloadend if available
request.onloadend = onloadend;
} else {
// Listen for ready state to emulate onloadend
request.onreadystatechange = function handleLoad() {
if (!request || request.readyState !== 4) {
return;
}
// The request errored out and we didn't get a response, this will be
// handled by onerror instead
// With one exception: request that using file: protocol, most browsers
// will return status as 0 even though it's a successful request
if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
return;
}
// readystate handler is calling before onerror or ontimeout handlers,
// so we should call onloadend on the next 'tick'
setTimeout(onloadend);
};
}
// Handle browser request cancellation (as opposed to a manual cancellation)
request.onabort = function handleAbort() {
if (!request) {
return;
}
reject(new AxiosError["a" /* default */]('Request aborted', AxiosError["a" /* default */].ECONNABORTED, config, request));
// Clean up request
request = null;
};
// Handle low level network errors
request.onerror = function handleError() {
// Real errors are hidden from us by the browser
// onerror should only fire if it's a network error
reject(new AxiosError["a" /* default */]('Network Error', AxiosError["a" /* default */].ERR_NETWORK, config, request));
// Clean up request
request = null;
};
// Handle timeout
request.ontimeout = function handleTimeout() {
let timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
const transitional = config.transitional || defaults_transitional;
if (config.timeoutErrorMessage) {
timeoutErrorMessage = config.timeoutErrorMessage;
}
reject(new AxiosError["a" /* default */](
timeoutErrorMessage,
transitional.clarifyTimeoutError ? AxiosError["a" /* default */].ETIMEDOUT : AxiosError["a" /* default */].ECONNABORTED,
config,
request));
// Clean up request
request = null;
};
// Add xsrf header
// This is only done if running in a standard browser environment.
// Specifically not if we're in a web worker, or react-native.
if(platform.hasStandardBrowserEnv) {
withXSRFToken && utils["a" /* default */].isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
if (withXSRFToken || (withXSRFToken !== false && helpers_isURLSameOrigin(fullPath))) {
// Add xsrf header
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
if (xsrfValue) {
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
}
}
}
// Remove Content-Type if data is undefined
requestData === undefined && requestHeaders.setContentType(null);
// Add headers to the request
if ('setRequestHeader' in request) {
utils["a" /* default */].forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
request.setRequestHeader(key, val);
});
}
// Add withCredentials to request if needed
if (!utils["a" /* default */].isUndefined(config.withCredentials)) {
request.withCredentials = !!config.withCredentials;
}
// Add responseType to request if needed
if (responseType && responseType !== 'json') {
request.responseType = config.responseType;
}
// Handle progress if needed
if (typeof config.onDownloadProgress === 'function') {
request.addEventListener('progress', progressEventReducer(config.onDownloadProgress, true));
}
// Not all browsers support upload events
if (typeof config.onUploadProgress === 'function' && request.upload) {
request.upload.addEventListener('progress', progressEventReducer(config.onUploadProgress));
}
if (config.cancelToken || config.signal) {
// Handle cancellation
// eslint-disable-next-line func-names
onCanceled = cancel => {
if (!request) {
return;
}
reject(!cancel || cancel.type ? new cancel_CanceledError(null, config, request) : cancel);
request.abort();
request = null;
};
config.cancelToken && config.cancelToken.subscribe(onCanceled);
if (config.signal) {
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
}
}
const protocol = parseProtocol(fullPath);
if (protocol && platform.protocols.indexOf(protocol) === -1) {
reject(new AxiosError["a" /* default */]('Unsupported protocol ' + protocol + ':', AxiosError["a" /* default */].ERR_BAD_REQUEST, config));
return;
}
// Send the request
request.send(requestData || null);
});
});
// CONCATENATED MODULE: ./node_modules/axios/lib/adapters/adapters.js
const knownAdapters = {
http: helpers_null["a" /* default */],
xhr: xhr
}
utils["a" /* default */].forEach(knownAdapters, (fn, value) => {
if (fn) {
try {
Object.defineProperty(fn, 'name', {value});
} catch (e) {
// eslint-disable-next-line no-empty
}
Object.defineProperty(fn, 'adapterName', {value});
}
});
const renderReason = (reason) => `- ${reason}`;
const isResolvedHandle = (adapter) => utils["a" /* default */].isFunction(adapter) || adapter === null || adapter === false;
/* harmony default export */ var adapters_adapters = ({
getAdapter: (adapters) => {
adapters = utils["a" /* default */].isArray(adapters) ? adapters : [adapters];
const {length} = adapters;
let nameOrAdapter;
let adapter;
const rejectedReasons = {};
for (let i = 0; i < length; i++) {
nameOrAdapter = adapters[i];
let id;
adapter = nameOrAdapter;
if (!isResolvedHandle(nameOrAdapter)) {
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
if (adapter === undefined) {
throw new AxiosError["a" /* default */](`Unknown adapter '${id}'`);
}
}
if (adapter) {
break;
}
rejectedReasons[id || '#' + i] = adapter;
}
if (!adapter) {
const reasons = Object.entries(rejectedReasons)
.map(([id, state]) => `adapter ${id} ` +
(state === false ? 'is not supported by the environment' : 'is not available in the build')
);
let s = length ?
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
'as no adapter specified';
throw new AxiosError["a" /* default */](
`There is no suitable adapter to dispatch the request ` + s,
'ERR_NOT_SUPPORT'
);
}
return adapter;
},
adapters: knownAdapters
});
// CONCATENATED MODULE: ./node_modules/axios/lib/core/dispatchRequest.js
/**
* Throws a `CanceledError` if cancellation has been requested.
*
* @param {Object} config The config that is to be used for the request
*
* @returns {void}
*/
function throwIfCancellationRequested(config) {
if (config.cancelToken) {
config.cancelToken.throwIfRequested();
}
if (config.signal && config.signal.aborted) {
throw new cancel_CanceledError(null, config);
}
}
/**
* Dispatch a request to the server using the configured adapter.
*
* @param {object} config The config that is to be used for the request
*
* @returns {Promise} The Promise to be fulfilled
*/
function dispatchRequest(config) {
throwIfCancellationRequested(config);
config.headers = core_AxiosHeaders.from(config.headers);
// Transform request data
config.data = transformData.call(
config,
config.transformRequest
);
if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {
config.headers.setContentType('application/x-www-form-urlencoded', false);
}
const adapter = adapters_adapters.getAdapter(config.adapter || lib_defaults.adapter);
return adapter(config).then(function onAdapterResolution(response) {
throwIfCancellationRequested(config);
// Transform response data
response.data = transformData.call(
config,
config.transformResponse,
response
);
response.headers = core_AxiosHeaders.from(response.headers);
return response;
}, function onAdapterRejection(reason) {
if (!isCancel(reason)) {
throwIfCancellationRequested(config);
// Transform response data
if (reason && reason.response) {
reason.response.data = transformData.call(
config,
config.transformResponse,
reason.response
);
reason.response.headers = core_AxiosHeaders.from(reason.response.headers);
}
}
return Promise.reject(reason);
});
}
// CONCATENATED MODULE: ./node_modules/axios/lib/core/mergeConfig.js
const headersToObject = (thing) => thing instanceof core_AxiosHeaders ? { ...thing } : thing;
/**
* Config-specific merge-function which creates a new config-object
* by merging two configuration objects together.
*
* @param {Object} config1
* @param {Object} config2
*
* @returns {Object} New object resulting from merging config2 to config1
*/
function mergeConfig(config1, config2) {
// eslint-disable-next-line no-param-reassign
config2 = config2 || {};
const config = {};
function getMergedValue(target, source, caseless) {
if (utils["a" /* default */].isPlainObject(target) && utils["a" /* default */].isPlainObject(source)) {
return utils["a" /* default */].merge.call({caseless}, target, source);
} else if (utils["a" /* default */].isPlainObject(source)) {
return utils["a" /* default */].merge({}, source);
} else if (utils["a" /* default */].isArray(source)) {
return source.slice();
}
return source;
}
// eslint-disable-next-line consistent-return
function mergeDeepProperties(a, b, caseless) {
if (!utils["a" /* default */].isUndefined(b)) {
return getMergedValue(a, b, caseless);
} else if (!utils["a" /* default */].isUndefined(a)) {
return getMergedValue(undefined, a, caseless);
}
}
// eslint-disable-next-line consistent-return
function valueFromConfig2(a, b) {
if (!utils["a" /* default */].isUndefined(b)) {
return getMergedValue(undefined, b);
}
}
// eslint-disable-next-line consistent-return
function defaultToConfig2(a, b) {
if (!utils["a" /* default */].isUndefined(b)) {
return getMergedValue(undefined, b);
} else if (!utils["a" /* default */].isUndefined(a)) {
return getMergedValue(undefined, a);
}
}
// eslint-disable-next-line consistent-return
function mergeDirectKeys(a, b, prop) {
if (prop in config2) {
return getMergedValue(a, b);
} else if (prop in config1) {
return getMergedValue(undefined, a);
}
}
const mergeMap = {
url: valueFromConfig2,
method: valueFromConfig2,
data: valueFromConfig2,
baseURL: defaultToConfig2,
transformRequest: defaultToConfig2,
transformResponse: defaultToConfig2,
paramsSerializer: defaultToConfig2,
timeout: defaultToConfig2,
timeoutMessage: defaultToConfig2,
withCredentials: defaultToConfig2,
withXSRFToken: defaultToConfig2,
adapter: defaultToConfig2,
responseType: defaultToConfig2,
xsrfCookieName: defaultToConfig2,
xsrfHeaderName: defaultToConfig2,
onUploadProgress: defaultToConfig2,
onDownloadProgress: defaultToConfig2,
decompress: defaultToConfig2,
maxContentLength: defaultToConfig2,
maxBodyLength: defaultToConfig2,
beforeRedirect: defaultToConfig2,
transport: defaultToConfig2,
httpAgent: defaultToConfig2,
httpsAgent: defaultToConfig2,
cancelToken: defaultToConfig2,
socketPath: defaultToConfig2,
responseEncoding: defaultToConfig2,
validateStatus: mergeDirectKeys,
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
};
utils["a" /* default */].forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
const merge = mergeMap[prop] || mergeDeepProperties;
const configValue = merge(config1[prop], config2[prop], prop);
(utils["a" /* default */].isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
});
return config;
}
// CONCATENATED MODULE: ./node_modules/axios/lib/env/data.js
const VERSION = "1.6.8";
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/validator.js
const validators = {};
// eslint-disable-next-line func-names
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {
validators[type] = function validator(thing) {
return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
};
});
const deprecatedWarnings = {};
/**
* Transitional option validator
*
* @param {function|boolean?} validator - set to false if the transitional option has been removed
* @param {string?} version - deprecated version / removed since version
* @param {string?} message - some message with additional info
*
* @returns {function}
*/
validators.transitional = function transitional(validator, version, message) {
function formatMessage(opt, desc) {
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
}
// eslint-disable-next-line func-names
return (value, opt, opts) => {
if (validator === false) {
throw new AxiosError["a" /* default */](
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
AxiosError["a" /* default */].ERR_DEPRECATED
);
}
if (version && !deprecatedWarnings[opt]) {
deprecatedWarnings[opt] = true;
// eslint-disable-next-line no-console
console.warn(
formatMessage(
opt,
' has been deprecated since v' + version + ' and will be removed in the near future'
)
);
}
return validator ? validator(value, opt, opts) : true;
};
};
/**
* Assert object's properties type
*
* @param {object} options
* @param {object} schema
* @param {boolean?} allowUnknown
*
* @returns {object}
*/
function assertOptions(options, schema, allowUnknown) {
if (typeof options !== 'object') {
throw new AxiosError["a" /* default */]('options must be an object', AxiosError["a" /* default */].ERR_BAD_OPTION_VALUE);
}
const keys = Object.keys(options);
let i = keys.length;
while (i-- > 0) {
const opt = keys[i];
const validator = schema[opt];
if (validator) {
const value = options[opt];
const result = value === undefined || validator(value, opt, options);
if (result !== true) {
throw new AxiosError["a" /* default */]('option ' + opt + ' must be ' + result, AxiosError["a" /* default */].ERR_BAD_OPTION_VALUE);
}
continue;
}
if (allowUnknown !== true) {
throw new AxiosError["a" /* default */]('Unknown option ' + opt, AxiosError["a" /* default */].ERR_BAD_OPTION);
}
}
}
/* harmony default export */ var helpers_validator = ({
assertOptions,
validators
});
// CONCATENATED MODULE: ./node_modules/axios/lib/core/Axios.js
const Axios_validators = helpers_validator.validators;
/**
* Create a new instance of Axios
*
* @param {Object} instanceConfig The default config for the instance
*
* @return {Axios} A new instance of Axios
*/
class Axios_Axios {
constructor(instanceConfig) {
this.defaults = instanceConfig;
this.interceptors = {
request: new core_InterceptorManager(),
response: new core_InterceptorManager()
};
}
/**
* Dispatch a request
*
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
* @param {?Object} config
*
* @returns {Promise} The Promise to be fulfilled
*/
async request(configOrUrl, config) {
try {
return await this._request(configOrUrl, config);
} catch (err) {
if (err instanceof Error) {
let dummy;
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
// slice off the Error: ... line
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
if (!err.stack) {
err.stack = stack;
// match without the 2 top stack lines
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
err.stack += '\n' + stack
}
}
throw err;
}
}
_request(configOrUrl, config) {
/*eslint no-param-reassign:0*/
// Allow for axios('example/url'[, config]) a la fetch API
if (typeof configOrUrl === 'string') {
config = config || {};
config.url = configOrUrl;
} else {
config = configOrUrl || {};
}
config = mergeConfig(this.defaults, config);
const {transitional, paramsSerializer, headers} = config;
if (transitional !== undefined) {
helpers_validator.assertOptions(transitional, {
silentJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
forcedJSONParsing: Axios_validators.transitional(Axios_validators.boolean),
clarifyTimeoutError: Axios_validators.transitional(Axios_validators.boolean)
}, false);
}
if (paramsSerializer != null) {
if (utils["a" /* default */].isFunction(paramsSerializer)) {
config.paramsSerializer = {
serialize: paramsSerializer
}
} else {
helpers_validator.assertOptions(paramsSerializer, {
encode: Axios_validators.function,
serialize: Axios_validators.function
}, true);
}
}
// Set config.method
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
// Flatten headers
let contextHeaders = headers && utils["a" /* default */].merge(
headers.common,
headers[config.method]
);
headers && utils["a" /* default */].forEach(
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
(method) => {
delete headers[method];
}
);
config.headers = core_AxiosHeaders.concat(contextHeaders, headers);
// filter out skipped interceptors
const requestInterceptorChain = [];
let synchronousRequestInterceptors = true;
this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
return;
}
synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;
requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
});
const responseInterceptorChain = [];
this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
});
let promise;
let i = 0;
let len;
if (!synchronousRequestInterceptors) {
const chain = [dispatchRequest.bind(this), undefined];
chain.unshift.apply(chain, requestInterceptorChain);
chain.push.apply(chain, responseInterceptorChain);
len = chain.length;
promise = Promise.resolve(config);
while (i < len) {
promise = promise.then(chain[i++], chain[i++]);
}
return promise;
}
len = requestInterceptorChain.length;
let newConfig = config;
i = 0;
while (i < len) {
const onFulfilled = requestInterceptorChain[i++];
const onRejected = requestInterceptorChain[i++];
try {
newConfig = onFulfilled(newConfig);
} catch (error) {
onRejected.call(this, error);
break;
}
}
try {
promise = dispatchRequest.call(this, newConfig);
} catch (error) {
return Promise.reject(error);
}
i = 0;
len = responseInterceptorChain.length;
while (i < len) {
promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);
}
return promise;
}
getUri(config) {
config = mergeConfig(this.defaults, config);
const fullPath = buildFullPath(config.baseURL, config.url);
return buildURL(fullPath, config.params, config.paramsSerializer);
}
}
// Provide aliases for supported request methods
utils["a" /* default */].forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
/*eslint func-names:0*/
Axios_Axios.prototype[method] = function(url, config) {
return this.request(mergeConfig(config || {}, {
method,
url,
data: (config || {}).data
}));
};
});
utils["a" /* default */].forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
/*eslint func-names:0*/
function generateHTTPMethod(isForm) {
return function httpMethod(url, data, config) {
return this.request(mergeConfig(config || {}, {
method,
headers: isForm ? {
'Content-Type': 'multipart/form-data'
} : {},
url,
data
}));
};
}
Axios_Axios.prototype[method] = generateHTTPMethod();
Axios_Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
});
/* harmony default export */ var core_Axios = (Axios_Axios);
// CONCATENATED MODULE: ./node_modules/axios/lib/cancel/CancelToken.js
/**
* A `CancelToken` is an object that can be used to request cancellation of an operation.
*
* @param {Function} executor The executor function.
*
* @returns {CancelToken}
*/
class CancelToken_CancelToken {
constructor(executor) {
if (typeof executor !== 'function') {
throw new TypeError('executor must be a function.');
}
let resolvePromise;
this.promise = new Promise(function promiseExecutor(resolve) {
resolvePromise = resolve;
});
const token = this;
// eslint-disable-next-line func-names
this.promise.then(cancel => {
if (!token._listeners) return;
let i = token._listeners.length;
while (i-- > 0) {
token._listeners[i](cancel);
}
token._listeners = null;
});
// eslint-disable-next-line func-names
this.promise.then = onfulfilled => {
let _resolve;
// eslint-disable-next-line func-names
const promise = new Promise(resolve => {
token.subscribe(resolve);
_resolve = resolve;
}).then(onfulfilled);
promise.cancel = function reject() {
token.unsubscribe(_resolve);
};
return promise;
};
executor(function cancel(message, config, request) {
if (token.reason) {
// Cancellation has already been requested
return;
}
token.reason = new cancel_CanceledError(message, config, request);
resolvePromise(token.reason);
});
}
/**
* Throws a `CanceledError` if cancellation has been requested.
*/
throwIfRequested() {
if (this.reason) {
throw this.reason;
}
}
/**
* Subscribe to the cancel signal
*/
subscribe(listener) {
if (this.reason) {
listener(this.reason);
return;
}
if (this._listeners) {
this._listeners.push(listener);
} else {
this._listeners = [listener];
}
}
/**
* Unsubscribe from the cancel signal
*/
unsubscribe(listener) {
if (!this._listeners) {
return;
}
const index = this._listeners.indexOf(listener);
if (index !== -1) {
this._listeners.splice(index, 1);
}
}
/**
* Returns an object that contains a new `CancelToken` and a function that, when called,
* cancels the `CancelToken`.
*/
static source() {
let cancel;
const token = new CancelToken_CancelToken(function executor(c) {
cancel = c;
});
return {
token,
cancel
};
}
}
/* harmony default export */ var cancel_CancelToken = (CancelToken_CancelToken);
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/spread.js
/**
* Syntactic sugar for invoking a function and expanding an array for arguments.
*
* Common use case would be to use `Function.prototype.apply`.
*
* ```js
* function f(x, y, z) {}
* var args = [1, 2, 3];
* f.apply(null, args);
* ```
*
* With `spread` this example can be re-written.
*
* ```js
* spread(function(x, y, z) {})([1, 2, 3]);
* ```
*
* @param {Function} callback
*
* @returns {Function}
*/
function spread(callback) {
return function wrap(arr) {
return callback.apply(null, arr);
};
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/isAxiosError.js
/**
* Determines whether the payload is an error thrown by Axios
*
* @param {*} payload The value to test
*
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
*/
function isAxiosError(payload) {
return utils["a" /* default */].isObject(payload) && (payload.isAxiosError === true);
}
// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/HttpStatusCode.js
const HttpStatusCode = {
Continue: 100,
SwitchingProtocols: 101,
Processing: 102,
EarlyHints: 103,
Ok: 200,
Created: 201,
Accepted: 202,
NonAuthoritativeInformation: 203,
NoContent: 204,
ResetContent: 205,
PartialContent: 206,
MultiStatus: 207,
AlreadyReported: 208,
ImUsed: 226,
MultipleChoices: 300,
MovedPermanently: 301,
Found: 302,
SeeOther: 303,
NotModified: 304,
UseProxy: 305,
Unused: 306,
TemporaryRedirect: 307,
PermanentRedirect: 308,
BadRequest: 400,
Unauthorized: 401,
PaymentRequired: 402,
Forbidden: 403,
NotFound: 404,
MethodNotAllowed: 405,
NotAcceptable: 406,
ProxyAuthenticationRequired: 407,
RequestTimeout: 408,
Conflict: 409,
Gone: 410,
LengthRequired: 411,
PreconditionFailed: 412,
PayloadTooLarge: 413,
UriTooLong: 414,
UnsupportedMediaType: 415,
RangeNotSatisfiable: 416,
ExpectationFailed: 417,
ImATeapot: 418,
MisdirectedRequest: 421,
UnprocessableEntity: 422,
Locked: 423,
FailedDependency: 424,
TooEarly: 425,
UpgradeRequired: 426,
PreconditionRequired: 428,
TooManyRequests: 429,
RequestHeaderFieldsTooLarge: 431,
UnavailableForLegalReasons: 451,
InternalServerError: 500,
NotImplemented: 501,
BadGateway: 502,
ServiceUnavailable: 503,
GatewayTimeout: 504,
HttpVersionNotSupported: 505,
VariantAlsoNegotiates: 506,
InsufficientStorage: 507,
LoopDetected: 508,
NotExtended: 510,
NetworkAuthenticationRequired: 511,
};
Object.entries(HttpStatusCode).forEach(([key, value]) => {
HttpStatusCode[value] = key;
});
/* harmony default export */ var helpers_HttpStatusCode = (HttpStatusCode);
// CONCATENATED MODULE: ./node_modules/axios/lib/axios.js
/**
* Create an instance of Axios
*
* @param {Object} defaultConfig The default config for the instance
*
* @returns {Axios} A new instance of Axios
*/
function createInstance(defaultConfig) {
const context = new core_Axios(defaultConfig);
const instance = Object(bind["a" /* default */])(core_Axios.prototype.request, context);
// Copy axios.prototype to instance
utils["a" /* default */].extend(instance, core_Axios.prototype, context, {allOwnKeys: true});
// Copy context to instance
utils["a" /* default */].extend(instance, context, null, {allOwnKeys: true});
// Factory for creating new instances
instance.create = function create(instanceConfig) {
return createInstance(mergeConfig(defaultConfig, instanceConfig));
};
return instance;
}
// Create the default instance to be exported
const axios = createInstance(lib_defaults);
// Expose Axios class to allow class inheritance
axios.Axios = core_Axios;
// Expose Cancel & CancelToken
axios.CanceledError = cancel_CanceledError;
axios.CancelToken = cancel_CancelToken;
axios.isCancel = isCancel;
axios.VERSION = VERSION;
axios.toFormData = toFormData["a" /* default */];
// Expose AxiosError class
axios.AxiosError = AxiosError["a" /* default */];
// alias for CanceledError for backward compatibility
axios.Cancel = axios.CanceledError;
// Expose all/spread
axios.all = function all(promises) {
return Promise.all(promises);
};
axios.spread = spread;
// Expose isAxiosError
axios.isAxiosError = isAxiosError;
// Expose mergeConfig
axios.mergeConfig = mergeConfig;
axios.AxiosHeaders = core_AxiosHeaders;
axios.formToJSON = thing => helpers_formDataToJSON(utils["a" /* default */].isHTMLForm(thing) ? new FormData(thing) : thing);
axios.getAdapter = adapters_adapters.getAdapter;
axios.HttpStatusCode = helpers_HttpStatusCode;
axios.default = axios;
// this module should only have a default export
/* harmony default export */ var lib_axios = (axios);
// CONCATENATED MODULE: ./src/pages/metting/index.js
function beforeFetch() {
if (window.location.href.indexOf('localhost') < 0) {
lib_axios.defaults.withCredentials = true;
}
var service = lib_axios.create({
baseURL: 'https://gateway.gitlink.org.cn',
timeout: 1800000 // 请求超时时间
});
service.interceptors.response.use(function (response) {
var res = response || {};
if (res && res.data && res.data.code === 404) {
es_message["b" /* default */].error("错误链接!");
window.location.href = '/nopage';
return Promise.reject('error');
} else if (res && res.data && res.data.code === 500) {
es_message["b" /* default */].error(res.data.msg);
return Promise.reject('error');
} else {
return response.data;
}
}, function (error) {
console.log(error);
// notification.open({
// message: "提示",
// description: error.message,
// });
// return Promise.reject(error);
});
return service;
}
var metting_service = beforeFetch();
/* harmony default export */ var metting = (metting_service);
// EXTERNAL MODULE: ./src/pages/metting/info.js
var info = __webpack_require__("PZZE");
// CONCATENATED MODULE: ./src/pages/metting/api.js
/**
* 获取基础信息
* @param {*} params
* @returns
*/
function getBaseInfo(params) {
return metting({
url: "/api/zone/open/zoneKey/".concat(info["a" /* config */].zoneKey),
method: 'get',
params: params
});
}
/**
* 获取会议议程主会场(指定新闻列表)
* @param {*} cateId 指定专栏id
* @param {*} params
* @returns
*/
function getDocList(cateId, params) {
return metting({
url: "/api/cms/doc/open/dir/".concat(cateId, "/docList"),
method: 'get',
params: params
});
}
/**
* 获取会议议程分会场(指定新闻列表内容)
* @param {*} cateId 指定专栏id
* @param {*} params
* @returns
*/
function getSubAgenda(cateId, params) {
return metting({
url: "/api/cms/doc/open/dir/".concat(cateId, "/docContentList"),
method: 'get',
params: params
});
}
/**
* 获取会议指南(专区首页文章列表
* @returns
*/
function gethomePageDocList() {
return metting({
url: "/api/cms/doc/open/zone/".concat(info["a" /* config */].zoneId, "/homePageDocList"),
method: 'get'
});
}
/**
* 获取与会嘉宾
* @returns
*/
function getMemberList() {
return metting({
url: "/api/zone/open/".concat(info["a" /* config */].zoneId, "/member/homePageList"),
method: 'get'
});
}
/**
* 合作伙伴
* @returns
*/
function getPartnerList() {
return metting({
url: "/api/zone/open/".concat(info["a" /* config */].zoneId, "/partners/list"),
method: 'get'
});
}
/**
* 获取组织机构
* @returns
*/
function getOrganization() {
return metting({
url: "/api/zone/open/".concat(info["a" /* config */].zoneId, "/member/overviewList"),
method: 'get'
});
}
/**
* 获取文章详情
* @param {*} id 文章id
* @returns
*/
function getDocDetail(id) {
return metting({
url: "/api/cms/doc/open/".concat(id),
method: 'get'
});
}
/**
* 获取所有栏目列表
* @returns
*/
function getDirList() {
return metting({
url: "/api/cms/doc/open/zone/".concat(info["a" /* config */].zoneId, "/dirList"),
method: 'get'
});
}
/***/ }),
/***/ "LpSC":
/*!***************************************************************!*\
!*** ./node_modules/isomorphic-fetch/fetch-npm-browserify.js ***!
\***************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// the whatwg-fetch polyfill installs the fetch() function
// on the global object (window or self)
//
// Return that as the export for use in Webpack, Browserify etc.
__webpack_require__(/*! whatwg-fetch */ "bZMm");
module.exports = self.fetch.bind(self);
/***/ }),
/***/ "LvDl":
/*!***************************************!*\
!*** ./node_modules/lodash/lodash.js ***!
\***************************************/
/*! no static exports found */
/*! exports used: cloneDeep, default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
;(function() {
/** Used as a safe reference for `undefined` in pre-ES5 environments. */
var undefined;
/** Used as the semantic version number. */
var VERSION = '4.17.21';
/** Used as the size to enable large array optimizations. */
var LARGE_ARRAY_SIZE = 200;
/** Error message constants. */
var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.',
FUNC_ERROR_TEXT = 'Expected a function',
INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`';
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used as the maximum memoize cache size. */
var MAX_MEMOIZE_SIZE = 500;
/** Used as the internal argument placeholder. */
var PLACEHOLDER = '__lodash_placeholder__';
/** Used to compose bitmasks for cloning. */
var CLONE_DEEP_FLAG = 1,
CLONE_FLAT_FLAG = 2,
CLONE_SYMBOLS_FLAG = 4;
/** Used to compose bitmasks for value comparisons. */
var COMPARE_PARTIAL_FLAG = 1,
COMPARE_UNORDERED_FLAG = 2;
/** Used to compose bitmasks for function metadata. */
var WRAP_BIND_FLAG = 1,
WRAP_BIND_KEY_FLAG = 2,
WRAP_CURRY_BOUND_FLAG = 4,
WRAP_CURRY_FLAG = 8,
WRAP_CURRY_RIGHT_FLAG = 16,
WRAP_PARTIAL_FLAG = 32,
WRAP_PARTIAL_RIGHT_FLAG = 64,
WRAP_ARY_FLAG = 128,
WRAP_REARG_FLAG = 256,
WRAP_FLIP_FLAG = 512;
/** Used as default options for `_.truncate`. */
var DEFAULT_TRUNC_LENGTH = 30,
DEFAULT_TRUNC_OMISSION = '...';
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
HOT_SPAN = 16;
/** Used to indicate the type of lazy iteratees. */
var LAZY_FILTER_FLAG = 1,
LAZY_MAP_FLAG = 2,
LAZY_WHILE_FLAG = 3;
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0,
MAX_SAFE_INTEGER = 9007199254740991,
MAX_INTEGER = 1.7976931348623157e+308,
NAN = 0 / 0;
/** Used as references for the maximum length and index of an array. */
var MAX_ARRAY_LENGTH = 4294967295,
MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1,
HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
/** Used to associate wrap methods with their bit flags. */
var wrapFlags = [
['ary', WRAP_ARY_FLAG],
['bind', WRAP_BIND_FLAG],
['bindKey', WRAP_BIND_KEY_FLAG],
['curry', WRAP_CURRY_FLAG],
['curryRight', WRAP_CURRY_RIGHT_FLAG],
['flip', WRAP_FLIP_FLAG],
['partial', WRAP_PARTIAL_FLAG],
['partialRight', WRAP_PARTIAL_RIGHT_FLAG],
['rearg', WRAP_REARG_FLAG]
];
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
asyncTag = '[object AsyncFunction]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
domExcTag = '[object DOMException]',
errorTag = '[object Error]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
mapTag = '[object Map]',
numberTag = '[object Number]',
nullTag = '[object Null]',
objectTag = '[object Object]',
promiseTag = '[object Promise]',
proxyTag = '[object Proxy]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
symbolTag = '[object Symbol]',
undefinedTag = '[object Undefined]',
weakMapTag = '[object WeakMap]',
weakSetTag = '[object WeakSet]';
var arrayBufferTag = '[object ArrayBuffer]',
dataViewTag = '[object DataView]',
float32Tag = '[object Float32Array]',
float64Tag = '[object Float64Array]',
int8Tag = '[object Int8Array]',
int16Tag = '[object Int16Array]',
int32Tag = '[object Int32Array]',
uint8Tag = '[object Uint8Array]',
uint8ClampedTag = '[object Uint8ClampedArray]',
uint16Tag = '[object Uint16Array]',
uint32Tag = '[object Uint32Array]';
/** Used to match empty string literals in compiled template source. */
var reEmptyStringLeading = /\b__p \+= '';/g,
reEmptyStringMiddle = /\b(__p \+=) '' \+/g,
reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
/** Used to match HTML entities and HTML characters. */
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g,
reUnescapedHtml = /[&<>"']/g,
reHasEscapedHtml = RegExp(reEscapedHtml.source),
reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
/** Used to match template delimiters. */
var reEscape = /<%-([\s\S]+?)%>/g,
reEvaluate = /<%([\s\S]+?)%>/g,
reInterpolate = /<%=([\s\S]+?)%>/g;
/** Used to match property names within property paths. */
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,
reIsPlainProp = /^\w*$/,
rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g,
reHasRegExpChar = RegExp(reRegExpChar.source);
/** Used to match leading whitespace. */
var reTrimStart = /^\s+/;
/** Used to match a single whitespace character. */
var reWhitespace = /\s/;
/** Used to match wrap detail comments. */
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,
reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
reSplitDetails = /,? & /;
/** Used to match words composed of alphanumeric characters. */
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
/**
* Used to validate the `validate` option in `_.template` variable.
*
* Forbids characters which could potentially change the meaning of the function argument definition:
* - "()," (modification of function parameters)
* - "=" (default value)
* - "[]{}" (destructuring of function parameters)
* - "/" (beginning of a comment)
* - whitespace
*/
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
/** Used to match backslashes in property paths. */
var reEscapeChar = /\\(\\)?/g;
/**
* Used to match
* [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components).
*/
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
/** Used to match `RegExp` flags from their coerced string values. */
var reFlags = /\w*$/;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/** Used to match Latin Unicode letters (excluding mathematical operators). */
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
/** Used to ensure capturing order of template delimiters. */
var reNoMatch = /($^)/;
/** Used to match unescaped characters in compiled string literals. */
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f',
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
rsComboSymbolsRange = '\\u20d0-\\u20ff',
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
rsDingbatRange = '\\u2700-\\u27bf',
rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff',
rsMathOpRange = '\\xac\\xb1\\xd7\\xf7',
rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf',
rsPunctuationRange = '\\u2000-\\u206f',
rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000',
rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde',
rsVarRange = '\\ufe0e\\ufe0f',
rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
/** Used to compose unicode capture groups. */
var rsApos = "['\u2019]",
rsAstral = '[' + rsAstralRange + ']',
rsBreak = '[' + rsBreakRange + ']',
rsCombo = '[' + rsComboRange + ']',
rsDigits = '\\d+',
rsDingbat = '[' + rsDingbatRange + ']',
rsLower = '[' + rsLowerRange + ']',
rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']',
rsFitz = '\\ud83c[\\udffb-\\udfff]',
rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',
rsNonAstral = '[^' + rsAstralRange + ']',
rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}',
rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]',
rsUpper = '[' + rsUpperRange + ']',
rsZWJ = '\\u200d';
/** Used to compose unicode regexes. */
var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')',
rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')',
rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?',
rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?',
reOptMod = rsModifier + '?',
rsOptVar = '[' + rsVarRange + ']?',
rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',
rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])',
rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])',
rsSeq = rsOptVar + reOptMod + rsOptJoin,
rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq,
rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';
/** Used to match apostrophes. */
var reApos = RegExp(rsApos, 'g');
/**
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
*/
var reComboMark = RegExp(rsCombo, 'g');
/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */
var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');
/** Used to match complex or compound words. */
var reUnicodeWord = RegExp([
rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')',
rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')',
rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower,
rsUpper + '+' + rsOptContrUpper,
rsOrdUpper,
rsOrdLower,
rsDigits,
rsEmoji
].join('|'), 'g');
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
/** Used to detect strings that need a more robust regexp to match words. */
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
/** Used to assign default `context` object properties. */
var contextProps = [
'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array',
'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object',
'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array',
'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap',
'_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout'
];
/** Used to make template sourceURLs easier to identify. */
var templateCounter = -1;
/** Used to identify `toStringTag` values of typed arrays. */
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
typedArrayTags[errorTag] = typedArrayTags[funcTag] =
typedArrayTags[mapTag] = typedArrayTags[numberTag] =
typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
typedArrayTags[setTag] = typedArrayTags[stringTag] =
typedArrayTags[weakMapTag] = false;
/** Used to identify `toStringTag` values supported by `_.clone`. */
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] =
cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =
cloneableTags[boolTag] = cloneableTags[dateTag] =
cloneableTags[float32Tag] = cloneableTags[float64Tag] =
cloneableTags[int8Tag] = cloneableTags[int16Tag] =
cloneableTags[int32Tag] = cloneableTags[mapTag] =
cloneableTags[numberTag] = cloneableTags[objectTag] =
cloneableTags[regexpTag] = cloneableTags[setTag] =
cloneableTags[stringTag] = cloneableTags[symbolTag] =
cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =
cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] =
cloneableTags[weakMapTag] = false;
/** Used to map Latin Unicode letters to basic Latin letters. */
var deburredLetters = {
// Latin-1 Supplement block.
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
'\xc7': 'C', '\xe7': 'c',
'\xd0': 'D', '\xf0': 'd',
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
'\xd1': 'N', '\xf1': 'n',
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
'\xc6': 'Ae', '\xe6': 'ae',
'\xde': 'Th', '\xfe': 'th',
'\xdf': 'ss',
// Latin Extended-A block.
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
'\u0134': 'J', '\u0135': 'j',
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
'\u0163': 't', '\u0165': 't', '\u0167': 't',
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
'\u0174': 'W', '\u0175': 'w',
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
'\u0132': 'IJ', '\u0133': 'ij',
'\u0152': 'Oe', '\u0153': 'oe',
'\u0149': "'n", '\u017f': 's'
};
/** Used to map characters to HTML entities. */
var htmlEscapes = {
'&': '&amp;',
'<': '&lt;',
'>': '&gt;',
'"': '&quot;',
"'": '&#39;'
};
/** Used to map HTML entities to characters. */
var htmlUnescapes = {
'&amp;': '&',
'&lt;': '<',
'&gt;': '>',
'&quot;': '"',
'&#39;': "'"
};
/** Used to escape characters for inclusion in compiled string literals. */
var stringEscapes = {
'\\': '\\',
"'": "'",
'\n': 'n',
'\r': 'r',
'\u2028': 'u2028',
'\u2029': 'u2029'
};
/** Built-in method references without a dependency on `root`. */
var freeParseFloat = parseFloat,
freeParseInt = parseInt;
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
/** Detect free variable `exports`. */
var freeExports = true && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
/** Detect the popular CommonJS extension `module.exports`. */
var moduleExports = freeModule && freeModule.exports === freeExports;
/** Detect free variable `process` from Node.js. */
var freeProcess = moduleExports && freeGlobal.process;
/** Used to access faster Node.js helpers. */
var nodeUtil = (function() {
try {
// Use `util.types` for Node.js 10+.
var types = freeModule && freeModule.require && freeModule.require('util').types;
if (types) {
return types;
}
// Legacy `process.binding('util')` for Node.js < 10.
return freeProcess && freeProcess.binding && freeProcess.binding('util');
} catch (e) {}
}());
/* Node.js helper references. */
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer,
nodeIsDate = nodeUtil && nodeUtil.isDate,
nodeIsMap = nodeUtil && nodeUtil.isMap,
nodeIsRegExp = nodeUtil && nodeUtil.isRegExp,
nodeIsSet = nodeUtil && nodeUtil.isSet,
nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/*--------------------------------------------------------------------------*/
/**
* A faster alternative to `Function#apply`, this function invokes `func`
* with the `this` binding of `thisArg` and the arguments of `args`.
*
* @private
* @param {Function} func The function to invoke.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} args The arguments to invoke `func` with.
* @returns {*} Returns the result of `func`.
*/
function apply(func, thisArg, args) {
switch (args.length) {
case 0: return func.call(thisArg);
case 1: return func.call(thisArg, args[0]);
case 2: return func.call(thisArg, args[0], args[1]);
case 3: return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
/**
* A specialized version of `baseAggregator` for arrays.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform keys.
* @param {Object} accumulator The initial aggregated object.
* @returns {Function} Returns `accumulator`.
*/
function arrayAggregator(array, setter, iteratee, accumulator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
var value = array[index];
setter(accumulator, value, iteratee(value), array);
}
return accumulator;
}
/**
* A specialized version of `_.forEach` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEach(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
/**
* A specialized version of `_.forEachRight` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns `array`.
*/
function arrayEachRight(array, iteratee) {
var length = array == null ? 0 : array.length;
while (length--) {
if (iteratee(array[length], length, array) === false) {
break;
}
}
return array;
}
/**
* A specialized version of `_.every` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`.
*/
function arrayEvery(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (!predicate(array[index], index, array)) {
return false;
}
}
return true;
}
/**
* A specialized version of `_.filter` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function arrayFilter(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
/**
* A specialized version of `_.includes` for arrays without support for
* specifying an index to search from.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
/**
* This function is like `arrayIncludes` except that it accepts a comparator.
*
* @private
* @param {Array} [array] The array to inspect.
* @param {*} target The value to search for.
* @param {Function} comparator The comparator invoked per element.
* @returns {boolean} Returns `true` if `target` is found, else `false`.
*/
function arrayIncludesWith(array, value, comparator) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
/**
* Appends the elements of `values` to `array`.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to append.
* @returns {Array} Returns `array`.
*/
function arrayPush(array, values) {
var index = -1,
length = values.length,
offset = array.length;
while (++index < length) {
array[offset + index] = values[index];
}
return array;
}
/**
* A specialized version of `_.reduce` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the first element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
/**
* A specialized version of `_.reduceRight` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the last element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
var length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[--length];
}
while (length--) {
accumulator = iteratee(accumulator, array[length], length, array);
}
return accumulator;
}
/**
* A specialized version of `_.some` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function arraySome(array, predicate) {
var index = -1,
length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
/**
* Gets the size of an ASCII `string`.
*
* @private
* @param {string} string The string inspect.
* @returns {number} Returns the string size.
*/
var asciiSize = baseProperty('length');
/**
* Converts an ASCII `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function asciiToArray(string) {
return string.split('');
}
/**
* Splits an ASCII `string` into an array of its words.
*
* @private
* @param {string} The string to inspect.
* @returns {Array} Returns the words of `string`.
*/
function asciiWords(string) {
return string.match(reAsciiWord) || [];
}
/**
* The base implementation of methods like `_.findKey` and `_.findLastKey`,
* without support for iteratee shorthands, which iterates over `collection`
* using `eachFunc`.
*
* @private
* @param {Array|Object} collection The collection to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {Function} eachFunc The function to iterate over `collection`.
* @returns {*} Returns the found element or its key, else `undefined`.
*/
function baseFindKey(collection, predicate, eachFunc) {
var result;
eachFunc(collection, function(value, key, collection) {
if (predicate(value, key, collection)) {
result = key;
return false;
}
});
return result;
}
/**
* The base implementation of `_.findIndex` and `_.findLastIndex` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} predicate The function invoked per iteration.
* @param {number} fromIndex The index to search from.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length,
index = fromIndex + (fromRight ? 1 : -1);
while ((fromRight ? index-- : ++index < length)) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
/**
* The base implementation of `_.indexOf` without `fromIndex` bounds checks.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOf(array, value, fromIndex) {
return value === value
? strictIndexOf(array, value, fromIndex)
: baseFindIndex(array, baseIsNaN, fromIndex);
}
/**
* This function is like `baseIndexOf` except that it accepts a comparator.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @param {Function} comparator The comparator invoked per element.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function baseIndexOfWith(array, value, fromIndex, comparator) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (comparator(array[index], value)) {
return index;
}
}
return -1;
}
/**
* The base implementation of `_.isNaN` without support for number objects.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
*/
function baseIsNaN(value) {
return value !== value;
}
/**
* The base implementation of `_.mean` and `_.meanBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the mean.
*/
function baseMean(array, iteratee) {
var length = array == null ? 0 : array.length;
return length ? (baseSum(array, iteratee) / length) : NAN;
}
/**
* The base implementation of `_.property` without support for deep paths.
*
* @private
* @param {string} key The key of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function baseProperty(key) {
return function(object) {
return object == null ? undefined : object[key];
};
}
/**
* The base implementation of `_.propertyOf` without support for deep paths.
*
* @private
* @param {Object} object The object to query.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyOf(object) {
return function(key) {
return object == null ? undefined : object[key];
};
}
/**
* The base implementation of `_.reduce` and `_.reduceRight`, without support
* for iteratee shorthands, which iterates over `collection` using `eachFunc`.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} accumulator The initial value.
* @param {boolean} initAccum Specify using the first or last element of
* `collection` as the initial value.
* @param {Function} eachFunc The function to iterate over `collection`.
* @returns {*} Returns the accumulated value.
*/
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
eachFunc(collection, function(value, index, collection) {
accumulator = initAccum
? (initAccum = false, value)
: iteratee(accumulator, value, index, collection);
});
return accumulator;
}
/**
* The base implementation of `_.sortBy` which uses `comparer` to define the
* sort order of `array` and replaces criteria objects with their corresponding
* values.
*
* @private
* @param {Array} array The array to sort.
* @param {Function} comparer The function to define sort order.
* @returns {Array} Returns `array`.
*/
function baseSortBy(array, comparer) {
var length = array.length;
array.sort(comparer);
while (length--) {
array[length] = array[length].value;
}
return array;
}
/**
* The base implementation of `_.sum` and `_.sumBy` without support for
* iteratee shorthands.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {number} Returns the sum.
*/
function baseSum(array, iteratee) {
var result,
index = -1,
length = array.length;
while (++index < length) {
var current = iteratee(array[index]);
if (current !== undefined) {
result = result === undefined ? current : (result + current);
}
}
return result;
}
/**
* The base implementation of `_.times` without support for iteratee shorthands
* or max array length checks.
*
* @private
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the array of results.
*/
function baseTimes(n, iteratee) {
var index = -1,
result = Array(n);
while (++index < n) {
result[index] = iteratee(index);
}
return result;
}
/**
* The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array
* of key-value pairs for `object` corresponding to the property names of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the key-value pairs.
*/
function baseToPairs(object, props) {
return arrayMap(props, function(key) {
return [key, object[key]];
});
}
/**
* The base implementation of `_.trim`.
*
* @private
* @param {string} string The string to trim.
* @returns {string} Returns the trimmed string.
*/
function baseTrim(string) {
return string
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
: string;
}
/**
* The base implementation of `_.unary` without support for storing metadata.
*
* @private
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
*/
function baseUnary(func) {
return function(value) {
return func(value);
};
}
/**
* The base implementation of `_.values` and `_.valuesIn` which creates an
* array of `object` property values corresponding to the property names
* of `props`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} props The property names to get values for.
* @returns {Object} Returns the array of property values.
*/
function baseValues(object, props) {
return arrayMap(props, function(key) {
return object[key];
});
}
/**
* Checks if a `cache` value for `key` exists.
*
* @private
* @param {Object} cache The cache to query.
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function cacheHas(cache, key) {
return cache.has(key);
}
/**
* Used by `_.trim` and `_.trimStart` to get the index of the first string symbol
* that is not found in the character symbols.
*
* @private
* @param {Array} strSymbols The string symbols to inspect.
* @param {Array} chrSymbols The character symbols to find.
* @returns {number} Returns the index of the first unmatched string symbol.
*/
function charsStartIndex(strSymbols, chrSymbols) {
var index = -1,
length = strSymbols.length;
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
}
/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol
* that is not found in the character symbols.
*
* @private
* @param {Array} strSymbols The string symbols to inspect.
* @param {Array} chrSymbols The character symbols to find.
* @returns {number} Returns the index of the last unmatched string symbol.
*/
function charsEndIndex(strSymbols, chrSymbols) {
var index = strSymbols.length;
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {}
return index;
}
/**
* Gets the number of `placeholder` occurrences in `array`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} placeholder The placeholder to search for.
* @returns {number} Returns the placeholder count.
*/
function countHolders(array, placeholder) {
var length = array.length,
result = 0;
while (length--) {
if (array[length] === placeholder) {
++result;
}
}
return result;
}
/**
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
* letters to basic Latin letters.
*
* @private
* @param {string} letter The matched letter to deburr.
* @returns {string} Returns the deburred letter.
*/
var deburrLetter = basePropertyOf(deburredLetters);
/**
* Used by `_.escape` to convert characters to HTML entities.
*
* @private
* @param {string} chr The matched character to escape.
* @returns {string} Returns the escaped character.
*/
var escapeHtmlChar = basePropertyOf(htmlEscapes);
/**
* Used by `_.template` to escape characters for inclusion in compiled string literals.
*
* @private
* @param {string} chr The matched character to escape.
* @returns {string} Returns the escaped character.
*/
function escapeStringChar(chr) {
return '\\' + stringEscapes[chr];
}
/**
* Gets the value at `key` of `object`.
*
* @private
* @param {Object} [object] The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function getValue(object, key) {
return object == null ? undefined : object[key];
}
/**
* Checks if `string` contains Unicode symbols.
*
* @private
* @param {string} string The string to inspect.
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
*/
function hasUnicode(string) {
return reHasUnicode.test(string);
}
/**
* Checks if `string` contains a word composed of Unicode symbols.
*
* @private
* @param {string} string The string to inspect.
* @returns {boolean} Returns `true` if a word is found, else `false`.
*/
function hasUnicodeWord(string) {
return reHasUnicodeWord.test(string);
}
/**
* Converts `iterator` to an array.
*
* @private
* @param {Object} iterator The iterator to convert.
* @returns {Array} Returns the converted array.
*/
function iteratorToArray(iterator) {
var data,
result = [];
while (!(data = iterator.next()).done) {
result.push(data.value);
}
return result;
}
/**
* Converts `map` to its key-value pairs.
*
* @private
* @param {Object} map The map to convert.
* @returns {Array} Returns the key-value pairs.
*/
function mapToArray(map) {
var index = -1,
result = Array(map.size);
map.forEach(function(value, key) {
result[++index] = [key, value];
});
return result;
}
/**
* Creates a unary function that invokes `func` with its argument transformed.
*
* @private
* @param {Function} func The function to wrap.
* @param {Function} transform The argument transform.
* @returns {Function} Returns the new function.
*/
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
/**
* Replaces all `placeholder` elements in `array` with an internal placeholder
* and returns an array of their indexes.
*
* @private
* @param {Array} array The array to modify.
* @param {*} placeholder The placeholder to replace.
* @returns {Array} Returns the new array of placeholder indexes.
*/
function replaceHolders(array, placeholder) {
var index = -1,
length = array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (value === placeholder || value === PLACEHOLDER) {
array[index] = PLACEHOLDER;
result[resIndex++] = index;
}
}
return result;
}
/**
* Converts `set` to an array of its values.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the values.
*/
function setToArray(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = value;
});
return result;
}
/**
* Converts `set` to its value-value pairs.
*
* @private
* @param {Object} set The set to convert.
* @returns {Array} Returns the value-value pairs.
*/
function setToPairs(set) {
var index = -1,
result = Array(set.size);
set.forEach(function(value) {
result[++index] = [value, value];
});
return result;
}
/**
* A specialized version of `_.indexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1,
length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
/**
* A specialized version of `_.lastIndexOf` which performs strict equality
* comparisons of values, i.e. `===`.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} fromIndex The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function strictLastIndexOf(array, value, fromIndex) {
var index = fromIndex + 1;
while (index--) {
if (array[index] === value) {
return index;
}
}
return index;
}
/**
* Gets the number of symbols in `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the string size.
*/
function stringSize(string) {
return hasUnicode(string)
? unicodeSize(string)
: asciiSize(string);
}
/**
* Converts `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function stringToArray(string) {
return hasUnicode(string)
? unicodeToArray(string)
: asciiToArray(string);
}
/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
* character of `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the index of the last non-whitespace character.
*/
function trimmedEndIndex(string) {
var index = string.length;
while (index-- && reWhitespace.test(string.charAt(index))) {}
return index;
}
/**
* Used by `_.unescape` to convert HTML entities to characters.
*
* @private
* @param {string} chr The matched character to unescape.
* @returns {string} Returns the unescaped character.
*/
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
/**
* Gets the size of a Unicode `string`.
*
* @private
* @param {string} string The string inspect.
* @returns {number} Returns the string size.
*/
function unicodeSize(string) {
var result = reUnicode.lastIndex = 0;
while (reUnicode.test(string)) {
++result;
}
return result;
}
/**
* Converts a Unicode `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function unicodeToArray(string) {
return string.match(reUnicode) || [];
}
/**
* Splits a Unicode `string` into an array of its words.
*
* @private
* @param {string} The string to inspect.
* @returns {Array} Returns the words of `string`.
*/
function unicodeWords(string) {
return string.match(reUnicodeWord) || [];
}
/*--------------------------------------------------------------------------*/
/**
* Create a new pristine `lodash` function using the `context` object.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Util
* @param {Object} [context=root] The context object.
* @returns {Function} Returns a new `lodash` function.
* @example
*
* _.mixin({ 'foo': _.constant('foo') });
*
* var lodash = _.runInContext();
* lodash.mixin({ 'bar': lodash.constant('bar') });
*
* _.isFunction(_.foo);
* // => true
* _.isFunction(_.bar);
* // => false
*
* lodash.isFunction(lodash.foo);
* // => false
* lodash.isFunction(lodash.bar);
* // => true
*
* // Create a suped-up `defer` in Node.js.
* var defer = _.runInContext({ 'setTimeout': setImmediate }).defer;
*/
var runInContext = (function runInContext(context) {
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
/** Built-in constructor references. */
var Array = context.Array,
Date = context.Date,
Error = context.Error,
Function = context.Function,
Math = context.Math,
Object = context.Object,
RegExp = context.RegExp,
String = context.String,
TypeError = context.TypeError;
/** Used for built-in method references. */
var arrayProto = Array.prototype,
funcProto = Function.prototype,
objectProto = Object.prototype;
/** Used to detect overreaching core-js shims. */
var coreJsData = context['__core-js_shared__'];
/** Used to resolve the decompiled source of functions. */
var funcToString = funcProto.toString;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/** Used to generate unique IDs. */
var idCounter = 0;
/** Used to detect methods masquerading as native. */
var maskSrcKey = (function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
return uid ? ('Symbol(src)_1.' + uid) : '';
}());
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var nativeObjectToString = objectProto.toString;
/** Used to infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/** Used to restore the original `_` reference in `_.noConflict`. */
var oldDash = root._;
/** Used to detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/** Built-in value references. */
var Buffer = moduleExports ? context.Buffer : undefined,
Symbol = context.Symbol,
Uint8Array = context.Uint8Array,
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,
getPrototype = overArg(Object.getPrototypeOf, Object),
objectCreate = Object.create,
propertyIsEnumerable = objectProto.propertyIsEnumerable,
splice = arrayProto.splice,
spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined,
symIterator = Symbol ? Symbol.iterator : undefined,
symToStringTag = Symbol ? Symbol.toStringTag : undefined;
var defineProperty = (function() {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}());
/** Mocked built-ins. */
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout,
ctxNow = Date && Date.now !== root.Date.now && Date.now,
ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeCeil = Math.ceil,
nativeFloor = Math.floor,
nativeGetSymbols = Object.getOwnPropertySymbols,
nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
nativeIsFinite = context.isFinite,
nativeJoin = arrayProto.join,
nativeKeys = overArg(Object.keys, Object),
nativeMax = Math.max,
nativeMin = Math.min,
nativeNow = Date.now,
nativeParseInt = context.parseInt,
nativeRandom = Math.random,
nativeReverse = arrayProto.reverse;
/* Built-in method references that are verified to be native. */
var DataView = getNative(context, 'DataView'),
Map = getNative(context, 'Map'),
Promise = getNative(context, 'Promise'),
Set = getNative(context, 'Set'),
WeakMap = getNative(context, 'WeakMap'),
nativeCreate = getNative(Object, 'create');
/** Used to store function metadata. */
var metaMap = WeakMap && new WeakMap;
/** Used to lookup unminified function names. */
var realNames = {};
/** Used to detect maps, sets, and weakmaps. */
var dataViewCtorString = toSource(DataView),
mapCtorString = toSource(Map),
promiseCtorString = toSource(Promise),
setCtorString = toSource(Set),
weakMapCtorString = toSource(WeakMap);
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolValueOf = symbolProto ? symbolProto.valueOf : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/*------------------------------------------------------------------------*/
/**
* Creates a `lodash` object which wraps `value` to enable implicit method
* chain sequences. Methods that operate on and return arrays, collections,
* and functions can be chained together. Methods that retrieve a single value
* or may return a primitive value will automatically end the chain sequence
* and return the unwrapped value. Otherwise, the value must be unwrapped
* with `_#value`.
*
* Explicit chain sequences, which must be unwrapped with `_#value`, may be
* enabled using `_.chain`.
*
* The execution of chained methods is lazy, that is, it's deferred until
* `_#value` is implicitly or explicitly called.
*
* Lazy evaluation allows several methods to support shortcut fusion.
* Shortcut fusion is an optimization to merge iteratee calls; this avoids
* the creation of intermediate arrays and can greatly reduce the number of
* iteratee executions. Sections of a chain sequence qualify for shortcut
* fusion if the section is applied to an array and iteratees accept only
* one argument. The heuristic for whether a section qualifies for shortcut
* fusion is subject to change.
*
* Chaining is supported in custom builds as long as the `_#value` method is
* directly or indirectly included in the build.
*
* In addition to lodash methods, wrappers have `Array` and `String` methods.
*
* The wrapper `Array` methods are:
* `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift`
*
* The wrapper `String` methods are:
* `replace` and `split`
*
* The wrapper methods that support shortcut fusion are:
* `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`,
* `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`,
* `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray`
*
* The chainable wrapper methods are:
* `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`,
* `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`,
* `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`,
* `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`,
* `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`,
* `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`,
* `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`,
* `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`,
* `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`,
* `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`,
* `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`,
* `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`,
* `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`,
* `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`,
* `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`,
* `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`,
* `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`,
* `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`,
* `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`,
* `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`,
* `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`,
* `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`,
* `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`,
* `zipObject`, `zipObjectDeep`, and `zipWith`
*
* The wrapper methods that are **not** chainable by default are:
* `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`,
* `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`,
* `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`,
* `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`,
* `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`,
* `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`,
* `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`,
* `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`,
* `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`,
* `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`,
* `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`,
* `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`,
* `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`,
* `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`,
* `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`,
* `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`,
* `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`,
* `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`,
* `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`,
* `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`,
* `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`,
* `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`,
* `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`,
* `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`,
* `upperFirst`, `value`, and `words`
*
* @name _
* @constructor
* @category Seq
* @param {*} value The value to wrap in a `lodash` instance.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* function square(n) {
* return n * n;
* }
*
* var wrapped = _([1, 2, 3]);
*
* // Returns an unwrapped value.
* wrapped.reduce(_.add);
* // => 6
*
* // Returns a wrapped value.
* var squares = wrapped.map(square);
*
* _.isArray(squares);
* // => false
*
* _.isArray(squares.value());
* // => true
*/
function lodash(value) {
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
if (value instanceof LodashWrapper) {
return value;
}
if (hasOwnProperty.call(value, '__wrapped__')) {
return wrapperClone(value);
}
}
return new LodashWrapper(value);
}
/**
* The base implementation of `_.create` without support for assigning
* properties to the created object.
*
* @private
* @param {Object} proto The object to inherit from.
* @returns {Object} Returns the new object.
*/
var baseCreate = (function() {
function object() {}
return function(proto) {
if (!isObject(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result = new object;
object.prototype = undefined;
return result;
};
}());
/**
* The function whose prototype chain sequence wrappers inherit from.
*
* @private
*/
function baseLodash() {
// No operation performed.
}
/**
* The base constructor for creating `lodash` wrapper objects.
*
* @private
* @param {*} value The value to wrap.
* @param {boolean} [chainAll] Enable explicit method chain sequences.
*/
function LodashWrapper(value, chainAll) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__chain__ = !!chainAll;
this.__index__ = 0;
this.__values__ = undefined;
}
/**
* By default, the template delimiters used by lodash are like those in
* embedded Ruby (ERB) as well as ES2015 template strings. Change the
* following template settings to use alternative delimiters.
*
* @static
* @memberOf _
* @type {Object}
*/
lodash.templateSettings = {
/**
* Used to detect `data` property values to be HTML-escaped.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
'escape': reEscape,
/**
* Used to detect code to be evaluated.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
'evaluate': reEvaluate,
/**
* Used to detect `data` property values to inject.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
'interpolate': reInterpolate,
/**
* Used to reference the data object in the template text.
*
* @memberOf _.templateSettings
* @type {string}
*/
'variable': '',
/**
* Used to import variables into the compiled template.
*
* @memberOf _.templateSettings
* @type {Object}
*/
'imports': {
/**
* A reference to the `lodash` function.
*
* @memberOf _.templateSettings.imports
* @type {Function}
*/
'_': lodash
}
};
// Ensure wrappers are instances of `baseLodash`.
lodash.prototype = baseLodash.prototype;
lodash.prototype.constructor = lodash;
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
LodashWrapper.prototype.constructor = LodashWrapper;
/*------------------------------------------------------------------------*/
/**
* Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.
*
* @private
* @constructor
* @param {*} value The value to wrap.
*/
function LazyWrapper(value) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__dir__ = 1;
this.__filtered__ = false;
this.__iteratees__ = [];
this.__takeCount__ = MAX_ARRAY_LENGTH;
this.__views__ = [];
}
/**
* Creates a clone of the lazy wrapper object.
*
* @private
* @name clone
* @memberOf LazyWrapper
* @returns {Object} Returns the cloned `LazyWrapper` object.
*/
function lazyClone() {
var result = new LazyWrapper(this.__wrapped__);
result.__actions__ = copyArray(this.__actions__);
result.__dir__ = this.__dir__;
result.__filtered__ = this.__filtered__;
result.__iteratees__ = copyArray(this.__iteratees__);
result.__takeCount__ = this.__takeCount__;
result.__views__ = copyArray(this.__views__);
return result;
}
/**
* Reverses the direction of lazy iteration.
*
* @private
* @name reverse
* @memberOf LazyWrapper
* @returns {Object} Returns the new reversed `LazyWrapper` object.
*/
function lazyReverse() {
if (this.__filtered__) {
var result = new LazyWrapper(this);
result.__dir__ = -1;
result.__filtered__ = true;
} else {
result = this.clone();
result.__dir__ *= -1;
}
return result;
}
/**
* Extracts the unwrapped value from its lazy wrapper.
*
* @private
* @name value
* @memberOf LazyWrapper
* @returns {*} Returns the unwrapped value.
*/
function lazyValue() {
var array = this.__wrapped__.value(),
dir = this.__dir__,
isArr = isArray(array),
isRight = dir < 0,
arrLength = isArr ? array.length : 0,
view = getView(0, arrLength, this.__views__),
start = view.start,
end = view.end,
length = end - start,
index = isRight ? end : (start - 1),
iteratees = this.__iteratees__,
iterLength = iteratees.length,
resIndex = 0,
takeCount = nativeMin(length, this.__takeCount__);
if (!isArr || (!isRight && arrLength == length && takeCount == length)) {
return baseWrapperValue(array, this.__actions__);
}
var result = [];
outer:
while (length-- && resIndex < takeCount) {
index += dir;
var iterIndex = -1,
value = array[index];
while (++iterIndex < iterLength) {
var data = iteratees[iterIndex],
iteratee = data.iteratee,
type = data.type,
computed = iteratee(value);
if (type == LAZY_MAP_FLAG) {
value = computed;
} else if (!computed) {
if (type == LAZY_FILTER_FLAG) {
continue outer;
} else {
break outer;
}
}
}
result[resIndex++] = value;
}
return result;
}
// Ensure `LazyWrapper` is an instance of `baseLodash`.
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
LazyWrapper.prototype.constructor = LazyWrapper;
/*------------------------------------------------------------------------*/
/**
* Creates a hash object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Hash(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
/**
* Removes `key` and its value from the hash.
*
* @private
* @name delete
* @memberOf Hash
* @param {Object} hash The hash to modify.
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function hashDelete(key) {
var result = this.has(key) && delete this.__data__[key];
this.size -= result ? 1 : 0;
return result;
}
/**
* Gets the hash value for `key`.
*
* @private
* @name get
* @memberOf Hash
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function hashGet(key) {
var data = this.__data__;
if (nativeCreate) {
var result = data[key];
return result === HASH_UNDEFINED ? undefined : result;
}
return hasOwnProperty.call(data, key) ? data[key] : undefined;
}
/**
* Checks if a hash value for `key` exists.
*
* @private
* @name has
* @memberOf Hash
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function hashHas(key) {
var data = this.__data__;
return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
}
/**
* Sets the hash `key` to `value`.
*
* @private
* @name set
* @memberOf Hash
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the hash instance.
*/
function hashSet(key, value) {
var data = this.__data__;
this.size += this.has(key) ? 0 : 1;
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
return this;
}
// Add methods to `Hash`.
Hash.prototype.clear = hashClear;
Hash.prototype['delete'] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
/*------------------------------------------------------------------------*/
/**
* Creates an list cache object.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function ListCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
/**
* Removes `key` and its value from the list cache.
*
* @private
* @name delete
* @memberOf ListCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function listCacheDelete(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
/**
* Gets the list cache value for `key`.
*
* @private
* @name get
* @memberOf ListCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function listCacheGet(key) {
var data = this.__data__,
index = assocIndexOf(data, key);
return index < 0 ? undefined : data[index][1];
}
/**
* Checks if a list cache value for `key` exists.
*
* @private
* @name has
* @memberOf ListCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function listCacheHas(key) {
return assocIndexOf(this.__data__, key) > -1;
}
/**
* Sets the list cache `key` to `value`.
*
* @private
* @name set
* @memberOf ListCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the list cache instance.
*/
function listCacheSet(key, value) {
var data = this.__data__,
index = assocIndexOf(data, key);
if (index < 0) {
++this.size;
data.push([key, value]);
} else {
data[index][1] = value;
}
return this;
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
/*------------------------------------------------------------------------*/
/**
* Creates a map cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function MapCache(entries) {
var index = -1,
length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
/**
* Removes all key-value entries from the map.
*
* @private
* @name clear
* @memberOf MapCache
*/
function mapCacheClear() {
this.size = 0;
this.__data__ = {
'hash': new Hash,
'map': new (Map || ListCache),
'string': new Hash
};
}
/**
* Removes `key` and its value from the map.
*
* @private
* @name delete
* @memberOf MapCache
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function mapCacheDelete(key) {
var result = getMapData(this, key)['delete'](key);
this.size -= result ? 1 : 0;
return result;
}
/**
* Gets the map value for `key`.
*
* @private
* @name get
* @memberOf MapCache
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function mapCacheGet(key) {
return getMapData(this, key).get(key);
}
/**
* Checks if a map value for `key` exists.
*
* @private
* @name has
* @memberOf MapCache
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function mapCacheHas(key) {
return getMapData(this, key).has(key);
}
/**
* Sets the map `key` to `value`.
*
* @private
* @name set
* @memberOf MapCache
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the map cache instance.
*/
function mapCacheSet(key, value) {
var data = getMapData(this, key),
size = data.size;
data.set(key, value);
this.size += data.size == size ? 0 : 1;
return this;
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
/*------------------------------------------------------------------------*/
/**
*
* Creates an array cache object to store unique values.
*
* @private
* @constructor
* @param {Array} [values] The values to cache.
*/
function SetCache(values) {
var index = -1,
length = values == null ? 0 : values.length;
this.__data__ = new MapCache;
while (++index < length) {
this.add(values[index]);
}
}
/**
* Adds `value` to the array cache.
*
* @private
* @name add
* @memberOf SetCache
* @alias push
* @param {*} value The value to cache.
* @returns {Object} Returns the cache instance.
*/
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
/**
* Checks if `value` is in the array cache.
*
* @private
* @name has
* @memberOf SetCache
* @param {*} value The value to search for.
* @returns {number} Returns `true` if `value` is found, else `false`.
*/
function setCacheHas(value) {
return this.__data__.has(value);
}
// Add methods to `SetCache`.
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
/*------------------------------------------------------------------------*/
/**
* Creates a stack cache object to store key-value pairs.
*
* @private
* @constructor
* @param {Array} [entries] The key-value pairs to cache.
*/
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
/**
* Removes all key-value entries from the stack.
*
* @private
* @name clear
* @memberOf Stack
*/
function stackClear() {
this.__data__ = new ListCache;
this.size = 0;
}
/**
* Removes `key` and its value from the stack.
*
* @private
* @name delete
* @memberOf Stack
* @param {string} key The key of the value to remove.
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
*/
function stackDelete(key) {
var data = this.__data__,
result = data['delete'](key);
this.size = data.size;
return result;
}
/**
* Gets the stack value for `key`.
*
* @private
* @name get
* @memberOf Stack
* @param {string} key The key of the value to get.
* @returns {*} Returns the entry value.
*/
function stackGet(key) {
return this.__data__.get(key);
}
/**
* Checks if a stack value for `key` exists.
*
* @private
* @name has
* @memberOf Stack
* @param {string} key The key of the entry to check.
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
*/
function stackHas(key) {
return this.__data__.has(key);
}
/**
* Sets the stack `key` to `value`.
*
* @private
* @name set
* @memberOf Stack
* @param {string} key The key of the value to set.
* @param {*} value The value to set.
* @returns {Object} Returns the stack cache instance.
*/
function stackSet(key, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
pairs.push([key, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key, value);
this.size = data.size;
return this;
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
/*------------------------------------------------------------------------*/
/**
* Creates an array of the enumerable property names of the array-like `value`.
*
* @private
* @param {*} value The value to query.
* @param {boolean} inherited Specify returning inherited property names.
* @returns {Array} Returns the array of property names.
*/
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value),
isArg = !isArr && isArguments(value),
isBuff = !isArr && !isArg && isBuffer(value),
isType = !isArr && !isArg && !isBuff && isTypedArray(value),
skipIndexes = isArr || isArg || isBuff || isType,
result = skipIndexes ? baseTimes(value.length, String) : [],
length = result.length;
for (var key in value) {
if ((inherited || hasOwnProperty.call(value, key)) &&
!(skipIndexes && (
// Safari 9 has enumerable `arguments.length` in strict mode.
key == 'length' ||
// Node.js 0.10 has enumerable non-index properties on buffers.
(isBuff && (key == 'offset' || key == 'parent')) ||
// PhantomJS 2 has enumerable non-index properties on typed arrays.
(isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
// Skip index properties.
isIndex(key, length)
))) {
result.push(key);
}
}
return result;
}
/**
* A specialized version of `_.sample` for arrays.
*
* @private
* @param {Array} array The array to sample.
* @returns {*} Returns the random element.
*/
function arraySample(array) {
var length = array.length;
return length ? array[baseRandom(0, length - 1)] : undefined;
}
/**
* A specialized version of `_.sampleSize` for arrays.
*
* @private
* @param {Array} array The array to sample.
* @param {number} n The number of elements to sample.
* @returns {Array} Returns the random elements.
*/
function arraySampleSize(array, n) {
return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length));
}
/**
* A specialized version of `_.shuffle` for arrays.
*
* @private
* @param {Array} array The array to shuffle.
* @returns {Array} Returns the new shuffled array.
*/
function arrayShuffle(array) {
return shuffleSelf(copyArray(array));
}
/**
* This function is like `assignValue` except that it doesn't assign
* `undefined` values.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignMergeValue(object, key, value) {
if ((value !== undefined && !eq(object[key], value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
/**
* Assigns `value` to `key` of `object` if the existing value is not equivalent
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function assignValue(object, key, value) {
var objValue = object[key];
if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||
(value === undefined && !(key in object))) {
baseAssignValue(object, key, value);
}
}
/**
* Gets the index at which the `key` is found in `array` of key-value pairs.
*
* @private
* @param {Array} array The array to inspect.
* @param {*} key The key to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
*/
function assocIndexOf(array, key) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key)) {
return length;
}
}
return -1;
}
/**
* Aggregates elements of `collection` on `accumulator` with keys transformed
* by `iteratee` and values set by `setter`.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform keys.
* @param {Object} accumulator The initial aggregated object.
* @returns {Function} Returns `accumulator`.
*/
function baseAggregator(collection, setter, iteratee, accumulator) {
baseEach(collection, function(value, key, collection) {
setter(accumulator, value, iteratee(value), collection);
});
return accumulator;
}
/**
* The base implementation of `_.assign` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssign(object, source) {
return object && copyObject(source, keys(source), object);
}
/**
* The base implementation of `_.assignIn` without support for multiple sources
* or `customizer` functions.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @returns {Object} Returns `object`.
*/
function baseAssignIn(object, source) {
return object && copyObject(source, keysIn(source), object);
}
/**
* The base implementation of `assignValue` and `assignMergeValue` without
* value checks.
*
* @private
* @param {Object} object The object to modify.
* @param {string} key The key of the property to assign.
* @param {*} value The value to assign.
*/
function baseAssignValue(object, key, value) {
if (key == '__proto__' && defineProperty) {
defineProperty(object, key, {
'configurable': true,
'enumerable': true,
'value': value,
'writable': true
});
} else {
object[key] = value;
}
}
/**
* The base implementation of `_.at` without support for individual paths.
*
* @private
* @param {Object} object The object to iterate over.
* @param {string[]} paths The property paths to pick.
* @returns {Array} Returns the picked elements.
*/
function baseAt(object, paths) {
var index = -1,
length = paths.length,
result = Array(length),
skip = object == null;
while (++index < length) {
result[index] = skip ? undefined : get(object, paths[index]);
}
return result;
}
/**
* The base implementation of `_.clamp` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
*/
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined) {
number = number <= upper ? number : upper;
}
if (lower !== undefined) {
number = number >= lower ? number : lower;
}
}
return number;
}
/**
* The base implementation of `_.clone` and `_.cloneDeep` which tracks
* traversed objects.
*
* @private
* @param {*} value The value to clone.
* @param {boolean} bitmask The bitmask flags.
* 1 - Deep clone
* 2 - Flatten inherited properties
* 4 - Clone symbols
* @param {Function} [customizer] The function to customize cloning.
* @param {string} [key] The key of `value`.
* @param {Object} [object] The parent object of `value`.
* @param {Object} [stack] Tracks traversed objects and their clone counterparts.
* @returns {*} Returns the cloned value.
*/
function baseClone(value, bitmask, customizer, key, object, stack) {
var result,
isDeep = bitmask & CLONE_DEEP_FLAG,
isFlat = bitmask & CLONE_FLAT_FLAG,
isFull = bitmask & CLONE_SYMBOLS_FLAG;
if (customizer) {
result = object ? customizer(value, key, object, stack) : customizer(value);
}
if (result !== undefined) {
return result;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result = initCloneArray(value);
if (!isDeep) {
return copyArray(value, result);
}
} else {
var tag = getTag(value),
isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || (isFunc && !object)) {
result = (isFlat || isFunc) ? {} : initCloneObject(value);
if (!isDeep) {
return isFlat
? copySymbolsIn(value, baseAssignIn(result, value))
: copySymbols(value, baseAssign(result, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result = initCloneByTag(value, tag, isDeep);
}
}
// Check for circular references and return its corresponding clone.
stack || (stack = new Stack);
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result);
if (isSet(value)) {
value.forEach(function(subValue) {
result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
});
} else if (isMap(value)) {
value.forEach(function(subValue, key) {
result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
}
var keysFunc = isFull
? (isFlat ? getAllKeysIn : getAllKeys)
: (isFlat ? keysIn : keys);
var props = isArr ? undefined : keysFunc(value);
arrayEach(props || value, function(subValue, key) {
if (props) {
key = subValue;
subValue = value[key];
}
// Recursively populate clone (susceptible to call stack limits).
assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));
});
return result;
}
/**
* The base implementation of `_.conforms` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property predicates to conform to.
* @returns {Function} Returns the new spec function.
*/
function baseConforms(source) {
var props = keys(source);
return function(object) {
return baseConformsTo(object, source, props);
};
}
/**
* The base implementation of `_.conformsTo` which accepts `props` to check.
*
* @private
* @param {Object} object The object to inspect.
* @param {Object} source The object of property predicates to conform to.
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
*/
function baseConformsTo(object, source, props) {
var length = props.length;
if (object == null) {
return !length;
}
object = Object(object);
while (length--) {
var key = props[length],
predicate = source[key],
value = object[key];
if ((value === undefined && !(key in object)) || !predicate(value)) {
return false;
}
}
return true;
}
/**
* The base implementation of `_.delay` and `_.defer` which accepts `args`
* to provide to `func`.
*
* @private
* @param {Function} func The function to delay.
* @param {number} wait The number of milliseconds to delay invocation.
* @param {Array} args The arguments to provide to `func`.
* @returns {number|Object} Returns the timer id or timeout object.
*/
function baseDelay(func, wait, args) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return setTimeout(function() { func.apply(undefined, args); }, wait);
}
/**
* The base implementation of methods like `_.difference` without support
* for excluding multiple arrays or iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Array} values The values to exclude.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
*/
function baseDifference(array, values, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
isCommon = true,
length = array.length,
result = [],
valuesLength = values.length;
if (!length) {
return result;
}
if (iteratee) {
values = arrayMap(values, baseUnary(iteratee));
}
if (comparator) {
includes = arrayIncludesWith;
isCommon = false;
}
else if (values.length >= LARGE_ARRAY_SIZE) {
includes = cacheHas;
isCommon = false;
values = new SetCache(values);
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee == null ? value : iteratee(value);
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values[valuesIndex] === computed) {
continue outer;
}
}
result.push(value);
}
else if (!includes(values, computed, comparator)) {
result.push(value);
}
}
return result;
}
/**
* The base implementation of `_.forEach` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEach = createBaseEach(baseForOwn);
/**
* The base implementation of `_.forEachRight` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
*/
var baseEachRight = createBaseEach(baseForOwnRight, true);
/**
* The base implementation of `_.every` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`
*/
function baseEvery(collection, predicate) {
var result = true;
baseEach(collection, function(value, index, collection) {
result = !!predicate(value, index, collection);
return result;
});
return result;
}
/**
* The base implementation of methods like `_.max` and `_.min` which accepts a
* `comparator` to determine the extremum value.
*
* @private
* @param {Array} array The array to iterate over.
* @param {Function} iteratee The iteratee invoked per iteration.
* @param {Function} comparator The comparator used to compare values.
* @returns {*} Returns the extremum value.
*/
function baseExtremum(array, iteratee, comparator) {
var index = -1,
length = array.length;
while (++index < length) {
var value = array[index],
current = iteratee(value);
if (current != null && (computed === undefined
? (current === current && !isSymbol(current))
: comparator(current, computed)
)) {
var computed = current,
result = value;
}
}
return result;
}
/**
* The base implementation of `_.fill` without an iteratee call guard.
*
* @private
* @param {Array} array The array to fill.
* @param {*} value The value to fill `array` with.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns `array`.
*/
function baseFill(array, value, start, end) {
var length = array.length;
start = toInteger(start);
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = (end === undefined || end > length) ? length : toInteger(end);
if (end < 0) {
end += length;
}
end = start > end ? 0 : toLength(end);
while (start < end) {
array[start++] = value;
}
return array;
}
/**
* The base implementation of `_.filter` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
*/
function baseFilter(collection, predicate) {
var result = [];
baseEach(collection, function(value, index, collection) {
if (predicate(value, index, collection)) {
result.push(value);
}
});
return result;
}
/**
* The base implementation of `_.flatten` with support for restricting flattening.
*
* @private
* @param {Array} array The array to flatten.
* @param {number} depth The maximum recursion depth.
* @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
* @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
* @param {Array} [result=[]] The initial result value.
* @returns {Array} Returns the new flattened array.
*/
function baseFlatten(array, depth, predicate, isStrict, result) {
var index = -1,
length = array.length;
predicate || (predicate = isFlattenable);
result || (result = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
// Recursively flatten arrays (susceptible to call stack limits).
baseFlatten(value, depth - 1, predicate, isStrict, result);
} else {
arrayPush(result, value);
}
} else if (!isStrict) {
result[result.length] = value;
}
}
return result;
}
/**
* The base implementation of `baseForOwn` which iterates over `object`
* properties returned by `keysFunc` and invokes `iteratee` for each property.
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseFor = createBaseFor();
/**
* This function is like `baseFor` except that it iterates over properties
* in the opposite order.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {Function} keysFunc The function to get the keys of `object`.
* @returns {Object} Returns `object`.
*/
var baseForRight = createBaseFor(true);
/**
* The base implementation of `_.forOwn` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwn(object, iteratee) {
return object && baseFor(object, iteratee, keys);
}
/**
* The base implementation of `_.forOwnRight` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Object} Returns `object`.
*/
function baseForOwnRight(object, iteratee) {
return object && baseForRight(object, iteratee, keys);
}
/**
* The base implementation of `_.functions` which creates an array of
* `object` function property names filtered from `props`.
*
* @private
* @param {Object} object The object to inspect.
* @param {Array} props The property names to filter.
* @returns {Array} Returns the function names.
*/
function baseFunctions(object, props) {
return arrayFilter(props, function(key) {
return isFunction(object[key]);
});
}
/**
* The base implementation of `_.get` without support for default values.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @returns {*} Returns the resolved value.
*/
function baseGet(object, path) {
path = castPath(path, object);
var index = 0,
length = path.length;
while (object != null && index < length) {
object = object[toKey(path[index++])];
}
return (index && index == length) ? object : undefined;
}
/**
* The base implementation of `getAllKeys` and `getAllKeysIn` which uses
* `keysFunc` and `symbolsFunc` to get the enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Function} keysFunc The function to get the keys of `object`.
* @param {Function} symbolsFunc The function to get the symbols of `object`.
* @returns {Array} Returns the array of property names and symbols.
*/
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result = keysFunc(object);
return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
}
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
: objectToString(value);
}
/**
* The base implementation of `_.gt` which doesn't coerce arguments.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than `other`,
* else `false`.
*/
function baseGt(value, other) {
return value > other;
}
/**
* The base implementation of `_.has` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHas(object, key) {
return object != null && hasOwnProperty.call(object, key);
}
/**
* The base implementation of `_.hasIn` without support for deep paths.
*
* @private
* @param {Object} [object] The object to query.
* @param {Array|string} key The key to check.
* @returns {boolean} Returns `true` if `key` exists, else `false`.
*/
function baseHasIn(object, key) {
return object != null && key in Object(object);
}
/**
* The base implementation of `_.inRange` which doesn't coerce arguments.
*
* @private
* @param {number} number The number to check.
* @param {number} start The start of the range.
* @param {number} end The end of the range.
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
*/
function baseInRange(number, start, end) {
return number >= nativeMin(start, end) && number < nativeMax(start, end);
}
/**
* The base implementation of methods like `_.intersection`, without support
* for iteratee shorthands, that accepts an array of arrays to inspect.
*
* @private
* @param {Array} arrays The arrays to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of shared values.
*/
function baseIntersection(arrays, iteratee, comparator) {
var includes = comparator ? arrayIncludesWith : arrayIncludes,
length = arrays[0].length,
othLength = arrays.length,
othIndex = othLength,
caches = Array(othLength),
maxLength = Infinity,
result = [];
while (othIndex--) {
var array = arrays[othIndex];
if (othIndex && iteratee) {
array = arrayMap(array, baseUnary(iteratee));
}
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120))
? new SetCache(othIndex && array)
: undefined;
}
array = arrays[0];
var index = -1,
seen = caches[0];
outer:
while (++index < length && result.length < maxLength) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (!(seen
? cacheHas(seen, computed)
: includes(result, computed, comparator)
)) {
othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
if (!(cache
? cacheHas(cache, computed)
: includes(arrays[othIndex], computed, comparator))
) {
continue outer;
}
}
if (seen) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
/**
* The base implementation of `_.invert` and `_.invertBy` which inverts
* `object` with values transformed by `iteratee` and set by `setter`.
*
* @private
* @param {Object} object The object to iterate over.
* @param {Function} setter The function to set `accumulator` values.
* @param {Function} iteratee The iteratee to transform values.
* @param {Object} accumulator The initial inverted object.
* @returns {Function} Returns `accumulator`.
*/
function baseInverter(object, setter, iteratee, accumulator) {
baseForOwn(object, function(value, key, object) {
setter(accumulator, iteratee(value), key, object);
});
return accumulator;
}
/**
* The base implementation of `_.invoke` without support for individual
* method arguments.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path of the method to invoke.
* @param {Array} args The arguments to invoke the method with.
* @returns {*} Returns the result of the invoked method.
*/
function baseInvoke(object, path, args) {
path = castPath(path, object);
object = parent(object, path);
var func = object == null ? object : object[toKey(last(path))];
return func == null ? undefined : apply(func, object, args);
}
/**
* The base implementation of `_.isArguments`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
*/
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
/**
* The base implementation of `_.isArrayBuffer` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
*/
function baseIsArrayBuffer(value) {
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
}
/**
* The base implementation of `_.isDate` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
*/
function baseIsDate(value) {
return isObjectLike(value) && baseGetTag(value) == dateTag;
}
/**
* The base implementation of `_.isEqual` which supports partial comparisons
* and tracks traversed objects.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {boolean} bitmask The bitmask flags.
* 1 - Unordered comparison
* 2 - Partial comparison
* @param {Function} [customizer] The function to customize comparisons.
* @param {Object} [stack] Tracks traversed `value` and `other` objects.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
*/
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
/**
* A specialized version of `baseIsEqual` for arrays and objects which performs
* deep comparisons and tracks traversed objects enabling objects with circular
* references to be compared.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} [stack] Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object),
othIsArr = isArray(other),
objTag = objIsArr ? arrayTag : getTag(object),
othTag = othIsArr ? arrayTag : getTag(other);
objTag = objTag == argsTag ? objectTag : objTag;
othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag,
othIsObj = othTag == objectTag,
isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) {
return false;
}
objIsArr = true;
objIsObj = false;
}
if (isSameTag && !objIsObj) {
stack || (stack = new Stack);
return (objIsArr || isTypedArray(object))
? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
: equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object,
othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack);
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack);
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
/**
* The base implementation of `_.isMap` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
*/
function baseIsMap(value) {
return isObjectLike(value) && getTag(value) == mapTag;
}
/**
* The base implementation of `_.isMatch` without support for iteratee shorthands.
*
* @private
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Array} matchData The property names, values, and compare flags to match.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
*/
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length,
length = index,
noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object(object);
while (index--) {
var data = matchData[index];
if ((noCustomizer && data[2])
? data[1] !== object[data[0]]
: !(data[0] in object)
) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key = data[0],
objValue = object[key],
srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined && !(key in object)) {
return false;
}
} else {
var stack = new Stack;
if (customizer) {
var result = customizer(objValue, srcValue, key, object, source, stack);
}
if (!(result === undefined
? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)
: result
)) {
return false;
}
}
}
return true;
}
/**
* The base implementation of `_.isNative` without bad shim checks.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
*/
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
/**
* The base implementation of `_.isRegExp` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
*/
function baseIsRegExp(value) {
return isObjectLike(value) && baseGetTag(value) == regexpTag;
}
/**
* The base implementation of `_.isSet` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
*/
function baseIsSet(value) {
return isObjectLike(value) && getTag(value) == setTag;
}
/**
* The base implementation of `_.isTypedArray` without Node.js optimizations.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
*/
function baseIsTypedArray(value) {
return isObjectLike(value) &&
isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
/**
* The base implementation of `_.iteratee`.
*
* @private
* @param {*} [value=_.identity] The value to convert to an iteratee.
* @returns {Function} Returns the iteratee.
*/
function baseIteratee(value) {
// Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.
// See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.
if (typeof value == 'function') {
return value;
}
if (value == null) {
return identity;
}
if (typeof value == 'object') {
return isArray(value)
? baseMatchesProperty(value[0], value[1])
: baseMatches(value);
}
return property(value);
}
/**
* The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result = [];
for (var key in Object(object)) {
if (hasOwnProperty.call(object, key) && key != 'constructor') {
result.push(key);
}
}
return result;
}
/**
* The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object),
result = [];
for (var key in object) {
if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {
result.push(key);
}
}
return result;
}
/**
* The base implementation of `_.lt` which doesn't coerce arguments.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than `other`,
* else `false`.
*/
function baseLt(value, other) {
return value < other;
}
/**
* The base implementation of `_.map` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function baseMap(collection, iteratee) {
var index = -1,
result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value, key, collection) {
result[++index] = iteratee(value, key, collection);
});
return result;
}
/**
* The base implementation of `_.matches` which doesn't clone `source`.
*
* @private
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
/**
* The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.
*
* @private
* @param {string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function baseMatchesProperty(path, srcValue) {
if (isKey(path) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path), srcValue);
}
return function(object) {
var objValue = get(object, path);
return (objValue === undefined && objValue === srcValue)
? hasIn(object, path)
: baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
};
}
/**
* The base implementation of `_.merge` without support for multiple sources.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {number} srcIndex The index of `source`.
* @param {Function} [customizer] The function to customize merged values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
baseFor(source, function(srcValue, key) {
stack || (stack = new Stack);
if (isObject(srcValue)) {
baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);
}
else {
var newValue = customizer
? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)
: undefined;
if (newValue === undefined) {
newValue = srcValue;
}
assignMergeValue(object, key, newValue);
}
}, keysIn);
}
/**
* A specialized version of `baseMerge` for arrays and objects which performs
* deep merges and tracks traversed objects enabling objects with circular
* references to be merged.
*
* @private
* @param {Object} object The destination object.
* @param {Object} source The source object.
* @param {string} key The key of the value to merge.
* @param {number} srcIndex The index of `source`.
* @param {Function} mergeFunc The function to merge values.
* @param {Function} [customizer] The function to customize assigned values.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
*/
function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {
var objValue = safeGet(object, key),
srcValue = safeGet(source, key),
stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key, stacked);
return;
}
var newValue = customizer
? customizer(objValue, srcValue, (key + ''), object, source, stack)
: undefined;
var isCommon = newValue === undefined;
if (isCommon) {
var isArr = isArray(srcValue),
isBuff = !isArr && isBuffer(srcValue),
isTyped = !isArr && !isBuff && isTypedArray(srcValue);
newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
}
else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
}
else if (isBuff) {
isCommon = false;
newValue = cloneBuffer(srcValue, true);
}
else if (isTyped) {
isCommon = false;
newValue = cloneTypedArray(srcValue, true);
}
else {
newValue = [];
}
}
else if (isPlainObject(srcValue) || isArguments(srcValue)) {
newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
}
else if (!isObject(objValue) || isFunction(objValue)) {
newValue = initCloneObject(srcValue);
}
}
else {
isCommon = false;
}
}
if (isCommon) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack['delete'](srcValue);
}
assignMergeValue(object, key, newValue);
}
/**
* The base implementation of `_.nth` which doesn't coerce arguments.
*
* @private
* @param {Array} array The array to query.
* @param {number} n The index of the element to return.
* @returns {*} Returns the nth element of `array`.
*/
function baseNth(array, n) {
var length = array.length;
if (!length) {
return;
}
n += n < 0 ? length : 0;
return isIndex(n, length) ? array[n] : undefined;
}
/**
* The base implementation of `_.orderBy` without param guards.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
* @param {string[]} orders The sort orders of `iteratees`.
* @returns {Array} Returns the new sorted array.
*/
function baseOrderBy(collection, iteratees, orders) {
if (iteratees.length) {
iteratees = arrayMap(iteratees, function(iteratee) {
if (isArray(iteratee)) {
return function(value) {
return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);
}
}
return iteratee;
});
} else {
iteratees = [identity];
}
var index = -1;
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
var result = baseMap(collection, function(value, key, collection) {
var criteria = arrayMap(iteratees, function(iteratee) {
return iteratee(value);
});
return { 'criteria': criteria, 'index': ++index, 'value': value };
});
return baseSortBy(result, function(object, other) {
return compareMultiple(object, other, orders);
});
}
/**
* The base implementation of `_.pick` without support for individual
* property identifiers.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @returns {Object} Returns the new object.
*/
function basePick(object, paths) {
return basePickBy(object, paths, function(value, path) {
return hasIn(object, path);
});
}
/**
* The base implementation of `_.pickBy` without support for iteratee shorthands.
*
* @private
* @param {Object} object The source object.
* @param {string[]} paths The property paths to pick.
* @param {Function} predicate The function invoked per property.
* @returns {Object} Returns the new object.
*/
function basePickBy(object, paths, predicate) {
var index = -1,
length = paths.length,
result = {};
while (++index < length) {
var path = paths[index],
value = baseGet(object, path);
if (predicate(value, path)) {
baseSet(result, castPath(path, object), value);
}
}
return result;
}
/**
* A specialized version of `baseProperty` which supports deep paths.
*
* @private
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
*/
function basePropertyDeep(path) {
return function(object) {
return baseGet(object, path);
};
}
/**
* The base implementation of `_.pullAllBy` without support for iteratee
* shorthands.
*
* @private
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns `array`.
*/
function basePullAll(array, values, iteratee, comparator) {
var indexOf = comparator ? baseIndexOfWith : baseIndexOf,
index = -1,
length = values.length,
seen = array;
if (array === values) {
values = copyArray(values);
}
if (iteratee) {
seen = arrayMap(array, baseUnary(iteratee));
}
while (++index < length) {
var fromIndex = 0,
value = values[index],
computed = iteratee ? iteratee(value) : value;
while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {
if (seen !== array) {
splice.call(seen, fromIndex, 1);
}
splice.call(array, fromIndex, 1);
}
}
return array;
}
/**
* The base implementation of `_.pullAt` without support for individual
* indexes or capturing the removed elements.
*
* @private
* @param {Array} array The array to modify.
* @param {number[]} indexes The indexes of elements to remove.
* @returns {Array} Returns `array`.
*/
function basePullAt(array, indexes) {
var length = array ? indexes.length : 0,
lastIndex = length - 1;
while (length--) {
var index = indexes[length];
if (length == lastIndex || index !== previous) {
var previous = index;
if (isIndex(index)) {
splice.call(array, index, 1);
} else {
baseUnset(array, index);
}
}
}
return array;
}
/**
* The base implementation of `_.random` without support for returning
* floating-point numbers.
*
* @private
* @param {number} lower The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the random number.
*/
function baseRandom(lower, upper) {
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
}
/**
* The base implementation of `_.range` and `_.rangeRight` which doesn't
* coerce arguments.
*
* @private
* @param {number} start The start of the range.
* @param {number} end The end of the range.
* @param {number} step The value to increment or decrement by.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Array} Returns the range of numbers.
*/
function baseRange(start, end, step, fromRight) {
var index = -1,
length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),
result = Array(length);
while (length--) {
result[fromRight ? length : ++index] = start;
start += step;
}
return result;
}
/**
* The base implementation of `_.repeat` which doesn't coerce arguments.
*
* @private
* @param {string} string The string to repeat.
* @param {number} n The number of times to repeat the string.
* @returns {string} Returns the repeated string.
*/
function baseRepeat(string, n) {
var result = '';
if (!string || n < 1 || n > MAX_SAFE_INTEGER) {
return result;
}
// Leverage the exponentiation by squaring algorithm for a faster repeat.
// See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details.
do {
if (n % 2) {
result += string;
}
n = nativeFloor(n / 2);
if (n) {
string += string;
}
} while (n);
return result;
}
/**
* The base implementation of `_.rest` which doesn't validate or coerce arguments.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
*/
function baseRest(func, start) {
return setToString(overRest(func, start, identity), func + '');
}
/**
* The base implementation of `_.sample`.
*
* @private
* @param {Array|Object} collection The collection to sample.
* @returns {*} Returns the random element.
*/
function baseSample(collection) {
return arraySample(values(collection));
}
/**
* The base implementation of `_.sampleSize` without param guards.
*
* @private
* @param {Array|Object} collection The collection to sample.
* @param {number} n The number of elements to sample.
* @returns {Array} Returns the random elements.
*/
function baseSampleSize(collection, n) {
var array = values(collection);
return shuffleSelf(array, baseClamp(n, 0, array.length));
}
/**
* The base implementation of `_.set`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @param {Function} [customizer] The function to customize path creation.
* @returns {Object} Returns `object`.
*/
function baseSet(object, path, value, customizer) {
if (!isObject(object)) {
return object;
}
path = castPath(path, object);
var index = -1,
length = path.length,
lastIndex = length - 1,
nested = object;
while (nested != null && ++index < length) {
var key = toKey(path[index]),
newValue = value;
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
return object;
}
if (index != lastIndex) {
var objValue = nested[key];
newValue = customizer ? customizer(objValue, key, nested) : undefined;
if (newValue === undefined) {
newValue = isObject(objValue)
? objValue
: (isIndex(path[index + 1]) ? [] : {});
}
}
assignValue(nested, key, newValue);
nested = nested[key];
}
return object;
}
/**
* The base implementation of `setData` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to associate metadata with.
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
var baseSetData = !metaMap ? identity : function(func, data) {
metaMap.set(func, data);
return func;
};
/**
* The base implementation of `setToString` without support for hot loop shorting.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var baseSetToString = !defineProperty ? identity : function(func, string) {
return defineProperty(func, 'toString', {
'configurable': true,
'enumerable': false,
'value': constant(string),
'writable': true
});
};
/**
* The base implementation of `_.shuffle`.
*
* @private
* @param {Array|Object} collection The collection to shuffle.
* @returns {Array} Returns the new shuffled array.
*/
function baseShuffle(collection) {
return shuffleSelf(values(collection));
}
/**
* The base implementation of `_.slice` without an iteratee call guard.
*
* @private
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function baseSlice(array, start, end) {
var index = -1,
length = array.length;
if (start < 0) {
start = -start > length ? 0 : (length + start);
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : ((end - start) >>> 0);
start >>>= 0;
var result = Array(length);
while (++index < length) {
result[index] = array[index + start];
}
return result;
}
/**
* The base implementation of `_.some` without support for iteratee shorthands.
*
* @private
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} predicate The function invoked per iteration.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
*/
function baseSome(collection, predicate) {
var result;
baseEach(collection, function(value, index, collection) {
result = predicate(value, index, collection);
return !result;
});
return !!result;
}
/**
* The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which
* performs a binary search of `array` to determine the index at which `value`
* should be inserted into `array` in order to maintain its sort order.
*
* @private
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {boolean} [retHighest] Specify returning the highest qualified index.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
*/
function baseSortedIndex(array, value, retHighest) {
var low = 0,
high = array == null ? low : array.length;
if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
while (low < high) {
var mid = (low + high) >>> 1,
computed = array[mid];
if (computed !== null && !isSymbol(computed) &&
(retHighest ? (computed <= value) : (computed < value))) {
low = mid + 1;
} else {
high = mid;
}
}
return high;
}
return baseSortedIndexBy(array, value, identity, retHighest);
}
/**
* The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy`
* which invokes `iteratee` for `value` and each element of `array` to compute
* their sort ranking. The iteratee is invoked with one argument; (value).
*
* @private
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} iteratee The iteratee invoked per element.
* @param {boolean} [retHighest] Specify returning the highest qualified index.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
*/
function baseSortedIndexBy(array, value, iteratee, retHighest) {
var low = 0,
high = array == null ? 0 : array.length;
if (high === 0) {
return 0;
}
value = iteratee(value);
var valIsNaN = value !== value,
valIsNull = value === null,
valIsSymbol = isSymbol(value),
valIsUndefined = value === undefined;
while (low < high) {
var mid = nativeFloor((low + high) / 2),
computed = iteratee(array[mid]),
othIsDefined = computed !== undefined,
othIsNull = computed === null,
othIsReflexive = computed === computed,
othIsSymbol = isSymbol(computed);
if (valIsNaN) {
var setLow = retHighest || othIsReflexive;
} else if (valIsUndefined) {
setLow = othIsReflexive && (retHighest || othIsDefined);
} else if (valIsNull) {
setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
} else if (valIsSymbol) {
setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
} else if (othIsNull || othIsSymbol) {
setLow = false;
} else {
setLow = retHighest ? (computed <= value) : (computed < value);
}
if (setLow) {
low = mid + 1;
} else {
high = mid;
}
}
return nativeMin(high, MAX_ARRAY_INDEX);
}
/**
* The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without
* support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
*/
function baseSortedUniq(array, iteratee) {
var index = -1,
length = array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
if (!index || !eq(computed, seen)) {
var seen = computed;
result[resIndex++] = value === 0 ? 0 : value;
}
}
return result;
}
/**
* The base implementation of `_.toNumber` which doesn't ensure correct
* conversions of binary, hexadecimal, or octal string values.
*
* @private
* @param {*} value The value to process.
* @returns {number} Returns the number.
*/
function baseToNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
return +value;
}
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isArray(value)) {
// Recursively convert values (susceptible to call stack limits).
return arrayMap(value, baseToString) + '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
* The base implementation of `_.uniqBy` without support for iteratee shorthands.
*
* @private
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
*/
function baseUniq(array, iteratee, comparator) {
var index = -1,
includes = arrayIncludes,
length = array.length,
isCommon = true,
result = [],
seen = result;
if (comparator) {
isCommon = false;
includes = arrayIncludesWith;
}
else if (length >= LARGE_ARRAY_SIZE) {
var set = iteratee ? null : createSet(array);
if (set) {
return setToArray(set);
}
isCommon = false;
includes = cacheHas;
seen = new SetCache;
}
else {
seen = iteratee ? [] : result;
}
outer:
while (++index < length) {
var value = array[index],
computed = iteratee ? iteratee(value) : value;
value = (comparator || value !== 0) ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee) {
seen.push(computed);
}
result.push(value);
}
else if (!includes(seen, computed, comparator)) {
if (seen !== result) {
seen.push(computed);
}
result.push(value);
}
}
return result;
}
/**
* The base implementation of `_.unset`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The property path to unset.
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
*/
function baseUnset(object, path) {
path = castPath(path, object);
object = parent(object, path);
return object == null || delete object[toKey(last(path))];
}
/**
* The base implementation of `_.update`.
*
* @private
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to update.
* @param {Function} updater The function to produce the updated value.
* @param {Function} [customizer] The function to customize path creation.
* @returns {Object} Returns `object`.
*/
function baseUpdate(object, path, updater, customizer) {
return baseSet(object, path, updater(baseGet(object, path)), customizer);
}
/**
* The base implementation of methods like `_.dropWhile` and `_.takeWhile`
* without support for iteratee shorthands.
*
* @private
* @param {Array} array The array to query.
* @param {Function} predicate The function invoked per iteration.
* @param {boolean} [isDrop] Specify dropping elements instead of taking them.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Array} Returns the slice of `array`.
*/
function baseWhile(array, predicate, isDrop, fromRight) {
var length = array.length,
index = fromRight ? length : -1;
while ((fromRight ? index-- : ++index < length) &&
predicate(array[index], index, array)) {}
return isDrop
? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length))
: baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index));
}
/**
* The base implementation of `wrapperValue` which returns the result of
* performing a sequence of actions on the unwrapped `value`, where each
* successive action is supplied the return value of the previous.
*
* @private
* @param {*} value The unwrapped value.
* @param {Array} actions Actions to perform to resolve the unwrapped value.
* @returns {*} Returns the resolved value.
*/
function baseWrapperValue(value, actions) {
var result = value;
if (result instanceof LazyWrapper) {
result = result.value();
}
return arrayReduce(actions, function(result, action) {
return action.func.apply(action.thisArg, arrayPush([result], action.args));
}, result);
}
/**
* The base implementation of methods like `_.xor`, without support for
* iteratee shorthands, that accepts an array of arrays to inspect.
*
* @private
* @param {Array} arrays The arrays to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of values.
*/
function baseXor(arrays, iteratee, comparator) {
var length = arrays.length;
if (length < 2) {
return length ? baseUniq(arrays[0]) : [];
}
var index = -1,
result = Array(length);
while (++index < length) {
var array = arrays[index],
othIndex = -1;
while (++othIndex < length) {
if (othIndex != index) {
result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator);
}
}
}
return baseUniq(baseFlatten(result, 1), iteratee, comparator);
}
/**
* This base implementation of `_.zipObject` which assigns values using `assignFunc`.
*
* @private
* @param {Array} props The property identifiers.
* @param {Array} values The property values.
* @param {Function} assignFunc The function to assign values.
* @returns {Object} Returns the new object.
*/
function baseZipObject(props, values, assignFunc) {
var index = -1,
length = props.length,
valsLength = values.length,
result = {};
while (++index < length) {
var value = index < valsLength ? values[index] : undefined;
assignFunc(result, props[index], value);
}
return result;
}
/**
* Casts `value` to an empty array if it's not an array like object.
*
* @private
* @param {*} value The value to inspect.
* @returns {Array|Object} Returns the cast array-like object.
*/
function castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
/**
* Casts `value` to `identity` if it's not a function.
*
* @private
* @param {*} value The value to inspect.
* @returns {Function} Returns cast function.
*/
function castFunction(value) {
return typeof value == 'function' ? value : identity;
}
/**
* Casts `value` to a path array if it's not one.
*
* @private
* @param {*} value The value to inspect.
* @param {Object} [object] The object to query keys on.
* @returns {Array} Returns the cast property path array.
*/
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
/**
* A `baseRest` alias which can be replaced with `identity` by module
* replacement plugins.
*
* @private
* @type {Function}
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
var castRest = baseRest;
/**
* Casts `array` to a slice if it's needed.
*
* @private
* @param {Array} array The array to inspect.
* @param {number} start The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the cast slice.
*/
function castSlice(array, start, end) {
var length = array.length;
end = end === undefined ? length : end;
return (!start && end >= length) ? array : baseSlice(array, start, end);
}
/**
* A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout).
*
* @private
* @param {number|Object} id The timer id or timeout object of the timer to clear.
*/
var clearTimeout = ctxClearTimeout || function(id) {
return root.clearTimeout(id);
};
/**
* Creates a clone of `buffer`.
*
* @private
* @param {Buffer} buffer The buffer to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Buffer} Returns the cloned buffer.
*/
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length = buffer.length,
result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result);
return result;
}
/**
* Creates a clone of `arrayBuffer`.
*
* @private
* @param {ArrayBuffer} arrayBuffer The array buffer to clone.
* @returns {ArrayBuffer} Returns the cloned array buffer.
*/
function cloneArrayBuffer(arrayBuffer) {
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
return result;
}
/**
* Creates a clone of `dataView`.
*
* @private
* @param {Object} dataView The data view to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned data view.
*/
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
/**
* Creates a clone of `regexp`.
*
* @private
* @param {Object} regexp The regexp to clone.
* @returns {Object} Returns the cloned regexp.
*/
function cloneRegExp(regexp) {
var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result.lastIndex = regexp.lastIndex;
return result;
}
/**
* Creates a clone of the `symbol` object.
*
* @private
* @param {Object} symbol The symbol object to clone.
* @returns {Object} Returns the cloned symbol object.
*/
function cloneSymbol(symbol) {
return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};
}
/**
* Creates a clone of `typedArray`.
*
* @private
* @param {Object} typedArray The typed array to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned typed array.
*/
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
/**
* Compares values to sort them in ascending order.
*
* @private
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {number} Returns the sort order indicator for `value`.
*/
function compareAscending(value, other) {
if (value !== other) {
var valIsDefined = value !== undefined,
valIsNull = value === null,
valIsReflexive = value === value,
valIsSymbol = isSymbol(value);
var othIsDefined = other !== undefined,
othIsNull = other === null,
othIsReflexive = other === other,
othIsSymbol = isSymbol(other);
if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||
(valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||
(valIsNull && othIsDefined && othIsReflexive) ||
(!valIsDefined && othIsReflexive) ||
!valIsReflexive) {
return 1;
}
if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||
(othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||
(othIsNull && valIsDefined && valIsReflexive) ||
(!othIsDefined && valIsReflexive) ||
!othIsReflexive) {
return -1;
}
}
return 0;
}
/**
* Used by `_.orderBy` to compare multiple properties of a value to another
* and stable sort them.
*
* If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
* specify an order of "desc" for descending or "asc" for ascending sort order
* of corresponding values.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {boolean[]|string[]} orders The order to sort by for each property.
* @returns {number} Returns the sort order indicator for `object`.
*/
function compareMultiple(object, other, orders) {
var index = -1,
objCriteria = object.criteria,
othCriteria = other.criteria,
length = objCriteria.length,
ordersLength = orders.length;
while (++index < length) {
var result = compareAscending(objCriteria[index], othCriteria[index]);
if (result) {
if (index >= ordersLength) {
return result;
}
var order = orders[index];
return result * (order == 'desc' ? -1 : 1);
}
}
// Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
// that causes it, under certain circumstances, to provide the same value for
// `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
// for more details.
//
// This also ensures a stable sort in V8 and other engines.
// See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
return object.index - other.index;
}
/**
* Creates an array that is the composition of partially applied arguments,
* placeholders, and provided arguments into a single array of arguments.
*
* @private
* @param {Array} args The provided arguments.
* @param {Array} partials The arguments to prepend to those provided.
* @param {Array} holders The `partials` placeholder indexes.
* @params {boolean} [isCurried] Specify composing for a curried function.
* @returns {Array} Returns the new array of composed arguments.
*/
function composeArgs(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersLength = holders.length,
leftIndex = -1,
leftLength = partials.length,
rangeLength = nativeMax(argsLength - holdersLength, 0),
result = Array(leftLength + rangeLength),
isUncurried = !isCurried;
while (++leftIndex < leftLength) {
result[leftIndex] = partials[leftIndex];
}
while (++argsIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[holders[argsIndex]] = args[argsIndex];
}
}
while (rangeLength--) {
result[leftIndex++] = args[argsIndex++];
}
return result;
}
/**
* This function is like `composeArgs` except that the arguments composition
* is tailored for `_.partialRight`.
*
* @private
* @param {Array} args The provided arguments.
* @param {Array} partials The arguments to append to those provided.
* @param {Array} holders The `partials` placeholder indexes.
* @params {boolean} [isCurried] Specify composing for a curried function.
* @returns {Array} Returns the new array of composed arguments.
*/
function composeArgsRight(args, partials, holders, isCurried) {
var argsIndex = -1,
argsLength = args.length,
holdersIndex = -1,
holdersLength = holders.length,
rightIndex = -1,
rightLength = partials.length,
rangeLength = nativeMax(argsLength - holdersLength, 0),
result = Array(rangeLength + rightLength),
isUncurried = !isCurried;
while (++argsIndex < rangeLength) {
result[argsIndex] = args[argsIndex];
}
var offset = argsIndex;
while (++rightIndex < rightLength) {
result[offset + rightIndex] = partials[rightIndex];
}
while (++holdersIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result[offset + holders[holdersIndex]] = args[argsIndex++];
}
}
return result;
}
/**
* Copies the values of `source` to `array`.
*
* @private
* @param {Array} source The array to copy values from.
* @param {Array} [array=[]] The array to copy values to.
* @returns {Array} Returns `array`.
*/
function copyArray(source, array) {
var index = -1,
length = source.length;
array || (array = Array(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
/**
* Copies properties of `source` to `object`.
*
* @private
* @param {Object} source The object to copy properties from.
* @param {Array} props The property identifiers to copy.
* @param {Object} [object={}] The object to copy properties to.
* @param {Function} [customizer] The function to customize copied values.
* @returns {Object} Returns `object`.
*/
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1,
length = props.length;
while (++index < length) {
var key = props[index];
var newValue = customizer
? customizer(object[key], source[key], key, object, source)
: undefined;
if (newValue === undefined) {
newValue = source[key];
}
if (isNew) {
baseAssignValue(object, key, newValue);
} else {
assignValue(object, key, newValue);
}
}
return object;
}
/**
* Copies own symbols of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
/**
* Copies own and inherited symbols of `source` to `object`.
*
* @private
* @param {Object} source The object to copy symbols from.
* @param {Object} [object={}] The object to copy symbols to.
* @returns {Object} Returns `object`.
*/
function copySymbolsIn(source, object) {
return copyObject(source, getSymbolsIn(source), object);
}
/**
* Creates a function like `_.groupBy`.
*
* @private
* @param {Function} setter The function to set accumulator values.
* @param {Function} [initializer] The accumulator object initializer.
* @returns {Function} Returns the new aggregator function.
*/
function createAggregator(setter, initializer) {
return function(collection, iteratee) {
var func = isArray(collection) ? arrayAggregator : baseAggregator,
accumulator = initializer ? initializer() : {};
return func(collection, setter, getIteratee(iteratee, 2), accumulator);
};
}
/**
* Creates a function like `_.assign`.
*
* @private
* @param {Function} assigner The function to assign values.
* @returns {Function} Returns the new assigner function.
*/
function createAssigner(assigner) {
return baseRest(function(object, sources) {
var index = -1,
length = sources.length,
customizer = length > 1 ? sources[length - 1] : undefined,
guard = length > 2 ? sources[2] : undefined;
customizer = (assigner.length > 3 && typeof customizer == 'function')
? (length--, customizer)
: undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined : customizer;
length = 1;
}
object = Object(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
/**
* Creates a `baseEach` or `baseEachRight` function.
*
* @private
* @param {Function} eachFunc The function to iterate over a collection.
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee);
}
var length = collection.length,
index = fromRight ? length : -1,
iterable = Object(collection);
while ((fromRight ? index-- : ++index < length)) {
if (iteratee(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
/**
* Creates a base function for methods like `_.forIn` and `_.forOwn`.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new base function.
*/
function createBaseFor(fromRight) {
return function(object, iteratee, keysFunc) {
var index = -1,
iterable = Object(object),
props = keysFunc(object),
length = props.length;
while (length--) {
var key = props[fromRight ? length : ++index];
if (iteratee(iterable[key], key, iterable) === false) {
break;
}
}
return object;
};
}
/**
* Creates a function that wraps `func` to invoke it with the optional `this`
* binding of `thisArg`.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return fn.apply(isBind ? thisArg : this, arguments);
}
return wrapper;
}
/**
* Creates a function like `_.lowerFirst`.
*
* @private
* @param {string} methodName The name of the `String` case method to use.
* @returns {Function} Returns the new case function.
*/
function createCaseFirst(methodName) {
return function(string) {
string = toString(string);
var strSymbols = hasUnicode(string)
? stringToArray(string)
: undefined;
var chr = strSymbols
? strSymbols[0]
: string.charAt(0);
var trailing = strSymbols
? castSlice(strSymbols, 1).join('')
: string.slice(1);
return chr[methodName]() + trailing;
};
}
/**
* Creates a function like `_.camelCase`.
*
* @private
* @param {Function} callback The function to combine each word.
* @returns {Function} Returns the new compounder function.
*/
function createCompounder(callback) {
return function(string) {
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
};
}
/**
* Creates a function that produces an instance of `Ctor` regardless of
* whether it was invoked as part of a `new` expression or by `call` or `apply`.
*
* @private
* @param {Function} Ctor The constructor to wrap.
* @returns {Function} Returns the new wrapped function.
*/
function createCtor(Ctor) {
return function() {
// Use a `switch` statement to work with class constructors. See
// http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist
// for more details.
var args = arguments;
switch (args.length) {
case 0: return new Ctor;
case 1: return new Ctor(args[0]);
case 2: return new Ctor(args[0], args[1]);
case 3: return new Ctor(args[0], args[1], args[2]);
case 4: return new Ctor(args[0], args[1], args[2], args[3]);
case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]);
case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
}
var thisBinding = baseCreate(Ctor.prototype),
result = Ctor.apply(thisBinding, args);
// Mimic the constructor's `return` behavior.
// See https://es5.github.io/#x13.2.2 for more details.
return isObject(result) ? result : thisBinding;
};
}
/**
* Creates a function that wraps `func` to enable currying.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {number} arity The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createCurry(func, bitmask, arity) {
var Ctor = createCtor(func);
function wrapper() {
var length = arguments.length,
args = Array(length),
index = length,
placeholder = getHolder(wrapper);
while (index--) {
args[index] = arguments[index];
}
var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)
? []
: replaceHolders(args, placeholder);
length -= holders.length;
if (length < arity) {
return createRecurry(
func, bitmask, createHybrid, wrapper.placeholder, undefined,
args, holders, undefined, undefined, arity - length);
}
var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
return apply(fn, this, args);
}
return wrapper;
}
/**
* Creates a `_.find` or `_.findLast` function.
*
* @private
* @param {Function} findIndexFunc The function to find the collection index.
* @returns {Function} Returns the new find function.
*/
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
var iterable = Object(collection);
if (!isArrayLike(collection)) {
var iteratee = getIteratee(predicate, 3);
collection = keys(collection);
predicate = function(key) { return iteratee(iterable[key], key, iterable); };
}
var index = findIndexFunc(collection, predicate, fromIndex);
return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;
};
}
/**
* Creates a `_.flow` or `_.flowRight` function.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new flow function.
*/
function createFlow(fromRight) {
return flatRest(function(funcs) {
var length = funcs.length,
index = length,
prereq = LodashWrapper.prototype.thru;
if (fromRight) {
funcs.reverse();
}
while (index--) {
var func = funcs[index];
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
if (prereq && !wrapper && getFuncName(func) == 'wrapper') {
var wrapper = new LodashWrapper([], true);
}
}
index = wrapper ? index : length;
while (++index < length) {
func = funcs[index];
var funcName = getFuncName(func),
data = funcName == 'wrapper' ? getData(func) : undefined;
if (data && isLaziable(data[0]) &&
data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) &&
!data[4].length && data[9] == 1
) {
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
} else {
wrapper = (func.length == 1 && isLaziable(func))
? wrapper[funcName]()
: wrapper.thru(func);
}
}
return function() {
var args = arguments,
value = args[0];
if (wrapper && args.length == 1 && isArray(value)) {
return wrapper.plant(value).value();
}
var index = 0,
result = length ? funcs[index].apply(this, args) : value;
while (++index < length) {
result = funcs[index].call(this, result);
}
return result;
};
});
}
/**
* Creates a function that wraps `func` to invoke it with optional `this`
* binding of `thisArg`, partial application, and currying.
*
* @private
* @param {Function|string} func The function or method name to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to prepend to those provided to
* the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [partialsRight] The arguments to append to those provided
* to the new function.
* @param {Array} [holdersRight] The `partialsRight` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {
var isAry = bitmask & WRAP_ARY_FLAG,
isBind = bitmask & WRAP_BIND_FLAG,
isBindKey = bitmask & WRAP_BIND_KEY_FLAG,
isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),
isFlip = bitmask & WRAP_FLIP_FLAG,
Ctor = isBindKey ? undefined : createCtor(func);
function wrapper() {
var length = arguments.length,
args = Array(length),
index = length;
while (index--) {
args[index] = arguments[index];
}
if (isCurried) {
var placeholder = getHolder(wrapper),
holdersCount = countHolders(args, placeholder);
}
if (partials) {
args = composeArgs(args, partials, holders, isCurried);
}
if (partialsRight) {
args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
}
length -= holdersCount;
if (isCurried && length < arity) {
var newHolders = replaceHolders(args, placeholder);
return createRecurry(
func, bitmask, createHybrid, wrapper.placeholder, thisArg,
args, newHolders, argPos, ary, arity - length
);
}
var thisBinding = isBind ? thisArg : this,
fn = isBindKey ? thisBinding[func] : func;
length = args.length;
if (argPos) {
args = reorder(args, argPos);
} else if (isFlip && length > 1) {
args.reverse();
}
if (isAry && ary < length) {
args.length = ary;
}
if (this && this !== root && this instanceof wrapper) {
fn = Ctor || createCtor(fn);
}
return fn.apply(thisBinding, args);
}
return wrapper;
}
/**
* Creates a function like `_.invertBy`.
*
* @private
* @param {Function} setter The function to set accumulator values.
* @param {Function} toIteratee The function to resolve iteratees.
* @returns {Function} Returns the new inverter function.
*/
function createInverter(setter, toIteratee) {
return function(object, iteratee) {
return baseInverter(object, setter, toIteratee(iteratee), {});
};
}
/**
* Creates a function that performs a mathematical operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @param {number} [defaultValue] The value used for `undefined` arguments.
* @returns {Function} Returns the new mathematical operation function.
*/
function createMathOperation(operator, defaultValue) {
return function(value, other) {
var result;
if (value === undefined && other === undefined) {
return defaultValue;
}
if (value !== undefined) {
result = value;
}
if (other !== undefined) {
if (result === undefined) {
return other;
}
if (typeof value == 'string' || typeof other == 'string') {
value = baseToString(value);
other = baseToString(other);
} else {
value = baseToNumber(value);
other = baseToNumber(other);
}
result = operator(value, other);
}
return result;
};
}
/**
* Creates a function like `_.over`.
*
* @private
* @param {Function} arrayFunc The function to iterate over iteratees.
* @returns {Function} Returns the new over function.
*/
function createOver(arrayFunc) {
return flatRest(function(iteratees) {
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
return baseRest(function(args) {
var thisArg = this;
return arrayFunc(iteratees, function(iteratee) {
return apply(iteratee, thisArg, args);
});
});
});
}
/**
* Creates the padding for `string` based on `length`. The `chars` string
* is truncated if the number of characters exceeds `length`.
*
* @private
* @param {number} length The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padding for `string`.
*/
function createPadding(length, chars) {
chars = chars === undefined ? ' ' : baseToString(chars);
var charsLength = chars.length;
if (charsLength < 2) {
return charsLength ? baseRepeat(chars, length) : chars;
}
var result = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return hasUnicode(chars)
? castSlice(stringToArray(result), 0, length).join('')
: result.slice(0, length);
}
/**
* Creates a function that wraps `func` to invoke it with the `this` binding
* of `thisArg` and `partials` prepended to the arguments it receives.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {*} thisArg The `this` binding of `func`.
* @param {Array} partials The arguments to prepend to those provided to
* the new function.
* @returns {Function} Returns the new wrapped function.
*/
function createPartial(func, bitmask, thisArg, partials) {
var isBind = bitmask & WRAP_BIND_FLAG,
Ctor = createCtor(func);
function wrapper() {
var argsIndex = -1,
argsLength = arguments.length,
leftIndex = -1,
leftLength = partials.length,
args = Array(leftLength + argsLength),
fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;
while (++leftIndex < leftLength) {
args[leftIndex] = partials[leftIndex];
}
while (argsLength--) {
args[leftIndex++] = arguments[++argsIndex];
}
return apply(fn, isBind ? thisArg : this, args);
}
return wrapper;
}
/**
* Creates a `_.range` or `_.rangeRight` function.
*
* @private
* @param {boolean} [fromRight] Specify iterating from right to left.
* @returns {Function} Returns the new range function.
*/
function createRange(fromRight) {
return function(start, end, step) {
if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {
end = step = undefined;
}
// Ensure the sign of `-0` is preserved.
start = toFinite(start);
if (end === undefined) {
end = start;
start = 0;
} else {
end = toFinite(end);
}
step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);
return baseRange(start, end, step, fromRight);
};
}
/**
* Creates a function that performs a relational operation on two values.
*
* @private
* @param {Function} operator The function to perform the operation.
* @returns {Function} Returns the new relational operation function.
*/
function createRelationalOperation(operator) {
return function(value, other) {
if (!(typeof value == 'string' && typeof other == 'string')) {
value = toNumber(value);
other = toNumber(other);
}
return operator(value, other);
};
}
/**
* Creates a function that wraps `func` to continue currying.
*
* @private
* @param {Function} func The function to wrap.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @param {Function} wrapFunc The function to create the `func` wrapper.
* @param {*} placeholder The placeholder value.
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to prepend to those provided to
* the new function.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) {
var isCurry = bitmask & WRAP_CURRY_FLAG,
newHolders = isCurry ? holders : undefined,
newHoldersRight = isCurry ? undefined : holders,
newPartials = isCurry ? partials : undefined,
newPartialsRight = isCurry ? undefined : partials;
bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG);
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
}
var newData = [
func, bitmask, thisArg, newPartials, newHolders, newPartialsRight,
newHoldersRight, argPos, ary, arity
];
var result = wrapFunc.apply(undefined, newData);
if (isLaziable(func)) {
setData(result, newData);
}
result.placeholder = placeholder;
return setWrapToString(result, func, bitmask);
}
/**
* Creates a function like `_.round`.
*
* @private
* @param {string} methodName The name of the `Math` method to use when rounding.
* @returns {Function} Returns the new round function.
*/
function createRound(methodName) {
var func = Math[methodName];
return function(number, precision) {
number = toNumber(number);
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision && nativeIsFinite(number)) {
// Shift with exponential notation to avoid floating-point issues.
// See [MDN](https://mdn.io/round#Examples) for more details.
var pair = (toString(number) + 'e').split('e'),
value = func(pair[0] + 'e' + (+pair[1] + precision));
pair = (toString(value) + 'e').split('e');
return +(pair[0] + 'e' + (+pair[1] - precision));
}
return func(number);
};
}
/**
* Creates a set object of `values`.
*
* @private
* @param {Array} values The values to add to the set.
* @returns {Object} Returns the new set.
*/
var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
return new Set(values);
};
/**
* Creates a `_.toPairs` or `_.toPairsIn` function.
*
* @private
* @param {Function} keysFunc The function to get the keys of a given object.
* @returns {Function} Returns the new pairs function.
*/
function createToPairs(keysFunc) {
return function(object) {
var tag = getTag(object);
if (tag == mapTag) {
return mapToArray(object);
}
if (tag == setTag) {
return setToPairs(object);
}
return baseToPairs(object, keysFunc(object));
};
}
/**
* Creates a function that either curries or invokes `func` with optional
* `this` binding and partially applied arguments.
*
* @private
* @param {Function|string} func The function or method name to wrap.
* @param {number} bitmask The bitmask flags.
* 1 - `_.bind`
* 2 - `_.bindKey`
* 4 - `_.curry` or `_.curryRight` of a bound function
* 8 - `_.curry`
* 16 - `_.curryRight`
* 32 - `_.partial`
* 64 - `_.partialRight`
* 128 - `_.rearg`
* 256 - `_.ary`
* 512 - `_.flip`
* @param {*} [thisArg] The `this` binding of `func`.
* @param {Array} [partials] The arguments to be partially applied.
* @param {Array} [holders] The `partials` placeholder indexes.
* @param {Array} [argPos] The argument positions of the new function.
* @param {number} [ary] The arity cap of `func`.
* @param {number} [arity] The arity of `func`.
* @returns {Function} Returns the new wrapped function.
*/
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) {
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
if (!isBindKey && typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
var length = partials ? partials.length : 0;
if (!length) {
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
partials = holders = undefined;
}
ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0);
arity = arity === undefined ? arity : toInteger(arity);
length -= holders ? holders.length : 0;
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
var partialsRight = partials,
holdersRight = holders;
partials = holders = undefined;
}
var data = isBindKey ? undefined : getData(func);
var newData = [
func, bitmask, thisArg, partials, holders, partialsRight, holdersRight,
argPos, ary, arity
];
if (data) {
mergeData(newData, data);
}
func = newData[0];
bitmask = newData[1];
thisArg = newData[2];
partials = newData[3];
holders = newData[4];
arity = newData[9] = newData[9] === undefined
? (isBindKey ? 0 : func.length)
: nativeMax(newData[9] - length, 0);
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
}
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
var result = createBind(func, bitmask, thisArg);
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
result = createCurry(func, bitmask, arity);
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
result = createPartial(func, bitmask, thisArg, partials);
} else {
result = createHybrid.apply(undefined, newData);
}
var setter = data ? baseSetData : setData;
return setWrapToString(setter(result, newData), func, bitmask);
}
/**
* Used by `_.defaults` to customize its `_.assignIn` use to assign properties
* of source objects to the destination object for all destination properties
* that resolve to `undefined`.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to assign.
* @param {Object} object The parent object of `objValue`.
* @returns {*} Returns the value to assign.
*/
function customDefaultsAssignIn(objValue, srcValue, key, object) {
if (objValue === undefined ||
(eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) {
return srcValue;
}
return objValue;
}
/**
* Used by `_.defaultsDeep` to customize its `_.merge` use to merge source
* objects into destination objects that are passed thru.
*
* @private
* @param {*} objValue The destination value.
* @param {*} srcValue The source value.
* @param {string} key The key of the property to merge.
* @param {Object} object The parent object of `objValue`.
* @param {Object} source The parent object of `srcValue`.
* @param {Object} [stack] Tracks traversed source values and their merged
* counterparts.
* @returns {*} Returns the value to assign.
*/
function customDefaultsMerge(objValue, srcValue, key, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) {
// Recursively merge objects and arrays (susceptible to call stack limits).
stack.set(srcValue, objValue);
baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack);
stack['delete'](srcValue);
}
return objValue;
}
/**
* Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain
* objects.
*
* @private
* @param {*} value The value to inspect.
* @param {string} key The key of the property to inspect.
* @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`.
*/
function customOmitClone(value) {
return isPlainObject(value) ? undefined : value;
}
/**
* A specialized version of `baseIsEqualDeep` for arrays with support for
* partial deep comparisons.
*
* @private
* @param {Array} array The array to compare.
* @param {Array} other The other array to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `array` and `other` objects.
* @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
*/
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
arrLength = array.length,
othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
// Check that cyclic values are equal.
var arrStacked = stack.get(array);
var othStacked = stack.get(other);
if (arrStacked && othStacked) {
return arrStacked == other && othStacked == array;
}
var index = -1,
result = true,
seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
stack.set(array, other);
stack.set(other, array);
// Ignore non-index properties.
while (++index < arrLength) {
var arrValue = array[index],
othValue = other[index];
if (customizer) {
var compared = isPartial
? customizer(othValue, arrValue, index, other, array, stack)
: customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined) {
if (compared) {
continue;
}
result = false;
break;
}
// Recursively compare arrays (susceptible to call stack limits).
if (seen) {
if (!arraySome(other, function(othValue, othIndex) {
if (!cacheHas(seen, othIndex) &&
(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
return seen.push(othIndex);
}
})) {
result = false;
break;
}
} else if (!(
arrValue === othValue ||
equalFunc(arrValue, othValue, bitmask, customizer, stack)
)) {
result = false;
break;
}
}
stack['delete'](array);
stack['delete'](other);
return result;
}
/**
* A specialized version of `baseIsEqualDeep` for comparing objects of
* the same `toStringTag`.
*
* **Note:** This function only supports comparing values with tags of
* `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {string} tag The `toStringTag` of the objects to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if ((object.byteLength != other.byteLength) ||
(object.byteOffset != other.byteOffset)) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if ((object.byteLength != other.byteLength) ||
!equalFunc(new Uint8Array(object), new Uint8Array(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
// Coerce booleans to `1` or `0` and dates to milliseconds.
// Invalid dates are coerced to `NaN`.
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
// Coerce regexes to strings and treat strings, primitives and objects,
// as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
// for more details.
return object == (other + '');
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
// Assume cyclic values are equal.
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG;
// Recursively compare objects (susceptible to call stack limits).
stack.set(object, other);
var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack['delete'](object);
return result;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
/**
* A specialized version of `baseIsEqualDeep` for objects with support for
* partial deep comparisons.
*
* @private
* @param {Object} object The object to compare.
* @param {Object} other The other object to compare.
* @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
* @param {Function} customizer The function to customize comparisons.
* @param {Function} equalFunc The function to determine equivalents of values.
* @param {Object} stack Tracks traversed `object` and `other` objects.
* @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
*/
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
objProps = getAllKeys(object),
objLength = objProps.length,
othProps = getAllKeys(other),
othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key = objProps[index];
if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
return false;
}
}
// Check that cyclic values are equal.
var objStacked = stack.get(object);
var othStacked = stack.get(other);
if (objStacked && othStacked) {
return objStacked == other && othStacked == object;
}
var result = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key = objProps[index];
var objValue = object[key],
othValue = other[key];
if (customizer) {
var compared = isPartial
? customizer(othValue, objValue, key, other, object, stack)
: customizer(objValue, othValue, key, object, other, stack);
}
// Recursively compare objects (susceptible to call stack limits).
if (!(compared === undefined
? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
: compared
)) {
result = false;
break;
}
skipCtor || (skipCtor = key == 'constructor');
}
if (result && !skipCtor) {
var objCtor = object.constructor,
othCtor = other.constructor;
// Non `Object` object instances with different constructors are not equal.
if (objCtor != othCtor &&
('constructor' in object && 'constructor' in other) &&
!(typeof objCtor == 'function' && objCtor instanceof objCtor &&
typeof othCtor == 'function' && othCtor instanceof othCtor)) {
result = false;
}
}
stack['delete'](object);
stack['delete'](other);
return result;
}
/**
* A specialized version of `baseRest` which flattens the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @returns {Function} Returns the new function.
*/
function flatRest(func) {
return setToString(overRest(func, undefined, flatten), func + '');
}
/**
* Creates an array of own enumerable property names and symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
/**
* Creates an array of own and inherited enumerable property names and
* symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names and symbols.
*/
function getAllKeysIn(object) {
return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
/**
* Gets metadata for `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {*} Returns the metadata for `func`.
*/
var getData = !metaMap ? noop : function(func) {
return metaMap.get(func);
};
/**
* Gets the name of `func`.
*
* @private
* @param {Function} func The function to query.
* @returns {string} Returns the function name.
*/
function getFuncName(func) {
var result = (func.name + ''),
array = realNames[result],
length = hasOwnProperty.call(realNames, result) ? array.length : 0;
while (length--) {
var data = array[length],
otherFunc = data.func;
if (otherFunc == null || otherFunc == func) {
return data.name;
}
}
return result;
}
/**
* Gets the argument placeholder value for `func`.
*
* @private
* @param {Function} func The function to inspect.
* @returns {*} Returns the placeholder value.
*/
function getHolder(func) {
var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
return object.placeholder;
}
/**
* Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
* this function returns the custom method, otherwise it returns `baseIteratee`.
* If arguments are provided, the chosen function is invoked with them and
* its result is returned.
*
* @private
* @param {*} [value] The value to convert to an iteratee.
* @param {number} [arity] The arity of the created iteratee.
* @returns {Function} Returns the chosen function or its result.
*/
function getIteratee() {
var result = lodash.iteratee || iteratee;
result = result === iteratee ? baseIteratee : result;
return arguments.length ? result(arguments[0], arguments[1]) : result;
}
/**
* Gets the data for `map`.
*
* @private
* @param {Object} map The map to query.
* @param {string} key The reference key.
* @returns {*} Returns the map data.
*/
function getMapData(map, key) {
var data = map.__data__;
return isKeyable(key)
? data[typeof key == 'string' ? 'string' : 'hash']
: data.map;
}
/**
* Gets the property names, values, and compare flags of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the match data of `object`.
*/
function getMatchData(object) {
var result = keys(object),
length = result.length;
while (length--) {
var key = result[length],
value = object[key];
result[length] = [key, value, isStrictComparable(value)];
}
return result;
}
/**
* Gets the native function at `key` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the method to get.
* @returns {*} Returns the function if it's native, else `undefined`.
*/
function getNative(object, key) {
var value = getValue(object, key);
return baseIsNative(value) ? value : undefined;
}
/**
* A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the raw `toStringTag`.
*/
function getRawTag(value) {
var isOwn = hasOwnProperty.call(value, symToStringTag),
tag = value[symToStringTag];
try {
value[symToStringTag] = undefined;
var unmasked = true;
} catch (e) {}
var result = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result;
}
/**
* Creates an array of the own enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
if (object == null) {
return [];
}
object = Object(object);
return arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable.call(object, symbol);
});
};
/**
* Creates an array of the own and inherited enumerable symbols of `object`.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of symbols.
*/
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
var result = [];
while (object) {
arrayPush(result, getSymbols(object));
object = getPrototype(object);
}
return result;
};
/**
* Gets the `toStringTag` of `value`.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
var getTag = baseGetTag;
// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
(Map && getTag(new Map) != mapTag) ||
(Promise && getTag(Promise.resolve()) != promiseTag) ||
(Set && getTag(new Set) != setTag) ||
(WeakMap && getTag(new WeakMap) != weakMapTag)) {
getTag = function(value) {
var result = baseGetTag(value),
Ctor = result == objectTag ? value.constructor : undefined,
ctorString = Ctor ? toSource(Ctor) : '';
if (ctorString) {
switch (ctorString) {
case dataViewCtorString: return dataViewTag;
case mapCtorString: return mapTag;
case promiseCtorString: return promiseTag;
case setCtorString: return setTag;
case weakMapCtorString: return weakMapTag;
}
}
return result;
};
}
/**
* Gets the view, applying any `transforms` to the `start` and `end` positions.
*
* @private
* @param {number} start The start of the view.
* @param {number} end The end of the view.
* @param {Array} transforms The transformations to apply to the view.
* @returns {Object} Returns an object containing the `start` and `end`
* positions of the view.
*/
function getView(start, end, transforms) {
var index = -1,
length = transforms.length;
while (++index < length) {
var data = transforms[index],
size = data.size;
switch (data.type) {
case 'drop': start += size; break;
case 'dropRight': end -= size; break;
case 'take': end = nativeMin(end, start + size); break;
case 'takeRight': start = nativeMax(start, end - size); break;
}
}
return { 'start': start, 'end': end };
}
/**
* Extracts wrapper details from the `source` body comment.
*
* @private
* @param {string} source The source to inspect.
* @returns {Array} Returns the wrapper details.
*/
function getWrapDetails(source) {
var match = source.match(reWrapDetails);
return match ? match[1].split(reSplitDetails) : [];
}
/**
* Checks if `path` exists on `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @param {Function} hasFunc The function to check properties.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
*/
function hasPath(object, path, hasFunc) {
path = castPath(path, object);
var index = -1,
length = path.length,
result = false;
while (++index < length) {
var key = toKey(path[index]);
if (!(result = object != null && hasFunc(object, key))) {
break;
}
object = object[key];
}
if (result || ++index != length) {
return result;
}
length = object == null ? 0 : object.length;
return !!length && isLength(length) && isIndex(key, length) &&
(isArray(object) || isArguments(object));
}
/**
* Initializes an array clone.
*
* @private
* @param {Array} array The array to clone.
* @returns {Array} Returns the initialized clone.
*/
function initCloneArray(array) {
var length = array.length,
result = new array.constructor(length);
// Add properties assigned by `RegExp#exec`.
if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {
result.index = array.index;
result.input = array.input;
}
return result;
}
/**
* Initializes an object clone.
*
* @private
* @param {Object} object The object to clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneObject(object) {
return (typeof object.constructor == 'function' && !isPrototype(object))
? baseCreate(getPrototype(object))
: {};
}
/**
* Initializes an object clone based on its `toStringTag`.
*
* **Note:** This function only supports cloning values with tags of
* `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.
*
* @private
* @param {Object} object The object to clone.
* @param {string} tag The `toStringTag` of the object to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the initialized clone.
*/
function initCloneByTag(object, tag, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag: case float64Tag:
case int8Tag: case int16Tag: case int32Tag:
case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return new Ctor;
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return new Ctor;
case symbolTag:
return cloneSymbol(object);
}
}
/**
* Inserts wrapper `details` in a comment at the top of the `source` body.
*
* @private
* @param {string} source The source to modify.
* @returns {Array} details The details to insert.
* @returns {string} Returns the modified source.
*/
function insertWrapDetails(source, details) {
var length = details.length;
if (!length) {
return source;
}
var lastIndex = length - 1;
details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex];
details = details.join(length > 2 ? ', ' : ' ');
return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n');
}
/**
* Checks if `value` is a flattenable `arguments` object or array.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
*/
function isFlattenable(value) {
return isArray(value) || isArguments(value) ||
!!(spreadableSymbol && value && value[spreadableSymbol]);
}
/**
* Checks if `value` is a valid array-like index.
*
* @private
* @param {*} value The value to check.
* @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
* @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
*/
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length &&
(type == 'number' ||
(type != 'symbol' && reIsUint.test(value))) &&
(value > -1 && value % 1 == 0 && value < length);
}
/**
* Checks if the given arguments are from an iteratee call.
*
* @private
* @param {*} value The potential iteratee value argument.
* @param {*} index The potential iteratee index or key argument.
* @param {*} object The potential iteratee object argument.
* @returns {boolean} Returns `true` if the arguments are from an iteratee call,
* else `false`.
*/
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == 'number'
? (isArrayLike(object) && isIndex(index, object.length))
: (type == 'string' && index in object)
) {
return eq(object[index], value);
}
return false;
}
/**
* Checks if `value` is a property name and not a property path.
*
* @private
* @param {*} value The value to check.
* @param {Object} [object] The object to query keys on.
* @returns {boolean} Returns `true` if `value` is a property name, else `false`.
*/
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == 'number' || type == 'symbol' || type == 'boolean' ||
value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||
(object != null && value in Object(object));
}
/**
* Checks if `value` is suitable for use as unique object key.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
*/
function isKeyable(value) {
var type = typeof value;
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
? (value !== '__proto__')
: (value === null);
}
/**
* Checks if `func` has a lazy counterpart.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` has a lazy counterpart,
* else `false`.
*/
function isLaziable(func) {
var funcName = getFuncName(func),
other = lodash[funcName];
if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) {
return false;
}
if (func === other) {
return true;
}
var data = getData(other);
return !!data && func === data[0];
}
/**
* Checks if `func` has its source masked.
*
* @private
* @param {Function} func The function to check.
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
*/
function isMasked(func) {
return !!maskSrcKey && (maskSrcKey in func);
}
/**
* Checks if `func` is capable of being masked.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `func` is maskable, else `false`.
*/
var isMaskable = coreJsData ? isFunction : stubFalse;
/**
* Checks if `value` is likely a prototype object.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
*/
function isPrototype(value) {
var Ctor = value && value.constructor,
proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
return value === proto;
}
/**
* Checks if `value` is suitable for strict equality comparisons, i.e. `===`.
*
* @private
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` if suitable for strict
* equality comparisons, else `false`.
*/
function isStrictComparable(value) {
return value === value && !isObject(value);
}
/**
* A specialized version of `matchesProperty` for source values suitable
* for strict equality comparisons, i.e. `===`.
*
* @private
* @param {string} key The key of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
*/
function matchesStrictComparable(key, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key] === srcValue &&
(srcValue !== undefined || (key in Object(object)));
};
}
/**
* A specialized version of `_.memoize` which clears the memoized function's
* cache when it exceeds `MAX_MEMOIZE_SIZE`.
*
* @private
* @param {Function} func The function to have its output memoized.
* @returns {Function} Returns the new memoized function.
*/
function memoizeCapped(func) {
var result = memoize(func, function(key) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key;
});
var cache = result.cache;
return result;
}
/**
* Merges the function metadata of `source` into `data`.
*
* Merging metadata reduces the number of wrappers used to invoke a function.
* This is possible because methods like `_.bind`, `_.curry`, and `_.partial`
* may be applied regardless of execution order. Methods like `_.ary` and
* `_.rearg` modify function arguments, making the order in which they are
* executed important, preventing the merging of metadata. However, we make
* an exception for a safe combined case where curried functions have `_.ary`
* and or `_.rearg` applied.
*
* @private
* @param {Array} data The destination metadata.
* @param {Array} source The source metadata.
* @returns {Array} Returns `data`.
*/
function mergeData(data, source) {
var bitmask = data[1],
srcBitmask = source[1],
newBitmask = bitmask | srcBitmask,
isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
var isCombo =
((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||
((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||
((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));
// Exit early if metadata can't be merged.
if (!(isCommon || isCombo)) {
return data;
}
// Use source `thisArg` if available.
if (srcBitmask & WRAP_BIND_FLAG) {
data[2] = source[2];
// Set when currying a bound function.
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
}
// Compose partial arguments.
var value = source[3];
if (value) {
var partials = data[3];
data[3] = partials ? composeArgs(partials, value, source[4]) : value;
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
}
// Compose partial right arguments.
value = source[5];
if (value) {
partials = data[5];
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
}
// Use source `argPos` if available.
value = source[7];
if (value) {
data[7] = value;
}
// Use source `ary` if it's smaller.
if (srcBitmask & WRAP_ARY_FLAG) {
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
}
// Use source `arity` if one is not provided.
if (data[9] == null) {
data[9] = source[9];
}
// Use source `func` and merge bitmasks.
data[0] = source[0];
data[1] = newBitmask;
return data;
}
/**
* This function is like
* [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* except that it includes inherited enumerable properties.
*
* @private
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
*/
function nativeKeysIn(object) {
var result = [];
if (object != null) {
for (var key in Object(object)) {
result.push(key);
}
}
return result;
}
/**
* Converts `value` to a string using `Object.prototype.toString`.
*
* @private
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
*/
function objectToString(value) {
return nativeObjectToString.call(value);
}
/**
* A specialized version of `baseRest` which transforms the rest array.
*
* @private
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @param {Function} transform The rest array transform.
* @returns {Function} Returns the new function.
*/
function overRest(func, start, transform) {
start = nativeMax(start === undefined ? (func.length - 1) : start, 0);
return function() {
var args = arguments,
index = -1,
length = nativeMax(args.length - start, 0),
array = Array(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = transform(array);
return apply(func, this, otherArgs);
};
}
/**
* Gets the parent value at `path` of `object`.
*
* @private
* @param {Object} object The object to query.
* @param {Array} path The path to get the parent value of.
* @returns {*} Returns the parent value.
*/
function parent(object, path) {
return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));
}
/**
* Reorder `array` according to the specified indexes where the element at
* the first index is assigned as the first element, the element at
* the second index is assigned as the second element, and so on.
*
* @private
* @param {Array} array The array to reorder.
* @param {Array} indexes The arranged array indexes.
* @returns {Array} Returns `array`.
*/
function reorder(array, indexes) {
var arrLength = array.length,
length = nativeMin(indexes.length, arrLength),
oldArray = copyArray(array);
while (length--) {
var index = indexes[length];
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;
}
return array;
}
/**
* Gets the value at `key`, unless `key` is "__proto__" or "constructor".
*
* @private
* @param {Object} object The object to query.
* @param {string} key The key of the property to get.
* @returns {*} Returns the property value.
*/
function safeGet(object, key) {
if (key === 'constructor' && typeof object[key] === 'function') {
return;
}
if (key == '__proto__') {
return;
}
return object[key];
}
/**
* Sets metadata for `func`.
*
* **Note:** If this function becomes hot, i.e. is invoked a lot in a short
* period of time, it will trip its breaker and transition to an identity
* function to avoid garbage collection pauses in V8. See
* [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070)
* for more details.
*
* @private
* @param {Function} func The function to associate metadata with.
* @param {*} data The metadata.
* @returns {Function} Returns `func`.
*/
var setData = shortOut(baseSetData);
/**
* A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout).
*
* @private
* @param {Function} func The function to delay.
* @param {number} wait The number of milliseconds to delay invocation.
* @returns {number|Object} Returns the timer id or timeout object.
*/
var setTimeout = ctxSetTimeout || function(func, wait) {
return root.setTimeout(func, wait);
};
/**
* Sets the `toString` method of `func` to return `string`.
*
* @private
* @param {Function} func The function to modify.
* @param {Function} string The `toString` result.
* @returns {Function} Returns `func`.
*/
var setToString = shortOut(baseSetToString);
/**
* Sets the `toString` method of `wrapper` to mimic the source of `reference`
* with wrapper details in a comment at the top of the source body.
*
* @private
* @param {Function} wrapper The function to modify.
* @param {Function} reference The reference function.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @returns {Function} Returns `wrapper`.
*/
function setWrapToString(wrapper, reference, bitmask) {
var source = (reference + '');
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
}
/**
* Creates a function that'll short out and invoke `identity` instead
* of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`
* milliseconds.
*
* @private
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new shortable function.
*/
function shortOut(func) {
var count = 0,
lastCalled = 0;
return function() {
var stamp = nativeNow(),
remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined, arguments);
};
}
/**
* A specialized version of `_.shuffle` which mutates and sets the size of `array`.
*
* @private
* @param {Array} array The array to shuffle.
* @param {number} [size=array.length] The size of `array`.
* @returns {Array} Returns `array`.
*/
function shuffleSelf(array, size) {
var index = -1,
length = array.length,
lastIndex = length - 1;
size = size === undefined ? length : size;
while (++index < size) {
var rand = baseRandom(index, lastIndex),
value = array[rand];
array[rand] = array[index];
array[index] = value;
}
array.length = size;
return array;
}
/**
* Converts `string` to a property path array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the property path array.
*/
var stringToPath = memoizeCapped(function(string) {
var result = [];
if (string.charCodeAt(0) === 46 /* . */) {
result.push('');
}
string.replace(rePropName, function(match, number, quote, subString) {
result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));
});
return result;
});
/**
* Converts `value` to a string key if it's not a string or symbol.
*
* @private
* @param {*} value The value to inspect.
* @returns {string|symbol} Returns the key.
*/
function toKey(value) {
if (typeof value == 'string' || isSymbol(value)) {
return value;
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
/**
* Converts `func` to its source code.
*
* @private
* @param {Function} func The function to convert.
* @returns {string} Returns the source code.
*/
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {}
try {
return (func + '');
} catch (e) {}
}
return '';
}
/**
* Updates wrapper `details` based on `bitmask` flags.
*
* @private
* @returns {Array} details The details to modify.
* @param {number} bitmask The bitmask flags. See `createWrap` for more details.
* @returns {Array} Returns `details`.
*/
function updateWrapDetails(details, bitmask) {
arrayEach(wrapFlags, function(pair) {
var value = '_.' + pair[0];
if ((bitmask & pair[1]) && !arrayIncludes(details, value)) {
details.push(value);
}
});
return details.sort();
}
/**
* Creates a clone of `wrapper`.
*
* @private
* @param {Object} wrapper The wrapper to clone.
* @returns {Object} Returns the cloned wrapper.
*/
function wrapperClone(wrapper) {
if (wrapper instanceof LazyWrapper) {
return wrapper.clone();
}
var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
result.__actions__ = copyArray(wrapper.__actions__);
result.__index__ = wrapper.__index__;
result.__values__ = wrapper.__values__;
return result;
}
/*------------------------------------------------------------------------*/
/**
* Creates an array of elements split into groups the length of `size`.
* If `array` can't be split evenly, the final chunk will be the remaining
* elements.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to process.
* @param {number} [size=1] The length of each chunk
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the new array of chunks.
* @example
*
* _.chunk(['a', 'b', 'c', 'd'], 2);
* // => [['a', 'b'], ['c', 'd']]
*
* _.chunk(['a', 'b', 'c', 'd'], 3);
* // => [['a', 'b', 'c'], ['d']]
*/
function chunk(array, size, guard) {
if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) {
size = 1;
} else {
size = nativeMax(toInteger(size), 0);
}
var length = array == null ? 0 : array.length;
if (!length || size < 1) {
return [];
}
var index = 0,
resIndex = 0,
result = Array(nativeCeil(length / size));
while (index < length) {
result[resIndex++] = baseSlice(array, index, (index += size));
}
return result;
}
/**
* Creates an array with all falsey values removed. The values `false`, `null`,
* `0`, `""`, `undefined`, and `NaN` are falsey.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to compact.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* _.compact([0, 1, false, 2, '', 3]);
* // => [1, 2, 3]
*/
function compact(array) {
var index = -1,
length = array == null ? 0 : array.length,
resIndex = 0,
result = [];
while (++index < length) {
var value = array[index];
if (value) {
result[resIndex++] = value;
}
}
return result;
}
/**
* Creates a new array concatenating `array` with any additional arrays
* and/or values.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to concatenate.
* @param {...*} [values] The values to concatenate.
* @returns {Array} Returns the new concatenated array.
* @example
*
* var array = [1];
* var other = _.concat(array, 2, [3], [[4]]);
*
* console.log(other);
* // => [1, 2, 3, [4]]
*
* console.log(array);
* // => [1]
*/
function concat() {
var length = arguments.length;
if (!length) {
return [];
}
var args = Array(length - 1),
array = arguments[0],
index = length;
while (index--) {
args[index - 1] = arguments[index];
}
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
/**
* Creates an array of `array` values not included in the other given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* **Note:** Unlike `_.pullAll`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see _.without, _.xor
* @example
*
* _.difference([2, 1], [2, 3]);
* // => [1]
*/
var difference = baseRest(function(array, values) {
return isArrayLikeObject(array)
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true))
: [];
});
/**
* This method is like `_.difference` except that it accepts `iteratee` which
* is invoked for each element of `array` and `values` to generate the criterion
* by which they're compared. The order and references of result values are
* determined by the first array. The iteratee is invoked with one argument:
* (value).
*
* **Note:** Unlike `_.pullAllBy`, this method returns a new array.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor);
* // => [1.2]
*
* // The `_.property` iteratee shorthand.
* _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x');
* // => [{ 'x': 2 }]
*/
var differenceBy = baseRest(function(array, values) {
var iteratee = last(values);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return isArrayLikeObject(array)
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2))
: [];
});
/**
* This method is like `_.difference` except that it accepts `comparator`
* which is invoked to compare elements of `array` to `values`. The order and
* references of result values are determined by the first array. The comparator
* is invoked with two arguments: (arrVal, othVal).
*
* **Note:** Unlike `_.pullAllWith`, this method returns a new array.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...Array} [values] The values to exclude.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
*
* _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual);
* // => [{ 'x': 2, 'y': 1 }]
*/
var differenceWith = baseRest(function(array, values) {
var comparator = last(values);
if (isArrayLikeObject(comparator)) {
comparator = undefined;
}
return isArrayLikeObject(array)
? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator)
: [];
});
/**
* Creates a slice of `array` with `n` elements dropped from the beginning.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.drop([1, 2, 3]);
* // => [2, 3]
*
* _.drop([1, 2, 3], 2);
* // => [3]
*
* _.drop([1, 2, 3], 5);
* // => []
*
* _.drop([1, 2, 3], 0);
* // => [1, 2, 3]
*/
function drop(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
return baseSlice(array, n < 0 ? 0 : n, length);
}
/**
* Creates a slice of `array` with `n` elements dropped from the end.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to drop.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.dropRight([1, 2, 3]);
* // => [1, 2]
*
* _.dropRight([1, 2, 3], 2);
* // => [1]
*
* _.dropRight([1, 2, 3], 5);
* // => []
*
* _.dropRight([1, 2, 3], 0);
* // => [1, 2, 3]
*/
function dropRight(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, 0, n < 0 ? 0 : n);
}
/**
* Creates a slice of `array` excluding elements dropped from the end.
* Elements are dropped until `predicate` returns falsey. The predicate is
* invoked with three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.dropRightWhile(users, function(o) { return !o.active; });
* // => objects for ['barney']
*
* // The `_.matches` iteratee shorthand.
* _.dropRightWhile(users, { 'user': 'pebbles', 'active': false });
* // => objects for ['barney', 'fred']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.dropRightWhile(users, ['active', false]);
* // => objects for ['barney']
*
* // The `_.property` iteratee shorthand.
* _.dropRightWhile(users, 'active');
* // => objects for ['barney', 'fred', 'pebbles']
*/
function dropRightWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3), true, true)
: [];
}
/**
* Creates a slice of `array` excluding elements dropped from the beginning.
* Elements are dropped until `predicate` returns falsey. The predicate is
* invoked with three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.dropWhile(users, function(o) { return !o.active; });
* // => objects for ['pebbles']
*
* // The `_.matches` iteratee shorthand.
* _.dropWhile(users, { 'user': 'barney', 'active': false });
* // => objects for ['fred', 'pebbles']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.dropWhile(users, ['active', false]);
* // => objects for ['pebbles']
*
* // The `_.property` iteratee shorthand.
* _.dropWhile(users, 'active');
* // => objects for ['barney', 'fred', 'pebbles']
*/
function dropWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3), true)
: [];
}
/**
* Fills elements of `array` with `value` from `start` up to, but not
* including, `end`.
*
* **Note:** This method mutates `array`.
*
* @static
* @memberOf _
* @since 3.2.0
* @category Array
* @param {Array} array The array to fill.
* @param {*} value The value to fill `array` with.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns `array`.
* @example
*
* var array = [1, 2, 3];
*
* _.fill(array, 'a');
* console.log(array);
* // => ['a', 'a', 'a']
*
* _.fill(Array(3), 2);
* // => [2, 2, 2]
*
* _.fill([4, 6, 8, 10], '*', 1, 3);
* // => [4, '*', '*', 10]
*/
function fill(array, value, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (start && typeof start != 'number' && isIterateeCall(array, value, start)) {
start = 0;
end = length;
}
return baseFill(array, value, start, end);
}
/**
* This method is like `_.find` except that it returns the index of the first
* element `predicate` returns truthy for instead of the element itself.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.findIndex(users, function(o) { return o.user == 'barney'; });
* // => 0
*
* // The `_.matches` iteratee shorthand.
* _.findIndex(users, { 'user': 'fred', 'active': false });
* // => 1
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findIndex(users, ['active', false]);
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.findIndex(users, 'active');
* // => 2
*/
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(array, getIteratee(predicate, 3), index);
}
/**
* This method is like `_.findIndex` except that it iterates over elements
* of `collection` from right to left.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=array.length-1] The index to search from.
* @returns {number} Returns the index of the found element, else `-1`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.findLastIndex(users, function(o) { return o.user == 'pebbles'; });
* // => 2
*
* // The `_.matches` iteratee shorthand.
* _.findLastIndex(users, { 'user': 'barney', 'active': true });
* // => 0
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findLastIndex(users, ['active', false]);
* // => 2
*
* // The `_.property` iteratee shorthand.
* _.findLastIndex(users, 'active');
* // => 0
*/
function findLastIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length - 1;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = fromIndex < 0
? nativeMax(length + index, 0)
: nativeMin(index, length - 1);
}
return baseFindIndex(array, getIteratee(predicate, 3), index, true);
}
/**
* Flattens `array` a single level deep.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @example
*
* _.flatten([1, [2, [3, [4]], 5]]);
* // => [1, 2, [3, [4]], 5]
*/
function flatten(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, 1) : [];
}
/**
* Recursively flattens `array`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to flatten.
* @returns {Array} Returns the new flattened array.
* @example
*
* _.flattenDeep([1, [2, [3, [4]], 5]]);
* // => [1, 2, 3, 4, 5]
*/
function flattenDeep(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, INFINITY) : [];
}
/**
* Recursively flatten `array` up to `depth` times.
*
* @static
* @memberOf _
* @since 4.4.0
* @category Array
* @param {Array} array The array to flatten.
* @param {number} [depth=1] The maximum recursion depth.
* @returns {Array} Returns the new flattened array.
* @example
*
* var array = [1, [2, [3, [4]], 5]];
*
* _.flattenDepth(array, 1);
* // => [1, 2, [3, [4]], 5]
*
* _.flattenDepth(array, 2);
* // => [1, 2, 3, [4], 5]
*/
function flattenDepth(array, depth) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(array, depth);
}
/**
* The inverse of `_.toPairs`; this method returns an object composed
* from key-value `pairs`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} pairs The key-value pairs.
* @returns {Object} Returns the new object.
* @example
*
* _.fromPairs([['a', 1], ['b', 2]]);
* // => { 'a': 1, 'b': 2 }
*/
function fromPairs(pairs) {
var index = -1,
length = pairs == null ? 0 : pairs.length,
result = {};
while (++index < length) {
var pair = pairs[index];
result[pair[0]] = pair[1];
}
return result;
}
/**
* Gets the first element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias first
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the first element of `array`.
* @example
*
* _.head([1, 2, 3]);
* // => 1
*
* _.head([]);
* // => undefined
*/
function head(array) {
return (array && array.length) ? array[0] : undefined;
}
/**
* Gets the index at which the first occurrence of `value` is found in `array`
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. If `fromIndex` is negative, it's used as the
* offset from the end of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.indexOf([1, 2, 1, 2], 2);
* // => 1
*
* // Search from the `fromIndex`.
* _.indexOf([1, 2, 1, 2], 2, 2);
* // => 3
*/
function indexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseIndexOf(array, value, index);
}
/**
* Gets all but the last element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.initial([1, 2, 3]);
* // => [1, 2]
*/
function initial(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 0, -1) : [];
}
/**
* Creates an array of unique values that are included in all given arrays
* using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons. The order and references of result values are
* determined by the first array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersection([2, 1], [2, 3]);
* // => [2]
*/
var intersection = baseRest(function(arrays) {
var mapped = arrayMap(arrays, castArrayLikeObject);
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped)
: [];
});
/**
* This method is like `_.intersection` except that it accepts `iteratee`
* which is invoked for each element of each `arrays` to generate the criterion
* by which they're compared. The order and references of result values are
* determined by the first array. The iteratee is invoked with one argument:
* (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor);
* // => [2.1]
*
* // The `_.property` iteratee shorthand.
* _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }]
*/
var intersectionBy = baseRest(function(arrays) {
var iteratee = last(arrays),
mapped = arrayMap(arrays, castArrayLikeObject);
if (iteratee === last(mapped)) {
iteratee = undefined;
} else {
mapped.pop();
}
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped, getIteratee(iteratee, 2))
: [];
});
/**
* This method is like `_.intersection` except that it accepts `comparator`
* which is invoked to compare elements of `arrays`. The order and references
* of result values are determined by the first array. The comparator is
* invoked with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of intersecting values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.intersectionWith(objects, others, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }]
*/
var intersectionWith = baseRest(function(arrays) {
var comparator = last(arrays),
mapped = arrayMap(arrays, castArrayLikeObject);
comparator = typeof comparator == 'function' ? comparator : undefined;
if (comparator) {
mapped.pop();
}
return (mapped.length && mapped[0] === arrays[0])
? baseIntersection(mapped, undefined, comparator)
: [];
});
/**
* Converts all elements in `array` into a string separated by `separator`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to convert.
* @param {string} [separator=','] The element separator.
* @returns {string} Returns the joined string.
* @example
*
* _.join(['a', 'b', 'c'], '~');
* // => 'a~b~c'
*/
function join(array, separator) {
return array == null ? '' : nativeJoin.call(array, separator);
}
/**
* Gets the last element of `array`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @returns {*} Returns the last element of `array`.
* @example
*
* _.last([1, 2, 3]);
* // => 3
*/
function last(array) {
var length = array == null ? 0 : array.length;
return length ? array[length - 1] : undefined;
}
/**
* This method is like `_.indexOf` except that it iterates over elements of
* `array` from right to left.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=array.length-1] The index to search from.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.lastIndexOf([1, 2, 1, 2], 2);
* // => 3
*
* // Search from the `fromIndex`.
* _.lastIndexOf([1, 2, 1, 2], 2, 2);
* // => 1
*/
function lastIndexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length;
if (fromIndex !== undefined) {
index = toInteger(fromIndex);
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return value === value
? strictLastIndexOf(array, value, index)
: baseFindIndex(array, baseIsNaN, index, true);
}
/**
* Gets the element at index `n` of `array`. If `n` is negative, the nth
* element from the end is returned.
*
* @static
* @memberOf _
* @since 4.11.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=0] The index of the element to return.
* @returns {*} Returns the nth element of `array`.
* @example
*
* var array = ['a', 'b', 'c', 'd'];
*
* _.nth(array, 1);
* // => 'b'
*
* _.nth(array, -2);
* // => 'c';
*/
function nth(array, n) {
return (array && array.length) ? baseNth(array, toInteger(n)) : undefined;
}
/**
* Removes all given values from `array` using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`
* to remove elements from an array by predicate.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {...*} [values] The values to remove.
* @returns {Array} Returns `array`.
* @example
*
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
*
* _.pull(array, 'a', 'c');
* console.log(array);
* // => ['b', 'b']
*/
var pull = baseRest(pullAll);
/**
* This method is like `_.pull` except that it accepts an array of values to remove.
*
* **Note:** Unlike `_.difference`, this method mutates `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @returns {Array} Returns `array`.
* @example
*
* var array = ['a', 'b', 'c', 'a', 'b', 'c'];
*
* _.pullAll(array, ['a', 'c']);
* console.log(array);
* // => ['b', 'b']
*/
function pullAll(array, values) {
return (array && array.length && values && values.length)
? basePullAll(array, values)
: array;
}
/**
* This method is like `_.pullAll` except that it accepts `iteratee` which is
* invoked for each element of `array` and `values` to generate the criterion
* by which they're compared. The iteratee is invoked with one argument: (value).
*
* **Note:** Unlike `_.differenceBy`, this method mutates `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns `array`.
* @example
*
* var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }];
*
* _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x');
* console.log(array);
* // => [{ 'x': 2 }]
*/
function pullAllBy(array, values, iteratee) {
return (array && array.length && values && values.length)
? basePullAll(array, values, getIteratee(iteratee, 2))
: array;
}
/**
* This method is like `_.pullAll` except that it accepts `comparator` which
* is invoked to compare elements of `array` to `values`. The comparator is
* invoked with two arguments: (arrVal, othVal).
*
* **Note:** Unlike `_.differenceWith`, this method mutates `array`.
*
* @static
* @memberOf _
* @since 4.6.0
* @category Array
* @param {Array} array The array to modify.
* @param {Array} values The values to remove.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns `array`.
* @example
*
* var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }];
*
* _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual);
* console.log(array);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }]
*/
function pullAllWith(array, values, comparator) {
return (array && array.length && values && values.length)
? basePullAll(array, values, undefined, comparator)
: array;
}
/**
* Removes elements from `array` corresponding to `indexes` and returns an
* array of removed elements.
*
* **Note:** Unlike `_.at`, this method mutates `array`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {...(number|number[])} [indexes] The indexes of elements to remove.
* @returns {Array} Returns the new array of removed elements.
* @example
*
* var array = ['a', 'b', 'c', 'd'];
* var pulled = _.pullAt(array, [1, 3]);
*
* console.log(array);
* // => ['a', 'c']
*
* console.log(pulled);
* // => ['b', 'd']
*/
var pullAt = flatRest(function(array, indexes) {
var length = array == null ? 0 : array.length,
result = baseAt(array, indexes);
basePullAt(array, arrayMap(indexes, function(index) {
return isIndex(index, length) ? +index : index;
}).sort(compareAscending));
return result;
});
/**
* Removes all elements from `array` that `predicate` returns truthy for
* and returns an array of the removed elements. The predicate is invoked
* with three arguments: (value, index, array).
*
* **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull`
* to pull elements from an array by value.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Array
* @param {Array} array The array to modify.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new array of removed elements.
* @example
*
* var array = [1, 2, 3, 4];
* var evens = _.remove(array, function(n) {
* return n % 2 == 0;
* });
*
* console.log(array);
* // => [1, 3]
*
* console.log(evens);
* // => [2, 4]
*/
function remove(array, predicate) {
var result = [];
if (!(array && array.length)) {
return result;
}
var index = -1,
indexes = [],
length = array.length;
predicate = getIteratee(predicate, 3);
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result.push(value);
indexes.push(index);
}
}
basePullAt(array, indexes);
return result;
}
/**
* Reverses `array` so that the first element becomes the last, the second
* element becomes the second to last, and so on.
*
* **Note:** This method mutates `array` and is based on
* [`Array#reverse`](https://mdn.io/Array/reverse).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to modify.
* @returns {Array} Returns `array`.
* @example
*
* var array = [1, 2, 3];
*
* _.reverse(array);
* // => [3, 2, 1]
*
* console.log(array);
* // => [3, 2, 1]
*/
function reverse(array) {
return array == null ? array : nativeReverse.call(array);
}
/**
* Creates a slice of `array` from `start` up to, but not including, `end`.
*
* **Note:** This method is used instead of
* [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are
* returned.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to slice.
* @param {number} [start=0] The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the slice of `array`.
*/
function slice(array, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (end && typeof end != 'number' && isIterateeCall(array, start, end)) {
start = 0;
end = length;
}
else {
start = start == null ? 0 : toInteger(start);
end = end === undefined ? length : toInteger(end);
}
return baseSlice(array, start, end);
}
/**
* Uses a binary search to determine the lowest index at which `value`
* should be inserted into `array` in order to maintain its sort order.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* _.sortedIndex([30, 50], 40);
* // => 1
*/
function sortedIndex(array, value) {
return baseSortedIndex(array, value);
}
/**
* This method is like `_.sortedIndex` except that it accepts `iteratee`
* which is invoked for `value` and each element of `array` to compute their
* sort ranking. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* var objects = [{ 'x': 4 }, { 'x': 5 }];
*
* _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
* // => 0
*
* // The `_.property` iteratee shorthand.
* _.sortedIndexBy(objects, { 'x': 4 }, 'x');
* // => 0
*/
function sortedIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2));
}
/**
* This method is like `_.indexOf` except that it performs a binary
* search on a sorted `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.sortedIndexOf([4, 5, 5, 5, 6], 5);
* // => 1
*/
function sortedIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value);
if (index < length && eq(array[index], value)) {
return index;
}
}
return -1;
}
/**
* This method is like `_.sortedIndex` except that it returns the highest
* index at which `value` should be inserted into `array` in order to
* maintain its sort order.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* _.sortedLastIndex([4, 5, 5, 5, 6], 5);
* // => 4
*/
function sortedLastIndex(array, value) {
return baseSortedIndex(array, value, true);
}
/**
* This method is like `_.sortedLastIndex` except that it accepts `iteratee`
* which is invoked for `value` and each element of `array` to compute their
* sort ranking. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The sorted array to inspect.
* @param {*} value The value to evaluate.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the index at which `value` should be inserted
* into `array`.
* @example
*
* var objects = [{ 'x': 4 }, { 'x': 5 }];
*
* _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; });
* // => 1
*
* // The `_.property` iteratee shorthand.
* _.sortedLastIndexBy(objects, { 'x': 4 }, 'x');
* // => 1
*/
function sortedLastIndexBy(array, value, iteratee) {
return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true);
}
/**
* This method is like `_.lastIndexOf` except that it performs a binary
* search on a sorted `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {*} value The value to search for.
* @returns {number} Returns the index of the matched value, else `-1`.
* @example
*
* _.sortedLastIndexOf([4, 5, 5, 5, 6], 5);
* // => 3
*/
function sortedLastIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value, true) - 1;
if (eq(array[index], value)) {
return index;
}
}
return -1;
}
/**
* This method is like `_.uniq` except that it's designed and optimized
* for sorted arrays.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.sortedUniq([1, 1, 2]);
* // => [1, 2]
*/
function sortedUniq(array) {
return (array && array.length)
? baseSortedUniq(array)
: [];
}
/**
* This method is like `_.uniqBy` except that it's designed and optimized
* for sorted arrays.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [iteratee] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor);
* // => [1.1, 2.3]
*/
function sortedUniqBy(array, iteratee) {
return (array && array.length)
? baseSortedUniq(array, getIteratee(iteratee, 2))
: [];
}
/**
* Gets all but the first element of `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to query.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.tail([1, 2, 3]);
* // => [2, 3]
*/
function tail(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 1, length) : [];
}
/**
* Creates a slice of `array` with `n` elements taken from the beginning.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to take.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.take([1, 2, 3]);
* // => [1]
*
* _.take([1, 2, 3], 2);
* // => [1, 2]
*
* _.take([1, 2, 3], 5);
* // => [1, 2, 3]
*
* _.take([1, 2, 3], 0);
* // => []
*/
function take(array, n, guard) {
if (!(array && array.length)) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
return baseSlice(array, 0, n < 0 ? 0 : n);
}
/**
* Creates a slice of `array` with `n` elements taken from the end.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {number} [n=1] The number of elements to take.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the slice of `array`.
* @example
*
* _.takeRight([1, 2, 3]);
* // => [3]
*
* _.takeRight([1, 2, 3], 2);
* // => [2, 3]
*
* _.takeRight([1, 2, 3], 5);
* // => [1, 2, 3]
*
* _.takeRight([1, 2, 3], 0);
* // => []
*/
function takeRight(array, n, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n = (guard || n === undefined) ? 1 : toInteger(n);
n = length - n;
return baseSlice(array, n < 0 ? 0 : n, length);
}
/**
* Creates a slice of `array` with elements taken from the end. Elements are
* taken until `predicate` returns falsey. The predicate is invoked with
* three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': false }
* ];
*
* _.takeRightWhile(users, function(o) { return !o.active; });
* // => objects for ['fred', 'pebbles']
*
* // The `_.matches` iteratee shorthand.
* _.takeRightWhile(users, { 'user': 'pebbles', 'active': false });
* // => objects for ['pebbles']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.takeRightWhile(users, ['active', false]);
* // => objects for ['fred', 'pebbles']
*
* // The `_.property` iteratee shorthand.
* _.takeRightWhile(users, 'active');
* // => []
*/
function takeRightWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3), false, true)
: [];
}
/**
* Creates a slice of `array` with elements taken from the beginning. Elements
* are taken until `predicate` returns falsey. The predicate is invoked with
* three arguments: (value, index, array).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Array
* @param {Array} array The array to query.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the slice of `array`.
* @example
*
* var users = [
* { 'user': 'barney', 'active': false },
* { 'user': 'fred', 'active': false },
* { 'user': 'pebbles', 'active': true }
* ];
*
* _.takeWhile(users, function(o) { return !o.active; });
* // => objects for ['barney', 'fred']
*
* // The `_.matches` iteratee shorthand.
* _.takeWhile(users, { 'user': 'barney', 'active': false });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.takeWhile(users, ['active', false]);
* // => objects for ['barney', 'fred']
*
* // The `_.property` iteratee shorthand.
* _.takeWhile(users, 'active');
* // => []
*/
function takeWhile(array, predicate) {
return (array && array.length)
? baseWhile(array, getIteratee(predicate, 3))
: [];
}
/**
* Creates an array of unique values, in order, from all given arrays using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of combined values.
* @example
*
* _.union([2], [1, 2]);
* // => [2, 1]
*/
var union = baseRest(function(arrays) {
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
});
/**
* This method is like `_.union` except that it accepts `iteratee` which is
* invoked for each element of each `arrays` to generate the criterion by
* which uniqueness is computed. Result values are chosen from the first
* array in which the value occurs. The iteratee is invoked with one argument:
* (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of combined values.
* @example
*
* _.unionBy([2.1], [1.2, 2.3], Math.floor);
* // => [2.1, 1.2]
*
* // The `_.property` iteratee shorthand.
* _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
var unionBy = baseRest(function(arrays) {
var iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2));
});
/**
* This method is like `_.union` except that it accepts `comparator` which
* is invoked to compare elements of `arrays`. Result values are chosen from
* the first array in which the value occurs. The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of combined values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.unionWith(objects, others, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
var unionWith = baseRest(function(arrays) {
var comparator = last(arrays);
comparator = typeof comparator == 'function' ? comparator : undefined;
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator);
});
/**
* Creates a duplicate-free version of an array, using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons, in which only the first occurrence of each element
* is kept. The order of result values is determined by the order they occur
* in the array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.uniq([2, 1, 2]);
* // => [2, 1]
*/
function uniq(array) {
return (array && array.length) ? baseUniq(array) : [];
}
/**
* This method is like `_.uniq` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* uniqueness is computed. The order of result values is determined by the
* order they occur in the array. The iteratee is invoked with one argument:
* (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* _.uniqBy([2.1, 1.2, 2.3], Math.floor);
* // => [2.1, 1.2]
*
* // The `_.property` iteratee shorthand.
* _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 1 }, { 'x': 2 }]
*/
function uniqBy(array, iteratee) {
return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : [];
}
/**
* This method is like `_.uniq` except that it accepts `comparator` which
* is invoked to compare elements of `array`. The order of result values is
* determined by the order they occur in the array.The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {Array} array The array to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new duplicate free array.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.uniqWith(objects, _.isEqual);
* // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
*/
function uniqWith(array, comparator) {
comparator = typeof comparator == 'function' ? comparator : undefined;
return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
}
/**
* This method is like `_.zip` except that it accepts an array of grouped
* elements and creates an array regrouping the elements to their pre-zip
* configuration.
*
* @static
* @memberOf _
* @since 1.2.0
* @category Array
* @param {Array} array The array of grouped elements to process.
* @returns {Array} Returns the new array of regrouped elements.
* @example
*
* var zipped = _.zip(['a', 'b'], [1, 2], [true, false]);
* // => [['a', 1, true], ['b', 2, false]]
*
* _.unzip(zipped);
* // => [['a', 'b'], [1, 2], [true, false]]
*/
function unzip(array) {
if (!(array && array.length)) {
return [];
}
var length = 0;
array = arrayFilter(array, function(group) {
if (isArrayLikeObject(group)) {
length = nativeMax(group.length, length);
return true;
}
});
return baseTimes(length, function(index) {
return arrayMap(array, baseProperty(index));
});
}
/**
* This method is like `_.unzip` except that it accepts `iteratee` to specify
* how regrouped values should be combined. The iteratee is invoked with the
* elements of each group: (...group).
*
* @static
* @memberOf _
* @since 3.8.0
* @category Array
* @param {Array} array The array of grouped elements to process.
* @param {Function} [iteratee=_.identity] The function to combine
* regrouped values.
* @returns {Array} Returns the new array of regrouped elements.
* @example
*
* var zipped = _.zip([1, 2], [10, 20], [100, 200]);
* // => [[1, 10, 100], [2, 20, 200]]
*
* _.unzipWith(zipped, _.add);
* // => [3, 30, 300]
*/
function unzipWith(array, iteratee) {
if (!(array && array.length)) {
return [];
}
var result = unzip(array);
if (iteratee == null) {
return result;
}
return arrayMap(result, function(group) {
return apply(iteratee, undefined, group);
});
}
/**
* Creates an array excluding all given values using
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* for equality comparisons.
*
* **Note:** Unlike `_.pull`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {Array} array The array to inspect.
* @param {...*} [values] The values to exclude.
* @returns {Array} Returns the new array of filtered values.
* @see _.difference, _.xor
* @example
*
* _.without([2, 1, 2, 3], 1, 2);
* // => [3]
*/
var without = baseRest(function(array, values) {
return isArrayLikeObject(array)
? baseDifference(array, values)
: [];
});
/**
* Creates an array of unique values that is the
* [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference)
* of the given arrays. The order of result values is determined by the order
* they occur in the arrays.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @returns {Array} Returns the new array of filtered values.
* @see _.difference, _.without
* @example
*
* _.xor([2, 1], [2, 3]);
* // => [1, 3]
*/
var xor = baseRest(function(arrays) {
return baseXor(arrayFilter(arrays, isArrayLikeObject));
});
/**
* This method is like `_.xor` except that it accepts `iteratee` which is
* invoked for each element of each `arrays` to generate the criterion by
* which by which they're compared. The order of result values is determined
* by the order they occur in the arrays. The iteratee is invoked with one
* argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor);
* // => [1.2, 3.4]
*
* // The `_.property` iteratee shorthand.
* _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x');
* // => [{ 'x': 2 }]
*/
var xorBy = baseRest(function(arrays) {
var iteratee = last(arrays);
if (isArrayLikeObject(iteratee)) {
iteratee = undefined;
}
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2));
});
/**
* This method is like `_.xor` except that it accepts `comparator` which is
* invoked to compare elements of `arrays`. The order of result values is
* determined by the order they occur in the arrays. The comparator is invoked
* with two arguments: (arrVal, othVal).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Array
* @param {...Array} [arrays] The arrays to inspect.
* @param {Function} [comparator] The comparator invoked per element.
* @returns {Array} Returns the new array of filtered values.
* @example
*
* var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }];
* var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }];
*
* _.xorWith(objects, others, _.isEqual);
* // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }]
*/
var xorWith = baseRest(function(arrays) {
var comparator = last(arrays);
comparator = typeof comparator == 'function' ? comparator : undefined;
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator);
});
/**
* Creates an array of grouped elements, the first of which contains the
* first elements of the given arrays, the second of which contains the
* second elements of the given arrays, and so on.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Array
* @param {...Array} [arrays] The arrays to process.
* @returns {Array} Returns the new array of grouped elements.
* @example
*
* _.zip(['a', 'b'], [1, 2], [true, false]);
* // => [['a', 1, true], ['b', 2, false]]
*/
var zip = baseRest(unzip);
/**
* This method is like `_.fromPairs` except that it accepts two arrays,
* one of property identifiers and one of corresponding values.
*
* @static
* @memberOf _
* @since 0.4.0
* @category Array
* @param {Array} [props=[]] The property identifiers.
* @param {Array} [values=[]] The property values.
* @returns {Object} Returns the new object.
* @example
*
* _.zipObject(['a', 'b'], [1, 2]);
* // => { 'a': 1, 'b': 2 }
*/
function zipObject(props, values) {
return baseZipObject(props || [], values || [], assignValue);
}
/**
* This method is like `_.zipObject` except that it supports property paths.
*
* @static
* @memberOf _
* @since 4.1.0
* @category Array
* @param {Array} [props=[]] The property identifiers.
* @param {Array} [values=[]] The property values.
* @returns {Object} Returns the new object.
* @example
*
* _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]);
* // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } }
*/
function zipObjectDeep(props, values) {
return baseZipObject(props || [], values || [], baseSet);
}
/**
* This method is like `_.zip` except that it accepts `iteratee` to specify
* how grouped values should be combined. The iteratee is invoked with the
* elements of each group: (...group).
*
* @static
* @memberOf _
* @since 3.8.0
* @category Array
* @param {...Array} [arrays] The arrays to process.
* @param {Function} [iteratee=_.identity] The function to combine
* grouped values.
* @returns {Array} Returns the new array of grouped elements.
* @example
*
* _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) {
* return a + b + c;
* });
* // => [111, 222]
*/
var zipWith = baseRest(function(arrays) {
var length = arrays.length,
iteratee = length > 1 ? arrays[length - 1] : undefined;
iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined;
return unzipWith(arrays, iteratee);
});
/*------------------------------------------------------------------------*/
/**
* Creates a `lodash` wrapper instance that wraps `value` with explicit method
* chain sequences enabled. The result of such sequences must be unwrapped
* with `_#value`.
*
* @static
* @memberOf _
* @since 1.3.0
* @category Seq
* @param {*} value The value to wrap.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'pebbles', 'age': 1 }
* ];
*
* var youngest = _
* .chain(users)
* .sortBy('age')
* .map(function(o) {
* return o.user + ' is ' + o.age;
* })
* .head()
* .value();
* // => 'pebbles is 1'
*/
function chain(value) {
var result = lodash(value);
result.__chain__ = true;
return result;
}
/**
* This method invokes `interceptor` and returns `value`. The interceptor
* is invoked with one argument; (value). The purpose of this method is to
* "tap into" a method chain sequence in order to modify intermediate results.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Seq
* @param {*} value The value to provide to `interceptor`.
* @param {Function} interceptor The function to invoke.
* @returns {*} Returns `value`.
* @example
*
* _([1, 2, 3])
* .tap(function(array) {
* // Mutate input array.
* array.pop();
* })
* .reverse()
* .value();
* // => [2, 1]
*/
function tap(value, interceptor) {
interceptor(value);
return value;
}
/**
* This method is like `_.tap` except that it returns the result of `interceptor`.
* The purpose of this method is to "pass thru" values replacing intermediate
* results in a method chain sequence.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Seq
* @param {*} value The value to provide to `interceptor`.
* @param {Function} interceptor The function to invoke.
* @returns {*} Returns the result of `interceptor`.
* @example
*
* _(' abc ')
* .chain()
* .trim()
* .thru(function(value) {
* return [value];
* })
* .value();
* // => ['abc']
*/
function thru(value, interceptor) {
return interceptor(value);
}
/**
* This method is the wrapper version of `_.at`.
*
* @name at
* @memberOf _
* @since 1.0.0
* @category Seq
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
*
* _(object).at(['a[0].b.c', 'a[1]']).value();
* // => [3, 4]
*/
var wrapperAt = flatRest(function(paths) {
var length = paths.length,
start = length ? paths[0] : 0,
value = this.__wrapped__,
interceptor = function(object) { return baseAt(object, paths); };
if (length > 1 || this.__actions__.length ||
!(value instanceof LazyWrapper) || !isIndex(start)) {
return this.thru(interceptor);
}
value = value.slice(start, +start + (length ? 1 : 0));
value.__actions__.push({
'func': thru,
'args': [interceptor],
'thisArg': undefined
});
return new LodashWrapper(value, this.__chain__).thru(function(array) {
if (length && !array.length) {
array.push(undefined);
}
return array;
});
});
/**
* Creates a `lodash` wrapper instance with explicit method chain sequences enabled.
*
* @name chain
* @memberOf _
* @since 0.1.0
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 40 }
* ];
*
* // A sequence without explicit chaining.
* _(users).head();
* // => { 'user': 'barney', 'age': 36 }
*
* // A sequence with explicit chaining.
* _(users)
* .chain()
* .head()
* .pick('user')
* .value();
* // => { 'user': 'barney' }
*/
function wrapperChain() {
return chain(this);
}
/**
* Executes the chain sequence and returns the wrapped result.
*
* @name commit
* @memberOf _
* @since 3.2.0
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var array = [1, 2];
* var wrapped = _(array).push(3);
*
* console.log(array);
* // => [1, 2]
*
* wrapped = wrapped.commit();
* console.log(array);
* // => [1, 2, 3]
*
* wrapped.last();
* // => 3
*
* console.log(array);
* // => [1, 2, 3]
*/
function wrapperCommit() {
return new LodashWrapper(this.value(), this.__chain__);
}
/**
* Gets the next value on a wrapped object following the
* [iterator protocol](https://mdn.io/iteration_protocols#iterator).
*
* @name next
* @memberOf _
* @since 4.0.0
* @category Seq
* @returns {Object} Returns the next iterator value.
* @example
*
* var wrapped = _([1, 2]);
*
* wrapped.next();
* // => { 'done': false, 'value': 1 }
*
* wrapped.next();
* // => { 'done': false, 'value': 2 }
*
* wrapped.next();
* // => { 'done': true, 'value': undefined }
*/
function wrapperNext() {
if (this.__values__ === undefined) {
this.__values__ = toArray(this.value());
}
var done = this.__index__ >= this.__values__.length,
value = done ? undefined : this.__values__[this.__index__++];
return { 'done': done, 'value': value };
}
/**
* Enables the wrapper to be iterable.
*
* @name Symbol.iterator
* @memberOf _
* @since 4.0.0
* @category Seq
* @returns {Object} Returns the wrapper object.
* @example
*
* var wrapped = _([1, 2]);
*
* wrapped[Symbol.iterator]() === wrapped;
* // => true
*
* Array.from(wrapped);
* // => [1, 2]
*/
function wrapperToIterator() {
return this;
}
/**
* Creates a clone of the chain sequence planting `value` as the wrapped value.
*
* @name plant
* @memberOf _
* @since 3.2.0
* @category Seq
* @param {*} value The value to plant.
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* function square(n) {
* return n * n;
* }
*
* var wrapped = _([1, 2]).map(square);
* var other = wrapped.plant([3, 4]);
*
* other.value();
* // => [9, 16]
*
* wrapped.value();
* // => [1, 4]
*/
function wrapperPlant(value) {
var result,
parent = this;
while (parent instanceof baseLodash) {
var clone = wrapperClone(parent);
clone.__index__ = 0;
clone.__values__ = undefined;
if (result) {
previous.__wrapped__ = clone;
} else {
result = clone;
}
var previous = clone;
parent = parent.__wrapped__;
}
previous.__wrapped__ = value;
return result;
}
/**
* This method is the wrapper version of `_.reverse`.
*
* **Note:** This method mutates the wrapped array.
*
* @name reverse
* @memberOf _
* @since 0.1.0
* @category Seq
* @returns {Object} Returns the new `lodash` wrapper instance.
* @example
*
* var array = [1, 2, 3];
*
* _(array).reverse().value()
* // => [3, 2, 1]
*
* console.log(array);
* // => [3, 2, 1]
*/
function wrapperReverse() {
var value = this.__wrapped__;
if (value instanceof LazyWrapper) {
var wrapped = value;
if (this.__actions__.length) {
wrapped = new LazyWrapper(this);
}
wrapped = wrapped.reverse();
wrapped.__actions__.push({
'func': thru,
'args': [reverse],
'thisArg': undefined
});
return new LodashWrapper(wrapped, this.__chain__);
}
return this.thru(reverse);
}
/**
* Executes the chain sequence to resolve the unwrapped value.
*
* @name value
* @memberOf _
* @since 0.1.0
* @alias toJSON, valueOf
* @category Seq
* @returns {*} Returns the resolved unwrapped value.
* @example
*
* _([1, 2, 3]).value();
* // => [1, 2, 3]
*/
function wrapperValue() {
return baseWrapperValue(this.__wrapped__, this.__actions__);
}
/*------------------------------------------------------------------------*/
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The corresponding value of
* each key is the number of times the key was returned by `iteratee`. The
* iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.5.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* _.countBy([6.1, 4.2, 6.3], Math.floor);
* // => { '4': 1, '6': 2 }
*
* // The `_.property` iteratee shorthand.
* _.countBy(['one', 'two', 'three'], 'length');
* // => { '3': 2, '5': 1 }
*/
var countBy = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
++result[key];
} else {
baseAssignValue(result, key, 1);
}
});
/**
* Checks if `predicate` returns truthy for **all** elements of `collection`.
* Iteration is stopped once `predicate` returns falsey. The predicate is
* invoked with three arguments: (value, index|key, collection).
*
* **Note:** This method returns `true` for
* [empty collections](https://en.wikipedia.org/wiki/Empty_set) because
* [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of
* elements of empty collections.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {boolean} Returns `true` if all elements pass the predicate check,
* else `false`.
* @example
*
* _.every([true, 1, null, 'yes'], Boolean);
* // => false
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': false },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* // The `_.matches` iteratee shorthand.
* _.every(users, { 'user': 'barney', 'active': false });
* // => false
*
* // The `_.matchesProperty` iteratee shorthand.
* _.every(users, ['active', false]);
* // => true
*
* // The `_.property` iteratee shorthand.
* _.every(users, 'active');
* // => false
*/
function every(collection, predicate, guard) {
var func = isArray(collection) ? arrayEvery : baseEvery;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined;
}
return func(collection, getIteratee(predicate, 3));
}
/**
* Iterates over elements of `collection`, returning an array of all elements
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* **Note:** Unlike `_.remove`, this method returns a new array.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see _.reject
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* _.filter(users, function(o) { return !o.active; });
* // => objects for ['fred']
*
* // The `_.matches` iteratee shorthand.
* _.filter(users, { 'age': 36, 'active': true });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.filter(users, ['active', false]);
* // => objects for ['fred']
*
* // The `_.property` iteratee shorthand.
* _.filter(users, 'active');
* // => objects for ['barney']
*
* // Combining several predicates using `_.overEvery` or `_.overSome`.
* _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));
* // => objects for ['fred', 'barney']
*/
function filter(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, getIteratee(predicate, 3));
}
/**
* Iterates over elements of `collection`, returning the first element
* `predicate` returns truthy for. The predicate is invoked with three
* arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=0] The index to search from.
* @returns {*} Returns the matched element, else `undefined`.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false },
* { 'user': 'pebbles', 'age': 1, 'active': true }
* ];
*
* _.find(users, function(o) { return o.age < 40; });
* // => object for 'barney'
*
* // The `_.matches` iteratee shorthand.
* _.find(users, { 'age': 1, 'active': true });
* // => object for 'pebbles'
*
* // The `_.matchesProperty` iteratee shorthand.
* _.find(users, ['active', false]);
* // => object for 'fred'
*
* // The `_.property` iteratee shorthand.
* _.find(users, 'active');
* // => object for 'barney'
*/
var find = createFind(findIndex);
/**
* This method is like `_.find` except that it iterates over elements of
* `collection` from right to left.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Collection
* @param {Array|Object} collection The collection to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param {number} [fromIndex=collection.length-1] The index to search from.
* @returns {*} Returns the matched element, else `undefined`.
* @example
*
* _.findLast([1, 2, 3, 4], function(n) {
* return n % 2 == 1;
* });
* // => 3
*/
var findLast = createFind(findLastIndex);
/**
* Creates a flattened array of values by running each element in `collection`
* thru `iteratee` and flattening the mapped results. The iteratee is invoked
* with three arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new flattened array.
* @example
*
* function duplicate(n) {
* return [n, n];
* }
*
* _.flatMap([1, 2], duplicate);
* // => [1, 1, 2, 2]
*/
function flatMap(collection, iteratee) {
return baseFlatten(map(collection, iteratee), 1);
}
/**
* This method is like `_.flatMap` except that it recursively flattens the
* mapped results.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new flattened array.
* @example
*
* function duplicate(n) {
* return [[[n, n]]];
* }
*
* _.flatMapDeep([1, 2], duplicate);
* // => [1, 1, 2, 2]
*/
function flatMapDeep(collection, iteratee) {
return baseFlatten(map(collection, iteratee), INFINITY);
}
/**
* This method is like `_.flatMap` except that it recursively flattens the
* mapped results up to `depth` times.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {number} [depth=1] The maximum recursion depth.
* @returns {Array} Returns the new flattened array.
* @example
*
* function duplicate(n) {
* return [[[n, n]]];
* }
*
* _.flatMapDepth([1, 2], duplicate, 2);
* // => [[1, 1], [2, 2]]
*/
function flatMapDepth(collection, iteratee, depth) {
depth = depth === undefined ? 1 : toInteger(depth);
return baseFlatten(map(collection, iteratee), depth);
}
/**
* Iterates over elements of `collection` and invokes `iteratee` for each element.
* The iteratee is invoked with three arguments: (value, index|key, collection).
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* **Note:** As with other "Collections" methods, objects with a "length"
* property are iterated like arrays. To avoid this behavior use `_.forIn`
* or `_.forOwn` for object iteration.
*
* @static
* @memberOf _
* @since 0.1.0
* @alias each
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see _.forEachRight
* @example
*
* _.forEach([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `1` then `2`.
*
* _.forEach({ 'a': 1, 'b': 2 }, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forEach(collection, iteratee) {
var func = isArray(collection) ? arrayEach : baseEach;
return func(collection, getIteratee(iteratee, 3));
}
/**
* This method is like `_.forEach` except that it iterates over elements of
* `collection` from right to left.
*
* @static
* @memberOf _
* @since 2.0.0
* @alias eachRight
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array|Object} Returns `collection`.
* @see _.forEach
* @example
*
* _.forEachRight([1, 2], function(value) {
* console.log(value);
* });
* // => Logs `2` then `1`.
*/
function forEachRight(collection, iteratee) {
var func = isArray(collection) ? arrayEachRight : baseEachRight;
return func(collection, getIteratee(iteratee, 3));
}
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The order of grouped values
* is determined by the order they occur in `collection`. The corresponding
* value of each key is an array of elements responsible for generating the
* key. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* _.groupBy([6.1, 4.2, 6.3], Math.floor);
* // => { '4': [4.2], '6': [6.1, 6.3] }
*
* // The `_.property` iteratee shorthand.
* _.groupBy(['one', 'two', 'three'], 'length');
* // => { '3': ['one', 'two'], '5': ['three'] }
*/
var groupBy = createAggregator(function(result, value, key) {
if (hasOwnProperty.call(result, key)) {
result[key].push(value);
} else {
baseAssignValue(result, key, [value]);
}
});
/**
* Checks if `value` is in `collection`. If `collection` is a string, it's
* checked for a substring of `value`, otherwise
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* is used for equality comparisons. If `fromIndex` is negative, it's used as
* the offset from the end of `collection`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object|string} collection The collection to inspect.
* @param {*} value The value to search for.
* @param {number} [fromIndex=0] The index to search from.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
* @returns {boolean} Returns `true` if `value` is found, else `false`.
* @example
*
* _.includes([1, 2, 3], 1);
* // => true
*
* _.includes([1, 2, 3], 1, 2);
* // => false
*
* _.includes({ 'a': 1, 'b': 2 }, 1);
* // => true
*
* _.includes('abcd', 'bc');
* // => true
*/
function includes(collection, value, fromIndex, guard) {
collection = isArrayLike(collection) ? collection : values(collection);
fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;
var length = collection.length;
if (fromIndex < 0) {
fromIndex = nativeMax(length + fromIndex, 0);
}
return isString(collection)
? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)
: (!!length && baseIndexOf(collection, value, fromIndex) > -1);
}
/**
* Invokes the method at `path` of each element in `collection`, returning
* an array of the results of each invoked method. Any additional arguments
* are provided to each invoked method. If `path` is a function, it's invoked
* for, and `this` bound to, each element in `collection`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Array|Function|string} path The path of the method to invoke or
* the function invoked per iteration.
* @param {...*} [args] The arguments to invoke each method with.
* @returns {Array} Returns the array of results.
* @example
*
* _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort');
* // => [[1, 5, 7], [1, 2, 3]]
*
* _.invokeMap([123, 456], String.prototype.split, '');
* // => [['1', '2', '3'], ['4', '5', '6']]
*/
var invokeMap = baseRest(function(collection, path, args) {
var index = -1,
isFunc = typeof path == 'function',
result = isArrayLike(collection) ? Array(collection.length) : [];
baseEach(collection, function(value) {
result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args);
});
return result;
});
/**
* Creates an object composed of keys generated from the results of running
* each element of `collection` thru `iteratee`. The corresponding value of
* each key is the last element responsible for generating the key. The
* iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee to transform keys.
* @returns {Object} Returns the composed aggregate object.
* @example
*
* var array = [
* { 'dir': 'left', 'code': 97 },
* { 'dir': 'right', 'code': 100 }
* ];
*
* _.keyBy(array, function(o) {
* return String.fromCharCode(o.code);
* });
* // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } }
*
* _.keyBy(array, 'dir');
* // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } }
*/
var keyBy = createAggregator(function(result, value, key) {
baseAssignValue(result, key, value);
});
/**
* Creates an array of values by running each element in `collection` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
*
* The guarded methods are:
* `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
* `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
* `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,
* `template`, `trim`, `trimEnd`, `trimStart`, and `words`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
* @example
*
* function square(n) {
* return n * n;
* }
*
* _.map([4, 8], square);
* // => [16, 64]
*
* _.map({ 'a': 4, 'b': 8 }, square);
* // => [16, 64] (iteration order is not guaranteed)
*
* var users = [
* { 'user': 'barney' },
* { 'user': 'fred' }
* ];
*
* // The `_.property` iteratee shorthand.
* _.map(users, 'user');
* // => ['barney', 'fred']
*/
function map(collection, iteratee) {
var func = isArray(collection) ? arrayMap : baseMap;
return func(collection, getIteratee(iteratee, 3));
}
/**
* This method is like `_.sortBy` except that it allows specifying the sort
* orders of the iteratees to sort by. If `orders` is unspecified, all values
* are sorted in ascending order. Otherwise, specify an order of "desc" for
* descending or "asc" for ascending sort order of corresponding values.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]]
* The iteratees to sort by.
* @param {string[]} [orders] The sort orders of `iteratees`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 34 },
* { 'user': 'fred', 'age': 40 },
* { 'user': 'barney', 'age': 36 }
* ];
*
* // Sort by `user` in ascending order and by `age` in descending order.
* _.orderBy(users, ['user', 'age'], ['asc', 'desc']);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
*/
function orderBy(collection, iteratees, orders, guard) {
if (collection == null) {
return [];
}
if (!isArray(iteratees)) {
iteratees = iteratees == null ? [] : [iteratees];
}
orders = guard ? undefined : orders;
if (!isArray(orders)) {
orders = orders == null ? [] : [orders];
}
return baseOrderBy(collection, iteratees, orders);
}
/**
* Creates an array of elements split into two groups, the first of which
* contains elements `predicate` returns truthy for, the second of which
* contains elements `predicate` returns falsey for. The predicate is
* invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 3.0.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the array of grouped elements.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': false },
* { 'user': 'fred', 'age': 40, 'active': true },
* { 'user': 'pebbles', 'age': 1, 'active': false }
* ];
*
* _.partition(users, function(o) { return o.active; });
* // => objects for [['fred'], ['barney', 'pebbles']]
*
* // The `_.matches` iteratee shorthand.
* _.partition(users, { 'age': 1, 'active': false });
* // => objects for [['pebbles'], ['barney', 'fred']]
*
* // The `_.matchesProperty` iteratee shorthand.
* _.partition(users, ['active', false]);
* // => objects for [['barney', 'pebbles'], ['fred']]
*
* // The `_.property` iteratee shorthand.
* _.partition(users, 'active');
* // => objects for [['fred'], ['barney', 'pebbles']]
*/
var partition = createAggregator(function(result, value, key) {
result[key ? 0 : 1].push(value);
}, function() { return [[], []]; });
/**
* Reduces `collection` to a value which is the accumulated result of running
* each element in `collection` thru `iteratee`, where each successive
* invocation is supplied the return value of the previous. If `accumulator`
* is not given, the first element of `collection` is used as the initial
* value. The iteratee is invoked with four arguments:
* (accumulator, value, index|key, collection).
*
* Many lodash methods are guarded to work as iteratees for methods like
* `_.reduce`, `_.reduceRight`, and `_.transform`.
*
* The guarded methods are:
* `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`,
* and `sortBy`
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @returns {*} Returns the accumulated value.
* @see _.reduceRight
* @example
*
* _.reduce([1, 2], function(sum, n) {
* return sum + n;
* }, 0);
* // => 3
*
* _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
* (result[value] || (result[value] = [])).push(key);
* return result;
* }, {});
* // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed)
*/
function reduce(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduce : baseReduce,
initAccum = arguments.length < 3;
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach);
}
/**
* This method is like `_.reduce` except that it iterates over elements of
* `collection` from right to left.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @returns {*} Returns the accumulated value.
* @see _.reduce
* @example
*
* var array = [[0, 1], [2, 3], [4, 5]];
*
* _.reduceRight(array, function(flattened, other) {
* return flattened.concat(other);
* }, []);
* // => [4, 5, 2, 3, 0, 1]
*/
function reduceRight(collection, iteratee, accumulator) {
var func = isArray(collection) ? arrayReduceRight : baseReduce,
initAccum = arguments.length < 3;
return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight);
}
/**
* The opposite of `_.filter`; this method returns the elements of `collection`
* that `predicate` does **not** return truthy for.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {Array} Returns the new filtered array.
* @see _.filter
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': false },
* { 'user': 'fred', 'age': 40, 'active': true }
* ];
*
* _.reject(users, function(o) { return !o.active; });
* // => objects for ['fred']
*
* // The `_.matches` iteratee shorthand.
* _.reject(users, { 'age': 40, 'active': true });
* // => objects for ['barney']
*
* // The `_.matchesProperty` iteratee shorthand.
* _.reject(users, ['active', false]);
* // => objects for ['fred']
*
* // The `_.property` iteratee shorthand.
* _.reject(users, 'active');
* // => objects for ['barney']
*/
function reject(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, negate(getIteratee(predicate, 3)));
}
/**
* Gets a random element from `collection`.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Collection
* @param {Array|Object} collection The collection to sample.
* @returns {*} Returns the random element.
* @example
*
* _.sample([1, 2, 3, 4]);
* // => 2
*/
function sample(collection) {
var func = isArray(collection) ? arraySample : baseSample;
return func(collection);
}
/**
* Gets `n` random elements at unique keys from `collection` up to the
* size of `collection`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Collection
* @param {Array|Object} collection The collection to sample.
* @param {number} [n=1] The number of elements to sample.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the random elements.
* @example
*
* _.sampleSize([1, 2, 3], 2);
* // => [3, 1]
*
* _.sampleSize([1, 2, 3], 4);
* // => [2, 3, 1]
*/
function sampleSize(collection, n, guard) {
if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) {
n = 1;
} else {
n = toInteger(n);
}
var func = isArray(collection) ? arraySampleSize : baseSampleSize;
return func(collection, n);
}
/**
* Creates an array of shuffled values, using a version of the
* [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to shuffle.
* @returns {Array} Returns the new shuffled array.
* @example
*
* _.shuffle([1, 2, 3, 4]);
* // => [4, 1, 3, 2]
*/
function shuffle(collection) {
var func = isArray(collection) ? arrayShuffle : baseShuffle;
return func(collection);
}
/**
* Gets the size of `collection` by returning its length for array-like
* values or the number of own enumerable string keyed properties for objects.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object|string} collection The collection to inspect.
* @returns {number} Returns the collection size.
* @example
*
* _.size([1, 2, 3]);
* // => 3
*
* _.size({ 'a': 1, 'b': 2 });
* // => 2
*
* _.size('pebbles');
* // => 7
*/
function size(collection) {
if (collection == null) {
return 0;
}
if (isArrayLike(collection)) {
return isString(collection) ? stringSize(collection) : collection.length;
}
var tag = getTag(collection);
if (tag == mapTag || tag == setTag) {
return collection.size;
}
return baseKeys(collection).length;
}
/**
* Checks if `predicate` returns truthy for **any** element of `collection`.
* Iteration is stopped once `predicate` returns truthy. The predicate is
* invoked with three arguments: (value, index|key, collection).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {boolean} Returns `true` if any element passes the predicate check,
* else `false`.
* @example
*
* _.some([null, 0, 'yes', false], Boolean);
* // => true
*
* var users = [
* { 'user': 'barney', 'active': true },
* { 'user': 'fred', 'active': false }
* ];
*
* // The `_.matches` iteratee shorthand.
* _.some(users, { 'user': 'barney', 'active': false });
* // => false
*
* // The `_.matchesProperty` iteratee shorthand.
* _.some(users, ['active', false]);
* // => true
*
* // The `_.property` iteratee shorthand.
* _.some(users, 'active');
* // => true
*/
function some(collection, predicate, guard) {
var func = isArray(collection) ? arraySome : baseSome;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined;
}
return func(collection, getIteratee(predicate, 3));
}
/**
* Creates an array of elements, sorted in ascending order by the results of
* running each element in a collection thru each iteratee. This method
* performs a stable sort, that is, it preserves the original sort order of
* equal elements. The iteratees are invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Collection
* @param {Array|Object} collection The collection to iterate over.
* @param {...(Function|Function[])} [iteratees=[_.identity]]
* The iteratees to sort by.
* @returns {Array} Returns the new sorted array.
* @example
*
* var users = [
* { 'user': 'fred', 'age': 48 },
* { 'user': 'barney', 'age': 36 },
* { 'user': 'fred', 'age': 30 },
* { 'user': 'barney', 'age': 34 }
* ];
*
* _.sortBy(users, [function(o) { return o.user; }]);
* // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]]
*
* _.sortBy(users, ['user', 'age']);
* // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]]
*/
var sortBy = baseRest(function(collection, iteratees) {
if (collection == null) {
return [];
}
var length = iteratees.length;
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
iteratees = [];
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
iteratees = [iteratees[0]];
}
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
});
/*------------------------------------------------------------------------*/
/**
* Gets the timestamp of the number of milliseconds that have elapsed since
* the Unix epoch (1 January 1970 00:00:00 UTC).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Date
* @returns {number} Returns the timestamp.
* @example
*
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
* // => Logs the number of milliseconds it took for the deferred invocation.
*/
var now = ctxNow || function() {
return root.Date.now();
};
/*------------------------------------------------------------------------*/
/**
* The opposite of `_.before`; this method creates a function that invokes
* `func` once it's called `n` or more times.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {number} n The number of calls before `func` is invoked.
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new restricted function.
* @example
*
* var saves = ['profile', 'settings'];
*
* var done = _.after(saves.length, function() {
* console.log('done saving!');
* });
*
* _.forEach(saves, function(type) {
* asyncSave({ 'type': type, 'complete': done });
* });
* // => Logs 'done saving!' after the two async saves have completed.
*/
function after(n, func) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
n = toInteger(n);
return function() {
if (--n < 1) {
return func.apply(this, arguments);
}
};
}
/**
* Creates a function that invokes `func`, with up to `n` arguments,
* ignoring any additional arguments.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} func The function to cap arguments for.
* @param {number} [n=func.length] The arity cap.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the new capped function.
* @example
*
* _.map(['6', '8', '10'], _.ary(parseInt, 1));
* // => [6, 8, 10]
*/
function ary(func, n, guard) {
n = guard ? undefined : n;
n = (func && n == null) ? func.length : n;
return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n);
}
/**
* Creates a function that invokes `func`, with the `this` binding and arguments
* of the created function, while it's called less than `n` times. Subsequent
* calls to the created function return the result of the last `func` invocation.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {number} n The number of calls at which `func` is no longer invoked.
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new restricted function.
* @example
*
* jQuery(element).on('click', _.before(5, addContactToList));
* // => Allows adding up to 4 contacts to the list.
*/
function before(n, func) {
var result;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
n = toInteger(n);
return function() {
if (--n > 0) {
result = func.apply(this, arguments);
}
if (n <= 1) {
func = undefined;
}
return result;
};
}
/**
* Creates a function that invokes `func` with the `this` binding of `thisArg`
* and `partials` prepended to the arguments it receives.
*
* The `_.bind.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for partially applied arguments.
*
* **Note:** Unlike native `Function#bind`, this method doesn't set the "length"
* property of bound functions.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to bind.
* @param {*} thisArg The `this` binding of `func`.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new bound function.
* @example
*
* function greet(greeting, punctuation) {
* return greeting + ' ' + this.user + punctuation;
* }
*
* var object = { 'user': 'fred' };
*
* var bound = _.bind(greet, object, 'hi');
* bound('!');
* // => 'hi fred!'
*
* // Bound with placeholders.
* var bound = _.bind(greet, object, _, '!');
* bound('hi');
* // => 'hi fred!'
*/
var bind = baseRest(function(func, thisArg, partials) {
var bitmask = WRAP_BIND_FLAG;
if (partials.length) {
var holders = replaceHolders(partials, getHolder(bind));
bitmask |= WRAP_PARTIAL_FLAG;
}
return createWrap(func, bitmask, thisArg, partials, holders);
});
/**
* Creates a function that invokes the method at `object[key]` with `partials`
* prepended to the arguments it receives.
*
* This method differs from `_.bind` by allowing bound functions to reference
* methods that may be redefined or don't yet exist. See
* [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern)
* for more details.
*
* The `_.bindKey.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
* @static
* @memberOf _
* @since 0.10.0
* @category Function
* @param {Object} object The object to invoke the method on.
* @param {string} key The key of the method.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new bound function.
* @example
*
* var object = {
* 'user': 'fred',
* 'greet': function(greeting, punctuation) {
* return greeting + ' ' + this.user + punctuation;
* }
* };
*
* var bound = _.bindKey(object, 'greet', 'hi');
* bound('!');
* // => 'hi fred!'
*
* object.greet = function(greeting, punctuation) {
* return greeting + 'ya ' + this.user + punctuation;
* };
*
* bound('!');
* // => 'hiya fred!'
*
* // Bound with placeholders.
* var bound = _.bindKey(object, 'greet', _, '!');
* bound('hi');
* // => 'hiya fred!'
*/
var bindKey = baseRest(function(object, key, partials) {
var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
if (partials.length) {
var holders = replaceHolders(partials, getHolder(bindKey));
bitmask |= WRAP_PARTIAL_FLAG;
}
return createWrap(key, bitmask, object, partials, holders);
});
/**
* Creates a function that accepts arguments of `func` and either invokes
* `func` returning its result, if at least `arity` number of arguments have
* been provided, or returns a function that accepts the remaining `func`
* arguments, and so on. The arity of `func` may be specified if `func.length`
* is not sufficient.
*
* The `_.curry.placeholder` value, which defaults to `_` in monolithic builds,
* may be used as a placeholder for provided arguments.
*
* **Note:** This method doesn't set the "length" property of curried functions.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Function
* @param {Function} func The function to curry.
* @param {number} [arity=func.length] The arity of `func`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the new curried function.
* @example
*
* var abc = function(a, b, c) {
* return [a, b, c];
* };
*
* var curried = _.curry(abc);
*
* curried(1)(2)(3);
* // => [1, 2, 3]
*
* curried(1, 2)(3);
* // => [1, 2, 3]
*
* curried(1, 2, 3);
* // => [1, 2, 3]
*
* // Curried with placeholders.
* curried(1)(_, 3)(2);
* // => [1, 2, 3]
*/
function curry(func, arity, guard) {
arity = guard ? undefined : arity;
var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
result.placeholder = curry.placeholder;
return result;
}
/**
* This method is like `_.curry` except that arguments are applied to `func`
* in the manner of `_.partialRight` instead of `_.partial`.
*
* The `_.curryRight.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for provided arguments.
*
* **Note:** This method doesn't set the "length" property of curried functions.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} func The function to curry.
* @param {number} [arity=func.length] The arity of `func`.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the new curried function.
* @example
*
* var abc = function(a, b, c) {
* return [a, b, c];
* };
*
* var curried = _.curryRight(abc);
*
* curried(3)(2)(1);
* // => [1, 2, 3]
*
* curried(2, 3)(1);
* // => [1, 2, 3]
*
* curried(1, 2, 3);
* // => [1, 2, 3]
*
* // Curried with placeholders.
* curried(3)(1, _)(2);
* // => [1, 2, 3]
*/
function curryRight(func, arity, guard) {
arity = guard ? undefined : arity;
var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity);
result.placeholder = curryRight.placeholder;
return result;
}
/**
* Creates a debounced function that delays invoking `func` until after `wait`
* milliseconds have elapsed since the last time the debounced function was
* invoked. The debounced function comes with a `cancel` method to cancel
* delayed `func` invocations and a `flush` method to immediately invoke them.
* Provide `options` to indicate whether `func` should be invoked on the
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
* with the last arguments provided to the debounced function. Subsequent
* calls to the debounced function return the result of the last `func`
* invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the debounced function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.debounce` and `_.throttle`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to debounce.
* @param {number} [wait=0] The number of milliseconds to delay.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=false]
* Specify invoking on the leading edge of the timeout.
* @param {number} [options.maxWait]
* The maximum time `func` is allowed to be delayed before it's invoked.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new debounced function.
* @example
*
* // Avoid costly calculations while the window size is in flux.
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
*
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
* jQuery(element).on('click', _.debounce(sendMail, 300, {
* 'leading': true,
* 'trailing': false
* }));
*
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
* var source = new EventSource('/stream');
* jQuery(source).on('message', debounced);
*
* // Cancel the trailing debounced invocation.
* jQuery(window).on('popstate', debounced.cancel);
*/
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime,
lastInvokeTime = 0,
leading = false,
maxing = false,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = 'maxWait' in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs,
thisArg = lastThis;
lastArgs = lastThis = undefined;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
// Reset any `maxWait` timer.
lastInvokeTime = time;
// Start the timer for the trailing edge.
timerId = setTimeout(timerExpired, wait);
// Invoke the leading edge.
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
timeWaiting = wait - timeSinceLastCall;
return maxing
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
: timeWaiting;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime;
// Either this is the first call, activity has stopped and we're at the
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
function timerExpired() {
var time = now();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
// Restart the timer.
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined;
// Only invoke if we have `lastArgs` which means `func` has been
// debounced at least once.
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = undefined;
return result;
}
function cancel() {
if (timerId !== undefined) {
clearTimeout(timerId);
}
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
return timerId === undefined ? result : trailingEdge(now());
}
function debounced() {
var time = now(),
isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined) {
return leadingEdge(lastCallTime);
}
if (maxing) {
// Handle invocations in a tight loop.
clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
/**
* Defers invoking the `func` until the current call stack has cleared. Any
* additional arguments are provided to `func` when it's invoked.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to defer.
* @param {...*} [args] The arguments to invoke `func` with.
* @returns {number} Returns the timer id.
* @example
*
* _.defer(function(text) {
* console.log(text);
* }, 'deferred');
* // => Logs 'deferred' after one millisecond.
*/
var defer = baseRest(function(func, args) {
return baseDelay(func, 1, args);
});
/**
* Invokes `func` after `wait` milliseconds. Any additional arguments are
* provided to `func` when it's invoked.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to delay.
* @param {number} wait The number of milliseconds to delay invocation.
* @param {...*} [args] The arguments to invoke `func` with.
* @returns {number} Returns the timer id.
* @example
*
* _.delay(function(text) {
* console.log(text);
* }, 1000, 'later');
* // => Logs 'later' after one second.
*/
var delay = baseRest(function(func, wait, args) {
return baseDelay(func, toNumber(wait) || 0, args);
});
/**
* Creates a function that invokes `func` with arguments reversed.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to flip arguments for.
* @returns {Function} Returns the new flipped function.
* @example
*
* var flipped = _.flip(function() {
* return _.toArray(arguments);
* });
*
* flipped('a', 'b', 'c', 'd');
* // => ['d', 'c', 'b', 'a']
*/
function flip(func) {
return createWrap(func, WRAP_FLIP_FLAG);
}
/**
* Creates a function that memoizes the result of `func`. If `resolver` is
* provided, it determines the cache key for storing the result based on the
* arguments provided to the memoized function. By default, the first argument
* provided to the memoized function is used as the map cache key. The `func`
* is invoked with the `this` binding of the memoized function.
*
* **Note:** The cache is exposed as the `cache` property on the memoized
* function. Its creation may be customized by replacing the `_.memoize.Cache`
* constructor with one whose instances implement the
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
* method interface of `clear`, `delete`, `get`, `has`, and `set`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to have its output memoized.
* @param {Function} [resolver] The function to resolve the cache key.
* @returns {Function} Returns the new memoized function.
* @example
*
* var object = { 'a': 1, 'b': 2 };
* var other = { 'c': 3, 'd': 4 };
*
* var values = _.memoize(_.values);
* values(object);
* // => [1, 2]
*
* values(other);
* // => [3, 4]
*
* object.a = 2;
* values(object);
* // => [1, 2]
*
* // Modify the result cache.
* values.cache.set(object, ['a', 'b']);
* values(object);
* // => ['a', 'b']
*
* // Replace `_.memoize.Cache`.
* _.memoize.Cache = WeakMap;
*/
function memoize(func, resolver) {
if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {
throw new TypeError(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments,
key = resolver ? resolver.apply(this, args) : args[0],
cache = memoized.cache;
if (cache.has(key)) {
return cache.get(key);
}
var result = func.apply(this, args);
memoized.cache = cache.set(key, result) || cache;
return result;
};
memoized.cache = new (memoize.Cache || MapCache);
return memoized;
}
// Expose `MapCache`.
memoize.Cache = MapCache;
/**
* Creates a function that negates the result of the predicate `func`. The
* `func` predicate is invoked with the `this` binding and arguments of the
* created function.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} predicate The predicate to negate.
* @returns {Function} Returns the new negated function.
* @example
*
* function isEven(n) {
* return n % 2 == 0;
* }
*
* _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven));
* // => [1, 3, 5]
*/
function negate(predicate) {
if (typeof predicate != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return function() {
var args = arguments;
switch (args.length) {
case 0: return !predicate.call(this);
case 1: return !predicate.call(this, args[0]);
case 2: return !predicate.call(this, args[0], args[1]);
case 3: return !predicate.call(this, args[0], args[1], args[2]);
}
return !predicate.apply(this, args);
};
}
/**
* Creates a function that is restricted to invoking `func` once. Repeat calls
* to the function return the value of the first invocation. The `func` is
* invoked with the `this` binding and arguments of the created function.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to restrict.
* @returns {Function} Returns the new restricted function.
* @example
*
* var initialize = _.once(createApplication);
* initialize();
* initialize();
* // => `createApplication` is invoked once
*/
function once(func) {
return before(2, func);
}
/**
* Creates a function that invokes `func` with its arguments transformed.
*
* @static
* @since 4.0.0
* @memberOf _
* @category Function
* @param {Function} func The function to wrap.
* @param {...(Function|Function[])} [transforms=[_.identity]]
* The argument transforms.
* @returns {Function} Returns the new function.
* @example
*
* function doubled(n) {
* return n * 2;
* }
*
* function square(n) {
* return n * n;
* }
*
* var func = _.overArgs(function(x, y) {
* return [x, y];
* }, [square, doubled]);
*
* func(9, 3);
* // => [81, 6]
*
* func(10, 5);
* // => [100, 10]
*/
var overArgs = castRest(function(func, transforms) {
transforms = (transforms.length == 1 && isArray(transforms[0]))
? arrayMap(transforms[0], baseUnary(getIteratee()))
: arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
var funcsLength = transforms.length;
return baseRest(function(args) {
var index = -1,
length = nativeMin(args.length, funcsLength);
while (++index < length) {
args[index] = transforms[index].call(this, args[index]);
}
return apply(func, this, args);
});
});
/**
* Creates a function that invokes `func` with `partials` prepended to the
* arguments it receives. This method is like `_.bind` except it does **not**
* alter the `this` binding.
*
* The `_.partial.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
* **Note:** This method doesn't set the "length" property of partially
* applied functions.
*
* @static
* @memberOf _
* @since 0.2.0
* @category Function
* @param {Function} func The function to partially apply arguments to.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new partially applied function.
* @example
*
* function greet(greeting, name) {
* return greeting + ' ' + name;
* }
*
* var sayHelloTo = _.partial(greet, 'hello');
* sayHelloTo('fred');
* // => 'hello fred'
*
* // Partially applied with placeholders.
* var greetFred = _.partial(greet, _, 'fred');
* greetFred('hi');
* // => 'hi fred'
*/
var partial = baseRest(function(func, partials) {
var holders = replaceHolders(partials, getHolder(partial));
return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders);
});
/**
* This method is like `_.partial` except that partially applied arguments
* are appended to the arguments it receives.
*
* The `_.partialRight.placeholder` value, which defaults to `_` in monolithic
* builds, may be used as a placeholder for partially applied arguments.
*
* **Note:** This method doesn't set the "length" property of partially
* applied functions.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Function
* @param {Function} func The function to partially apply arguments to.
* @param {...*} [partials] The arguments to be partially applied.
* @returns {Function} Returns the new partially applied function.
* @example
*
* function greet(greeting, name) {
* return greeting + ' ' + name;
* }
*
* var greetFred = _.partialRight(greet, 'fred');
* greetFred('hi');
* // => 'hi fred'
*
* // Partially applied with placeholders.
* var sayHelloTo = _.partialRight(greet, 'hello', _);
* sayHelloTo('fred');
* // => 'hello fred'
*/
var partialRight = baseRest(function(func, partials) {
var holders = replaceHolders(partials, getHolder(partialRight));
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders);
});
/**
* Creates a function that invokes `func` with arguments arranged according
* to the specified `indexes` where the argument value at the first index is
* provided as the first argument, the argument value at the second index is
* provided as the second argument, and so on.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Function
* @param {Function} func The function to rearrange arguments for.
* @param {...(number|number[])} indexes The arranged argument indexes.
* @returns {Function} Returns the new function.
* @example
*
* var rearged = _.rearg(function(a, b, c) {
* return [a, b, c];
* }, [2, 0, 1]);
*
* rearged('b', 'c', 'a')
* // => ['a', 'b', 'c']
*/
var rearg = flatRest(function(func, indexes) {
return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes);
});
/**
* Creates a function that invokes `func` with the `this` binding of the
* created function and arguments from `start` and beyond provided as
* an array.
*
* **Note:** This method is based on the
* [rest parameter](https://mdn.io/rest_parameters).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to apply a rest parameter to.
* @param {number} [start=func.length-1] The start position of the rest parameter.
* @returns {Function} Returns the new function.
* @example
*
* var say = _.rest(function(what, names) {
* return what + ' ' + _.initial(names).join(', ') +
* (_.size(names) > 1 ? ', & ' : '') + _.last(names);
* });
*
* say('hello', 'fred', 'barney', 'pebbles');
* // => 'hello fred, barney, & pebbles'
*/
function rest(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = start === undefined ? start : toInteger(start);
return baseRest(func, start);
}
/**
* Creates a function that invokes `func` with the `this` binding of the
* create function and an array of arguments much like
* [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply).
*
* **Note:** This method is based on the
* [spread operator](https://mdn.io/spread_operator).
*
* @static
* @memberOf _
* @since 3.2.0
* @category Function
* @param {Function} func The function to spread arguments over.
* @param {number} [start=0] The start position of the spread.
* @returns {Function} Returns the new function.
* @example
*
* var say = _.spread(function(who, what) {
* return who + ' says ' + what;
* });
*
* say(['fred', 'hello']);
* // => 'fred says hello'
*
* var numbers = Promise.all([
* Promise.resolve(40),
* Promise.resolve(36)
* ]);
*
* numbers.then(_.spread(function(x, y) {
* return x + y;
* }));
* // => a Promise of 76
*/
function spread(func, start) {
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function(args) {
var array = args[start],
otherArgs = castSlice(args, 0, start);
if (array) {
arrayPush(otherArgs, array);
}
return apply(func, this, otherArgs);
});
}
/**
* Creates a throttled function that only invokes `func` at most once per
* every `wait` milliseconds. The throttled function comes with a `cancel`
* method to cancel delayed `func` invocations and a `flush` method to
* immediately invoke them. Provide `options` to indicate whether `func`
* should be invoked on the leading and/or trailing edge of the `wait`
* timeout. The `func` is invoked with the last arguments provided to the
* throttled function. Subsequent calls to the throttled function return the
* result of the last `func` invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the throttled function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.throttle` and `_.debounce`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to throttle.
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=true]
* Specify invoking on the leading edge of the timeout.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new throttled function.
* @example
*
* // Avoid excessively updating the position while scrolling.
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
*
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
* jQuery(element).on('click', throttled);
*
* // Cancel the trailing throttled invocation.
* jQuery(window).on('popstate', throttled.cancel);
*/
function throttle(func, wait, options) {
var leading = true,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
if (isObject(options)) {
leading = 'leading' in options ? !!options.leading : leading;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
return debounce(func, wait, {
'leading': leading,
'maxWait': wait,
'trailing': trailing
});
}
/**
* Creates a function that accepts up to one argument, ignoring any
* additional arguments.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Function
* @param {Function} func The function to cap arguments for.
* @returns {Function} Returns the new capped function.
* @example
*
* _.map(['6', '8', '10'], _.unary(parseInt));
* // => [6, 8, 10]
*/
function unary(func) {
return ary(func, 1);
}
/**
* Creates a function that provides `value` to `wrapper` as its first
* argument. Any additional arguments provided to the function are appended
* to those provided to the `wrapper`. The wrapper is invoked with the `this`
* binding of the created function.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {*} value The value to wrap.
* @param {Function} [wrapper=identity] The wrapper function.
* @returns {Function} Returns the new function.
* @example
*
* var p = _.wrap(_.escape, function(func, text) {
* return '<p>' + func(text) + '</p>';
* });
*
* p('fred, barney, & pebbles');
* // => '<p>fred, barney, &amp; pebbles</p>'
*/
function wrap(value, wrapper) {
return partial(castFunction(wrapper), value);
}
/*------------------------------------------------------------------------*/
/**
* Casts `value` as an array if it's not one.
*
* @static
* @memberOf _
* @since 4.4.0
* @category Lang
* @param {*} value The value to inspect.
* @returns {Array} Returns the cast array.
* @example
*
* _.castArray(1);
* // => [1]
*
* _.castArray({ 'a': 1 });
* // => [{ 'a': 1 }]
*
* _.castArray('abc');
* // => ['abc']
*
* _.castArray(null);
* // => [null]
*
* _.castArray(undefined);
* // => [undefined]
*
* _.castArray();
* // => []
*
* var array = [1, 2, 3];
* console.log(_.castArray(array) === array);
* // => true
*/
function castArray() {
if (!arguments.length) {
return [];
}
var value = arguments[0];
return isArray(value) ? value : [value];
}
/**
* Creates a shallow clone of `value`.
*
* **Note:** This method is loosely based on the
* [structured clone algorithm](https://mdn.io/Structured_clone_algorithm)
* and supports cloning arrays, array buffers, booleans, date objects, maps,
* numbers, `Object` objects, regexes, sets, strings, symbols, and typed
* arrays. The own enumerable properties of `arguments` objects are cloned
* as plain objects. An empty object is returned for uncloneable values such
* as error objects, functions, DOM nodes, and WeakMaps.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to clone.
* @returns {*} Returns the cloned value.
* @see _.cloneDeep
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var shallow = _.clone(objects);
* console.log(shallow[0] === objects[0]);
* // => true
*/
function clone(value) {
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
/**
* This method is like `_.clone` except that it accepts `customizer` which
* is invoked to produce the cloned value. If `customizer` returns `undefined`,
* cloning is handled by the method instead. The `customizer` is invoked with
* up to four arguments; (value [, index|key, object, stack]).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to clone.
* @param {Function} [customizer] The function to customize cloning.
* @returns {*} Returns the cloned value.
* @see _.cloneDeepWith
* @example
*
* function customizer(value) {
* if (_.isElement(value)) {
* return value.cloneNode(false);
* }
* }
*
* var el = _.cloneWith(document.body, customizer);
*
* console.log(el === document.body);
* // => false
* console.log(el.nodeName);
* // => 'BODY'
* console.log(el.childNodes.length);
* // => 0
*/
function cloneWith(value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
}
/**
* This method is like `_.clone` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @returns {*} Returns the deep cloned value.
* @see _.clone
* @example
*
* var objects = [{ 'a': 1 }, { 'b': 2 }];
*
* var deep = _.cloneDeep(objects);
* console.log(deep[0] === objects[0]);
* // => false
*/
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
/**
* This method is like `_.cloneWith` except that it recursively clones `value`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to recursively clone.
* @param {Function} [customizer] The function to customize cloning.
* @returns {*} Returns the deep cloned value.
* @see _.cloneWith
* @example
*
* function customizer(value) {
* if (_.isElement(value)) {
* return value.cloneNode(true);
* }
* }
*
* var el = _.cloneDeepWith(document.body, customizer);
*
* console.log(el === document.body);
* // => false
* console.log(el.nodeName);
* // => 'BODY'
* console.log(el.childNodes.length);
* // => 20
*/
function cloneDeepWith(value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
}
/**
* Checks if `object` conforms to `source` by invoking the predicate
* properties of `source` with the corresponding property values of `object`.
*
* **Note:** This method is equivalent to `_.conforms` when `source` is
* partially applied.
*
* @static
* @memberOf _
* @since 4.14.0
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property predicates to conform to.
* @returns {boolean} Returns `true` if `object` conforms, else `false`.
* @example
*
* var object = { 'a': 1, 'b': 2 };
*
* _.conformsTo(object, { 'b': function(n) { return n > 1; } });
* // => true
*
* _.conformsTo(object, { 'b': function(n) { return n > 2; } });
* // => false
*/
function conformsTo(object, source) {
return source == null || baseConformsTo(object, source, keys(source));
}
/**
* Performs a
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
* comparison between two values to determine if they are equivalent.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.eq(object, object);
* // => true
*
* _.eq(object, other);
* // => false
*
* _.eq('a', 'a');
* // => true
*
* _.eq('a', Object('a'));
* // => false
*
* _.eq(NaN, NaN);
* // => true
*/
function eq(value, other) {
return value === other || (value !== value && other !== other);
}
/**
* Checks if `value` is greater than `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than `other`,
* else `false`.
* @see _.lt
* @example
*
* _.gt(3, 1);
* // => true
*
* _.gt(3, 3);
* // => false
*
* _.gt(1, 3);
* // => false
*/
var gt = createRelationalOperation(baseGt);
/**
* Checks if `value` is greater than or equal to `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is greater than or equal to
* `other`, else `false`.
* @see _.lte
* @example
*
* _.gte(3, 1);
* // => true
*
* _.gte(3, 3);
* // => true
*
* _.gte(1, 3);
* // => false
*/
var gte = createRelationalOperation(function(value, other) {
return value >= other;
});
/**
* Checks if `value` is likely an `arguments` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an `arguments` object,
* else `false`.
* @example
*
* _.isArguments(function() { return arguments; }());
* // => true
*
* _.isArguments([1, 2, 3]);
* // => false
*/
var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
!propertyIsEnumerable.call(value, 'callee');
};
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
/**
* Checks if `value` is classified as an `ArrayBuffer` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array buffer, else `false`.
* @example
*
* _.isArrayBuffer(new ArrayBuffer(2));
* // => true
*
* _.isArrayBuffer(new Array(2));
* // => false
*/
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
/**
* Checks if `value` is array-like. A value is considered array-like if it's
* not a function and has a `value.length` that's an integer greater than or
* equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is array-like, else `false`.
* @example
*
* _.isArrayLike([1, 2, 3]);
* // => true
*
* _.isArrayLike(document.body.children);
* // => true
*
* _.isArrayLike('abc');
* // => true
*
* _.isArrayLike(_.noop);
* // => false
*/
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
/**
* This method is like `_.isArrayLike` except that it also checks if `value`
* is an object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array-like object,
* else `false`.
* @example
*
* _.isArrayLikeObject([1, 2, 3]);
* // => true
*
* _.isArrayLikeObject(document.body.children);
* // => true
*
* _.isArrayLikeObject('abc');
* // => false
*
* _.isArrayLikeObject(_.noop);
* // => false
*/
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
/**
* Checks if `value` is classified as a boolean primitive or object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a boolean, else `false`.
* @example
*
* _.isBoolean(false);
* // => true
*
* _.isBoolean(null);
* // => false
*/
function isBoolean(value) {
return value === true || value === false ||
(isObjectLike(value) && baseGetTag(value) == boolTag);
}
/**
* Checks if `value` is a buffer.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
* @example
*
* _.isBuffer(new Buffer(2));
* // => true
*
* _.isBuffer(new Uint8Array(2));
* // => false
*/
var isBuffer = nativeIsBuffer || stubFalse;
/**
* Checks if `value` is classified as a `Date` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a date object, else `false`.
* @example
*
* _.isDate(new Date);
* // => true
*
* _.isDate('Mon April 23 2012');
* // => false
*/
var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
/**
* Checks if `value` is likely a DOM element.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a DOM element, else `false`.
* @example
*
* _.isElement(document.body);
* // => true
*
* _.isElement('<body>');
* // => false
*/
function isElement(value) {
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value);
}
/**
* Checks if `value` is an empty object, collection, map, or set.
*
* Objects are considered empty if they have no own enumerable string keyed
* properties.
*
* Array-like values such as `arguments` objects, arrays, buffers, strings, or
* jQuery-like collections are considered empty if they have a `length` of `0`.
* Similarly, maps and sets are considered empty if they have a `size` of `0`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is empty, else `false`.
* @example
*
* _.isEmpty(null);
* // => true
*
* _.isEmpty(true);
* // => true
*
* _.isEmpty(1);
* // => true
*
* _.isEmpty([1, 2, 3]);
* // => false
*
* _.isEmpty({ 'a': 1 });
* // => false
*/
function isEmpty(value) {
if (value == null) {
return true;
}
if (isArrayLike(value) &&
(isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||
isBuffer(value) || isTypedArray(value) || isArguments(value))) {
return !value.length;
}
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
if (isPrototype(value)) {
return !baseKeys(value).length;
}
for (var key in value) {
if (hasOwnProperty.call(value, key)) {
return false;
}
}
return true;
}
/**
* Performs a deep comparison between two values to determine if they are
* equivalent.
*
* **Note:** This method supports comparing arrays, array buffers, booleans,
* date objects, error objects, maps, numbers, `Object` objects, regexes,
* sets, strings, symbols, and typed arrays. `Object` objects are compared
* by their own, not inherited, enumerable properties. Functions and DOM
* nodes are compared by strict equality, i.e. `===`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* var object = { 'a': 1 };
* var other = { 'a': 1 };
*
* _.isEqual(object, other);
* // => true
*
* object === other;
* // => false
*/
function isEqual(value, other) {
return baseIsEqual(value, other);
}
/**
* This method is like `_.isEqual` except that it accepts `customizer` which
* is invoked to compare values. If `customizer` returns `undefined`, comparisons
* are handled by the method instead. The `customizer` is invoked with up to
* six arguments: (objValue, othValue [, index|key, object, other, stack]).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
* @example
*
* function isGreeting(value) {
* return /^h(?:i|ello)$/.test(value);
* }
*
* function customizer(objValue, othValue) {
* if (isGreeting(objValue) && isGreeting(othValue)) {
* return true;
* }
* }
*
* var array = ['hello', 'goodbye'];
* var other = ['hi', 'goodbye'];
*
* _.isEqualWith(array, other, customizer);
* // => true
*/
function isEqualWith(value, other, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
var result = customizer ? customizer(value, other) : undefined;
return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result;
}
/**
* Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`,
* `SyntaxError`, `TypeError`, or `URIError` object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an error object, else `false`.
* @example
*
* _.isError(new Error);
* // => true
*
* _.isError(Error);
* // => false
*/
function isError(value) {
if (!isObjectLike(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == errorTag || tag == domExcTag ||
(typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value));
}
/**
* Checks if `value` is a finite primitive number.
*
* **Note:** This method is based on
* [`Number.isFinite`](https://mdn.io/Number/isFinite).
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a finite number, else `false`.
* @example
*
* _.isFinite(3);
* // => true
*
* _.isFinite(Number.MIN_VALUE);
* // => true
*
* _.isFinite(Infinity);
* // => false
*
* _.isFinite('3');
* // => false
*/
function isFinite(value) {
return typeof value == 'number' && nativeIsFinite(value);
}
/**
* Checks if `value` is classified as a `Function` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
* @example
*
* _.isFunction(_);
* // => true
*
* _.isFunction(/abc/);
* // => false
*/
function isFunction(value) {
if (!isObject(value)) {
return false;
}
// The use of `Object#toString` avoids issues with the `typeof` operator
// in Safari 9 which returns 'object' for typed arrays and other constructors.
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
/**
* Checks if `value` is an integer.
*
* **Note:** This method is based on
* [`Number.isInteger`](https://mdn.io/Number/isInteger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an integer, else `false`.
* @example
*
* _.isInteger(3);
* // => true
*
* _.isInteger(Number.MIN_VALUE);
* // => false
*
* _.isInteger(Infinity);
* // => false
*
* _.isInteger('3');
* // => false
*/
function isInteger(value) {
return typeof value == 'number' && value == toInteger(value);
}
/**
* Checks if `value` is a valid array-like length.
*
* **Note:** This method is loosely based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
* @example
*
* _.isLength(3);
* // => true
*
* _.isLength(Number.MIN_VALUE);
* // => false
*
* _.isLength(Infinity);
* // => false
*
* _.isLength('3');
* // => false
*/
function isLength(value) {
return typeof value == 'number' &&
value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return value != null && (type == 'object' || type == 'function');
}
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return value != null && typeof value == 'object';
}
/**
* Checks if `value` is classified as a `Map` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a map, else `false`.
* @example
*
* _.isMap(new Map);
* // => true
*
* _.isMap(new WeakMap);
* // => false
*/
var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
/**
* Performs a partial deep comparison between `object` and `source` to
* determine if `object` contains equivalent property values.
*
* **Note:** This method is equivalent to `_.matches` when `source` is
* partially applied.
*
* Partial comparisons will match empty array and empty object `source`
* values against any array or object value, respectively. See `_.isEqual`
* for a list of supported value comparisons.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
* @example
*
* var object = { 'a': 1, 'b': 2 };
*
* _.isMatch(object, { 'b': 2 });
* // => true
*
* _.isMatch(object, { 'b': 1 });
* // => false
*/
function isMatch(object, source) {
return object === source || baseIsMatch(object, source, getMatchData(source));
}
/**
* This method is like `_.isMatch` except that it accepts `customizer` which
* is invoked to compare values. If `customizer` returns `undefined`, comparisons
* are handled by the method instead. The `customizer` is invoked with five
* arguments: (objValue, srcValue, index|key, object, source).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {Object} object The object to inspect.
* @param {Object} source The object of property values to match.
* @param {Function} [customizer] The function to customize comparisons.
* @returns {boolean} Returns `true` if `object` is a match, else `false`.
* @example
*
* function isGreeting(value) {
* return /^h(?:i|ello)$/.test(value);
* }
*
* function customizer(objValue, srcValue) {
* if (isGreeting(objValue) && isGreeting(srcValue)) {
* return true;
* }
* }
*
* var object = { 'greeting': 'hello' };
* var source = { 'greeting': 'hi' };
*
* _.isMatchWith(object, source, customizer);
* // => true
*/
function isMatchWith(object, source, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return baseIsMatch(object, source, getMatchData(source), customizer);
}
/**
* Checks if `value` is `NaN`.
*
* **Note:** This method is based on
* [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as
* global [`isNaN`](https://mdn.io/isNaN) which returns `true` for
* `undefined` and other non-number values.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
* @example
*
* _.isNaN(NaN);
* // => true
*
* _.isNaN(new Number(NaN));
* // => true
*
* isNaN(undefined);
* // => true
*
* _.isNaN(undefined);
* // => false
*/
function isNaN(value) {
// An `NaN` primitive is the only value that is not equal to itself.
// Perform the `toStringTag` check first to avoid errors with some
// ActiveX objects in IE.
return isNumber(value) && value != +value;
}
/**
* Checks if `value` is a pristine native function.
*
* **Note:** This method can't reliably detect native functions in the presence
* of the core-js package because core-js circumvents this kind of detection.
* Despite multiple requests, the core-js maintainer has made it clear: any
* attempt to fix the detection will be obstructed. As a result, we're left
* with little choice but to throw an error. Unfortunately, this also affects
* packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill),
* which rely on core-js.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a native function,
* else `false`.
* @example
*
* _.isNative(Array.prototype.push);
* // => true
*
* _.isNative(_);
* // => false
*/
function isNative(value) {
if (isMaskable(value)) {
throw new Error(CORE_ERROR_TEXT);
}
return baseIsNative(value);
}
/**
* Checks if `value` is `null`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `null`, else `false`.
* @example
*
* _.isNull(null);
* // => true
*
* _.isNull(void 0);
* // => false
*/
function isNull(value) {
return value === null;
}
/**
* Checks if `value` is `null` or `undefined`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is nullish, else `false`.
* @example
*
* _.isNil(null);
* // => true
*
* _.isNil(void 0);
* // => true
*
* _.isNil(NaN);
* // => false
*/
function isNil(value) {
return value == null;
}
/**
* Checks if `value` is classified as a `Number` primitive or object.
*
* **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are
* classified as numbers, use the `_.isFinite` method.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a number, else `false`.
* @example
*
* _.isNumber(3);
* // => true
*
* _.isNumber(Number.MIN_VALUE);
* // => true
*
* _.isNumber(Infinity);
* // => true
*
* _.isNumber('3');
* // => false
*/
function isNumber(value) {
return typeof value == 'number' ||
(isObjectLike(value) && baseGetTag(value) == numberTag);
}
/**
* Checks if `value` is a plain object, that is, an object created by the
* `Object` constructor or one with a `[[Prototype]]` of `null`.
*
* @static
* @memberOf _
* @since 0.8.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* _.isPlainObject(new Foo);
* // => false
*
* _.isPlainObject([1, 2, 3]);
* // => false
*
* _.isPlainObject({ 'x': 0, 'y': 0 });
* // => true
*
* _.isPlainObject(Object.create(null));
* // => true
*/
function isPlainObject(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
return typeof Ctor == 'function' && Ctor instanceof Ctor &&
funcToString.call(Ctor) == objectCtorString;
}
/**
* Checks if `value` is classified as a `RegExp` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a regexp, else `false`.
* @example
*
* _.isRegExp(/abc/);
* // => true
*
* _.isRegExp('/abc/');
* // => false
*/
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
/**
* Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754
* double precision number which isn't the result of a rounded unsafe integer.
*
* **Note:** This method is based on
* [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a safe integer, else `false`.
* @example
*
* _.isSafeInteger(3);
* // => true
*
* _.isSafeInteger(Number.MIN_VALUE);
* // => false
*
* _.isSafeInteger(Infinity);
* // => false
*
* _.isSafeInteger('3');
* // => false
*/
function isSafeInteger(value) {
return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
}
/**
* Checks if `value` is classified as a `Set` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a set, else `false`.
* @example
*
* _.isSet(new Set);
* // => true
*
* _.isSet(new WeakSet);
* // => false
*/
var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
/**
* Checks if `value` is classified as a `String` primitive or object.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a string, else `false`.
* @example
*
* _.isString('abc');
* // => true
*
* _.isString(1);
* // => false
*/
function isString(value) {
return typeof value == 'string' ||
(!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);
}
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && baseGetTag(value) == symbolTag);
}
/**
* Checks if `value` is classified as a typed array.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
* @example
*
* _.isTypedArray(new Uint8Array);
* // => true
*
* _.isTypedArray([]);
* // => false
*/
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
/**
* Checks if `value` is `undefined`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is `undefined`, else `false`.
* @example
*
* _.isUndefined(void 0);
* // => true
*
* _.isUndefined(null);
* // => false
*/
function isUndefined(value) {
return value === undefined;
}
/**
* Checks if `value` is classified as a `WeakMap` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a weak map, else `false`.
* @example
*
* _.isWeakMap(new WeakMap);
* // => true
*
* _.isWeakMap(new Map);
* // => false
*/
function isWeakMap(value) {
return isObjectLike(value) && getTag(value) == weakMapTag;
}
/**
* Checks if `value` is classified as a `WeakSet` object.
*
* @static
* @memberOf _
* @since 4.3.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a weak set, else `false`.
* @example
*
* _.isWeakSet(new WeakSet);
* // => true
*
* _.isWeakSet(new Set);
* // => false
*/
function isWeakSet(value) {
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
}
/**
* Checks if `value` is less than `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than `other`,
* else `false`.
* @see _.gt
* @example
*
* _.lt(1, 3);
* // => true
*
* _.lt(3, 3);
* // => false
*
* _.lt(3, 1);
* // => false
*/
var lt = createRelationalOperation(baseLt);
/**
* Checks if `value` is less than or equal to `other`.
*
* @static
* @memberOf _
* @since 3.9.0
* @category Lang
* @param {*} value The value to compare.
* @param {*} other The other value to compare.
* @returns {boolean} Returns `true` if `value` is less than or equal to
* `other`, else `false`.
* @see _.gte
* @example
*
* _.lte(1, 3);
* // => true
*
* _.lte(3, 3);
* // => true
*
* _.lte(3, 1);
* // => false
*/
var lte = createRelationalOperation(function(value, other) {
return value <= other;
});
/**
* Converts `value` to an array.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Lang
* @param {*} value The value to convert.
* @returns {Array} Returns the converted array.
* @example
*
* _.toArray({ 'a': 1, 'b': 2 });
* // => [1, 2]
*
* _.toArray('abc');
* // => ['a', 'b', 'c']
*
* _.toArray(1);
* // => []
*
* _.toArray(null);
* // => []
*/
function toArray(value) {
if (!value) {
return [];
}
if (isArrayLike(value)) {
return isString(value) ? stringToArray(value) : copyArray(value);
}
if (symIterator && value[symIterator]) {
return iteratorToArray(value[symIterator]());
}
var tag = getTag(value),
func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values);
return func(value);
}
/**
* Converts `value` to a finite number.
*
* @static
* @memberOf _
* @since 4.12.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted number.
* @example
*
* _.toFinite(3.2);
* // => 3.2
*
* _.toFinite(Number.MIN_VALUE);
* // => 5e-324
*
* _.toFinite(Infinity);
* // => 1.7976931348623157e+308
*
* _.toFinite('3.2');
* // => 3.2
*/
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = (value < 0 ? -1 : 1);
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
/**
* Converts `value` to an integer.
*
* **Note:** This method is loosely based on
* [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toInteger(3.2);
* // => 3
*
* _.toInteger(Number.MIN_VALUE);
* // => 0
*
* _.toInteger(Infinity);
* // => 1.7976931348623157e+308
*
* _.toInteger('3.2');
* // => 3
*/
function toInteger(value) {
var result = toFinite(value),
remainder = result % 1;
return result === result ? (remainder ? result - remainder : result) : 0;
}
/**
* Converts `value` to an integer suitable for use as the length of an
* array-like object.
*
* **Note:** This method is based on
* [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toLength(3.2);
* // => 3
*
* _.toLength(Number.MIN_VALUE);
* // => 0
*
* _.toLength(Infinity);
* // => 4294967295
*
* _.toLength('3.2');
* // => 3
*/
function toLength(value) {
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
}
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = baseTrim(value);
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
: (reIsBadHex.test(value) ? NAN : +value);
}
/**
* Converts `value` to a plain object flattening inherited enumerable string
* keyed properties of `value` to own properties of the plain object.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {Object} Returns the converted plain object.
* @example
*
* function Foo() {
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.assign({ 'a': 1 }, new Foo);
* // => { 'a': 1, 'b': 2 }
*
* _.assign({ 'a': 1 }, _.toPlainObject(new Foo));
* // => { 'a': 1, 'b': 2, 'c': 3 }
*/
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
/**
* Converts `value` to a safe integer. A safe integer can be compared and
* represented correctly.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {number} Returns the converted integer.
* @example
*
* _.toSafeInteger(3.2);
* // => 3
*
* _.toSafeInteger(Number.MIN_VALUE);
* // => 0
*
* _.toSafeInteger(Infinity);
* // => 9007199254740991
*
* _.toSafeInteger('3.2');
* // => 3
*/
function toSafeInteger(value) {
return value
? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER)
: (value === 0 ? value : 0);
}
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
return value == null ? '' : baseToString(value);
}
/*------------------------------------------------------------------------*/
/**
* Assigns own enumerable string keyed properties of source objects to the
* destination object. Source objects are applied from left to right.
* Subsequent sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object` and is loosely based on
* [`Object.assign`](https://mdn.io/Object/assign).
*
* @static
* @memberOf _
* @since 0.10.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.assignIn
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* function Bar() {
* this.c = 3;
* }
*
* Foo.prototype.b = 2;
* Bar.prototype.d = 4;
*
* _.assign({ 'a': 0 }, new Foo, new Bar);
* // => { 'a': 1, 'c': 3 }
*/
var assign = createAssigner(function(object, source) {
if (isPrototype(source) || isArrayLike(source)) {
copyObject(source, keys(source), object);
return;
}
for (var key in source) {
if (hasOwnProperty.call(source, key)) {
assignValue(object, key, source[key]);
}
}
});
/**
* This method is like `_.assign` except that it iterates over own and
* inherited source properties.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias extend
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.assign
* @example
*
* function Foo() {
* this.a = 1;
* }
*
* function Bar() {
* this.c = 3;
* }
*
* Foo.prototype.b = 2;
* Bar.prototype.d = 4;
*
* _.assignIn({ 'a': 0 }, new Foo, new Bar);
* // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 }
*/
var assignIn = createAssigner(function(object, source) {
copyObject(source, keysIn(source), object);
});
/**
* This method is like `_.assignIn` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias extendWith
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignInWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keysIn(source), object, customizer);
});
/**
* This method is like `_.assign` except that it accepts `customizer`
* which is invoked to produce the assigned values. If `customizer` returns
* `undefined`, assignment is handled by the method instead. The `customizer`
* is invoked with five arguments: (objValue, srcValue, key, object, source).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @see _.assignInWith
* @example
*
* function customizer(objValue, srcValue) {
* return _.isUndefined(objValue) ? srcValue : objValue;
* }
*
* var defaults = _.partialRight(_.assignWith, customizer);
*
* defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keys(source), object, customizer);
});
/**
* Creates an array of values corresponding to `paths` of `object`.
*
* @static
* @memberOf _
* @since 1.0.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Array} Returns the picked values.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }, 4] };
*
* _.at(object, ['a[0].b.c', 'a[1]']);
* // => [3, 4]
*/
var at = flatRest(baseAt);
/**
* Creates an object that inherits from the `prototype` object. If a
* `properties` object is given, its own enumerable string keyed properties
* are assigned to the created object.
*
* @static
* @memberOf _
* @since 2.3.0
* @category Object
* @param {Object} prototype The object to inherit from.
* @param {Object} [properties] The properties to assign to the object.
* @returns {Object} Returns the new object.
* @example
*
* function Shape() {
* this.x = 0;
* this.y = 0;
* }
*
* function Circle() {
* Shape.call(this);
* }
*
* Circle.prototype = _.create(Shape.prototype, {
* 'constructor': Circle
* });
*
* var circle = new Circle;
* circle instanceof Circle;
* // => true
*
* circle instanceof Shape;
* // => true
*/
function create(prototype, properties) {
var result = baseCreate(prototype);
return properties == null ? result : baseAssign(result, properties);
}
/**
* Assigns own and inherited enumerable string keyed properties of source
* objects to the destination object for all destination properties that
* resolve to `undefined`. Source objects are applied from left to right.
* Once a property is set, additional values of the same property are ignored.
*
* **Note:** This method mutates `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.defaultsDeep
* @example
*
* _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 });
* // => { 'a': 1, 'b': 2 }
*/
var defaults = baseRest(function(object, sources) {
object = Object(object);
var index = -1;
var length = sources.length;
var guard = length > 2 ? sources[2] : undefined;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
length = 1;
}
while (++index < length) {
var source = sources[index];
var props = keysIn(source);
var propsIndex = -1;
var propsLength = props.length;
while (++propsIndex < propsLength) {
var key = props[propsIndex];
var value = object[key];
if (value === undefined ||
(eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) {
object[key] = source[key];
}
}
}
return object;
});
/**
* This method is like `_.defaults` except that it recursively assigns
* default properties.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @see _.defaults
* @example
*
* _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } });
* // => { 'a': { 'b': 2, 'c': 3 } }
*/
var defaultsDeep = baseRest(function(args) {
args.push(undefined, customDefaultsMerge);
return apply(mergeWith, undefined, args);
});
/**
* This method is like `_.find` except that it returns the key of the first
* element `predicate` returns truthy for instead of the element itself.
*
* @static
* @memberOf _
* @since 1.1.0
* @category Object
* @param {Object} object The object to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {string|undefined} Returns the key of the matched element,
* else `undefined`.
* @example
*
* var users = {
* 'barney': { 'age': 36, 'active': true },
* 'fred': { 'age': 40, 'active': false },
* 'pebbles': { 'age': 1, 'active': true }
* };
*
* _.findKey(users, function(o) { return o.age < 40; });
* // => 'barney' (iteration order is not guaranteed)
*
* // The `_.matches` iteratee shorthand.
* _.findKey(users, { 'age': 1, 'active': true });
* // => 'pebbles'
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findKey(users, ['active', false]);
* // => 'fred'
*
* // The `_.property` iteratee shorthand.
* _.findKey(users, 'active');
* // => 'barney'
*/
function findKey(object, predicate) {
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
}
/**
* This method is like `_.findKey` except that it iterates over elements of
* a collection in the opposite order.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Object
* @param {Object} object The object to inspect.
* @param {Function} [predicate=_.identity] The function invoked per iteration.
* @returns {string|undefined} Returns the key of the matched element,
* else `undefined`.
* @example
*
* var users = {
* 'barney': { 'age': 36, 'active': true },
* 'fred': { 'age': 40, 'active': false },
* 'pebbles': { 'age': 1, 'active': true }
* };
*
* _.findLastKey(users, function(o) { return o.age < 40; });
* // => returns 'pebbles' assuming `_.findKey` returns 'barney'
*
* // The `_.matches` iteratee shorthand.
* _.findLastKey(users, { 'age': 36, 'active': true });
* // => 'barney'
*
* // The `_.matchesProperty` iteratee shorthand.
* _.findLastKey(users, ['active', false]);
* // => 'fred'
*
* // The `_.property` iteratee shorthand.
* _.findLastKey(users, 'active');
* // => 'pebbles'
*/
function findLastKey(object, predicate) {
return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
}
/**
* Iterates over own and inherited enumerable string keyed properties of an
* object and invokes `iteratee` for each property. The iteratee is invoked
* with three arguments: (value, key, object). Iteratee functions may exit
* iteration early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 0.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forInRight
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forIn(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed).
*/
function forIn(object, iteratee) {
return object == null
? object
: baseFor(object, getIteratee(iteratee, 3), keysIn);
}
/**
* This method is like `_.forIn` except that it iterates over properties of
* `object` in the opposite order.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forIn
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forInRight(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'.
*/
function forInRight(object, iteratee) {
return object == null
? object
: baseForRight(object, getIteratee(iteratee, 3), keysIn);
}
/**
* Iterates over own enumerable string keyed properties of an object and
* invokes `iteratee` for each property. The iteratee is invoked with three
* arguments: (value, key, object). Iteratee functions may exit iteration
* early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 0.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forOwnRight
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forOwn(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'a' then 'b' (iteration order is not guaranteed).
*/
function forOwn(object, iteratee) {
return object && baseForOwn(object, getIteratee(iteratee, 3));
}
/**
* This method is like `_.forOwn` except that it iterates over properties of
* `object` in the opposite order.
*
* @static
* @memberOf _
* @since 2.0.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns `object`.
* @see _.forOwn
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.forOwnRight(new Foo, function(value, key) {
* console.log(key);
* });
* // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'.
*/
function forOwnRight(object, iteratee) {
return object && baseForOwnRight(object, getIteratee(iteratee, 3));
}
/**
* Creates an array of function property names from own enumerable properties
* of `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to inspect.
* @returns {Array} Returns the function names.
* @see _.functionsIn
* @example
*
* function Foo() {
* this.a = _.constant('a');
* this.b = _.constant('b');
* }
*
* Foo.prototype.c = _.constant('c');
*
* _.functions(new Foo);
* // => ['a', 'b']
*/
function functions(object) {
return object == null ? [] : baseFunctions(object, keys(object));
}
/**
* Creates an array of function property names from own and inherited
* enumerable properties of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to inspect.
* @returns {Array} Returns the function names.
* @see _.functions
* @example
*
* function Foo() {
* this.a = _.constant('a');
* this.b = _.constant('b');
* }
*
* Foo.prototype.c = _.constant('c');
*
* _.functionsIn(new Foo);
* // => ['a', 'b', 'c']
*/
function functionsIn(object) {
return object == null ? [] : baseFunctions(object, keysIn(object));
}
/**
* Gets the value at `path` of `object`. If the resolved value is
* `undefined`, the `defaultValue` is returned in its place.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to get.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.get(object, 'a[0].b.c');
* // => 3
*
* _.get(object, ['a', '0', 'b', 'c']);
* // => 3
*
* _.get(object, 'a.b.c', 'default');
* // => 'default'
*/
function get(object, path, defaultValue) {
var result = object == null ? undefined : baseGet(object, path);
return result === undefined ? defaultValue : result;
}
/**
* Checks if `path` is a direct property of `object`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = { 'a': { 'b': 2 } };
* var other = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.has(object, 'a');
* // => true
*
* _.has(object, 'a.b');
* // => true
*
* _.has(object, ['a', 'b']);
* // => true
*
* _.has(other, 'a');
* // => false
*/
function has(object, path) {
return object != null && hasPath(object, path, baseHas);
}
/**
* Checks if `path` is a direct or inherited property of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path to check.
* @returns {boolean} Returns `true` if `path` exists, else `false`.
* @example
*
* var object = _.create({ 'a': _.create({ 'b': 2 }) });
*
* _.hasIn(object, 'a');
* // => true
*
* _.hasIn(object, 'a.b');
* // => true
*
* _.hasIn(object, ['a', 'b']);
* // => true
*
* _.hasIn(object, 'b');
* // => false
*/
function hasIn(object, path) {
return object != null && hasPath(object, path, baseHasIn);
}
/**
* Creates an object composed of the inverted keys and values of `object`.
* If `object` contains duplicate values, subsequent values overwrite
* property assignments of previous values.
*
* @static
* @memberOf _
* @since 0.7.0
* @category Object
* @param {Object} object The object to invert.
* @returns {Object} Returns the new inverted object.
* @example
*
* var object = { 'a': 1, 'b': 2, 'c': 1 };
*
* _.invert(object);
* // => { '1': 'c', '2': 'b' }
*/
var invert = createInverter(function(result, value, key) {
if (value != null &&
typeof value.toString != 'function') {
value = nativeObjectToString.call(value);
}
result[value] = key;
}, constant(identity));
/**
* This method is like `_.invert` except that the inverted object is generated
* from the results of running each element of `object` thru `iteratee`. The
* corresponding inverted value of each inverted key is an array of keys
* responsible for generating the inverted value. The iteratee is invoked
* with one argument: (value).
*
* @static
* @memberOf _
* @since 4.1.0
* @category Object
* @param {Object} object The object to invert.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {Object} Returns the new inverted object.
* @example
*
* var object = { 'a': 1, 'b': 2, 'c': 1 };
*
* _.invertBy(object);
* // => { '1': ['a', 'c'], '2': ['b'] }
*
* _.invertBy(object, function(value) {
* return 'group' + value;
* });
* // => { 'group1': ['a', 'c'], 'group2': ['b'] }
*/
var invertBy = createInverter(function(result, value, key) {
if (value != null &&
typeof value.toString != 'function') {
value = nativeObjectToString.call(value);
}
if (hasOwnProperty.call(result, value)) {
result[value].push(key);
} else {
result[value] = [key];
}
}, getIteratee);
/**
* Invokes the method at `path` of `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the method to invoke.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {*} Returns the result of the invoked method.
* @example
*
* var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] };
*
* _.invoke(object, 'a[0].b.c.slice', 1, 3);
* // => [2, 3]
*/
var invoke = baseRest(baseInvoke);
/**
* Creates an array of the own enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects. See the
* [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
* for more details.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keys(new Foo);
* // => ['a', 'b'] (iteration order is not guaranteed)
*
* _.keys('hi');
* // => ['0', '1']
*/
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
/**
* Creates an array of the own and inherited enumerable property names of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property names.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.keysIn(new Foo);
* // => ['a', 'b', 'c'] (iteration order is not guaranteed)
*/
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
/**
* The opposite of `_.mapValues`; this method creates an object with the
* same values as `object` and keys generated by running each own enumerable
* string keyed property of `object` thru `iteratee`. The iteratee is invoked
* with three arguments: (value, key, object).
*
* @static
* @memberOf _
* @since 3.8.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns the new mapped object.
* @see _.mapValues
* @example
*
* _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) {
* return key + value;
* });
* // => { 'a1': 1, 'b2': 2 }
*/
function mapKeys(object, iteratee) {
var result = {};
iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
baseAssignValue(result, iteratee(value, key, object), value);
});
return result;
}
/**
* Creates an object with the same keys as `object` and values generated
* by running each own enumerable string keyed property of `object` thru
* `iteratee`. The iteratee is invoked with three arguments:
* (value, key, object).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Object} Returns the new mapped object.
* @see _.mapKeys
* @example
*
* var users = {
* 'fred': { 'user': 'fred', 'age': 40 },
* 'pebbles': { 'user': 'pebbles', 'age': 1 }
* };
*
* _.mapValues(users, function(o) { return o.age; });
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*
* // The `_.property` iteratee shorthand.
* _.mapValues(users, 'age');
* // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)
*/
function mapValues(object, iteratee) {
var result = {};
iteratee = getIteratee(iteratee, 3);
baseForOwn(object, function(value, key, object) {
baseAssignValue(result, key, iteratee(value, key, object));
});
return result;
}
/**
* This method is like `_.assign` except that it recursively merges own and
* inherited enumerable string keyed properties of source objects into the
* destination object. Source properties that resolve to `undefined` are
* skipped if a destination value exists. Array and plain object properties
* are merged recursively. Other objects and value types are overridden by
* assignment. Source objects are applied from left to right. Subsequent
* sources overwrite property assignments of previous sources.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 0.5.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} [sources] The source objects.
* @returns {Object} Returns `object`.
* @example
*
* var object = {
* 'a': [{ 'b': 2 }, { 'd': 4 }]
* };
*
* var other = {
* 'a': [{ 'c': 3 }, { 'e': 5 }]
* };
*
* _.merge(object, other);
* // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }
*/
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
/**
* This method is like `_.merge` except that it accepts `customizer` which
* is invoked to produce the merged values of the destination and source
* properties. If `customizer` returns `undefined`, merging is handled by the
* method instead. The `customizer` is invoked with six arguments:
* (objValue, srcValue, key, object, source, stack).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The destination object.
* @param {...Object} sources The source objects.
* @param {Function} customizer The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* function customizer(objValue, srcValue) {
* if (_.isArray(objValue)) {
* return objValue.concat(srcValue);
* }
* }
*
* var object = { 'a': [1], 'b': [2] };
* var other = { 'a': [3], 'b': [4] };
*
* _.mergeWith(object, other, customizer);
* // => { 'a': [1, 3], 'b': [2, 4] }
*/
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
baseMerge(object, source, srcIndex, customizer);
});
/**
* The opposite of `_.pick`; this method creates an object composed of the
* own and inherited enumerable property paths of `object` that are not omitted.
*
* **Note:** This method is considerably slower than `_.pick`.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The source object.
* @param {...(string|string[])} [paths] The property paths to omit.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.omit(object, ['a', 'c']);
* // => { 'b': '2' }
*/
var omit = flatRest(function(object, paths) {
var result = {};
if (object == null) {
return result;
}
var isDeep = false;
paths = arrayMap(paths, function(path) {
path = castPath(path, object);
isDeep || (isDeep = path.length > 1);
return path;
});
copyObject(object, getAllKeysIn(object), result);
if (isDeep) {
result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
}
var length = paths.length;
while (length--) {
baseUnset(result, paths[length]);
}
return result;
});
/**
* The opposite of `_.pickBy`; this method creates an object composed of
* the own and inherited enumerable string keyed properties of `object` that
* `predicate` doesn't return truthy for. The predicate is invoked with two
* arguments: (value, key).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The source object.
* @param {Function} [predicate=_.identity] The function invoked per property.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.omitBy(object, _.isNumber);
* // => { 'b': '2' }
*/
function omitBy(object, predicate) {
return pickBy(object, negate(getIteratee(predicate)));
}
/**
* Creates an object composed of the picked `object` properties.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The source object.
* @param {...(string|string[])} [paths] The property paths to pick.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.pick(object, ['a', 'c']);
* // => { 'a': 1, 'c': 3 }
*/
var pick = flatRest(function(object, paths) {
return object == null ? {} : basePick(object, paths);
});
/**
* Creates an object composed of the `object` properties `predicate` returns
* truthy for. The predicate is invoked with two arguments: (value, key).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The source object.
* @param {Function} [predicate=_.identity] The function invoked per property.
* @returns {Object} Returns the new object.
* @example
*
* var object = { 'a': 1, 'b': '2', 'c': 3 };
*
* _.pickBy(object, _.isNumber);
* // => { 'a': 1, 'c': 3 }
*/
function pickBy(object, predicate) {
if (object == null) {
return {};
}
var props = arrayMap(getAllKeysIn(object), function(prop) {
return [prop];
});
predicate = getIteratee(predicate);
return basePickBy(object, props, function(value, path) {
return predicate(value, path[0]);
});
}
/**
* This method is like `_.get` except that if the resolved value is a
* function it's invoked with the `this` binding of its parent object and
* its result is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @param {Array|string} path The path of the property to resolve.
* @param {*} [defaultValue] The value returned for `undefined` resolved values.
* @returns {*} Returns the resolved value.
* @example
*
* var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] };
*
* _.result(object, 'a[0].b.c1');
* // => 3
*
* _.result(object, 'a[0].b.c2');
* // => 4
*
* _.result(object, 'a[0].b.c3', 'default');
* // => 'default'
*
* _.result(object, 'a[0].b.c3', _.constant('default'));
* // => 'default'
*/
function result(object, path, defaultValue) {
path = castPath(path, object);
var index = -1,
length = path.length;
// Ensure the loop is entered when path is empty.
if (!length) {
length = 1;
object = undefined;
}
while (++index < length) {
var value = object == null ? undefined : object[toKey(path[index])];
if (value === undefined) {
index = length;
value = defaultValue;
}
object = isFunction(value) ? value.call(object) : value;
}
return object;
}
/**
* Sets the value at `path` of `object`. If a portion of `path` doesn't exist,
* it's created. Arrays are created for missing index properties while objects
* are created for all other missing properties. Use `_.setWith` to customize
* `path` creation.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @returns {Object} Returns `object`.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.set(object, 'a[0].b.c', 4);
* console.log(object.a[0].b.c);
* // => 4
*
* _.set(object, ['x', '0', 'y', 'z'], 5);
* console.log(object.x[0].y.z);
* // => 5
*/
function set(object, path, value) {
return object == null ? object : baseSet(object, path, value);
}
/**
* This method is like `_.set` except that it accepts `customizer` which is
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
* path creation is handled by the method instead. The `customizer` is invoked
* with three arguments: (nsValue, key, nsObject).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {*} value The value to set.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* var object = {};
*
* _.setWith(object, '[0][1]', 'a', Object);
* // => { '0': { '1': 'a' } }
*/
function setWith(object, path, value, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return object == null ? object : baseSet(object, path, value, customizer);
}
/**
* Creates an array of own enumerable string keyed-value pairs for `object`
* which can be consumed by `_.fromPairs`. If `object` is a map or set, its
* entries are returned.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias entries
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the key-value pairs.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.toPairs(new Foo);
* // => [['a', 1], ['b', 2]] (iteration order is not guaranteed)
*/
var toPairs = createToPairs(keys);
/**
* Creates an array of own and inherited enumerable string keyed-value pairs
* for `object` which can be consumed by `_.fromPairs`. If `object` is a map
* or set, its entries are returned.
*
* @static
* @memberOf _
* @since 4.0.0
* @alias entriesIn
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the key-value pairs.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.toPairsIn(new Foo);
* // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed)
*/
var toPairsIn = createToPairs(keysIn);
/**
* An alternative to `_.reduce`; this method transforms `object` to a new
* `accumulator` object which is the result of running each of its own
* enumerable string keyed properties thru `iteratee`, with each invocation
* potentially mutating the `accumulator` object. If `accumulator` is not
* provided, a new object with the same `[[Prototype]]` will be used. The
* iteratee is invoked with four arguments: (accumulator, value, key, object).
* Iteratee functions may exit iteration early by explicitly returning `false`.
*
* @static
* @memberOf _
* @since 1.3.0
* @category Object
* @param {Object} object The object to iterate over.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @param {*} [accumulator] The custom accumulator value.
* @returns {*} Returns the accumulated value.
* @example
*
* _.transform([2, 3, 4], function(result, n) {
* result.push(n *= n);
* return n % 2 == 0;
* }, []);
* // => [4, 9]
*
* _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) {
* (result[value] || (result[value] = [])).push(key);
* }, {});
* // => { '1': ['a', 'c'], '2': ['b'] }
*/
function transform(object, iteratee, accumulator) {
var isArr = isArray(object),
isArrLike = isArr || isBuffer(object) || isTypedArray(object);
iteratee = getIteratee(iteratee, 4);
if (accumulator == null) {
var Ctor = object && object.constructor;
if (isArrLike) {
accumulator = isArr ? new Ctor : [];
}
else if (isObject(object)) {
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
}
else {
accumulator = {};
}
}
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) {
return iteratee(accumulator, value, index, object);
});
return accumulator;
}
/**
* Removes the property at `path` of `object`.
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to unset.
* @returns {boolean} Returns `true` if the property is deleted, else `false`.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 7 } }] };
* _.unset(object, 'a[0].b.c');
* // => true
*
* console.log(object);
* // => { 'a': [{ 'b': {} }] };
*
* _.unset(object, ['a', '0', 'b', 'c']);
* // => true
*
* console.log(object);
* // => { 'a': [{ 'b': {} }] };
*/
function unset(object, path) {
return object == null ? true : baseUnset(object, path);
}
/**
* This method is like `_.set` except that accepts `updater` to produce the
* value to set. Use `_.updateWith` to customize `path` creation. The `updater`
* is invoked with one argument: (value).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.6.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {Function} updater The function to produce the updated value.
* @returns {Object} Returns `object`.
* @example
*
* var object = { 'a': [{ 'b': { 'c': 3 } }] };
*
* _.update(object, 'a[0].b.c', function(n) { return n * n; });
* console.log(object.a[0].b.c);
* // => 9
*
* _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; });
* console.log(object.x[0].y.z);
* // => 0
*/
function update(object, path, updater) {
return object == null ? object : baseUpdate(object, path, castFunction(updater));
}
/**
* This method is like `_.update` except that it accepts `customizer` which is
* invoked to produce the objects of `path`. If `customizer` returns `undefined`
* path creation is handled by the method instead. The `customizer` is invoked
* with three arguments: (nsValue, key, nsObject).
*
* **Note:** This method mutates `object`.
*
* @static
* @memberOf _
* @since 4.6.0
* @category Object
* @param {Object} object The object to modify.
* @param {Array|string} path The path of the property to set.
* @param {Function} updater The function to produce the updated value.
* @param {Function} [customizer] The function to customize assigned values.
* @returns {Object} Returns `object`.
* @example
*
* var object = {};
*
* _.updateWith(object, '[0][1]', _.constant('a'), Object);
* // => { '0': { '1': 'a' } }
*/
function updateWith(object, path, updater, customizer) {
customizer = typeof customizer == 'function' ? customizer : undefined;
return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer);
}
/**
* Creates an array of the own enumerable string keyed property values of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property values.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.values(new Foo);
* // => [1, 2] (iteration order is not guaranteed)
*
* _.values('hi');
* // => ['h', 'i']
*/
function values(object) {
return object == null ? [] : baseValues(object, keys(object));
}
/**
* Creates an array of the own and inherited enumerable string keyed property
* values of `object`.
*
* **Note:** Non-object values are coerced to objects.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Object
* @param {Object} object The object to query.
* @returns {Array} Returns the array of property values.
* @example
*
* function Foo() {
* this.a = 1;
* this.b = 2;
* }
*
* Foo.prototype.c = 3;
*
* _.valuesIn(new Foo);
* // => [1, 2, 3] (iteration order is not guaranteed)
*/
function valuesIn(object) {
return object == null ? [] : baseValues(object, keysIn(object));
}
/*------------------------------------------------------------------------*/
/**
* Clamps `number` within the inclusive `lower` and `upper` bounds.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Number
* @param {number} number The number to clamp.
* @param {number} [lower] The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the clamped number.
* @example
*
* _.clamp(-10, -5, 5);
* // => -5
*
* _.clamp(10, -5, 5);
* // => 5
*/
function clamp(number, lower, upper) {
if (upper === undefined) {
upper = lower;
lower = undefined;
}
if (upper !== undefined) {
upper = toNumber(upper);
upper = upper === upper ? upper : 0;
}
if (lower !== undefined) {
lower = toNumber(lower);
lower = lower === lower ? lower : 0;
}
return baseClamp(toNumber(number), lower, upper);
}
/**
* Checks if `n` is between `start` and up to, but not including, `end`. If
* `end` is not specified, it's set to `start` with `start` then set to `0`.
* If `start` is greater than `end` the params are swapped to support
* negative ranges.
*
* @static
* @memberOf _
* @since 3.3.0
* @category Number
* @param {number} number The number to check.
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
* @returns {boolean} Returns `true` if `number` is in the range, else `false`.
* @see _.range, _.rangeRight
* @example
*
* _.inRange(3, 2, 4);
* // => true
*
* _.inRange(4, 8);
* // => true
*
* _.inRange(4, 2);
* // => false
*
* _.inRange(2, 2);
* // => false
*
* _.inRange(1.2, 2);
* // => true
*
* _.inRange(5.2, 4);
* // => false
*
* _.inRange(-3, -2, -6);
* // => true
*/
function inRange(number, start, end) {
start = toFinite(start);
if (end === undefined) {
end = start;
start = 0;
} else {
end = toFinite(end);
}
number = toNumber(number);
return baseInRange(number, start, end);
}
/**
* Produces a random number between the inclusive `lower` and `upper` bounds.
* If only one argument is provided a number between `0` and the given number
* is returned. If `floating` is `true`, or either `lower` or `upper` are
* floats, a floating-point number is returned instead of an integer.
*
* **Note:** JavaScript follows the IEEE-754 standard for resolving
* floating-point values which can produce unexpected results.
*
* @static
* @memberOf _
* @since 0.7.0
* @category Number
* @param {number} [lower=0] The lower bound.
* @param {number} [upper=1] The upper bound.
* @param {boolean} [floating] Specify returning a floating-point number.
* @returns {number} Returns the random number.
* @example
*
* _.random(0, 5);
* // => an integer between 0 and 5
*
* _.random(5);
* // => also an integer between 0 and 5
*
* _.random(5, true);
* // => a floating-point number between 0 and 5
*
* _.random(1.2, 5.2);
* // => a floating-point number between 1.2 and 5.2
*/
function random(lower, upper, floating) {
if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) {
upper = floating = undefined;
}
if (floating === undefined) {
if (typeof upper == 'boolean') {
floating = upper;
upper = undefined;
}
else if (typeof lower == 'boolean') {
floating = lower;
lower = undefined;
}
}
if (lower === undefined && upper === undefined) {
lower = 0;
upper = 1;
}
else {
lower = toFinite(lower);
if (upper === undefined) {
upper = lower;
lower = 0;
} else {
upper = toFinite(upper);
}
}
if (lower > upper) {
var temp = lower;
lower = upper;
upper = temp;
}
if (floating || lower % 1 || upper % 1) {
var rand = nativeRandom();
return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper);
}
return baseRandom(lower, upper);
}
/*------------------------------------------------------------------------*/
/**
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the camel cased string.
* @example
*
* _.camelCase('Foo Bar');
* // => 'fooBar'
*
* _.camelCase('--foo-bar--');
* // => 'fooBar'
*
* _.camelCase('__FOO_BAR__');
* // => 'fooBar'
*/
var camelCase = createCompounder(function(result, word, index) {
word = word.toLowerCase();
return result + (index ? capitalize(word) : word);
});
/**
* Converts the first character of `string` to upper case and the remaining
* to lower case.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to capitalize.
* @returns {string} Returns the capitalized string.
* @example
*
* _.capitalize('FRED');
* // => 'Fred'
*/
function capitalize(string) {
return upperFirst(toString(string).toLowerCase());
}
/**
* Deburrs `string` by converting
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
* letters to basic Latin letters and removing
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to deburr.
* @returns {string} Returns the deburred string.
* @example
*
* _.deburr('déjà vu');
* // => 'deja vu'
*/
function deburr(string) {
string = toString(string);
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
}
/**
* Checks if `string` ends with the given target string.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to inspect.
* @param {string} [target] The string to search for.
* @param {number} [position=string.length] The position to search up to.
* @returns {boolean} Returns `true` if `string` ends with `target`,
* else `false`.
* @example
*
* _.endsWith('abc', 'c');
* // => true
*
* _.endsWith('abc', 'b');
* // => false
*
* _.endsWith('abc', 'b', 2);
* // => true
*/
function endsWith(string, target, position) {
string = toString(string);
target = baseToString(target);
var length = string.length;
position = position === undefined
? length
: baseClamp(toInteger(position), 0, length);
var end = position;
position -= target.length;
return position >= 0 && string.slice(position, end) == target;
}
/**
* Converts the characters "&", "<", ">", '"', and "'" in `string` to their
* corresponding HTML entities.
*
* **Note:** No other characters are escaped. To escape additional
* characters use a third-party library like [_he_](https://mths.be/he).
*
* Though the ">" character is escaped for symmetry, characters like
* ">" and "/" don't need escaping in HTML and have no special meaning
* unless they're part of a tag or unquoted attribute value. See
* [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands)
* (under "semi-related fun fact") for more details.
*
* When working with HTML you should always
* [quote attribute values](http://wonko.com/post/html-escaping) to reduce
* XSS vectors.
*
* @static
* @since 0.1.0
* @memberOf _
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
* _.escape('fred, barney, & pebbles');
* // => 'fred, barney, &amp; pebbles'
*/
function escape(string) {
string = toString(string);
return (string && reHasUnescapedHtml.test(string))
? string.replace(reUnescapedHtml, escapeHtmlChar)
: string;
}
/**
* Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+",
* "?", "(", ")", "[", "]", "{", "}", and "|" in `string`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to escape.
* @returns {string} Returns the escaped string.
* @example
*
* _.escapeRegExp('[lodash](https://lodash.com/)');
* // => '\[lodash\]\(https://lodash\.com/\)'
*/
function escapeRegExp(string) {
string = toString(string);
return (string && reHasRegExpChar.test(string))
? string.replace(reRegExpChar, '\\$&')
: string;
}
/**
* Converts `string` to
* [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the kebab cased string.
* @example
*
* _.kebabCase('Foo Bar');
* // => 'foo-bar'
*
* _.kebabCase('fooBar');
* // => 'foo-bar'
*
* _.kebabCase('__FOO_BAR__');
* // => 'foo-bar'
*/
var kebabCase = createCompounder(function(result, word, index) {
return result + (index ? '-' : '') + word.toLowerCase();
});
/**
* Converts `string`, as space separated words, to lower case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the lower cased string.
* @example
*
* _.lowerCase('--Foo-Bar--');
* // => 'foo bar'
*
* _.lowerCase('fooBar');
* // => 'foo bar'
*
* _.lowerCase('__FOO_BAR__');
* // => 'foo bar'
*/
var lowerCase = createCompounder(function(result, word, index) {
return result + (index ? ' ' : '') + word.toLowerCase();
});
/**
* Converts the first character of `string` to lower case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.lowerFirst('Fred');
* // => 'fred'
*
* _.lowerFirst('FRED');
* // => 'fRED'
*/
var lowerFirst = createCaseFirst('toLowerCase');
/**
* Pads `string` on the left and right sides if it's shorter than `length`.
* Padding characters are truncated if they can't be evenly divided by `length`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.pad('abc', 8);
* // => ' abc '
*
* _.pad('abc', 8, '_-');
* // => '_-abc_-_'
*
* _.pad('abc', 3);
* // => 'abc'
*/
function pad(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
if (!length || strLength >= length) {
return string;
}
var mid = (length - strLength) / 2;
return (
createPadding(nativeFloor(mid), chars) +
string +
createPadding(nativeCeil(mid), chars)
);
}
/**
* Pads `string` on the right side if it's shorter than `length`. Padding
* characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.padEnd('abc', 6);
* // => 'abc '
*
* _.padEnd('abc', 6, '_-');
* // => 'abc_-_'
*
* _.padEnd('abc', 3);
* // => 'abc'
*/
function padEnd(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return (length && strLength < length)
? (string + createPadding(length - strLength, chars))
: string;
}
/**
* Pads `string` on the left side if it's shorter than `length`. Padding
* characters are truncated if they exceed `length`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to pad.
* @param {number} [length=0] The padding length.
* @param {string} [chars=' '] The string used as padding.
* @returns {string} Returns the padded string.
* @example
*
* _.padStart('abc', 6);
* // => ' abc'
*
* _.padStart('abc', 6, '_-');
* // => '_-_abc'
*
* _.padStart('abc', 3);
* // => 'abc'
*/
function padStart(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return (length && strLength < length)
? (createPadding(length - strLength, chars) + string)
: string;
}
/**
* Converts `string` to an integer of the specified radix. If `radix` is
* `undefined` or `0`, a `radix` of `10` is used unless `value` is a
* hexadecimal, in which case a `radix` of `16` is used.
*
* **Note:** This method aligns with the
* [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`.
*
* @static
* @memberOf _
* @since 1.1.0
* @category String
* @param {string} string The string to convert.
* @param {number} [radix=10] The radix to interpret `value` by.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {number} Returns the converted integer.
* @example
*
* _.parseInt('08');
* // => 8
*
* _.map(['6', '08', '10'], _.parseInt);
* // => [6, 8, 10]
*/
function parseInt(string, radix, guard) {
if (guard || radix == null) {
radix = 0;
} else if (radix) {
radix = +radix;
}
return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0);
}
/**
* Repeats the given string `n` times.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to repeat.
* @param {number} [n=1] The number of times to repeat the string.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the repeated string.
* @example
*
* _.repeat('*', 3);
* // => '***'
*
* _.repeat('abc', 2);
* // => 'abcabc'
*
* _.repeat('abc', 0);
* // => ''
*/
function repeat(string, n, guard) {
if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) {
n = 1;
} else {
n = toInteger(n);
}
return baseRepeat(toString(string), n);
}
/**
* Replaces matches for `pattern` in `string` with `replacement`.
*
* **Note:** This method is based on
* [`String#replace`](https://mdn.io/String/replace).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to modify.
* @param {RegExp|string} pattern The pattern to replace.
* @param {Function|string} replacement The match replacement.
* @returns {string} Returns the modified string.
* @example
*
* _.replace('Hi Fred', 'Fred', 'Barney');
* // => 'Hi Barney'
*/
function replace() {
var args = arguments,
string = toString(args[0]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
}
/**
* Converts `string` to
* [snake case](https://en.wikipedia.org/wiki/Snake_case).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the snake cased string.
* @example
*
* _.snakeCase('Foo Bar');
* // => 'foo_bar'
*
* _.snakeCase('fooBar');
* // => 'foo_bar'
*
* _.snakeCase('--FOO-BAR--');
* // => 'foo_bar'
*/
var snakeCase = createCompounder(function(result, word, index) {
return result + (index ? '_' : '') + word.toLowerCase();
});
/**
* Splits `string` by `separator`.
*
* **Note:** This method is based on
* [`String#split`](https://mdn.io/String/split).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to split.
* @param {RegExp|string} separator The separator pattern to split by.
* @param {number} [limit] The length to truncate results to.
* @returns {Array} Returns the string segments.
* @example
*
* _.split('a-b-c', '-', 2);
* // => ['a', 'b']
*/
function split(string, separator, limit) {
if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) {
separator = limit = undefined;
}
limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0;
if (!limit) {
return [];
}
string = toString(string);
if (string && (
typeof separator == 'string' ||
(separator != null && !isRegExp(separator))
)) {
separator = baseToString(separator);
if (!separator && hasUnicode(string)) {
return castSlice(stringToArray(string), 0, limit);
}
}
return string.split(separator, limit);
}
/**
* Converts `string` to
* [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage).
*
* @static
* @memberOf _
* @since 3.1.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the start cased string.
* @example
*
* _.startCase('--foo-bar--');
* // => 'Foo Bar'
*
* _.startCase('fooBar');
* // => 'Foo Bar'
*
* _.startCase('__FOO_BAR__');
* // => 'FOO BAR'
*/
var startCase = createCompounder(function(result, word, index) {
return result + (index ? ' ' : '') + upperFirst(word);
});
/**
* Checks if `string` starts with the given target string.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to inspect.
* @param {string} [target] The string to search for.
* @param {number} [position=0] The position to search from.
* @returns {boolean} Returns `true` if `string` starts with `target`,
* else `false`.
* @example
*
* _.startsWith('abc', 'a');
* // => true
*
* _.startsWith('abc', 'b');
* // => false
*
* _.startsWith('abc', 'b', 1);
* // => true
*/
function startsWith(string, target, position) {
string = toString(string);
position = position == null
? 0
: baseClamp(toInteger(position), 0, string.length);
target = baseToString(target);
return string.slice(position, position + target.length) == target;
}
/**
* Creates a compiled template function that can interpolate data properties
* in "interpolate" delimiters, HTML-escape interpolated data properties in
* "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data
* properties may be accessed as free variables in the template. If a setting
* object is given, it takes precedence over `_.templateSettings` values.
*
* **Note:** In the development build `_.template` utilizes
* [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
* for easier debugging.
*
* For more information on precompiling templates see
* [lodash's custom builds documentation](https://lodash.com/custom-builds).
*
* For more information on Chrome extension sandboxes see
* [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval).
*
* @static
* @since 0.1.0
* @memberOf _
* @category String
* @param {string} [string=''] The template string.
* @param {Object} [options={}] The options object.
* @param {RegExp} [options.escape=_.templateSettings.escape]
* The HTML "escape" delimiter.
* @param {RegExp} [options.evaluate=_.templateSettings.evaluate]
* The "evaluate" delimiter.
* @param {Object} [options.imports=_.templateSettings.imports]
* An object to import into the template as free variables.
* @param {RegExp} [options.interpolate=_.templateSettings.interpolate]
* The "interpolate" delimiter.
* @param {string} [options.sourceURL='lodash.templateSources[n]']
* The sourceURL of the compiled template.
* @param {string} [options.variable='obj']
* The data object variable name.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Function} Returns the compiled template function.
* @example
*
* // Use the "interpolate" delimiter to create a compiled template.
* var compiled = _.template('hello <%= user %>!');
* compiled({ 'user': 'fred' });
* // => 'hello fred!'
*
* // Use the HTML "escape" delimiter to escape data property values.
* var compiled = _.template('<b><%- value %></b>');
* compiled({ 'value': '<script>' });
* // => '<b>&lt;script&gt;</b>'
*
* // Use the "evaluate" delimiter to execute JavaScript and generate HTML.
* var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>');
* compiled({ 'users': ['fred', 'barney'] });
* // => '<li>fred</li><li>barney</li>'
*
* // Use the internal `print` function in "evaluate" delimiters.
* var compiled = _.template('<% print("hello " + user); %>!');
* compiled({ 'user': 'barney' });
* // => 'hello barney!'
*
* // Use the ES template literal delimiter as an "interpolate" delimiter.
* // Disable support by replacing the "interpolate" delimiter.
* var compiled = _.template('hello ${ user }!');
* compiled({ 'user': 'pebbles' });
* // => 'hello pebbles!'
*
* // Use backslashes to treat delimiters as plain text.
* var compiled = _.template('<%= "\\<%- value %\\>" %>');
* compiled({ 'value': 'ignored' });
* // => '<%- value %>'
*
* // Use the `imports` option to import `jQuery` as `jq`.
* var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>';
* var compiled = _.template(text, { 'imports': { 'jq': jQuery } });
* compiled({ 'users': ['fred', 'barney'] });
* // => '<li>fred</li><li>barney</li>'
*
* // Use the `sourceURL` option to specify a custom sourceURL for the template.
* var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' });
* compiled(data);
* // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector.
*
* // Use the `variable` option to ensure a with-statement isn't used in the compiled template.
* var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' });
* compiled.source;
* // => function(data) {
* // var __t, __p = '';
* // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!';
* // return __p;
* // }
*
* // Use custom template delimiters.
* _.templateSettings.interpolate = /{{([\s\S]+?)}}/g;
* var compiled = _.template('hello {{ user }}!');
* compiled({ 'user': 'mustache' });
* // => 'hello mustache!'
*
* // Use the `source` property to inline compiled templates for meaningful
* // line numbers in error messages and stack traces.
* fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\
* var JST = {\
* "main": ' + _.template(mainText).source + '\
* };\
* ');
*/
function template(string, options, guard) {
// Based on John Resig's `tmpl` implementation
// (http://ejohn.org/blog/javascript-micro-templating/)
// and Laura Doktorova's doT.js (https://github.com/olado/doT).
var settings = lodash.templateSettings;
if (guard && isIterateeCall(string, options, guard)) {
options = undefined;
}
string = toString(string);
options = assignInWith({}, options, settings, customDefaultsAssignIn);
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn),
importsKeys = keys(imports),
importsValues = baseValues(imports, importsKeys);
var isEscaping,
isEvaluating,
index = 0,
interpolate = options.interpolate || reNoMatch,
source = "__p += '";
// Compile the regexp to match each delimiter.
var reDelimiters = RegExp(
(options.escape || reNoMatch).source + '|' +
interpolate.source + '|' +
(interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' +
(options.evaluate || reNoMatch).source + '|$'
, 'g');
// Use a sourceURL for easier debugging.
// The sourceURL gets injected into the source that's eval-ed, so be careful
// to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in
// and escape the comment, thus injecting code that gets evaled.
var sourceURL = '//# sourceURL=' +
(hasOwnProperty.call(options, 'sourceURL')
? (options.sourceURL + '').replace(/\s/g, ' ')
: ('lodash.templateSources[' + (++templateCounter) + ']')
) + '\n';
string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) {
interpolateValue || (interpolateValue = esTemplateValue);
// Escape characters that can't be included in string literals.
source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar);
// Replace delimiters with snippets.
if (escapeValue) {
isEscaping = true;
source += "' +\n__e(" + escapeValue + ") +\n'";
}
if (evaluateValue) {
isEvaluating = true;
source += "';\n" + evaluateValue + ";\n__p += '";
}
if (interpolateValue) {
source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
}
index = offset + match.length;
// The JS engine embedded in Adobe products needs `match` returned in
// order to produce the correct `offset` value.
return match;
});
source += "';\n";
// If `variable` is not specified wrap a with-statement around the generated
// code to add the data object to the top of the scope chain.
var variable = hasOwnProperty.call(options, 'variable') && options.variable;
if (!variable) {
source = 'with (obj) {\n' + source + '\n}\n';
}
// Throw an error if a forbidden character was found in `variable`, to prevent
// potential command injection attacks.
else if (reForbiddenIdentifierChars.test(variable)) {
throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT);
}
// Cleanup code by stripping empty strings.
source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source)
.replace(reEmptyStringMiddle, '$1')
.replace(reEmptyStringTrailing, '$1;');
// Frame code as the function body.
source = 'function(' + (variable || 'obj') + ') {\n' +
(variable
? ''
: 'obj || (obj = {});\n'
) +
"var __t, __p = ''" +
(isEscaping
? ', __e = _.escape'
: ''
) +
(isEvaluating
? ', __j = Array.prototype.join;\n' +
"function print() { __p += __j.call(arguments, '') }\n"
: ';\n'
) +
source +
'return __p\n}';
var result = attempt(function() {
return Function(importsKeys, sourceURL + 'return ' + source)
.apply(undefined, importsValues);
});
// Provide the compiled function's source by its `toString` method or
// the `source` property as a convenience for inlining compiled templates.
result.source = source;
if (isError(result)) {
throw result;
}
return result;
}
/**
* Converts `string`, as a whole, to lower case just like
* [String#toLowerCase](https://mdn.io/toLowerCase).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the lower cased string.
* @example
*
* _.toLower('--Foo-Bar--');
* // => '--foo-bar--'
*
* _.toLower('fooBar');
* // => 'foobar'
*
* _.toLower('__FOO_BAR__');
* // => '__foo_bar__'
*/
function toLower(value) {
return toString(value).toLowerCase();
}
/**
* Converts `string`, as a whole, to upper case just like
* [String#toUpperCase](https://mdn.io/toUpperCase).
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the upper cased string.
* @example
*
* _.toUpper('--foo-bar--');
* // => '--FOO-BAR--'
*
* _.toUpper('fooBar');
* // => 'FOOBAR'
*
* _.toUpper('__foo_bar__');
* // => '__FOO_BAR__'
*/
function toUpper(value) {
return toString(value).toUpperCase();
}
/**
* Removes leading and trailing whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trim(' abc ');
* // => 'abc'
*
* _.trim('-_-abc-_-', '_-');
* // => 'abc'
*
* _.map([' foo ', ' bar '], _.trim);
* // => ['foo', 'bar']
*/
function trim(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return baseTrim(string);
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
chrSymbols = stringToArray(chars),
start = charsStartIndex(strSymbols, chrSymbols),
end = charsEndIndex(strSymbols, chrSymbols) + 1;
return castSlice(strSymbols, start, end).join('');
}
/**
* Removes trailing whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trimEnd(' abc ');
* // => ' abc'
*
* _.trimEnd('-_-abc-_-', '_-');
* // => '-_-abc'
*/
function trimEnd(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return string.slice(0, trimmedEndIndex(string) + 1);
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
return castSlice(strSymbols, 0, end).join('');
}
/**
* Removes leading whitespace or specified characters from `string`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to trim.
* @param {string} [chars=whitespace] The characters to trim.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {string} Returns the trimmed string.
* @example
*
* _.trimStart(' abc ');
* // => 'abc '
*
* _.trimStart('-_-abc-_-', '_-');
* // => 'abc-_-'
*/
function trimStart(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined)) {
return string.replace(reTrimStart, '');
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string),
start = charsStartIndex(strSymbols, stringToArray(chars));
return castSlice(strSymbols, start).join('');
}
/**
* Truncates `string` if it's longer than the given maximum string length.
* The last characters of the truncated string are replaced with the omission
* string which defaults to "...".
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to truncate.
* @param {Object} [options={}] The options object.
* @param {number} [options.length=30] The maximum string length.
* @param {string} [options.omission='...'] The string to indicate text is omitted.
* @param {RegExp|string} [options.separator] The separator pattern to truncate to.
* @returns {string} Returns the truncated string.
* @example
*
* _.truncate('hi-diddly-ho there, neighborino');
* // => 'hi-diddly-ho there, neighbo...'
*
* _.truncate('hi-diddly-ho there, neighborino', {
* 'length': 24,
* 'separator': ' '
* });
* // => 'hi-diddly-ho there,...'
*
* _.truncate('hi-diddly-ho there, neighborino', {
* 'length': 24,
* 'separator': /,? +/
* });
* // => 'hi-diddly-ho there...'
*
* _.truncate('hi-diddly-ho there, neighborino', {
* 'omission': ' [...]'
* });
* // => 'hi-diddly-ho there, neig [...]'
*/
function truncate(string, options) {
var length = DEFAULT_TRUNC_LENGTH,
omission = DEFAULT_TRUNC_OMISSION;
if (isObject(options)) {
var separator = 'separator' in options ? options.separator : separator;
length = 'length' in options ? toInteger(options.length) : length;
omission = 'omission' in options ? baseToString(options.omission) : omission;
}
string = toString(string);
var strLength = string.length;
if (hasUnicode(string)) {
var strSymbols = stringToArray(string);
strLength = strSymbols.length;
}
if (length >= strLength) {
return string;
}
var end = length - stringSize(omission);
if (end < 1) {
return omission;
}
var result = strSymbols
? castSlice(strSymbols, 0, end).join('')
: string.slice(0, end);
if (separator === undefined) {
return result + omission;
}
if (strSymbols) {
end += (result.length - end);
}
if (isRegExp(separator)) {
if (string.slice(end).search(separator)) {
var match,
substring = result;
if (!separator.global) {
separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g');
}
separator.lastIndex = 0;
while ((match = separator.exec(substring))) {
var newEnd = match.index;
}
result = result.slice(0, newEnd === undefined ? end : newEnd);
}
} else if (string.indexOf(baseToString(separator), end) != end) {
var index = result.lastIndexOf(separator);
if (index > -1) {
result = result.slice(0, index);
}
}
return result + omission;
}
/**
* The inverse of `_.escape`; this method converts the HTML entities
* `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` in `string` to
* their corresponding characters.
*
* **Note:** No other HTML entities are unescaped. To unescape additional
* HTML entities use a third-party library like [_he_](https://mths.be/he).
*
* @static
* @memberOf _
* @since 0.6.0
* @category String
* @param {string} [string=''] The string to unescape.
* @returns {string} Returns the unescaped string.
* @example
*
* _.unescape('fred, barney, &amp; pebbles');
* // => 'fred, barney, & pebbles'
*/
function unescape(string) {
string = toString(string);
return (string && reHasEscapedHtml.test(string))
? string.replace(reEscapedHtml, unescapeHtmlChar)
: string;
}
/**
* Converts `string`, as space separated words, to upper case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the upper cased string.
* @example
*
* _.upperCase('--foo-bar');
* // => 'FOO BAR'
*
* _.upperCase('fooBar');
* // => 'FOO BAR'
*
* _.upperCase('__foo_bar__');
* // => 'FOO BAR'
*/
var upperCase = createCompounder(function(result, word, index) {
return result + (index ? ' ' : '') + word.toUpperCase();
});
/**
* Converts the first character of `string` to upper case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.upperFirst('fred');
* // => 'Fred'
*
* _.upperFirst('FRED');
* // => 'FRED'
*/
var upperFirst = createCaseFirst('toUpperCase');
/**
* Splits `string` into an array of its words.
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to inspect.
* @param {RegExp|string} [pattern] The pattern to match words.
* @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.
* @returns {Array} Returns the words of `string`.
* @example
*
* _.words('fred, barney, & pebbles');
* // => ['fred', 'barney', 'pebbles']
*
* _.words('fred, barney, & pebbles', /[^, ]+/g);
* // => ['fred', 'barney', '&', 'pebbles']
*/
function words(string, pattern, guard) {
string = toString(string);
pattern = guard ? undefined : pattern;
if (pattern === undefined) {
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
}
return string.match(pattern) || [];
}
/*------------------------------------------------------------------------*/
/**
* Attempts to invoke `func`, returning either the result or the caught error
* object. Any additional arguments are provided to `func` when it's invoked.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Function} func The function to attempt.
* @param {...*} [args] The arguments to invoke `func` with.
* @returns {*} Returns the `func` result or error object.
* @example
*
* // Avoid throwing errors for invalid selectors.
* var elements = _.attempt(function(selector) {
* return document.querySelectorAll(selector);
* }, '>_>');
*
* if (_.isError(elements)) {
* elements = [];
* }
*/
var attempt = baseRest(function(func, args) {
try {
return apply(func, undefined, args);
} catch (e) {
return isError(e) ? e : new Error(e);
}
});
/**
* Binds methods of an object to the object itself, overwriting the existing
* method.
*
* **Note:** This method doesn't set the "length" property of bound functions.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {Object} object The object to bind and assign the bound methods to.
* @param {...(string|string[])} methodNames The object method names to bind.
* @returns {Object} Returns `object`.
* @example
*
* var view = {
* 'label': 'docs',
* 'click': function() {
* console.log('clicked ' + this.label);
* }
* };
*
* _.bindAll(view, ['click']);
* jQuery(element).on('click', view.click);
* // => Logs 'clicked docs' when clicked.
*/
var bindAll = flatRest(function(object, methodNames) {
arrayEach(methodNames, function(key) {
key = toKey(key);
baseAssignValue(object, key, bind(object[key], object));
});
return object;
});
/**
* Creates a function that iterates over `pairs` and invokes the corresponding
* function of the first predicate to return truthy. The predicate-function
* pairs are invoked with the `this` binding and arguments of the created
* function.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {Array} pairs The predicate-function pairs.
* @returns {Function} Returns the new composite function.
* @example
*
* var func = _.cond([
* [_.matches({ 'a': 1 }), _.constant('matches A')],
* [_.conforms({ 'b': _.isNumber }), _.constant('matches B')],
* [_.stubTrue, _.constant('no match')]
* ]);
*
* func({ 'a': 1, 'b': 2 });
* // => 'matches A'
*
* func({ 'a': 0, 'b': 1 });
* // => 'matches B'
*
* func({ 'a': '1', 'b': '2' });
* // => 'no match'
*/
function cond(pairs) {
var length = pairs == null ? 0 : pairs.length,
toIteratee = getIteratee();
pairs = !length ? [] : arrayMap(pairs, function(pair) {
if (typeof pair[1] != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
return [toIteratee(pair[0]), pair[1]];
});
return baseRest(function(args) {
var index = -1;
while (++index < length) {
var pair = pairs[index];
if (apply(pair[0], this, args)) {
return apply(pair[1], this, args);
}
}
});
}
/**
* Creates a function that invokes the predicate properties of `source` with
* the corresponding property values of a given object, returning `true` if
* all predicates return truthy, else `false`.
*
* **Note:** The created function is equivalent to `_.conformsTo` with
* `source` partially applied.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {Object} source The object of property predicates to conform to.
* @returns {Function} Returns the new spec function.
* @example
*
* var objects = [
* { 'a': 2, 'b': 1 },
* { 'a': 1, 'b': 2 }
* ];
*
* _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } }));
* // => [{ 'a': 1, 'b': 2 }]
*/
function conforms(source) {
return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
}
/**
* Creates a function that returns `value`.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {*} value The value to return from the new function.
* @returns {Function} Returns the new constant function.
* @example
*
* var objects = _.times(2, _.constant({ 'a': 1 }));
*
* console.log(objects);
* // => [{ 'a': 1 }, { 'a': 1 }]
*
* console.log(objects[0] === objects[1]);
* // => true
*/
function constant(value) {
return function() {
return value;
};
}
/**
* Checks `value` to determine whether a default value should be returned in
* its place. The `defaultValue` is returned if `value` is `NaN`, `null`,
* or `undefined`.
*
* @static
* @memberOf _
* @since 4.14.0
* @category Util
* @param {*} value The value to check.
* @param {*} defaultValue The default value.
* @returns {*} Returns the resolved value.
* @example
*
* _.defaultTo(1, 10);
* // => 1
*
* _.defaultTo(undefined, 10);
* // => 10
*/
function defaultTo(value, defaultValue) {
return (value == null || value !== value) ? defaultValue : value;
}
/**
* Creates a function that returns the result of invoking the given functions
* with the `this` binding of the created function, where each successive
* invocation is supplied the return value of the previous.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {...(Function|Function[])} [funcs] The functions to invoke.
* @returns {Function} Returns the new composite function.
* @see _.flowRight
* @example
*
* function square(n) {
* return n * n;
* }
*
* var addSquare = _.flow([_.add, square]);
* addSquare(1, 2);
* // => 9
*/
var flow = createFlow();
/**
* This method is like `_.flow` except that it creates a function that
* invokes the given functions from right to left.
*
* @static
* @since 3.0.0
* @memberOf _
* @category Util
* @param {...(Function|Function[])} [funcs] The functions to invoke.
* @returns {Function} Returns the new composite function.
* @see _.flow
* @example
*
* function square(n) {
* return n * n;
* }
*
* var addSquare = _.flowRight([square, _.add]);
* addSquare(1, 2);
* // => 9
*/
var flowRight = createFlow(true);
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
/**
* Creates a function that invokes `func` with the arguments of the created
* function. If `func` is a property name, the created function returns the
* property value for a given element. If `func` is an array or object, the
* created function returns `true` for elements that contain the equivalent
* source properties, otherwise it returns `false`.
*
* @static
* @since 4.0.0
* @memberOf _
* @category Util
* @param {*} [func=_.identity] The value to convert to a callback.
* @returns {Function} Returns the callback.
* @example
*
* var users = [
* { 'user': 'barney', 'age': 36, 'active': true },
* { 'user': 'fred', 'age': 40, 'active': false }
* ];
*
* // The `_.matches` iteratee shorthand.
* _.filter(users, _.iteratee({ 'user': 'barney', 'active': true }));
* // => [{ 'user': 'barney', 'age': 36, 'active': true }]
*
* // The `_.matchesProperty` iteratee shorthand.
* _.filter(users, _.iteratee(['user', 'fred']));
* // => [{ 'user': 'fred', 'age': 40 }]
*
* // The `_.property` iteratee shorthand.
* _.map(users, _.iteratee('user'));
* // => ['barney', 'fred']
*
* // Create custom iteratee shorthands.
* _.iteratee = _.wrap(_.iteratee, function(iteratee, func) {
* return !_.isRegExp(func) ? iteratee(func) : function(string) {
* return func.test(string);
* };
* });
*
* _.filter(['abc', 'def'], /ef/);
* // => ['def']
*/
function iteratee(func) {
return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG));
}
/**
* Creates a function that performs a partial deep comparison between a given
* object and `source`, returning `true` if the given object has equivalent
* property values, else `false`.
*
* **Note:** The created function is equivalent to `_.isMatch` with `source`
* partially applied.
*
* Partial comparisons will match empty array and empty object `source`
* values against any array or object value, respectively. See `_.isEqual`
* for a list of supported value comparisons.
*
* **Note:** Multiple values can be checked by combining several matchers
* using `_.overSome`
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Object} source The object of property values to match.
* @returns {Function} Returns the new spec function.
* @example
*
* var objects = [
* { 'a': 1, 'b': 2, 'c': 3 },
* { 'a': 4, 'b': 5, 'c': 6 }
* ];
*
* _.filter(objects, _.matches({ 'a': 4, 'c': 6 }));
* // => [{ 'a': 4, 'b': 5, 'c': 6 }]
*
* // Checking for several possible values
* _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })]));
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
*/
function matches(source) {
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
}
/**
* Creates a function that performs a partial deep comparison between the
* value at `path` of a given object to `srcValue`, returning `true` if the
* object value is equivalent, else `false`.
*
* **Note:** Partial comparisons will match empty array and empty object
* `srcValue` values against any array or object value, respectively. See
* `_.isEqual` for a list of supported value comparisons.
*
* **Note:** Multiple values can be checked by combining several matchers
* using `_.overSome`
*
* @static
* @memberOf _
* @since 3.2.0
* @category Util
* @param {Array|string} path The path of the property to get.
* @param {*} srcValue The value to match.
* @returns {Function} Returns the new spec function.
* @example
*
* var objects = [
* { 'a': 1, 'b': 2, 'c': 3 },
* { 'a': 4, 'b': 5, 'c': 6 }
* ];
*
* _.find(objects, _.matchesProperty('a', 4));
* // => { 'a': 4, 'b': 5, 'c': 6 }
*
* // Checking for several possible values
* _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)]));
* // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }]
*/
function matchesProperty(path, srcValue) {
return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG));
}
/**
* Creates a function that invokes the method at `path` of a given object.
* Any additional arguments are provided to the invoked method.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Util
* @param {Array|string} path The path of the method to invoke.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {Function} Returns the new invoker function.
* @example
*
* var objects = [
* { 'a': { 'b': _.constant(2) } },
* { 'a': { 'b': _.constant(1) } }
* ];
*
* _.map(objects, _.method('a.b'));
* // => [2, 1]
*
* _.map(objects, _.method(['a', 'b']));
* // => [2, 1]
*/
var method = baseRest(function(path, args) {
return function(object) {
return baseInvoke(object, path, args);
};
});
/**
* The opposite of `_.method`; this method creates a function that invokes
* the method at a given path of `object`. Any additional arguments are
* provided to the invoked method.
*
* @static
* @memberOf _
* @since 3.7.0
* @category Util
* @param {Object} object The object to query.
* @param {...*} [args] The arguments to invoke the method with.
* @returns {Function} Returns the new invoker function.
* @example
*
* var array = _.times(3, _.constant),
* object = { 'a': array, 'b': array, 'c': array };
*
* _.map(['a[2]', 'c[0]'], _.methodOf(object));
* // => [2, 0]
*
* _.map([['a', '2'], ['c', '0']], _.methodOf(object));
* // => [2, 0]
*/
var methodOf = baseRest(function(object, args) {
return function(path) {
return baseInvoke(object, path, args);
};
});
/**
* Adds all own enumerable string keyed function properties of a source
* object to the destination object. If `object` is a function, then methods
* are added to its prototype as well.
*
* **Note:** Use `_.runInContext` to create a pristine `lodash` function to
* avoid conflicts caused by modifying the original.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {Function|Object} [object=lodash] The destination object.
* @param {Object} source The object of functions to add.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.chain=true] Specify whether mixins are chainable.
* @returns {Function|Object} Returns `object`.
* @example
*
* function vowels(string) {
* return _.filter(string, function(v) {
* return /[aeiou]/i.test(v);
* });
* }
*
* _.mixin({ 'vowels': vowels });
* _.vowels('fred');
* // => ['e']
*
* _('fred').vowels().value();
* // => ['e']
*
* _.mixin({ 'vowels': vowels }, { 'chain': false });
* _('fred').vowels();
* // => ['e']
*/
function mixin(object, source, options) {
var props = keys(source),
methodNames = baseFunctions(source, props);
if (options == null &&
!(isObject(source) && (methodNames.length || !props.length))) {
options = source;
source = object;
object = this;
methodNames = baseFunctions(source, keys(source));
}
var chain = !(isObject(options) && 'chain' in options) || !!options.chain,
isFunc = isFunction(object);
arrayEach(methodNames, function(methodName) {
var func = source[methodName];
object[methodName] = func;
if (isFunc) {
object.prototype[methodName] = function() {
var chainAll = this.__chain__;
if (chain || chainAll) {
var result = object(this.__wrapped__),
actions = result.__actions__ = copyArray(this.__actions__);
actions.push({ 'func': func, 'args': arguments, 'thisArg': object });
result.__chain__ = chainAll;
return result;
}
return func.apply(object, arrayPush([this.value()], arguments));
};
}
});
return object;
}
/**
* Reverts the `_` variable to its previous value and returns a reference to
* the `lodash` function.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @returns {Function} Returns the `lodash` function.
* @example
*
* var lodash = _.noConflict();
*/
function noConflict() {
if (root._ === this) {
root._ = oldDash;
}
return this;
}
/**
* This method returns `undefined`.
*
* @static
* @memberOf _
* @since 2.3.0
* @category Util
* @example
*
* _.times(2, _.noop);
* // => [undefined, undefined]
*/
function noop() {
// No operation performed.
}
/**
* Creates a function that gets the argument at index `n`. If `n` is negative,
* the nth argument from the end is returned.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {number} [n=0] The index of the argument to return.
* @returns {Function} Returns the new pass-thru function.
* @example
*
* var func = _.nthArg(1);
* func('a', 'b', 'c', 'd');
* // => 'b'
*
* var func = _.nthArg(-2);
* func('a', 'b', 'c', 'd');
* // => 'c'
*/
function nthArg(n) {
n = toInteger(n);
return baseRest(function(args) {
return baseNth(args, n);
});
}
/**
* Creates a function that invokes `iteratees` with the arguments it receives
* and returns their results.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {...(Function|Function[])} [iteratees=[_.identity]]
* The iteratees to invoke.
* @returns {Function} Returns the new function.
* @example
*
* var func = _.over([Math.max, Math.min]);
*
* func(1, 2, 3, 4);
* // => [4, 1]
*/
var over = createOver(arrayMap);
/**
* Creates a function that checks if **all** of the `predicates` return
* truthy when invoked with the arguments it receives.
*
* Following shorthands are possible for providing predicates.
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {...(Function|Function[])} [predicates=[_.identity]]
* The predicates to check.
* @returns {Function} Returns the new function.
* @example
*
* var func = _.overEvery([Boolean, isFinite]);
*
* func('1');
* // => true
*
* func(null);
* // => false
*
* func(NaN);
* // => false
*/
var overEvery = createOver(arrayEvery);
/**
* Creates a function that checks if **any** of the `predicates` return
* truthy when invoked with the arguments it receives.
*
* Following shorthands are possible for providing predicates.
* Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate.
* Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {...(Function|Function[])} [predicates=[_.identity]]
* The predicates to check.
* @returns {Function} Returns the new function.
* @example
*
* var func = _.overSome([Boolean, isFinite]);
*
* func('1');
* // => true
*
* func(null);
* // => true
*
* func(NaN);
* // => false
*
* var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }])
* var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]])
*/
var overSome = createOver(arraySome);
/**
* Creates a function that returns the value at `path` of a given object.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {Array|string} path The path of the property to get.
* @returns {Function} Returns the new accessor function.
* @example
*
* var objects = [
* { 'a': { 'b': 2 } },
* { 'a': { 'b': 1 } }
* ];
*
* _.map(objects, _.property('a.b'));
* // => [2, 1]
*
* _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');
* // => [1, 2]
*/
function property(path) {
return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);
}
/**
* The opposite of `_.property`; this method creates a function that returns
* the value at a given path of `object`.
*
* @static
* @memberOf _
* @since 3.0.0
* @category Util
* @param {Object} object The object to query.
* @returns {Function} Returns the new accessor function.
* @example
*
* var array = [0, 1, 2],
* object = { 'a': array, 'b': array, 'c': array };
*
* _.map(['a[2]', 'c[0]'], _.propertyOf(object));
* // => [2, 0]
*
* _.map([['a', '2'], ['c', '0']], _.propertyOf(object));
* // => [2, 0]
*/
function propertyOf(object) {
return function(path) {
return object == null ? undefined : baseGet(object, path);
};
}
/**
* Creates an array of numbers (positive and/or negative) progressing from
* `start` up to, but not including, `end`. A step of `-1` is used if a negative
* `start` is specified without an `end` or `step`. If `end` is not specified,
* it's set to `start` with `start` then set to `0`.
*
* **Note:** JavaScript follows the IEEE-754 standard for resolving
* floating-point values which can produce unexpected results.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
* @param {number} [step=1] The value to increment or decrement by.
* @returns {Array} Returns the range of numbers.
* @see _.inRange, _.rangeRight
* @example
*
* _.range(4);
* // => [0, 1, 2, 3]
*
* _.range(-4);
* // => [0, -1, -2, -3]
*
* _.range(1, 5);
* // => [1, 2, 3, 4]
*
* _.range(0, 20, 5);
* // => [0, 5, 10, 15]
*
* _.range(0, -4, -1);
* // => [0, -1, -2, -3]
*
* _.range(1, 4, 0);
* // => [1, 1, 1]
*
* _.range(0);
* // => []
*/
var range = createRange();
/**
* This method is like `_.range` except that it populates values in
* descending order.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {number} [start=0] The start of the range.
* @param {number} end The end of the range.
* @param {number} [step=1] The value to increment or decrement by.
* @returns {Array} Returns the range of numbers.
* @see _.inRange, _.range
* @example
*
* _.rangeRight(4);
* // => [3, 2, 1, 0]
*
* _.rangeRight(-4);
* // => [-3, -2, -1, 0]
*
* _.rangeRight(1, 5);
* // => [4, 3, 2, 1]
*
* _.rangeRight(0, 20, 5);
* // => [15, 10, 5, 0]
*
* _.rangeRight(0, -4, -1);
* // => [-3, -2, -1, 0]
*
* _.rangeRight(1, 4, 0);
* // => [1, 1, 1]
*
* _.rangeRight(0);
* // => []
*/
var rangeRight = createRange(true);
/**
* This method returns a new empty array.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {Array} Returns the new empty array.
* @example
*
* var arrays = _.times(2, _.stubArray);
*
* console.log(arrays);
* // => [[], []]
*
* console.log(arrays[0] === arrays[1]);
* // => false
*/
function stubArray() {
return [];
}
/**
* This method returns `false`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `false`.
* @example
*
* _.times(2, _.stubFalse);
* // => [false, false]
*/
function stubFalse() {
return false;
}
/**
* This method returns a new empty object.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {Object} Returns the new empty object.
* @example
*
* var objects = _.times(2, _.stubObject);
*
* console.log(objects);
* // => [{}, {}]
*
* console.log(objects[0] === objects[1]);
* // => false
*/
function stubObject() {
return {};
}
/**
* This method returns an empty string.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {string} Returns the empty string.
* @example
*
* _.times(2, _.stubString);
* // => ['', '']
*/
function stubString() {
return '';
}
/**
* This method returns `true`.
*
* @static
* @memberOf _
* @since 4.13.0
* @category Util
* @returns {boolean} Returns `true`.
* @example
*
* _.times(2, _.stubTrue);
* // => [true, true]
*/
function stubTrue() {
return true;
}
/**
* Invokes the iteratee `n` times, returning an array of the results of
* each invocation. The iteratee is invoked with one argument; (index).
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {number} n The number of times to invoke `iteratee`.
* @param {Function} [iteratee=_.identity] The function invoked per iteration.
* @returns {Array} Returns the array of results.
* @example
*
* _.times(3, String);
* // => ['0', '1', '2']
*
* _.times(4, _.constant(0));
* // => [0, 0, 0, 0]
*/
function times(n, iteratee) {
n = toInteger(n);
if (n < 1 || n > MAX_SAFE_INTEGER) {
return [];
}
var index = MAX_ARRAY_LENGTH,
length = nativeMin(n, MAX_ARRAY_LENGTH);
iteratee = getIteratee(iteratee);
n -= MAX_ARRAY_LENGTH;
var result = baseTimes(length, iteratee);
while (++index < n) {
iteratee(index);
}
return result;
}
/**
* Converts `value` to a property path array.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Util
* @param {*} value The value to convert.
* @returns {Array} Returns the new property path array.
* @example
*
* _.toPath('a.b.c');
* // => ['a', 'b', 'c']
*
* _.toPath('a[0].b.c');
* // => ['a', '0', 'b', 'c']
*/
function toPath(value) {
if (isArray(value)) {
return arrayMap(value, toKey);
}
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
}
/**
* Generates a unique ID. If `prefix` is given, the ID is appended to it.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {string} [prefix=''] The value to prefix the ID with.
* @returns {string} Returns the unique ID.
* @example
*
* _.uniqueId('contact_');
* // => 'contact_104'
*
* _.uniqueId();
* // => '105'
*/
function uniqueId(prefix) {
var id = ++idCounter;
return toString(prefix) + id;
}
/*------------------------------------------------------------------------*/
/**
* Adds two numbers.
*
* @static
* @memberOf _
* @since 3.4.0
* @category Math
* @param {number} augend The first number in an addition.
* @param {number} addend The second number in an addition.
* @returns {number} Returns the total.
* @example
*
* _.add(6, 4);
* // => 10
*/
var add = createMathOperation(function(augend, addend) {
return augend + addend;
}, 0);
/**
* Computes `number` rounded up to `precision`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Math
* @param {number} number The number to round up.
* @param {number} [precision=0] The precision to round up to.
* @returns {number} Returns the rounded up number.
* @example
*
* _.ceil(4.006);
* // => 5
*
* _.ceil(6.004, 2);
* // => 6.01
*
* _.ceil(6040, -2);
* // => 6100
*/
var ceil = createRound('ceil');
/**
* Divide two numbers.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Math
* @param {number} dividend The first number in a division.
* @param {number} divisor The second number in a division.
* @returns {number} Returns the quotient.
* @example
*
* _.divide(6, 4);
* // => 1.5
*/
var divide = createMathOperation(function(dividend, divisor) {
return dividend / divisor;
}, 1);
/**
* Computes `number` rounded down to `precision`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Math
* @param {number} number The number to round down.
* @param {number} [precision=0] The precision to round down to.
* @returns {number} Returns the rounded down number.
* @example
*
* _.floor(4.006);
* // => 4
*
* _.floor(0.046, 2);
* // => 0.04
*
* _.floor(4060, -2);
* // => 4000
*/
var floor = createRound('floor');
/**
* Computes the maximum value of `array`. If `array` is empty or falsey,
* `undefined` is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Math
* @param {Array} array The array to iterate over.
* @returns {*} Returns the maximum value.
* @example
*
* _.max([4, 2, 8, 6]);
* // => 8
*
* _.max([]);
* // => undefined
*/
function max(array) {
return (array && array.length)
? baseExtremum(array, identity, baseGt)
: undefined;
}
/**
* This method is like `_.max` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* the value is ranked. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {*} Returns the maximum value.
* @example
*
* var objects = [{ 'n': 1 }, { 'n': 2 }];
*
* _.maxBy(objects, function(o) { return o.n; });
* // => { 'n': 2 }
*
* // The `_.property` iteratee shorthand.
* _.maxBy(objects, 'n');
* // => { 'n': 2 }
*/
function maxBy(array, iteratee) {
return (array && array.length)
? baseExtremum(array, getIteratee(iteratee, 2), baseGt)
: undefined;
}
/**
* Computes the mean of the values in `array`.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @returns {number} Returns the mean.
* @example
*
* _.mean([4, 2, 8, 6]);
* // => 5
*/
function mean(array) {
return baseMean(array, identity);
}
/**
* This method is like `_.mean` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the value to be averaged.
* The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.7.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the mean.
* @example
*
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* _.meanBy(objects, function(o) { return o.n; });
* // => 5
*
* // The `_.property` iteratee shorthand.
* _.meanBy(objects, 'n');
* // => 5
*/
function meanBy(array, iteratee) {
return baseMean(array, getIteratee(iteratee, 2));
}
/**
* Computes the minimum value of `array`. If `array` is empty or falsey,
* `undefined` is returned.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Math
* @param {Array} array The array to iterate over.
* @returns {*} Returns the minimum value.
* @example
*
* _.min([4, 2, 8, 6]);
* // => 2
*
* _.min([]);
* // => undefined
*/
function min(array) {
return (array && array.length)
? baseExtremum(array, identity, baseLt)
: undefined;
}
/**
* This method is like `_.min` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the criterion by which
* the value is ranked. The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {*} Returns the minimum value.
* @example
*
* var objects = [{ 'n': 1 }, { 'n': 2 }];
*
* _.minBy(objects, function(o) { return o.n; });
* // => { 'n': 1 }
*
* // The `_.property` iteratee shorthand.
* _.minBy(objects, 'n');
* // => { 'n': 1 }
*/
function minBy(array, iteratee) {
return (array && array.length)
? baseExtremum(array, getIteratee(iteratee, 2), baseLt)
: undefined;
}
/**
* Multiply two numbers.
*
* @static
* @memberOf _
* @since 4.7.0
* @category Math
* @param {number} multiplier The first number in a multiplication.
* @param {number} multiplicand The second number in a multiplication.
* @returns {number} Returns the product.
* @example
*
* _.multiply(6, 4);
* // => 24
*/
var multiply = createMathOperation(function(multiplier, multiplicand) {
return multiplier * multiplicand;
}, 1);
/**
* Computes `number` rounded to `precision`.
*
* @static
* @memberOf _
* @since 3.10.0
* @category Math
* @param {number} number The number to round.
* @param {number} [precision=0] The precision to round to.
* @returns {number} Returns the rounded number.
* @example
*
* _.round(4.006);
* // => 4
*
* _.round(4.006, 2);
* // => 4.01
*
* _.round(4060, -2);
* // => 4100
*/
var round = createRound('round');
/**
* Subtract two numbers.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {number} minuend The first number in a subtraction.
* @param {number} subtrahend The second number in a subtraction.
* @returns {number} Returns the difference.
* @example
*
* _.subtract(6, 4);
* // => 2
*/
var subtract = createMathOperation(function(minuend, subtrahend) {
return minuend - subtrahend;
}, 0);
/**
* Computes the sum of the values in `array`.
*
* @static
* @memberOf _
* @since 3.4.0
* @category Math
* @param {Array} array The array to iterate over.
* @returns {number} Returns the sum.
* @example
*
* _.sum([4, 2, 8, 6]);
* // => 20
*/
function sum(array) {
return (array && array.length)
? baseSum(array, identity)
: 0;
}
/**
* This method is like `_.sum` except that it accepts `iteratee` which is
* invoked for each element in `array` to generate the value to be summed.
* The iteratee is invoked with one argument: (value).
*
* @static
* @memberOf _
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @param {Function} [iteratee=_.identity] The iteratee invoked per element.
* @returns {number} Returns the sum.
* @example
*
* var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }];
*
* _.sumBy(objects, function(o) { return o.n; });
* // => 20
*
* // The `_.property` iteratee shorthand.
* _.sumBy(objects, 'n');
* // => 20
*/
function sumBy(array, iteratee) {
return (array && array.length)
? baseSum(array, getIteratee(iteratee, 2))
: 0;
}
/*------------------------------------------------------------------------*/
// Add methods that return wrapped values in chain sequences.
lodash.after = after;
lodash.ary = ary;
lodash.assign = assign;
lodash.assignIn = assignIn;
lodash.assignInWith = assignInWith;
lodash.assignWith = assignWith;
lodash.at = at;
lodash.before = before;
lodash.bind = bind;
lodash.bindAll = bindAll;
lodash.bindKey = bindKey;
lodash.castArray = castArray;
lodash.chain = chain;
lodash.chunk = chunk;
lodash.compact = compact;
lodash.concat = concat;
lodash.cond = cond;
lodash.conforms = conforms;
lodash.constant = constant;
lodash.countBy = countBy;
lodash.create = create;
lodash.curry = curry;
lodash.curryRight = curryRight;
lodash.debounce = debounce;
lodash.defaults = defaults;
lodash.defaultsDeep = defaultsDeep;
lodash.defer = defer;
lodash.delay = delay;
lodash.difference = difference;
lodash.differenceBy = differenceBy;
lodash.differenceWith = differenceWith;
lodash.drop = drop;
lodash.dropRight = dropRight;
lodash.dropRightWhile = dropRightWhile;
lodash.dropWhile = dropWhile;
lodash.fill = fill;
lodash.filter = filter;
lodash.flatMap = flatMap;
lodash.flatMapDeep = flatMapDeep;
lodash.flatMapDepth = flatMapDepth;
lodash.flatten = flatten;
lodash.flattenDeep = flattenDeep;
lodash.flattenDepth = flattenDepth;
lodash.flip = flip;
lodash.flow = flow;
lodash.flowRight = flowRight;
lodash.fromPairs = fromPairs;
lodash.functions = functions;
lodash.functionsIn = functionsIn;
lodash.groupBy = groupBy;
lodash.initial = initial;
lodash.intersection = intersection;
lodash.intersectionBy = intersectionBy;
lodash.intersectionWith = intersectionWith;
lodash.invert = invert;
lodash.invertBy = invertBy;
lodash.invokeMap = invokeMap;
lodash.iteratee = iteratee;
lodash.keyBy = keyBy;
lodash.keys = keys;
lodash.keysIn = keysIn;
lodash.map = map;
lodash.mapKeys = mapKeys;
lodash.mapValues = mapValues;
lodash.matches = matches;
lodash.matchesProperty = matchesProperty;
lodash.memoize = memoize;
lodash.merge = merge;
lodash.mergeWith = mergeWith;
lodash.method = method;
lodash.methodOf = methodOf;
lodash.mixin = mixin;
lodash.negate = negate;
lodash.nthArg = nthArg;
lodash.omit = omit;
lodash.omitBy = omitBy;
lodash.once = once;
lodash.orderBy = orderBy;
lodash.over = over;
lodash.overArgs = overArgs;
lodash.overEvery = overEvery;
lodash.overSome = overSome;
lodash.partial = partial;
lodash.partialRight = partialRight;
lodash.partition = partition;
lodash.pick = pick;
lodash.pickBy = pickBy;
lodash.property = property;
lodash.propertyOf = propertyOf;
lodash.pull = pull;
lodash.pullAll = pullAll;
lodash.pullAllBy = pullAllBy;
lodash.pullAllWith = pullAllWith;
lodash.pullAt = pullAt;
lodash.range = range;
lodash.rangeRight = rangeRight;
lodash.rearg = rearg;
lodash.reject = reject;
lodash.remove = remove;
lodash.rest = rest;
lodash.reverse = reverse;
lodash.sampleSize = sampleSize;
lodash.set = set;
lodash.setWith = setWith;
lodash.shuffle = shuffle;
lodash.slice = slice;
lodash.sortBy = sortBy;
lodash.sortedUniq = sortedUniq;
lodash.sortedUniqBy = sortedUniqBy;
lodash.split = split;
lodash.spread = spread;
lodash.tail = tail;
lodash.take = take;
lodash.takeRight = takeRight;
lodash.takeRightWhile = takeRightWhile;
lodash.takeWhile = takeWhile;
lodash.tap = tap;
lodash.throttle = throttle;
lodash.thru = thru;
lodash.toArray = toArray;
lodash.toPairs = toPairs;
lodash.toPairsIn = toPairsIn;
lodash.toPath = toPath;
lodash.toPlainObject = toPlainObject;
lodash.transform = transform;
lodash.unary = unary;
lodash.union = union;
lodash.unionBy = unionBy;
lodash.unionWith = unionWith;
lodash.uniq = uniq;
lodash.uniqBy = uniqBy;
lodash.uniqWith = uniqWith;
lodash.unset = unset;
lodash.unzip = unzip;
lodash.unzipWith = unzipWith;
lodash.update = update;
lodash.updateWith = updateWith;
lodash.values = values;
lodash.valuesIn = valuesIn;
lodash.without = without;
lodash.words = words;
lodash.wrap = wrap;
lodash.xor = xor;
lodash.xorBy = xorBy;
lodash.xorWith = xorWith;
lodash.zip = zip;
lodash.zipObject = zipObject;
lodash.zipObjectDeep = zipObjectDeep;
lodash.zipWith = zipWith;
// Add aliases.
lodash.entries = toPairs;
lodash.entriesIn = toPairsIn;
lodash.extend = assignIn;
lodash.extendWith = assignInWith;
// Add methods to `lodash.prototype`.
mixin(lodash, lodash);
/*------------------------------------------------------------------------*/
// Add methods that return unwrapped values in chain sequences.
lodash.add = add;
lodash.attempt = attempt;
lodash.camelCase = camelCase;
lodash.capitalize = capitalize;
lodash.ceil = ceil;
lodash.clamp = clamp;
lodash.clone = clone;
lodash.cloneDeep = cloneDeep;
lodash.cloneDeepWith = cloneDeepWith;
lodash.cloneWith = cloneWith;
lodash.conformsTo = conformsTo;
lodash.deburr = deburr;
lodash.defaultTo = defaultTo;
lodash.divide = divide;
lodash.endsWith = endsWith;
lodash.eq = eq;
lodash.escape = escape;
lodash.escapeRegExp = escapeRegExp;
lodash.every = every;
lodash.find = find;
lodash.findIndex = findIndex;
lodash.findKey = findKey;
lodash.findLast = findLast;
lodash.findLastIndex = findLastIndex;
lodash.findLastKey = findLastKey;
lodash.floor = floor;
lodash.forEach = forEach;
lodash.forEachRight = forEachRight;
lodash.forIn = forIn;
lodash.forInRight = forInRight;
lodash.forOwn = forOwn;
lodash.forOwnRight = forOwnRight;
lodash.get = get;
lodash.gt = gt;
lodash.gte = gte;
lodash.has = has;
lodash.hasIn = hasIn;
lodash.head = head;
lodash.identity = identity;
lodash.includes = includes;
lodash.indexOf = indexOf;
lodash.inRange = inRange;
lodash.invoke = invoke;
lodash.isArguments = isArguments;
lodash.isArray = isArray;
lodash.isArrayBuffer = isArrayBuffer;
lodash.isArrayLike = isArrayLike;
lodash.isArrayLikeObject = isArrayLikeObject;
lodash.isBoolean = isBoolean;
lodash.isBuffer = isBuffer;
lodash.isDate = isDate;
lodash.isElement = isElement;
lodash.isEmpty = isEmpty;
lodash.isEqual = isEqual;
lodash.isEqualWith = isEqualWith;
lodash.isError = isError;
lodash.isFinite = isFinite;
lodash.isFunction = isFunction;
lodash.isInteger = isInteger;
lodash.isLength = isLength;
lodash.isMap = isMap;
lodash.isMatch = isMatch;
lodash.isMatchWith = isMatchWith;
lodash.isNaN = isNaN;
lodash.isNative = isNative;
lodash.isNil = isNil;
lodash.isNull = isNull;
lodash.isNumber = isNumber;
lodash.isObject = isObject;
lodash.isObjectLike = isObjectLike;
lodash.isPlainObject = isPlainObject;
lodash.isRegExp = isRegExp;
lodash.isSafeInteger = isSafeInteger;
lodash.isSet = isSet;
lodash.isString = isString;
lodash.isSymbol = isSymbol;
lodash.isTypedArray = isTypedArray;
lodash.isUndefined = isUndefined;
lodash.isWeakMap = isWeakMap;
lodash.isWeakSet = isWeakSet;
lodash.join = join;
lodash.kebabCase = kebabCase;
lodash.last = last;
lodash.lastIndexOf = lastIndexOf;
lodash.lowerCase = lowerCase;
lodash.lowerFirst = lowerFirst;
lodash.lt = lt;
lodash.lte = lte;
lodash.max = max;
lodash.maxBy = maxBy;
lodash.mean = mean;
lodash.meanBy = meanBy;
lodash.min = min;
lodash.minBy = minBy;
lodash.stubArray = stubArray;
lodash.stubFalse = stubFalse;
lodash.stubObject = stubObject;
lodash.stubString = stubString;
lodash.stubTrue = stubTrue;
lodash.multiply = multiply;
lodash.nth = nth;
lodash.noConflict = noConflict;
lodash.noop = noop;
lodash.now = now;
lodash.pad = pad;
lodash.padEnd = padEnd;
lodash.padStart = padStart;
lodash.parseInt = parseInt;
lodash.random = random;
lodash.reduce = reduce;
lodash.reduceRight = reduceRight;
lodash.repeat = repeat;
lodash.replace = replace;
lodash.result = result;
lodash.round = round;
lodash.runInContext = runInContext;
lodash.sample = sample;
lodash.size = size;
lodash.snakeCase = snakeCase;
lodash.some = some;
lodash.sortedIndex = sortedIndex;
lodash.sortedIndexBy = sortedIndexBy;
lodash.sortedIndexOf = sortedIndexOf;
lodash.sortedLastIndex = sortedLastIndex;
lodash.sortedLastIndexBy = sortedLastIndexBy;
lodash.sortedLastIndexOf = sortedLastIndexOf;
lodash.startCase = startCase;
lodash.startsWith = startsWith;
lodash.subtract = subtract;
lodash.sum = sum;
lodash.sumBy = sumBy;
lodash.template = template;
lodash.times = times;
lodash.toFinite = toFinite;
lodash.toInteger = toInteger;
lodash.toLength = toLength;
lodash.toLower = toLower;
lodash.toNumber = toNumber;
lodash.toSafeInteger = toSafeInteger;
lodash.toString = toString;
lodash.toUpper = toUpper;
lodash.trim = trim;
lodash.trimEnd = trimEnd;
lodash.trimStart = trimStart;
lodash.truncate = truncate;
lodash.unescape = unescape;
lodash.uniqueId = uniqueId;
lodash.upperCase = upperCase;
lodash.upperFirst = upperFirst;
// Add aliases.
lodash.each = forEach;
lodash.eachRight = forEachRight;
lodash.first = head;
mixin(lodash, (function() {
var source = {};
baseForOwn(lodash, function(func, methodName) {
if (!hasOwnProperty.call(lodash.prototype, methodName)) {
source[methodName] = func;
}
});
return source;
}()), { 'chain': false });
/*------------------------------------------------------------------------*/
/**
* The semantic version number.
*
* @static
* @memberOf _
* @type {string}
*/
lodash.VERSION = VERSION;
// Assign default placeholders.
arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) {
lodash[methodName].placeholder = lodash;
});
// Add `LazyWrapper` methods for `_.drop` and `_.take` variants.
arrayEach(['drop', 'take'], function(methodName, index) {
LazyWrapper.prototype[methodName] = function(n) {
n = n === undefined ? 1 : nativeMax(toInteger(n), 0);
var result = (this.__filtered__ && !index)
? new LazyWrapper(this)
: this.clone();
if (result.__filtered__) {
result.__takeCount__ = nativeMin(n, result.__takeCount__);
} else {
result.__views__.push({
'size': nativeMin(n, MAX_ARRAY_LENGTH),
'type': methodName + (result.__dir__ < 0 ? 'Right' : '')
});
}
return result;
};
LazyWrapper.prototype[methodName + 'Right'] = function(n) {
return this.reverse()[methodName](n).reverse();
};
});
// Add `LazyWrapper` methods that accept an `iteratee` value.
arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) {
var type = index + 1,
isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
LazyWrapper.prototype[methodName] = function(iteratee) {
var result = this.clone();
result.__iteratees__.push({
'iteratee': getIteratee(iteratee, 3),
'type': type
});
result.__filtered__ = result.__filtered__ || isFilter;
return result;
};
});
// Add `LazyWrapper` methods for `_.head` and `_.last`.
arrayEach(['head', 'last'], function(methodName, index) {
var takeName = 'take' + (index ? 'Right' : '');
LazyWrapper.prototype[methodName] = function() {
return this[takeName](1).value()[0];
};
});
// Add `LazyWrapper` methods for `_.initial` and `_.tail`.
arrayEach(['initial', 'tail'], function(methodName, index) {
var dropName = 'drop' + (index ? '' : 'Right');
LazyWrapper.prototype[methodName] = function() {
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
};
});
LazyWrapper.prototype.compact = function() {
return this.filter(identity);
};
LazyWrapper.prototype.find = function(predicate) {
return this.filter(predicate).head();
};
LazyWrapper.prototype.findLast = function(predicate) {
return this.reverse().find(predicate);
};
LazyWrapper.prototype.invokeMap = baseRest(function(path, args) {
if (typeof path == 'function') {
return new LazyWrapper(this);
}
return this.map(function(value) {
return baseInvoke(value, path, args);
});
});
LazyWrapper.prototype.reject = function(predicate) {
return this.filter(negate(getIteratee(predicate)));
};
LazyWrapper.prototype.slice = function(start, end) {
start = toInteger(start);
var result = this;
if (result.__filtered__ && (start > 0 || end < 0)) {
return new LazyWrapper(result);
}
if (start < 0) {
result = result.takeRight(-start);
} else if (start) {
result = result.drop(start);
}
if (end !== undefined) {
end = toInteger(end);
result = end < 0 ? result.dropRight(-end) : result.take(end - start);
}
return result;
};
LazyWrapper.prototype.takeRightWhile = function(predicate) {
return this.reverse().takeWhile(predicate).reverse();
};
LazyWrapper.prototype.toArray = function() {
return this.take(MAX_ARRAY_LENGTH);
};
// Add `LazyWrapper` methods to `lodash.prototype`.
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName),
isTaker = /^(?:head|last)$/.test(methodName),
lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName],
retUnwrapped = isTaker || /^find/.test(methodName);
if (!lodashFunc) {
return;
}
lodash.prototype[methodName] = function() {
var value = this.__wrapped__,
args = isTaker ? [1] : arguments,
isLazy = value instanceof LazyWrapper,
iteratee = args[0],
useLazy = isLazy || isArray(value);
var interceptor = function(value) {
var result = lodashFunc.apply(lodash, arrayPush([value], args));
return (isTaker && chainAll) ? result[0] : result;
};
if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) {
// Avoid lazy use if the iteratee has a "length" value other than `1`.
isLazy = useLazy = false;
}
var chainAll = this.__chain__,
isHybrid = !!this.__actions__.length,
isUnwrapped = retUnwrapped && !chainAll,
onlyLazy = isLazy && !isHybrid;
if (!retUnwrapped && useLazy) {
value = onlyLazy ? value : new LazyWrapper(this);
var result = func.apply(value, args);
result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined });
return new LodashWrapper(result, chainAll);
}
if (isUnwrapped && onlyLazy) {
return func.apply(this, args);
}
result = this.thru(interceptor);
return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result;
};
});
// Add `Array` methods to `lodash.prototype`.
arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) {
var func = arrayProto[methodName],
chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru',
retUnwrapped = /^(?:pop|shift)$/.test(methodName);
lodash.prototype[methodName] = function() {
var args = arguments;
if (retUnwrapped && !this.__chain__) {
var value = this.value();
return func.apply(isArray(value) ? value : [], args);
}
return this[chainName](function(value) {
return func.apply(isArray(value) ? value : [], args);
});
};
});
// Map minified method names to their real names.
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
var lodashFunc = lodash[methodName];
if (lodashFunc) {
var key = lodashFunc.name + '';
if (!hasOwnProperty.call(realNames, key)) {
realNames[key] = [];
}
realNames[key].push({ 'name': methodName, 'func': lodashFunc });
}
});
realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{
'name': 'wrapper',
'func': undefined
}];
// Add methods to `LazyWrapper`.
LazyWrapper.prototype.clone = lazyClone;
LazyWrapper.prototype.reverse = lazyReverse;
LazyWrapper.prototype.value = lazyValue;
// Add chain sequence methods to the `lodash` wrapper.
lodash.prototype.at = wrapperAt;
lodash.prototype.chain = wrapperChain;
lodash.prototype.commit = wrapperCommit;
lodash.prototype.next = wrapperNext;
lodash.prototype.plant = wrapperPlant;
lodash.prototype.reverse = wrapperReverse;
lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
// Add lazy aliases.
lodash.prototype.first = lodash.prototype.head;
if (symIterator) {
lodash.prototype[symIterator] = wrapperToIterator;
}
return lodash;
});
/*--------------------------------------------------------------------------*/
// Export lodash.
var _ = runInContext();
// Some AMD build optimizers, like r.js, check for condition patterns like:
if (true) {
// Expose Lodash on the global object to prevent errors when Lodash is
// loaded by a script tag in the presence of an AMD loader.
// See http://requirejs.org/docs/errors.html#mismatch for more details.
// Use `_.noConflict` to remove Lodash from the global object.
root._ = _;
// Define as an anonymous module so, through path mapping, it can be
// referenced as the "underscore" module.
!(__WEBPACK_AMD_DEFINE_RESULT__ = (function() {
return _;
}).call(exports, __webpack_require__, exports, module),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
}
// Check for `exports` after `define` in case a build optimizer adds it.
else {}
}.call(this));
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj"), __webpack_require__(/*! ./../webpack/buildin/module.js */ "YuTi")(module)))
/***/ }),
/***/ "MIOZ":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
\**********************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
module.exports = _iterableToArrayLimit;
/***/ }),
/***/ "MNnm":
/*!**************************************************!*\
!*** ./node_modules/rc-util/es/Dom/canUseDom.js ***!
\**************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return canUseDom; });
function canUseDom() {
return !!(typeof window !== 'undefined' && window.document && window.document.createElement);
}
/***/ }),
/***/ "Mgx3":
/*!******************************!*\
!*** ./src/service/paths.ts ***!
\******************************/
/*! exports provided: getCourseList, getIntelligentRecommendationsList, getCourseMenus, editCourse, submitCourse, getEditCourseData, getPathsDetail, getRightData, getCoureses, getStageData, updateTeamTitle, deleteMember, deleteCourses, memberMoveUp, memberMoveDowm, collect, cancelCollect, deletePath, applyPublish, cancelPublish, applyPublic, cancelPublic, getSendCourseList, sendToCourse, addSubjectMembers, addCourses, appointment, immediatelyRegister, getStatisticsInfo, getShixunUseData, getLearnData, getLearnStatistics, getShixunAnalyzeData, getStudentData, appendToStage, updateStage, satgeAddShixunToStage, selectShixunToStage, addVideoToStage, addCoursewareToStage, addBlankItems, addStage, addShixunToStage, upPosition, downPosition, deleteStage, getDiscusses, getCourseDiscusses, createDiscusses, stagesMovePosition, deleteStages, excellentDiscuss, postDiscuss */
/*! exports used: editCourse, getCoureses, getCourseList, getCourseMenus, getDiscusses, getEditCourseData, getPathsDetail, getRightData, getStageData, submitCourse */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getCourseList; });
/* unused harmony export getIntelligentRecommendationsList */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getCourseMenus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return editCourse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return submitCourse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getEditCourseData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getPathsDetail; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getRightData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getCoureses; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getStageData; });
/* unused harmony export updateTeamTitle */
/* unused harmony export deleteMember */
/* unused harmony export deleteCourses */
/* unused harmony export memberMoveUp */
/* unused harmony export memberMoveDowm */
/* unused harmony export collect */
/* unused harmony export cancelCollect */
/* unused harmony export deletePath */
/* unused harmony export applyPublish */
/* unused harmony export cancelPublish */
/* unused harmony export applyPublic */
/* unused harmony export cancelPublic */
/* unused harmony export getSendCourseList */
/* unused harmony export sendToCourse */
/* unused harmony export addSubjectMembers */
/* unused harmony export addCourses */
/* unused harmony export appointment */
/* unused harmony export immediatelyRegister */
/* unused harmony export getStatisticsInfo */
/* unused harmony export getShixunUseData */
/* unused harmony export getLearnData */
/* unused harmony export getLearnStatistics */
/* unused harmony export getShixunAnalyzeData */
/* unused harmony export getStudentData */
/* unused harmony export appendToStage */
/* unused harmony export updateStage */
/* unused harmony export satgeAddShixunToStage */
/* unused harmony export selectShixunToStage */
/* unused harmony export addVideoToStage */
/* unused harmony export addCoursewareToStage */
/* unused harmony export addBlankItems */
/* unused harmony export addStage */
/* unused harmony export addShixunToStage */
/* unused harmony export upPosition */
/* unused harmony export downPosition */
/* unused harmony export deleteStage */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getDiscusses; });
/* unused harmony export getCourseDiscusses */
/* unused harmony export createDiscusses */
/* unused harmony export stagesMovePosition */
/* unused harmony export deleteStages */
/* unused harmony export excellentDiscuss */
/* unused harmony export postDiscuss */
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
//实训首页列表
function getCourseList(_x) {
return _getCourseList.apply(this, arguments);
}
//实训首页智能推荐列表
function _getCourseList() {
_getCourseList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/paths.json', {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getCourseList.apply(this, arguments);
}
function getIntelligentRecommendationsList(_x2) {
return _getIntelligentRecommendationsList.apply(this, arguments);
}
// 获取课堂首页菜单
function _getIntelligentRecommendationsList() {
_getIntelligentRecommendationsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/intelligent_recommendations/subject_lists.json', {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getIntelligentRecommendationsList.apply(this, arguments);
}
function getCourseMenus(_x3) {
return _getCourseMenus.apply(this, arguments);
}
function _getCourseMenus() {
_getCourseMenus = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/disciplines.json', {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getCourseMenus.apply(this, arguments);
}
function editCourse(_x4) {
return _editCourse.apply(this, arguments);
}
function _editCourse() {
_editCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, ".json"), {
method: 'PUT',
body: params
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _editCourse.apply(this, arguments);
}
function submitCourse(_x5) {
return _submitCourse.apply(this, arguments);
}
function _submitCourse() {
_submitCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _submitCourse.apply(this, arguments);
}
function getEditCourseData(_x6) {
return _getEditCourseData.apply(this, arguments);
}
function _getEditCourseData() {
_getEditCourseData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/edit.json"), {
method: 'get'
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _getEditCourseData.apply(this, arguments);
}
function getPathsDetail(_x7) {
return _getPathsDetail.apply(this, arguments);
}
function _getPathsDetail() {
_getPathsDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, ".json"), {
method: 'get',
params: {
identifier: params.id
}
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getPathsDetail.apply(this, arguments);
}
function getRightData(_x8) {
return _getRightData.apply(this, arguments);
}
function _getRightData() {
_getRightData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/right_banner.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _getRightData.apply(this, arguments);
}
function getCoureses(_x9) {
return _getCoureses.apply(this, arguments);
}
function _getCoureses() {
_getCoureses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/spoc_courses.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _getCoureses.apply(this, arguments);
}
function getStageData(_x10) {
return _getStageData.apply(this, arguments);
}
function _getStageData() {
_getStageData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _getStageData.apply(this, arguments);
}
function updateTeamTitle(_x11) {
return _updateTeamTitle.apply(this, arguments);
}
function _updateTeamTitle() {
_updateTeamTitle = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/update_team_title.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _updateTeamTitle.apply(this, arguments);
}
function deleteMember(_x12) {
return _deleteMember.apply(this, arguments);
}
function _deleteMember() {
_deleteMember = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/delete_member.json"), {
method: 'Delete',
body: params
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _deleteMember.apply(this, arguments);
}
function deleteCourses(_x13) {
return _deleteCourses.apply(this, arguments);
}
function _deleteCourses() {
_deleteCourses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/spoc_courses/").concat(params === null || params === void 0 ? void 0 : params.courseid, ".json"), {
method: 'Delete'
// body: params
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _deleteCourses.apply(this, arguments);
}
function memberMoveUp(_x14) {
return _memberMoveUp.apply(this, arguments);
}
function _memberMoveUp() {
_memberMoveUp = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/up_member_position.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _memberMoveUp.apply(this, arguments);
}
function memberMoveDowm(_x15) {
return _memberMoveDowm.apply(this, arguments);
}
function _memberMoveDowm() {
_memberMoveDowm = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/down_member_position.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _memberMoveDowm.apply(this, arguments);
}
function collect(_x16) {
return _collect.apply(this, arguments);
}
function _collect() {
_collect = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/collections.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _collect.apply(this, arguments);
}
function cancelCollect(_x17) {
return _cancelCollect.apply(this, arguments);
}
function _cancelCollect() {
_cancelCollect = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/collections/cancel.json", {
method: 'Delete',
body: params
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _cancelCollect.apply(this, arguments);
}
function deletePath(_x18) {
return _deletePath.apply(this, arguments);
}
function _deletePath() {
_deletePath = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, ".json"), {
method: 'Delete',
body: params
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _deletePath.apply(this, arguments);
}
function applyPublish(_x19) {
return _applyPublish.apply(this, arguments);
}
function _applyPublish() {
_applyPublish = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/publish.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _applyPublish.apply(this, arguments);
}
function cancelPublish(_x20) {
return _cancelPublish.apply(this, arguments);
}
function _cancelPublish() {
_cancelPublish = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/cancel_publish.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _cancelPublish.apply(this, arguments);
}
function applyPublic(_x21) {
return _applyPublic.apply(this, arguments);
}
function _applyPublic() {
_applyPublic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/apply_public.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _applyPublic.apply(this, arguments);
}
function cancelPublic(_x22) {
return _cancelPublic.apply(this, arguments);
}
function _cancelPublic() {
_cancelPublic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/cancel_public.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _cancelPublic.apply(this, arguments);
}
function getSendCourseList(_x23) {
return _getSendCourseList.apply(this, arguments);
}
function _getSendCourseList() {
_getSendCourseList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/choose_course.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _getSendCourseList.apply(this, arguments);
}
function sendToCourse(_x24) {
return _sendToCourse.apply(this, arguments);
}
function _sendToCourse() {
_sendToCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/send_to_course.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _sendToCourse.apply(this, arguments);
}
function addSubjectMembers(_x25) {
return _addSubjectMembers.apply(this, arguments);
}
function _addSubjectMembers() {
_addSubjectMembers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/add_subject_members.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _addSubjectMembers.apply(this, arguments);
}
function addCourses(_x26) {
return _addCourses.apply(this, arguments);
}
function _addCourses() {
_addCourses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/spoc_courses.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _addCourses.apply(this, arguments);
}
function appointment(_x27) {
return _appointment.apply(this, arguments);
}
function _appointment() {
_appointment = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/appointment.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _appointment.apply(this, arguments);
}
function immediatelyRegister(_x28) {
return _immediatelyRegister.apply(this, arguments);
}
function _immediatelyRegister() {
_immediatelyRegister = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
return _context28.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/join_excellent_course.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context28.stop();
}
}, _callee28);
}));
return _immediatelyRegister.apply(this, arguments);
}
function getStatisticsInfo(_x29) {
return _getStatisticsInfo.apply(this, arguments);
}
function _getStatisticsInfo() {
_getStatisticsInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
return _context29.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/statistics_info.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context29.stop();
}
}, _callee29);
}));
return _getStatisticsInfo.apply(this, arguments);
}
function getShixunUseData(_x30) {
return _getShixunUseData.apply(this, arguments);
}
function _getShixunUseData() {
_getShixunUseData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
return _context30.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/shixun_analyze.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context30.stop();
}
}, _callee30);
}));
return _getShixunUseData.apply(this, arguments);
}
function getLearnData(_x31) {
return _getLearnData.apply(this, arguments);
}
function _getLearnData() {
_getLearnData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(params) {
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
return _context31.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/learning_analyze.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context31.stop();
}
}, _callee31);
}));
return _getLearnData.apply(this, arguments);
}
function getLearnStatistics(_x32) {
return _getLearnStatistics.apply(this, arguments);
}
function _getLearnStatistics() {
_getLearnStatistics = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) {
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
return _context32.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/learning_statistics.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context32.stop();
}
}, _callee32);
}));
return _getLearnStatistics.apply(this, arguments);
}
function getShixunAnalyzeData(_x33) {
return _getShixunAnalyzeData.apply(this, arguments);
}
function _getShixunAnalyzeData() {
_getShixunAnalyzeData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
return _context33.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/shixun_statistics.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context33.stop();
}
}, _callee33);
}));
return _getShixunAnalyzeData.apply(this, arguments);
}
function getStudentData(_x34) {
return _getStudentData.apply(this, arguments);
}
function _getStudentData() {
_getStudentData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(params) {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
return _context34.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/study_analyze/").concat(params.type, ".json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context34.stop();
}
}, _callee34);
}));
return _getStudentData.apply(this, arguments);
}
function appendToStage(_x35) {
return _appendToStage.apply(this, arguments);
}
function _appendToStage() {
_appendToStage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(params) {
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
return _context35.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/append_to_stage.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context35.stop();
}
}, _callee35);
}));
return _appendToStage.apply(this, arguments);
}
function updateStage(_x36) {
return _updateStage.apply(this, arguments);
}
function _updateStage() {
_updateStage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(params) {
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
return _context36.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.id, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context36.stop();
}
}, _callee36);
}));
return _updateStage.apply(this, arguments);
}
function satgeAddShixunToStage(_x37) {
return _satgeAddShixunToStage.apply(this, arguments);
}
function _satgeAddShixunToStage() {
_satgeAddShixunToStage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(params) {
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
while (1) switch (_context37.prev = _context37.next) {
case 0:
return _context37.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.id, "/add_shixun_to_stage.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context37.stop();
}
}, _callee37);
}));
return _satgeAddShixunToStage.apply(this, arguments);
}
function selectShixunToStage(_x38) {
return _selectShixunToStage.apply(this, arguments);
}
function _selectShixunToStage() {
_selectShixunToStage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(params) {
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
while (1) switch (_context38.prev = _context38.next) {
case 0:
return _context38.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.id, "/select_shixun_to_stage.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context38.stop();
}
}, _callee38);
}));
return _selectShixunToStage.apply(this, arguments);
}
function addVideoToStage(_x39) {
return _addVideoToStage.apply(this, arguments);
}
function _addVideoToStage() {
_addVideoToStage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(params) {
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
while (1) switch (_context39.prev = _context39.next) {
case 0:
return _context39.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.id, "/add_video_to_stage.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context39.stop();
}
}, _callee39);
}));
return _addVideoToStage.apply(this, arguments);
}
function addCoursewareToStage(_x40) {
return _addCoursewareToStage.apply(this, arguments);
}
function _addCoursewareToStage() {
_addCoursewareToStage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(params) {
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
while (1) switch (_context40.prev = _context40.next) {
case 0:
return _context40.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.id, "/add_attachment_to_stage.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context40.stop();
}
}, _callee40);
}));
return _addCoursewareToStage.apply(this, arguments);
}
function addBlankItems(_x41) {
return _addBlankItems.apply(this, arguments);
}
function _addBlankItems() {
_addBlankItems = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(params) {
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
while (1) switch (_context41.prev = _context41.next) {
case 0:
return _context41.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.id, "/add_blank_to_stage.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context41.stop();
}
}, _callee41);
}));
return _addBlankItems.apply(this, arguments);
}
function addStage(_x42) {
return _addStage.apply(this, arguments);
}
function _addStage() {
_addStage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(params) {
return _regeneratorRuntime().wrap(function _callee42$(_context42) {
while (1) switch (_context42.prev = _context42.next) {
case 0:
return _context42.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages.json?subject_id=".concat(params.pathId), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context42.stop();
}
}, _callee42);
}));
return _addStage.apply(this, arguments);
}
function addShixunToStage(_x43) {
return _addShixunToStage.apply(this, arguments);
}
function _addShixunToStage() {
_addShixunToStage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(params) {
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
while (1) switch (_context43.prev = _context43.next) {
case 0:
return _context43.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/add_shixun_to_stage.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context43.stop();
}
}, _callee43);
}));
return _addShixunToStage.apply(this, arguments);
}
function upPosition(_x44) {
return _upPosition.apply(this, arguments);
}
function _upPosition() {
_upPosition = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(params) {
return _regeneratorRuntime().wrap(function _callee44$(_context44) {
while (1) switch (_context44.prev = _context44.next) {
case 0:
return _context44.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.id, "/up_position.json"), {
method: 'get'
}));
case 1:
case "end":
return _context44.stop();
}
}, _callee44);
}));
return _upPosition.apply(this, arguments);
}
function downPosition(_x45) {
return _downPosition.apply(this, arguments);
}
function _downPosition() {
_downPosition = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(params) {
return _regeneratorRuntime().wrap(function _callee45$(_context45) {
while (1) switch (_context45.prev = _context45.next) {
case 0:
return _context45.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.id, "/down_position.json"), {
method: 'get'
}));
case 1:
case "end":
return _context45.stop();
}
}, _callee45);
}));
return _downPosition.apply(this, arguments);
}
function deleteStage(_x46) {
return _deleteStage.apply(this, arguments);
}
function _deleteStage() {
_deleteStage = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46(params) {
return _regeneratorRuntime().wrap(function _callee46$(_context46) {
while (1) switch (_context46.prev = _context46.next) {
case 0:
return _context46.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context46.stop();
}
}, _callee46);
}));
return _deleteStage.apply(this, arguments);
}
function getDiscusses(_x47) {
return _getDiscusses.apply(this, arguments);
}
function _getDiscusses() {
_getDiscusses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47(params) {
return _regeneratorRuntime().wrap(function _callee47$(_context47) {
while (1) switch (_context47.prev = _context47.next) {
case 0:
return _context47.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.pathId, "/discusses.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context47.stop();
}
}, _callee47);
}));
return _getDiscusses.apply(this, arguments);
}
function getCourseDiscusses(_x48) {
return _getCourseDiscusses.apply(this, arguments);
}
function _getCourseDiscusses() {
_getCourseDiscusses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48(params) {
return _regeneratorRuntime().wrap(function _callee48$(_context48) {
while (1) switch (_context48.prev = _context48.next) {
case 0:
return _context48.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/excellent_discusses.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context48.stop();
}
}, _callee48);
}));
return _getCourseDiscusses.apply(this, arguments);
}
function createDiscusses(_x49) {
return _createDiscusses.apply(this, arguments);
}
function _createDiscusses() {
_createDiscusses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(params) {
return _regeneratorRuntime().wrap(function _callee49$(_context49) {
while (1) switch (_context49.prev = _context49.next) {
case 0:
return _context49.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/discusses.json", {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context49.stop();
}
}, _callee49);
}));
return _createDiscusses.apply(this, arguments);
}
function stagesMovePosition(_x50) {
return _stagesMovePosition.apply(this, arguments);
}
function _stagesMovePosition() {
_stagesMovePosition = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(params) {
return _regeneratorRuntime().wrap(function _callee50$(_context50) {
while (1) switch (_context50.prev = _context50.next) {
case 0:
return _context50.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.stage_id, "/items/move_position"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context50.stop();
}
}, _callee50);
}));
return _stagesMovePosition.apply(this, arguments);
}
function deleteStages(_x51) {
return _deleteStages.apply(this, arguments);
}
function _deleteStages() {
_deleteStages = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(params) {
return _regeneratorRuntime().wrap(function _callee51$(_context51) {
while (1) switch (_context51.prev = _context51.next) {
case 0:
return _context51.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages/".concat(params.stage_id, "/items/").concat(params.id), {
method: 'delete'
// body:{...params}
}));
case 1:
case "end":
return _context51.stop();
}
}, _callee51);
}));
return _deleteStages.apply(this, arguments);
}
function excellentDiscuss(_x52) {
return _excellentDiscuss.apply(this, arguments);
}
function _excellentDiscuss() {
_excellentDiscuss = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(params) {
return _regeneratorRuntime().wrap(function _callee52$(_context52) {
while (1) switch (_context52.prev = _context52.next) {
case 0:
return _context52.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/excellent_discuss"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context52.stop();
}
}, _callee52);
}));
return _excellentDiscuss.apply(this, arguments);
}
function postDiscuss(_x53) {
return _postDiscuss.apply(this, arguments);
}
// export async function postCoursesDiscuss(params: any) {
// return Fetch(`/api/courses/${params.id}/excellent_discuss`, {
// method: 'post',
// body:{...params}
// })
// }
// export async function getLearningDiscusses(params: any) {
// return Fetch(`/api/courses/${params.pathId}/excellent_discusses.json`, {
// method: 'get',
// params:{...params}
// })
// }
function _postDiscuss() {
_postDiscuss = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(params) {
return _regeneratorRuntime().wrap(function _callee53$(_context53) {
while (1) switch (_context53.prev = _context53.next) {
case 0:
return _context53.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/paths/".concat(params.id, "/post_discuss"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context53.stop();
}
}, _callee53);
}));
return _postDiscuss.apply(this, arguments);
}
/***/ }),
/***/ "MgzW":
/*!*********************************************!*\
!*** ./node_modules/object-assign/index.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/* eslint-disable no-unused-vars */
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
var hasOwnProperty = Object.prototype.hasOwnProperty;
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
function toObject(val) {
if (val === null || val === undefined) {
throw new TypeError('Object.assign cannot be called with null or undefined');
}
return Object(val);
}
function shouldUseNative() {
try {
if (!Object.assign) {
return false;
}
// Detect buggy property enumeration order in older V8 versions.
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
test1[5] = 'de';
if (Object.getOwnPropertyNames(test1)[0] === '5') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test2 = {};
for (var i = 0; i < 10; i++) {
test2['_' + String.fromCharCode(i)] = i;
}
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
return test2[n];
});
if (order2.join('') !== '0123456789') {
return false;
}
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
var test3 = {};
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
test3[letter] = letter;
});
if (Object.keys(Object.assign({}, test3)).join('') !==
'abcdefghijklmnopqrst') {
return false;
}
return true;
} catch (err) {
// We don't expect any of the above to throw, but better to be safe.
return false;
}
}
module.exports = shouldUseNative() ? Object.assign : function (target, source) {
var from;
var to = toObject(target);
var symbols;
for (var s = 1; s < arguments.length; s++) {
from = Object(arguments[s]);
for (var key in from) {
if (hasOwnProperty.call(from, key)) {
to[key] = from[key];
}
}
if (getOwnPropertySymbols) {
symbols = getOwnPropertySymbols(from);
for (var i = 0; i < symbols.length; i++) {
if (propIsEnumerable.call(from, symbols[i])) {
to[symbols[i]] = from[symbols[i]];
}
}
}
}
return to;
};
/***/ }),
/***/ "MoCz":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.last-index-of.js ***!
\**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $lastIndexOf = __webpack_require__(/*! ../internals/array-last-index-of */ "5Yz+");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.lastIndexOf` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.lastindexof
// eslint-disable-next-line no-unused-vars
exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) {
return $lastIndexOf.apply(aTypedArray(this), arguments);
});
/***/ }),
/***/ "N+g0":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/object-define-properties.js ***!
\********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "33Wh");
// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {
anObject(O);
var keys = objectKeys(Properties);
var length = keys.length;
var index = 0;
var key;
while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);
return O;
};
/***/ }),
/***/ "N2Kk":
/*!*******************************************************!*\
!*** ./node_modules/rc-pagination/es/locale/zh_CN.js ***!
\*******************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony default export */ __webpack_exports__["a"] = ({
// Options.jsx
items_per_page: '条/页',
jump_to: '跳至',
jump_to_confirm: '确定',
page: '页',
// Pagination.jsx
prev_page: '上一页',
next_page: '下一页',
prev_5: '向前 5 页',
next_5: '向后 5 页',
prev_3: '向前 3 页',
next_3: '向后 3 页'
});
/***/ }),
/***/ "N9QN":
/*!******************************************************!*\
!*** ./src/models/classrooms/teacher.ts + 1 modules ***!
\******************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/teacher.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function teacher_getList(_x) {
return _getList.apply(this, arguments);
}
function _getList() {
_getList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/teachers.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getList.apply(this, arguments);
}
function teacher_getApplyList(_x2) {
return _getApplyList.apply(this, arguments);
}
function _getApplyList() {
_getApplyList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/apply_teachers.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getApplyList.apply(this, arguments);
}
function teacher_getGraduationGroupList(_x3) {
return _getGraduationGroupList.apply(this, arguments);
}
function _getGraduationGroupList() {
_getGraduationGroupList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/graduation_group_list.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getGraduationGroupList.apply(this, arguments);
}
function teacher_getAllCourseGroups(_x4) {
return _getAllCourseGroups.apply(this, arguments);
}
function _getAllCourseGroups() {
_getAllCourseGroups = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/all_course_groups.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getAllCourseGroups.apply(this, arguments);
}
function teacher_setAllCourseGroups(_x5) {
return _setAllCourseGroups.apply(this, arguments);
}
function _setAllCourseGroups() {
_setAllCourseGroups = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/set_course_group.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _setAllCourseGroups.apply(this, arguments);
}
function joinGraduationGroup(_x6) {
return _joinGraduationGroup.apply(this, arguments);
}
function _joinGraduationGroup() {
_joinGraduationGroup = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/join_graduation_group.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _joinGraduationGroup.apply(this, arguments);
}
function createGraduationGroup(_x7) {
return _createGraduationGroup.apply(this, arguments);
}
function _createGraduationGroup() {
_createGraduationGroup = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/create_graduation_group.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _createGraduationGroup.apply(this, arguments);
}
function deleteCourseTeacher(_x8) {
return _deleteCourseTeacher.apply(this, arguments);
}
function _deleteCourseTeacher() {
_deleteCourseTeacher = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/delete_course_teacher.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _deleteCourseTeacher.apply(this, arguments);
}
function deleteCourseStudents(_x9) {
return _deleteCourseStudents.apply(this, arguments);
}
function _deleteCourseStudents() {
_deleteCourseStudents = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/delete_from_course.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _deleteCourseStudents.apply(this, arguments);
}
function changeMemberRole(_x10) {
return _changeMemberRole.apply(this, arguments);
}
function _changeMemberRole() {
_changeMemberRole = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/change_member_role.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _changeMemberRole.apply(this, arguments);
}
function changeCourseAdmin(_x11) {
return _changeCourseAdmin.apply(this, arguments);
}
function _changeCourseAdmin() {
_changeCourseAdmin = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/change_course_admin.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _changeCourseAdmin.apply(this, arguments);
}
function teacherApplicationReview(_x12) {
return _teacherApplicationReview.apply(this, arguments);
}
function _teacherApplicationReview() {
_teacherApplicationReview = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/teacher_application_review.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _teacherApplicationReview.apply(this, arguments);
}
function teacher_getStudentsList(_x13) {
return _getStudentsList.apply(this, arguments);
}
function _getStudentsList() {
_getStudentsList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/students.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _getStudentsList.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/classrooms/teacher.ts
function teacher_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ teacher_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var NewClassroomModel = {
namespace: 'teachers',
state: {
list: {},
applyList: {},
allCourseGroups: {},
graduationGroupList: {},
studentsList: {},
actionTabs: {
key: '',
params: {}
}
},
effects: {
getList: function getList(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/teacher_regeneratorRuntime().mark(function _callee(_response$teacher_lis) {
var response;
return teacher_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(teacher_getList, payload);
case 2:
response = _context.sent;
// 获取页面数据
response === null || response === void 0 ? void 0 : (_response$teacher_lis = response.teacher_list) === null || _response$teacher_lis === void 0 ? void 0 : _response$teacher_lis.map(function (item) {
item.key = item.course_member_id;
return item;
});
_context.next = 6;
return put({
type: 'save',
payload: {
list: response
}
});
case 6:
return _context.abrupt("return", response);
case 7:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getStudentsList: function getStudentsList(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/teacher_regeneratorRuntime().mark(function _callee2(_response$students) {
var response;
return teacher_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(teacher_getStudentsList, payload);
case 2:
response = _context2.sent;
// 获取页面数据
response === null || response === void 0 ? void 0 : (_response$students = response.students) === null || _response$students === void 0 ? void 0 : _response$students.map(function (item) {
item.key = item.user_id;
return item;
});
_context2.next = 6;
return put({
type: 'save',
payload: {
studentsList: response
}
});
case 6:
return _context2.abrupt("return", response);
case 7:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getApplyList: function getApplyList(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/teacher_regeneratorRuntime().mark(function _callee3() {
var response;
return teacher_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(teacher_getApplyList, payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
applyList: response
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
getAllCourseGroups: function getAllCourseGroups(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/teacher_regeneratorRuntime().mark(function _callee4() {
var response;
return teacher_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(teacher_getAllCourseGroups, payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
allCourseGroups: response
}
});
case 5:
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
getGraduationGroupList: function getGraduationGroupList(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/teacher_regeneratorRuntime().mark(function _callee5() {
var response;
return teacher_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(teacher_getGraduationGroupList, payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return put({
type: 'save',
payload: {
graduationGroupList: response
}
});
case 5:
return _context5.abrupt("return", response);
case 6:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
setAllCourseGroups: function setAllCourseGroups(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/teacher_regeneratorRuntime().mark(function _callee6() {
var response;
return teacher_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(teacher_setAllCourseGroups, payload);
case 2:
response = _context6.sent;
_context6.next = 5;
return put({
type: 'save',
payload: {
setAllCourseGroups: response
}
});
case 5:
return _context6.abrupt("return", response);
case 6:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/teacher_regeneratorRuntime().mark(function _callee7() {
return teacher_regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context7.stop();
}
}, _callee7);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref15) {
var dispatch = _ref15.dispatch,
history = _ref15.history;
}
}
};
/* harmony default export */ var teacher = __webpack_exports__["a"] = (NewClassroomModel);
/***/ }),
/***/ "NBAS":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.get-prototype-of.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var nativeGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "4Xet");
var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); });
// `Object.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, {
getPrototypeOf: function getPrototypeOf(it) {
return nativeGetPrototypeOf(toObject(it));
}
});
/***/ }),
/***/ "NC/Y":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/engine-user-agent.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
module.exports = getBuiltIn('navigator', 'userAgent') || '';
/***/ }),
/***/ "NV22":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.seeded-prng.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var numberIsFinite = __webpack_require__(/*! ../internals/number-is-finite */ "4oU/");
var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "ntOU");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var SEEDED_RANDOM = 'Seeded Random';
var SEEDED_RANDOM_GENERATOR = SEEDED_RANDOM + ' Generator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(SEEDED_RANDOM_GENERATOR);
var SEED_TYPE_ERROR = 'Math.seededPRNG() argument should have a "seed" field with a finite value.';
var $SeededRandomGenerator = createIteratorConstructor(function SeededRandomGenerator(seed) {
setInternalState(this, {
type: SEEDED_RANDOM_GENERATOR,
seed: seed % 2147483647
});
}, SEEDED_RANDOM, function next() {
var state = getInternalState(this);
var seed = state.seed = (state.seed * 1103515245 + 12345) % 2147483647;
return { value: (seed & 1073741823) / 1073741823, done: false };
});
// `Math.seededPRNG` method
// https://github.com/tc39/proposal-seeded-random
// based on https://github.com/tc39/proposal-seeded-random/blob/78b8258835b57fc2100d076151ab506bc3202ae6/demo.html
$({ target: 'Math', stat: true, forced: true }, {
seededPRNG: function seededPRNG(it) {
var seed = anObject(it).seed;
if (!numberIsFinite(seed)) throw TypeError(SEED_TYPE_ERROR);
return new $SeededRandomGenerator(seed);
}
});
/***/ }),
/***/ "NaFW":
/*!***************************************************************!*\
!*** ./node_modules/core-js/internals/get-iterator-method.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(/*! ../internals/classof */ "9d/t");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "P4y1");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var ITERATOR = wellKnownSymbol('iterator');
module.exports = function (it) {
if (it != undefined) return it[ITERATOR]
|| it['@@iterator']
|| Iterators[classof(it)];
};
/***/ }),
/***/ "NbN+":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.number.epsilon.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Number.EPSILON` constant
// https://tc39.github.io/ecma262/#sec-number.epsilon
$({ target: 'Number', stat: true }, {
EPSILON: Math.pow(2, -52)
});
/***/ }),
/***/ "NqR8":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.isubh.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Math.isubh` method
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
// TODO: Remove from `core-js@4`
$({ target: 'Math', stat: true }, {
isubh: function isubh(x0, x1, y0, y1) {
var $x0 = x0 >>> 0;
var $x1 = x1 >>> 0;
var $y0 = y0 >>> 0;
return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0;
}
});
/***/ }),
/***/ "Nsbk":
/*!***************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/getPrototypeOf.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _getPrototypeOf(o) {
module.exports = _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
return _getPrototypeOf(o);
}
module.exports = _getPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "Nsem":
/*!*******************************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js + 2 modules ***!
\*******************************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _possibleConstructorReturn; });
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/typeof.js
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function _typeof(obj) {
return typeof obj;
};
} else {
_typeof = function _typeof(obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js
function _possibleConstructorReturn(self, call) {
if (call && (_typeof(call) === "object" || typeof call === "function")) {
return call;
}
return _assertThisInitialized(self);
}
/***/ }),
/***/ "NykK":
/*!********************************************!*\
!*** ./node_modules/lodash/_baseGetTag.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(/*! ./_Symbol */ "nmnc"),
getRawTag = __webpack_require__(/*! ./_getRawTag */ "AP2z"),
objectToString = __webpack_require__(/*! ./_objectToString */ "KfNM");
/** `Object#toString` result references. */
var nullTag = '[object Null]',
undefinedTag = '[object Undefined]';
/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
: objectToString(value);
}
module.exports = baseGetTag;
/***/ }),
/***/ "O741":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/a-possible-prototype.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
module.exports = function (it) {
if (!isObject(it) && it !== null) {
throw TypeError("Can't set " + String(it) + ' as a prototype');
} return it;
};
/***/ }),
/***/ "ODXe":
/*!******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules ***!
\******************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js because of ./node_modules/antd/node_modules/rc-select/es/utils/valueUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js because of ./node_modules/antd/node_modules/rc-select/es/utils/valueUtil.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./src/pages/Competitions/Entered/index.tsx */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
var arrayWithHoles = __webpack_require__("DSFK");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = !0,
o = !1;
try {
if (i = (t = t.call(r)).next, 0 === l) {
if (Object(t) !== t) return;
f = !1;
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = !0, n = r;
} finally {
try {
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("BsWD");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
var nonIterableRest = __webpack_require__("PYwp");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js
function _slicedToArray(arr, i) {
return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
}
/***/ }),
/***/ "OIXA":
/*!************************************!*\
!*** ./src/styles/animate.min.css ***!
\************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "OM9Z":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.repeat.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var repeat = __webpack_require__(/*! ../internals/string-repeat */ "EUja");
// `String.prototype.repeat` method
// https://tc39.github.io/ecma262/#sec-string.prototype.repeat
$({ target: 'String', proto: true }, {
repeat: repeat
});
/***/ }),
/***/ "OSZE":
/*!*************************************************!*\
!*** ./src/models/account/index.ts + 1 modules ***!
\*************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/account.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function account_updateAvatar(_x) {
return _updateAvatar.apply(this, arguments);
}
function _updateAvatar() {
_updateAvatar = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.login, "/avatar.json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _updateAvatar.apply(this, arguments);
}
function account_getBasicInfo(_x2) {
return _getBasicInfo.apply(this, arguments);
}
function _getBasicInfo() {
_getBasicInfo = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.login, ".json"), {
method: 'get'
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getBasicInfo.apply(this, arguments);
}
function account_appplySchool(_x3) {
return _appplySchool.apply(this, arguments);
}
function _appplySchool() {
_appplySchool = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/add_school_applies.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _appplySchool.apply(this, arguments);
}
function account_getSchoolOption(_x4) {
return _getSchoolOption.apply(this, arguments);
}
function _getSchoolOption() {
_getSchoolOption = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/schools/for_option.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getSchoolOption.apply(this, arguments);
}
function account_getDepartmentOption(_x5) {
return _getDepartmentOption.apply(this, arguments);
}
function _getDepartmentOption() {
_getDepartmentOption = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/schools/".concat(params.id, "/departments/for_option.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getDepartmentOption.apply(this, arguments);
}
function account_appplyDepartment(_x6) {
return _appplyDepartment.apply(this, arguments);
}
function _appplyDepartment() {
_appplyDepartment = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/add_department_applies.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _appplyDepartment.apply(this, arguments);
}
function account_updateAccount(_x7) {
return _updateAccount.apply(this, arguments);
}
function _updateAccount() {
_updateAccount = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.id, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _updateAccount.apply(this, arguments);
}
function account_cancelRealNameAuth(_x8) {
return _cancelRealNameAuth.apply(this, arguments);
}
function _cancelRealNameAuth() {
_cancelRealNameAuth = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.login, "/authentication_apply.json"), {
method: 'delete'
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _cancelRealNameAuth.apply(this, arguments);
}
function account_cancelProfessionalAuth(_x9) {
return _cancelProfessionalAuth.apply(this, arguments);
}
function _cancelProfessionalAuth() {
_cancelProfessionalAuth = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.login, "/professional_auth_apply.json"), {
method: 'delete'
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _cancelProfessionalAuth.apply(this, arguments);
}
function account_applyProfessionalAuth(_x10) {
return _applyProfessionalAuth.apply(this, arguments);
}
function _applyProfessionalAuth() {
_applyProfessionalAuth = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.id, "/professional_auth_apply.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _applyProfessionalAuth.apply(this, arguments);
}
function account_applyRealNameAuth(_x11) {
return _applyRealNameAuth.apply(this, arguments);
}
function _applyRealNameAuth() {
_applyRealNameAuth = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.id, "/authentication_apply.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _applyRealNameAuth.apply(this, arguments);
}
function account_getCode(_x12) {
return _getCode.apply(this, arguments);
}
function _getCode() {
_getCode = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(fetch["a" /* default */])("/api/accounts/get_verification_code.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _getCode.apply(this, arguments);
}
function account_bindPhone(_x13) {
return _bindPhone.apply(this, arguments);
}
function _bindPhone() {
_bindPhone = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.login, "/phone_bind.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _bindPhone.apply(this, arguments);
}
function account_bindEmail(_x14) {
return _bindEmail.apply(this, arguments);
}
function _bindEmail() {
_bindEmail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.login, "/email_bind.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _bindEmail.apply(this, arguments);
}
function account_updatePassword(_x15) {
return _updatePassword.apply(this, arguments);
}
function _updatePassword() {
_updatePassword = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.login, "/password.json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _updatePassword.apply(this, arguments);
}
function account_unbindAccount(_x16) {
return _unbindAccount.apply(this, arguments);
}
function _unbindAccount() {
_unbindAccount = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(fetch["a" /* default */])("/api/users/accounts/".concat(params.basicInfoId, "/open_users/").concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _unbindAccount.apply(this, arguments);
}
function cancelAuthentication(_x17) {
return _cancelAuthentication.apply(this, arguments);
}
function _cancelAuthentication() {
_cancelAuthentication = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.login, "/cancel_authentication.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _cancelAuthentication.apply(this, arguments);
}
function cancelProfessionalCertification(_x18) {
return _cancelProfessionalCertification.apply(this, arguments);
}
function _cancelProfessionalCertification() {
_cancelProfessionalCertification = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(fetch["a" /* default */])("/api/users/".concat(params.login, "/cancel_professional_certification.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _cancelProfessionalCertification.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/account/index.ts
function account_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ account_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var AccountModel = {
namespace: 'account',
state: {
basicInfo: undefined,
actionTabs: {
key: '',
params: {}
}
},
effects: {
updateAvatar: function updateAvatar(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee() {
return account_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(account_updateAvatar, payload);
case 2:
return _context.abrupt("return", _context.sent);
case 3:
case "end":
return _context.stop();
}
}, _callee);
})();
},
appplySchool: function appplySchool(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee2() {
return account_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(account_appplySchool, payload);
case 2:
return _context2.abrupt("return", _context2.sent);
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getSchoolOption: function getSchoolOption(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee3() {
return account_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(account_getSchoolOption, payload);
case 2:
return _context3.abrupt("return", _context3.sent);
case 3:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
getDepartmentOption: function getDepartmentOption(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee4() {
return account_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(account_getDepartmentOption, payload);
case 2:
return _context4.abrupt("return", _context4.sent);
case 3:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
appplyDepartment: function appplyDepartment(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee5() {
return account_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(account_appplyDepartment, payload);
case 2:
return _context5.abrupt("return", _context5.sent);
case 3:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
updateAccount: function updateAccount(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee6() {
return account_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(account_updateAccount, payload);
case 2:
return _context6.abrupt("return", _context6.sent);
case 3:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
cancelRealNameAuth: function cancelRealNameAuth(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee7() {
return account_regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(account_cancelRealNameAuth, payload);
case 2:
return _context7.abrupt("return", _context7.sent);
case 3:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
cancelProfessionalAuth: function cancelProfessionalAuth(_ref15, _ref16) {
var payload = _ref15.payload;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee8() {
return account_regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(account_cancelProfessionalAuth, payload);
case 2:
return _context8.abrupt("return", _context8.sent);
case 3:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
applyProfessionalAuth: function applyProfessionalAuth(_ref17, _ref18) {
var payload = _ref17.payload;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee9() {
return account_regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(account_applyProfessionalAuth, payload);
case 2:
return _context9.abrupt("return", _context9.sent);
case 3:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
applyRealNameAuth: function applyRealNameAuth(_ref19, _ref20) {
var payload = _ref19.payload;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee10() {
return account_regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(account_applyRealNameAuth, payload);
case 2:
return _context10.abrupt("return", _context10.sent);
case 3:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
getCode: function getCode(_ref21, _ref22) {
var payload = _ref21.payload;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee11() {
return account_regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(account_getCode, payload);
case 2:
return _context11.abrupt("return", _context11.sent);
case 3:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
bindPhone: function bindPhone(_ref23, _ref24) {
var payload = _ref23.payload;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee12() {
return account_regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(account_bindPhone, payload);
case 2:
return _context12.abrupt("return", _context12.sent);
case 3:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
bindEmail: function bindEmail(_ref25, _ref26) {
var payload = _ref25.payload;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee13() {
return account_regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(account_bindEmail, payload);
case 2:
return _context13.abrupt("return", _context13.sent);
case 3:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
updatePassword: function updatePassword(_ref27, _ref28) {
var payload = _ref27.payload;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee14() {
return account_regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(account_updatePassword, payload);
case 2:
return _context14.abrupt("return", _context14.sent);
case 3:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
unbindAccount: function unbindAccount(_ref29, _ref30) {
var payload = _ref29.payload;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee15() {
return account_regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(account_unbindAccount, payload);
case 2:
return _context15.abrupt("return", _context15.sent);
case 3:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
getBasicInfo: function getBasicInfo(_ref31, _ref32) {
var payload = _ref31.payload;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee16() {
var response;
return account_regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(account_getBasicInfo, payload);
case 2:
response = _context16.sent;
_context16.next = 5;
return put({
type: 'save',
payload: {
basicInfo: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context16.abrupt("return", response);
case 6:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
setActionTabs: function setActionTabs(_ref33, _ref34) {
var payload = _ref33.payload;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/account_regeneratorRuntime().mark(function _callee17() {
return account_regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context17.stop();
}
}, _callee17);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref35) {
var dispatch = _ref35.dispatch,
history = _ref35.history;
return history.listen(function (_ref36) {
var pathname = _ref36.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ var account = __webpack_exports__["a"] = (AccountModel);
/***/ }),
/***/ "Onu3":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.find-index.js ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $findIndex = __webpack_require__(/*! ../internals/array-iteration */ "tycR").findIndex;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.findIndex` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.findindex
exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) {
return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/***/ "OwbQ":
/*!*********************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/ExclamationCircleOutlined.js ***!
\*********************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var ExclamationCircleOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z" } }, { "tag": "path", "attrs": { "d": "M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z" } }] }, "name": "exclamation-circle", "theme": "outlined" };
exports.default = ExclamationCircleOutlined;
/***/ }),
/***/ "P4y1":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/iterators.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = {};
/***/ }),
/***/ "P7XM":
/*!***************************************************!*\
!*** ./node_modules/inherits/inherits_browser.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
if (superCtor) {
ctor.super_ = superCtor
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
})
}
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
if (superCtor) {
ctor.super_ = superCtor
var TempCtor = function () {}
TempCtor.prototype = superCtor.prototype
ctor.prototype = new TempCtor()
ctor.prototype.constructor = ctor
}
}
}
/***/ }),
/***/ "P8wP":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.map.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $map = __webpack_require__(/*! ../internals/array-iteration */ "tycR").map;
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.map` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.map
exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) {
return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) {
return new (aTypedArrayConstructor(speciesConstructor(O, O.constructor)))(length);
});
});
/***/ }),
/***/ "P940":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/collection-of.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-setmap-offrom/
module.exports = function of() {
var length = arguments.length;
var A = new Array(length);
while (length--) A[length] = arguments[length];
return new this(A);
};
/***/ }),
/***/ "PF2M":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.set.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toOffset = __webpack_require__(/*! ../internals/to-offset */ "GC2F");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var FORCED = fails(function () {
// eslint-disable-next-line no-undef
new Int8Array(1).set({});
});
// `%TypedArray%.prototype.set` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.set
exportTypedArrayMethod('set', function set(arrayLike /* , offset */) {
aTypedArray(this);
var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1);
var length = this.length;
var src = toObject(arrayLike);
var len = toLength(src.length);
var index = 0;
if (len + offset > length) throw RangeError('Wrong length');
while (index < len) this[offset + index] = src[index++];
}, FORCED);
/***/ }),
/***/ "PJYZ":
/*!**********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/assertThisInitialized.js ***!
\**********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
module.exports = _assertThisInitialized, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "PKPk":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.iterator.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "ZUd8").charAt;
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "fdAy");
var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
// `String.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
defineIterator(String, 'String', function (iterated) {
setInternalState(this, {
type: STRING_ITERATOR,
string: String(iterated),
index: 0
});
// `%StringIteratorPrototype%.next` method
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
}, function next() {
var state = getInternalState(this);
var string = state.string;
var index = state.index;
var point;
if (index >= string.length) return { value: undefined, done: true };
point = charAt(string, index);
state.index += point.length;
return { value: point, done: false };
});
/***/ }),
/***/ "PYwp":
/*!********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
\********************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
/***/ }),
/***/ "PZZE":
/*!***********************************!*\
!*** ./src/pages/metting/info.js ***!
\***********************************/
/*! exports provided: menu, defaultPage, information, config, hidenMemberType */
/*! exports used: config, defaultPage, information, menu */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return menu; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return defaultPage; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return information; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return config; });
/* unused harmony export hidenMemberType */
var menu = [{
name: '首页',
link: '/competitions/2024'
}, {
name: '组织架构',
link: '/competitions/2024/organization'
}, {
name: '赛事安排',
link: '/competitions/2024/track/675'
}, {
name: '赛事动态',
link: '/competitions/2024/information'
}];
var defaultPage = {
'/register': 300,
'/contact': 299
};
var information = {
title: '大会资讯',
desc: '方便您第一时间收集各会议论坛信息,解读大会通知资讯',
category: [{
title: '赛事安排',
eng: 'Event arrangement',
anchor: 'forum'
}, {
title: '赛事动态',
eng: 'Event dynamics',
anchor: 'guide'
}, {
title: '赛题发布',
eng: 'Competition question release',
anchor: 'notice'
}]
};
var config = {
// zoneKey: 'kydhgw',
// zoneId: 6,
zoneKey: "KYDS7th",
zoneId: 11
};
var hidenMemberType = ['与会嘉宾', '院士嘉宾'];
/***/ }),
/***/ "PpiC":
/*!*****************************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules ***!
\*****************************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _objectWithoutProperties; });
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = _objectWithoutPropertiesLoose(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
/***/ }),
/***/ "PqOI":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.cbrt.js ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var sign = __webpack_require__(/*! ../internals/math-sign */ "90hW");
var abs = Math.abs;
var pow = Math.pow;
// `Math.cbrt` method
// https://tc39.github.io/ecma262/#sec-math.cbrt
$({ target: 'Math', stat: true }, {
cbrt: function cbrt(x) {
return sign(x = +x) * pow(abs(x), 1 / 3);
}
});
/***/ }),
/***/ "PrET":
/*!*****************************************!*\
!*** ./node_modules/call-bind/index.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(/*! function-bind */ "D3zA");
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "AM7I");
var setFunctionLength = __webpack_require__(/*! set-function-length */ "0Ake");
var $TypeError = __webpack_require__(/*! es-errors/type */ "DSU0");
var $apply = GetIntrinsic('%Function.prototype.apply%');
var $call = GetIntrinsic('%Function.prototype.call%');
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
var $defineProperty = __webpack_require__(/*! es-define-property */ "cckQ");
var $max = GetIntrinsic('%Math.max%');
module.exports = function callBind(originalFunction) {
if (typeof originalFunction !== 'function') {
throw new $TypeError('a function is required');
}
var func = $reflectApply(bind, $call, arguments);
return setFunctionLength(
func,
1 + $max(0, originalFunction.length - (arguments.length - 1)),
true
);
};
var applyBind = function applyBind() {
return $reflectApply(bind, $apply, arguments);
};
if ($defineProperty) {
$defineProperty(module.exports, 'apply', { value: applyBind });
} else {
module.exports.apply = applyBind;
}
/***/ }),
/***/ "PzqY":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.define-property.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
// MS Edge has broken Reflect.defineProperty - throwing instead of returning false
var ERROR_INSTEAD_OF_FALSE = fails(function () {
// eslint-disable-next-line no-undef
Reflect.defineProperty(definePropertyModule.f({}, 1, { value: 1 }), 1, { value: 2 });
});
// `Reflect.defineProperty` method
// https://tc39.github.io/ecma262/#sec-reflect.defineproperty
$({ target: 'Reflect', stat: true, forced: ERROR_INSTEAD_OF_FALSE, sham: !DESCRIPTORS }, {
defineProperty: function defineProperty(target, propertyKey, attributes) {
anObject(target);
var key = toPrimitive(propertyKey, true);
anObject(attributes);
try {
definePropertyModule.f(target, key, attributes);
return true;
} catch (error) {
return false;
}
}
});
/***/ }),
/***/ "Q2Ig":
/*!********************************************************!*\
!*** ./node_modules/node-libs-browser/mock/process.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
exports.nextTick = function nextTick(fn) {
var args = Array.prototype.slice.call(arguments);
args.shift();
setTimeout(function () {
fn.apply(null, args);
}, 0);
};
exports.platform = exports.arch =
exports.execPath = exports.title = 'browser';
exports.pid = 1;
exports.browser = true;
exports.env = {};
exports.argv = [];
exports.binding = function (name) {
throw new Error('No such module. (Possibly not yet loaded)')
};
(function () {
var cwd = '/';
var path;
exports.cwd = function () { return cwd };
exports.chdir = function (dir) {
if (!path) path = __webpack_require__(/*! path */ "33yf");
cwd = path.resolve(dir, cwd);
};
})();
exports.exit = exports.kill =
exports.umask = exports.dlopen =
exports.uptime = exports.memoryUsage =
exports.uvCounters = function() {};
exports.features = {};
/***/ }),
/***/ "Q7Pz":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.includes.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var sameValueZero = __webpack_require__(/*! ../internals/same-value-zero */ "i4U9");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.includes` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
includes: function includes(searchElement) {
return iterate(getMapIterator(anObject(this)), function (key, value) {
if (sameValueZero(value, searchElement)) return iterate.stop();
}, undefined, true, true).stopped;
}
});
/***/ }),
/***/ "Q9SF":
/*!****************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
\****************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
module.exports = _arrayWithHoles;
/***/ }),
/***/ "QC+M":
/*!*******************************************!*\
!*** ./node_modules/rc-util/es/Portal.js ***!
\*******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "i8i4");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _Dom_canUseDom__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Dom/canUseDom */ "MNnm");
var Portal = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["forwardRef"])(function (props, ref) {
var didUpdate = props.didUpdate,
getContainer = props.getContainer,
children = props.children;
var parentRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])();
var containerRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])();
// Ref return nothing, only for wrapper check exist
Object(react__WEBPACK_IMPORTED_MODULE_0__["useImperativeHandle"])(ref, function () {
return {};
});
// Create container in client side with sync to avoid useEffect not get ref
var initRef = Object(react__WEBPACK_IMPORTED_MODULE_0__["useRef"])(false);
if (!initRef.current && Object(_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])()) {
containerRef.current = getContainer();
parentRef.current = containerRef.current.parentNode;
initRef.current = true;
}
// [Legacy] Used by `rc-trigger`
Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
didUpdate === null || didUpdate === void 0 || didUpdate(props);
});
Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
// Restore container to original place
// React 18 StrictMode will unmount first and mount back for effect test:
// https://reactjs.org/blog/2022/03/29/react-v18.html#new-strict-mode-behaviors
if (containerRef.current.parentNode === null && parentRef.current !== null) {
parentRef.current.appendChild(containerRef.current);
}
return function () {
var _containerRef$current;
// [Legacy] This should not be handle by Portal but parent PortalWrapper instead.
// Since some component use `Portal` directly, we have to keep the logic here.
(_containerRef$current = containerRef.current) === null || _containerRef$current === void 0 || (_containerRef$current = _containerRef$current.parentNode) === null || _containerRef$current === void 0 || _containerRef$current.removeChild(containerRef.current);
};
}, []);
return containerRef.current ? /*#__PURE__*/react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.createPortal(children, containerRef.current) : null;
});
/* harmony default export */ __webpack_exports__["a"] = (Portal);
/***/ }),
/***/ "QCnb":
/*!*****************************************!*\
!*** ./node_modules/scheduler/index.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(/*! ./cjs/scheduler.production.min.js */ "+wdc");
} else {}
/***/ }),
/***/ "QFcT":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.hypot.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $hypot = Math.hypot;
var abs = Math.abs;
var sqrt = Math.sqrt;
// Chrome 77 bug
// https://bugs.chromium.org/p/v8/issues/detail?id=9546
var BUGGY = !!$hypot && $hypot(Infinity, NaN) !== Infinity;
// `Math.hypot` method
// https://tc39.github.io/ecma262/#sec-math.hypot
$({ target: 'Math', stat: true, forced: BUGGY }, {
hypot: function hypot(value1, value2) { // eslint-disable-line no-unused-vars
var sum = 0;
var i = 0;
var aLen = arguments.length;
var larg = 0;
var arg, div;
while (i < aLen) {
arg = abs(arguments[i++]);
if (larg < arg) {
div = larg / arg;
sum = sum * div * div + 1;
larg = arg;
} else if (arg > 0) {
div = arg / larg;
sum += div * div;
} else sum += arg;
}
return larg === Infinity ? Infinity : larg * sqrt(sum);
}
});
/***/ }),
/***/ "QGkA":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/es.array.unscopables.flat.js ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// this method was added to unscopables after implementation
// in popular engines, so it's moved to a separate module
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
addToUnscopables('flat');
/***/ }),
/***/ "QILm":
/*!************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/objectWithoutProperties.js ***!
\************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var objectWithoutPropertiesLoose = __webpack_require__(/*! ./objectWithoutPropertiesLoose.js */ "8OQS");
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = objectWithoutPropertiesLoose(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
module.exports = _objectWithoutProperties, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "QIpd":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/this-number-value.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
// `thisNumberValue` abstract operation
// https://tc39.github.io/ecma262/#sec-thisnumbervalue
module.exports = function (value) {
if (typeof value != 'number' && classof(value) != 'Number') {
throw TypeError('Incorrect invocation');
}
return +value;
};
/***/ }),
/***/ "QIyF":
/*!************************************!*\
!*** ./node_modules/lodash/now.js ***!
\************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__(/*! ./_root */ "Kz5y");
/**
* Gets the timestamp of the number of milliseconds that have elapsed since
* the Unix epoch (1 January 1970 00:00:00 UTC).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Date
* @returns {number} Returns the timestamp.
* @example
*
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
* // => Logs the number of milliseconds it took for the deferred invocation.
*/
var now = function() {
return root.Date.now();
};
module.exports = now;
/***/ }),
/***/ "QLaP":
/*!*******************************************!*\
!*** ./node_modules/invariant/browser.js ***!
\*******************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var invariant = function(condition, format, a, b, c, d, e, f) {
if (false) {}
if (!condition) {
var error;
if (format === undefined) {
error = new Error(
'Minified exception occurred; use the non-minified dev environment ' +
'for the full error message and additional helpful warnings.'
);
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(
format.replace(/%s/g, function() { return args[argIndex++]; })
);
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
};
module.exports = invariant;
/***/ }),
/***/ "QNnp":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.clz32.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var floor = Math.floor;
var log = Math.log;
var LOG2E = Math.LOG2E;
// `Math.clz32` method
// https://tc39.github.io/ecma262/#sec-math.clz32
$({ target: 'Math', stat: true }, {
clz32: function clz32(x) {
return (x >>>= 0) ? 31 - floor(log(x + 0.5) * LOG2E) : 32;
}
});
/***/ }),
/***/ "QSc6":
/*!******************************************!*\
!*** ./node_modules/qs/lib/stringify.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getSideChannel = __webpack_require__(/*! side-channel */ "VAJa");
var utils = __webpack_require__(/*! ./utils */ "0jNN");
var formats = __webpack_require__(/*! ./formats */ "sxOR");
var has = Object.prototype.hasOwnProperty;
var arrayPrefixGenerators = {
brackets: function brackets(prefix) {
return prefix + '[]';
},
comma: 'comma',
indices: function indices(prefix, key) {
return prefix + '[' + key + ']';
},
repeat: function repeat(prefix) {
return prefix;
}
};
var isArray = Array.isArray;
var push = Array.prototype.push;
var pushToArray = function (arr, valueOrArray) {
push.apply(arr, isArray(valueOrArray) ? valueOrArray : [valueOrArray]);
};
var toISO = Date.prototype.toISOString;
var defaultFormat = formats['default'];
var defaults = {
addQueryPrefix: false,
allowDots: false,
allowEmptyArrays: false,
arrayFormat: 'indices',
charset: 'utf-8',
charsetSentinel: false,
delimiter: '&',
encode: true,
encodeDotInKeys: false,
encoder: utils.encode,
encodeValuesOnly: false,
format: defaultFormat,
formatter: formats.formatters[defaultFormat],
// deprecated
indices: false,
serializeDate: function serializeDate(date) {
return toISO.call(date);
},
skipNulls: false,
strictNullHandling: false
};
var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
return typeof v === 'string'
|| typeof v === 'number'
|| typeof v === 'boolean'
|| typeof v === 'symbol'
|| typeof v === 'bigint';
};
var sentinel = {};
var stringify = function stringify(
object,
prefix,
generateArrayPrefix,
commaRoundTrip,
allowEmptyArrays,
strictNullHandling,
skipNulls,
encodeDotInKeys,
encoder,
filter,
sort,
allowDots,
serializeDate,
format,
formatter,
encodeValuesOnly,
charset,
sideChannel
) {
var obj = object;
var tmpSc = sideChannel;
var step = 0;
var findFlag = false;
while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
// Where object last appeared in the ref tree
var pos = tmpSc.get(object);
step += 1;
if (typeof pos !== 'undefined') {
if (pos === step) {
throw new RangeError('Cyclic object value');
} else {
findFlag = true; // Break while
}
}
if (typeof tmpSc.get(sentinel) === 'undefined') {
step = 0;
}
}
if (typeof filter === 'function') {
obj = filter(prefix, obj);
} else if (obj instanceof Date) {
obj = serializeDate(obj);
} else if (generateArrayPrefix === 'comma' && isArray(obj)) {
obj = utils.maybeMap(obj, function (value) {
if (value instanceof Date) {
return serializeDate(value);
}
return value;
});
}
if (obj === null) {
if (strictNullHandling) {
return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder, charset, 'key', format) : prefix;
}
obj = '';
}
if (isNonNullishPrimitive(obj) || utils.isBuffer(obj)) {
if (encoder) {
var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder, charset, 'key', format);
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
}
return [formatter(prefix) + '=' + formatter(String(obj))];
}
var values = [];
if (typeof obj === 'undefined') {
return values;
}
var objKeys;
if (generateArrayPrefix === 'comma' && isArray(obj)) {
// we need to join elements in
if (encodeValuesOnly && encoder) {
obj = utils.maybeMap(obj, encoder);
}
objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
} else if (isArray(filter)) {
objKeys = filter;
} else {
var keys = Object.keys(obj);
objKeys = sort ? keys.sort(sort) : keys;
}
var encodedPrefix = encodeDotInKeys ? prefix.replace(/\./g, '%2E') : prefix;
var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? encodedPrefix + '[]' : encodedPrefix;
if (allowEmptyArrays && isArray(obj) && obj.length === 0) {
return adjustedPrefix + '[]';
}
for (var j = 0; j < objKeys.length; ++j) {
var key = objKeys[j];
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
if (skipNulls && value === null) {
continue;
}
var encodedKey = allowDots && encodeDotInKeys ? key.replace(/\./g, '%2E') : key;
var keyPrefix = isArray(obj)
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, encodedKey) : adjustedPrefix
: adjustedPrefix + (allowDots ? '.' + encodedKey : '[' + encodedKey + ']');
sideChannel.set(object, step);
var valueSideChannel = getSideChannel();
valueSideChannel.set(sentinel, sideChannel);
pushToArray(values, stringify(
value,
keyPrefix,
generateArrayPrefix,
commaRoundTrip,
allowEmptyArrays,
strictNullHandling,
skipNulls,
encodeDotInKeys,
generateArrayPrefix === 'comma' && encodeValuesOnly && isArray(obj) ? null : encoder,
filter,
sort,
allowDots,
serializeDate,
format,
formatter,
encodeValuesOnly,
charset,
valueSideChannel
));
}
return values;
};
var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
if (!opts) {
return defaults;
}
if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
}
if (typeof opts.encodeDotInKeys !== 'undefined' && typeof opts.encodeDotInKeys !== 'boolean') {
throw new TypeError('`encodeDotInKeys` option can only be `true` or `false`, when provided');
}
if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
throw new TypeError('Encoder has to be a function.');
}
var charset = opts.charset || defaults.charset;
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
}
var format = formats['default'];
if (typeof opts.format !== 'undefined') {
if (!has.call(formats.formatters, opts.format)) {
throw new TypeError('Unknown format option provided.');
}
format = opts.format;
}
var formatter = formats.formatters[format];
var filter = defaults.filter;
if (typeof opts.filter === 'function' || isArray(opts.filter)) {
filter = opts.filter;
}
var arrayFormat;
if (opts.arrayFormat in arrayPrefixGenerators) {
arrayFormat = opts.arrayFormat;
} else if ('indices' in opts) {
arrayFormat = opts.indices ? 'indices' : 'repeat';
} else {
arrayFormat = defaults.arrayFormat;
}
if ('commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
}
var allowDots = typeof opts.allowDots === 'undefined' ? opts.encodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
return {
addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults.addQueryPrefix,
allowDots: allowDots,
allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
arrayFormat: arrayFormat,
charset: charset,
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
commaRoundTrip: opts.commaRoundTrip,
delimiter: typeof opts.delimiter === 'undefined' ? defaults.delimiter : opts.delimiter,
encode: typeof opts.encode === 'boolean' ? opts.encode : defaults.encode,
encodeDotInKeys: typeof opts.encodeDotInKeys === 'boolean' ? opts.encodeDotInKeys : defaults.encodeDotInKeys,
encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults.encoder,
encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults.encodeValuesOnly,
filter: filter,
format: format,
formatter: formatter,
serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults.serializeDate,
skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults.skipNulls,
sort: typeof opts.sort === 'function' ? opts.sort : null,
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
};
};
module.exports = function (object, opts) {
var obj = object;
var options = normalizeStringifyOptions(opts);
var objKeys;
var filter;
if (typeof options.filter === 'function') {
filter = options.filter;
obj = filter('', obj);
} else if (isArray(options.filter)) {
filter = options.filter;
objKeys = filter;
}
var keys = [];
if (typeof obj !== 'object' || obj === null) {
return '';
}
var generateArrayPrefix = arrayPrefixGenerators[options.arrayFormat];
var commaRoundTrip = generateArrayPrefix === 'comma' && options.commaRoundTrip;
if (!objKeys) {
objKeys = Object.keys(obj);
}
if (options.sort) {
objKeys.sort(options.sort);
}
var sideChannel = getSideChannel();
for (var i = 0; i < objKeys.length; ++i) {
var key = objKeys[i];
if (options.skipNulls && obj[key] === null) {
continue;
}
pushToArray(keys, stringify(
obj[key],
key,
generateArrayPrefix,
commaRoundTrip,
options.allowEmptyArrays,
options.strictNullHandling,
options.skipNulls,
options.encodeDotInKeys,
options.encode ? options.encoder : null,
options.filter,
options.sort,
options.allowDots,
options.serializeDate,
options.format,
options.formatter,
options.encodeValuesOnly,
options.charset,
sideChannel
));
}
var joined = keys.join(options.delimiter);
var prefix = options.addQueryPrefix === true ? '?' : '';
if (options.charsetSentinel) {
if (options.charset === 'iso-8859-1') {
// encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
prefix += 'utf8=%26%2310003%3B&';
} else {
// encodeURIComponent('✓')
prefix += 'utf8=%E2%9C%93&';
}
}
return joined.length > 0 ? prefix + joined : '';
};
/***/ }),
/***/ "QTEQ":
/*!***************************************!*\
!*** ./node_modules/flatten/index.js ***!
\***************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = function flatten(list, depth) {
depth = (typeof depth == 'number') ? depth : Infinity;
if (!depth) {
if (Array.isArray(list)) {
return list.map(function(i) { return i; });
}
return list;
}
return _flatten(list, 1);
function _flatten(list, d) {
return list.reduce(function (acc, item) {
if (Array.isArray(item) && d < depth) {
return acc.concat(_flatten(item, d + 1));
}
else {
return acc.concat(item);
}
}, []);
}
};
/***/ }),
/***/ "QX98":
/*!****************************************!*\
!*** ./node_modules/es-errors/eval.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @type {import('./eval')} */
module.exports = EvalError;
/***/ }),
/***/ "Qfp8":
/*!***********************************************************************************!*\
!*** ./node_modules/rc-util/node_modules/react-is/cjs/react-is.production.min.js ***!
\***********************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* @license React
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var b=Symbol.for("react.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),e=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),g=Symbol.for("react.provider"),h=Symbol.for("react.context"),k=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),n=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),t=Symbol.for("react.offscreen"),u;u=Symbol.for("react.module.reference");
function v(a){if("object"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;
exports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};
exports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||"object"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;
/***/ }),
/***/ "Qo9l":
/*!************************************************!*\
!*** ./node_modules/core-js/internals/path.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
module.exports = global;
/***/ }),
/***/ "Quko":
/*!**********************************************!*\
!*** ./node_modules/dva-immer/dist/index.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var produce = _interopDefault(__webpack_require__(/*! immer */ "4RId"));
function index () {
return {
_handleActions: function _handleActions(handlers, defaultState) {
return function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultState;
var action = arguments.length > 1 ? arguments[1] : undefined;
var type = action.type;
var ret = produce(state, function (draft) {
var handler = handlers[type];
if (handler) {
var compatiableRet = handler(draft, action);
if (compatiableRet !== undefined) {
// which means you are use redux pattern
// it's compatiable. https://github.com/mweststrate/immer#returning-data-from-producers
return compatiableRet;
}
}
});
return ret === undefined ? {} : ret;
};
}
};
}
module.exports = index;
/***/ }),
/***/ "Qw5x":
/*!********************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js ***!
\********************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _unsupportedIterableToArray; });
/* harmony import */ var _arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayLikeToArray */ "leS6");
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return Object(_arrayLikeToArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(o, minLen);
}
/***/ }),
/***/ "Qyje":
/*!**************************************!*\
!*** ./node_modules/qs/lib/index.js ***!
\**************************************/
/*! no static exports found */
/*! exports used: parse, stringify */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var stringify = __webpack_require__(/*! ./stringify */ "QSc6");
var parse = __webpack_require__(/*! ./parse */ "nmq7");
var formats = __webpack_require__(/*! ./formats */ "sxOR");
module.exports = {
formats: formats,
parse: parse,
stringify: stringify
};
/***/ }),
/***/ "R3/m":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.every.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.every` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
every: function every(callbackfn /* , thisArg */) {
var map = anObject(this);
var iterator = getMapIterator(map);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
return !iterate(iterator, function (key, value) {
if (!boundFunction(value, key, map)) return iterate.stop();
}, undefined, true, true).stopped;
}
});
/***/ }),
/***/ "R5yR":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles */ "9xmf");
var iterableToArray = __webpack_require__(/*! ./iterableToArray */ "rhT+");
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "mGKP");
var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ "XWE6");
function _toConsumableArray(arr) {
return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
}
module.exports = _toConsumableArray;
/***/ }),
/***/ "R80K":
/*!*******************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/ExclamationCircleFilled.js ***!
\*******************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var ExclamationCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "exclamation-circle", "theme": "filled" };
exports.default = ExclamationCircleFilled;
/***/ }),
/***/ "RIqP":
/*!******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/toConsumableArray.js ***!
\******************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayWithoutHoles = __webpack_require__(/*! ./arrayWithoutHoles.js */ "Ijbi");
var iterableToArray = __webpack_require__(/*! ./iterableToArray.js */ "EbDI");
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "ZhPi");
var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread.js */ "Bnag");
function _toConsumableArray(arr) {
return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();
}
module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "RK3t":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/indexed-object.js ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
var split = ''.split;
// fallback for non-array-like ES3 and non-enumerable old V8 strings
module.exports = fails(function () {
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
// eslint-disable-next-line no-prototype-builtins
return !Object('z').propertyIsEnumerable(0);
}) ? function (it) {
return classof(it) == 'String' ? split.call(it, '') : Object(it);
} : Object;
/***/ }),
/***/ "RN6c":
/*!**************************************************************!*\
!*** ./node_modules/core-js/internals/host-report-errors.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
module.exports = function (a, b) {
var console = global.console;
if (console && console.error) {
arguments.length === 1 ? console.error(a) : console.error(a, b);
}
};
/***/ }),
/***/ "RNIs":
/*!**************************************************************!*\
!*** ./node_modules/core-js/internals/add-to-unscopables.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var UNSCOPABLES = wellKnownSymbol('unscopables');
var ArrayPrototype = Array.prototype;
// Array.prototype[@@unscopables]
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
if (ArrayPrototype[UNSCOPABLES] == undefined) {
definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
configurable: true,
value: create(null)
});
}
// add a key to Array.prototype[@@unscopables]
module.exports = function (key) {
ArrayPrototype[UNSCOPABLES][key] = true;
};
/***/ }),
/***/ "ROdP":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/is-regexp.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var MATCH = wellKnownSymbol('match');
// `IsRegExp` abstract operation
// https://tc39.github.io/ecma262/#sec-isregexp
module.exports = function (it) {
var isRegExp;
return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp');
};
/***/ }),
/***/ "RYHr":
/*!************************************************!*\
!*** ./node_modules/axios/lib/helpers/null.js ***!
\************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// eslint-disable-next-line strict
/* harmony default export */ __webpack_exports__["a"] = (null);
/***/ }),
/***/ "Rm1S":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.match.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "14Sl");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "iqWW");
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "FMNM");
// @@match logic
fixRegExpWellKnownSymbolLogic('match', 1, function (MATCH, nativeMatch, maybeCallNative) {
return [
// `String.prototype.match` method
// https://tc39.github.io/ecma262/#sec-string.prototype.match
function match(regexp) {
var O = requireObjectCoercible(this);
var matcher = regexp == undefined ? undefined : regexp[MATCH];
return matcher !== undefined ? matcher.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));
},
// `RegExp.prototype[@@match]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
function (regexp) {
var res = maybeCallNative(nativeMatch, regexp, this);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
if (!rx.global) return regExpExec(rx, S);
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
var A = [];
var n = 0;
var result;
while ((result = regExpExec(rx, S)) !== null) {
var matchStr = String(result[0]);
A[n] = matchStr;
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
n++;
}
return n === 0 ? null : A;
}
];
});
/***/ }),
/***/ "SEBh":
/*!***************************************************************!*\
!*** ./node_modules/core-js/internals/species-constructor.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var SPECIES = wellKnownSymbol('species');
// `SpeciesConstructor` abstract operation
// https://tc39.github.io/ecma262/#sec-speciesconstructor
module.exports = function (O, defaultConstructor) {
var C = anObject(O).constructor;
var S;
return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aFunction(S);
};
/***/ }),
/***/ "SL6q":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.fscale.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var scale = __webpack_require__(/*! ../internals/math-scale */ "voyM");
var fround = __webpack_require__(/*! ../internals/math-fround */ "vo4V");
// `Math.fscale` method
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true }, {
fscale: function fscale(x, inLow, inHigh, outLow, outHigh) {
return fround(scale(x, inLow, inHigh, outLow, outHigh));
}
});
/***/ }),
/***/ "STAE":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/native-symbol.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
module.exports = !!Object.getOwnPropertySymbols && !fails(function () {
// Chrome 38 Symbol has incorrect toString conversion
// eslint-disable-next-line no-undef
return !String(Symbol());
});
/***/ }),
/***/ "SYor":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.trim.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $trim = __webpack_require__(/*! ../internals/string-trim */ "WKiH").trim;
var forcedStringTrimMethod = __webpack_require__(/*! ../internals/string-trim-forced */ "yNLB");
// `String.prototype.trim` method
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, {
trim: function trim() {
return $trim(this);
}
});
/***/ }),
/***/ "Si40":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.symmetric-difference.js ***!
\*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.symmetricDifference` method
// https://github.com/tc39/proposal-set-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
symmetricDifference: function symmetricDifference(iterable) {
var set = anObject(this);
var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set);
var remover = aFunction(newSet['delete']);
var adder = aFunction(newSet.add);
iterate(iterable, function (value) {
remover.call(newSet, value) || adder.call(newSet, value);
});
return newSet;
}
});
/***/ }),
/***/ "SksO":
/*!***************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/setPrototypeOf.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _setPrototypeOf(o, p) {
module.exports = _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
return _setPrototypeOf(o, p);
}
module.exports = _setPrototypeOf, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "SpvK":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.float64-array.js ***!
\**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj");
// `Float64Array` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Float64', function (init) {
return function Float64Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "Sssf":
/*!************************************************************!*\
!*** ./node_modules/core-js/internals/get-map-iterator.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getIterator = __webpack_require__(/*! ../internals/get-iterator */ "mh/w");
module.exports = IS_PURE ? getIterator : function (it) {
// eslint-disable-next-line no-undef
return Map.prototype.entries.call(it);
};
/***/ }),
/***/ "SuFq":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.construct.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var bind = __webpack_require__(/*! ../internals/function-bind */ "BTho");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var nativeConstruct = getBuiltIn('Reflect', 'construct');
// `Reflect.construct` method
// https://tc39.github.io/ecma262/#sec-reflect.construct
// MS Edge supports only 2 arguments and argumentsList argument is optional
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
var NEW_TARGET_BUG = fails(function () {
function F() { /* empty */ }
return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
});
var ARGS_BUG = !fails(function () {
nativeConstruct(function () { /* empty */ });
});
var FORCED = NEW_TARGET_BUG || ARGS_BUG;
$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
construct: function construct(Target, args /* , newTarget */) {
aFunction(Target);
anObject(args);
var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]);
if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
if (Target == newTarget) {
// w/o altered newTarget, optimization for 0-4 arguments
switch (args.length) {
case 0: return new Target();
case 1: return new Target(args[0]);
case 2: return new Target(args[0], args[1]);
case 3: return new Target(args[0], args[1], args[2]);
case 4: return new Target(args[0], args[1], args[2], args[3]);
}
// w/o altered newTarget, lot of arguments case
var $args = [null];
$args.push.apply($args, args);
return new (bind.apply(Target, $args))();
}
// with altered newTarget, not support built-in constructors
var proto = newTarget.prototype;
var instance = create(isObject(proto) ? proto : Object.prototype);
var result = Function.apply.call(Target, instance, args);
return isObject(result) ? result : instance;
}
});
/***/ }),
/***/ "T2oS":
/*!**************************************************!*\
!*** ./node_modules/antd/es/spin/style/index.js ***!
\**************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "YBTB");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/***/ }),
/***/ "T5T7":
/*!*******************************!*\
!*** ./src/styles/reset.less ***!
\*******************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "T5bk":
/*!************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/toArray.js ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _toArray; });
/* harmony import */ var _arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arrayWithHoles.js */ "DSFK");
/* harmony import */ var _iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./iterableToArray.js */ "25BE");
/* harmony import */ var _unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./unsupportedIterableToArray.js */ "BsWD");
/* harmony import */ var _nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./nonIterableRest.js */ "PYwp");
function _toArray(arr) {
return Object(_arrayWithHoles_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(arr) || Object(_iterableToArray_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(arr) || Object(_unsupportedIterableToArray_js__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(arr) || Object(_nonIterableRest_js__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])();
}
/***/ }),
/***/ "T63A":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.object.entries.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $entries = __webpack_require__(/*! ../internals/object-to-array */ "b1O7").entries;
// `Object.entries` method
// https://tc39.github.io/ecma262/#sec-object.entries
$({ target: 'Object', stat: true }, {
entries: function entries(O) {
return $entries(O);
}
});
/***/ }),
/***/ "TFPT":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.string.sub.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.sub` method
// https://tc39.github.io/ecma262/#sec-string.prototype.sub
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sub') }, {
sub: function sub() {
return createHTML(this, 'sub', '', '');
}
});
/***/ }),
/***/ "TJ79":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.weak-map.of.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var of = __webpack_require__(/*! ../internals/collection-of */ "P940");
// `WeakMap.of` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakmap.of
$({ target: 'WeakMap', stat: true }, {
of: of
});
/***/ }),
/***/ "TKrE":
/*!***************************************!*\
!*** ./node_modules/lodash/deburr.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var deburrLetter = __webpack_require__(/*! ./_deburrLetter */ "qRkn"),
toString = __webpack_require__(/*! ./toString */ "dt0z");
/** Used to match Latin Unicode letters (excluding mathematical operators). */
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
/** Used to compose unicode character classes. */
var rsComboMarksRange = '\\u0300-\\u036f',
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
rsComboSymbolsRange = '\\u20d0-\\u20ff',
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange;
/** Used to compose unicode capture groups. */
var rsCombo = '[' + rsComboRange + ']';
/**
* Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and
* [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols).
*/
var reComboMark = RegExp(rsCombo, 'g');
/**
* Deburrs `string` by converting
* [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table)
* and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A)
* letters to basic Latin letters and removing
* [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to deburr.
* @returns {string} Returns the deburred string.
* @example
*
* _.deburr('déjà vu');
* // => 'deja vu'
*/
function deburr(string) {
string = toString(string);
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, '');
}
module.exports = deburr;
/***/ }),
/***/ "TNol":
/*!**********************************************************!*\
!*** ./node_modules/rc-util/es/hooks/useLayoutEffect.js ***!
\**********************************************************/
/*! exports provided: useLayoutUpdateEffect, default */
/*! exports used: default, useLayoutUpdateEffect */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return useLayoutUpdateEffect; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Dom/canUseDom */ "MNnm");
/**
* Wrap `React.useLayoutEffect` which will not throw warning message in test env
*/
var useInternalLayoutEffect = true && Object(_Dom_canUseDom__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])() ? react__WEBPACK_IMPORTED_MODULE_0__["useLayoutEffect"] : react__WEBPACK_IMPORTED_MODULE_0__["useEffect"];
var useLayoutEffect = function useLayoutEffect(callback, deps) {
var firstMountRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"](true);
useInternalLayoutEffect(function () {
return callback(firstMountRef.current);
}, deps);
// We tell react that first mount has passed
useInternalLayoutEffect(function () {
firstMountRef.current = false;
return function () {
firstMountRef.current = true;
};
}, []);
};
var useLayoutUpdateEffect = function useLayoutUpdateEffect(callback, deps) {
useLayoutEffect(function (firstMount) {
if (!firstMount) {
return callback();
}
}, deps);
};
/* harmony default export */ __webpack_exports__["a"] = (useLayoutEffect);
/***/ }),
/***/ "TO8r":
/*!*************************************************!*\
!*** ./node_modules/lodash/_trimmedEndIndex.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/** Used to match a single whitespace character. */
var reWhitespace = /\s/;
/**
* Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace
* character of `string`.
*
* @private
* @param {string} string The string to inspect.
* @returns {number} Returns the index of the last non-whitespace character.
*/
function trimmedEndIndex(string) {
var index = string.length;
while (index-- && reWhitespace.test(string.charAt(index))) {}
return index;
}
module.exports = trimmedEndIndex;
/***/ }),
/***/ "TOwV":
/*!****************************************!*\
!*** ./node_modules/react-is/index.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(/*! ./cjs/react-is.production.min.js */ "qT12");
} else {}
/***/ }),
/***/ "TPcJ":
/*!***********************************!*\
!*** ./src/models/paths/index.ts ***!
\***********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_paths__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/paths */ "Mgx3");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var CourseListModel = {
namespace: 'pathsList',
state: {
name: '',
loading: true,
actionTabs: {
key: '',
params: {}
},
listParams: {
sort: "desc",
order: "new",
//new 最新hot最热
// order_by: 'new',
page: 1,
//第一页开始
limit: 16,
keyword: ""
}
},
effects: {
getCourse: function getCourse(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var listParams, response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
listParams = payload;
_context.next = 3;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_1__[/* getCourseList */ "c"], payload);
case 3:
response = _context.sent;
_context.next = 6;
return put({
type: "save",
payload: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
listParams: listParams
}, response)
});
case 6:
return _context.abrupt("return", response);
case 7:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getMenus: function getMenus(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_1__[/* getCourseMenus */ "d"], payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: "save",
payload: {
menus: response
}
});
case 5:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
setActionTabs: function setActionTabs(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
clearListParams: function clearListParams(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return put({
type: 'save',
payload: {
listParams: {
sort: "desc",
order: "new",
//new 最新hot最热
// order_by: 'new',
page: 1,
//第一页开始
limit: 16,
keyword: ""
}
}
});
case 2:
case "end":
return _context4.stop();
}
}, _callee4);
})();
}
},
reducers: {
save: function save(state, action) {
// console.log("reducers:",state,action)
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref9) {
var dispatch = _ref9.dispatch,
history = _ref9.history;
// console.log("subscriptions:", dispatch, history)
return history.listen(function (_ref10) {
var pathname = _ref10.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (CourseListModel);
/***/ }),
/***/ "TSYQ":
/*!******************************************!*\
!*** ./node_modules/classnames/index.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
Copyright (c) 2018 Jed Watson.
Licensed under the MIT License (MIT), see
http://jedwatson.github.io/classnames
*/
/* global define */
(function () {
'use strict';
var hasOwn = {}.hasOwnProperty;
function classNames () {
var classes = '';
for (var i = 0; i < arguments.length; i++) {
var arg = arguments[i];
if (arg) {
classes = appendClass(classes, parseValue(arg));
}
}
return classes;
}
function parseValue (arg) {
if (typeof arg === 'string' || typeof arg === 'number') {
return arg;
}
if (typeof arg !== 'object') {
return '';
}
if (Array.isArray(arg)) {
return classNames.apply(null, arg);
}
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
return arg.toString();
}
var classes = '';
for (var key in arg) {
if (hasOwn.call(arg, key) && arg[key]) {
classes = appendClass(classes, key);
}
}
return classes;
}
function appendClass (value, newClass) {
if (!newClass) {
return value;
}
if (value) {
return value + ' ' + newClass;
}
return value + newClass;
}
if ( true && module.exports) {
classNames.default = classNames;
module.exports = classNames;
} else if (true) {
// register as 'classnames', consistent with npm package name
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
return classNames;
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
} else {}
}());
/***/ }),
/***/ "TWQb":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/array-includes.js ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh");
// `Array.prototype.{ indexOf, includes }` methods implementation
var createMethod = function (IS_INCLUDES) {
return function ($this, el, fromIndex) {
var O = toIndexedObject($this);
var length = toLength(O.length);
var index = toAbsoluteIndex(fromIndex, length);
var value;
// Array#includes uses SameValueZero equality algorithm
// eslint-disable-next-line no-self-compare
if (IS_INCLUDES && el != el) while (length > index) {
value = O[index++];
// eslint-disable-next-line no-self-compare
if (value != value) return true;
// Array#indexOf ignores holes, Array#includes - not
} else for (;length > index; index++) {
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
} return !IS_INCLUDES && -1;
};
};
module.exports = {
// `Array.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
includes: createMethod(true),
// `Array.prototype.indexOf` method
// https://tc39.github.io/ecma262/#sec-array.prototype.indexof
indexOf: createMethod(false)
};
/***/ }),
/***/ "TZCg":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.pad-start.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $padStart = __webpack_require__(/*! ../internals/string-pad */ "DMt2").start;
var WEBKIT_BUG = __webpack_require__(/*! ../internals/string-pad-webkit-bug */ "mgyK");
// `String.prototype.padStart` method
// https://tc39.github.io/ecma262/#sec-string.prototype.padstart
$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
padStart: function padStart(maxLength /* , fillString = ' ' */) {
return $padStart(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "TeQF":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.array.filter.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $filter = __webpack_require__(/*! ../internals/array-iteration */ "tycR").filter;
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "Hd5f");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
// Edge 14- issue
var USES_TO_LENGTH = arrayMethodUsesToLength('filter');
// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
filter: function filter(callbackfn /* , thisArg */) {
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "TeRw":
/*!****************************************************************!*\
!*** ./node_modules/antd/es/notification/index.js + 1 modules ***!
\****************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CheckCircleOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CloseCircleOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CloseOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/ExclamationCircleOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/InfoCircleOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/index.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/useNotification.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/rc-notification/es/index.js + 6 modules
var es = __webpack_require__("8tx+");
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CloseOutlined.js
var CloseOutlined = __webpack_require__("V/uB");
var CloseOutlined_default = /*#__PURE__*/__webpack_require__.n(CloseOutlined);
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CheckCircleOutlined.js
var CheckCircleOutlined = __webpack_require__("0G8d");
var CheckCircleOutlined_default = /*#__PURE__*/__webpack_require__.n(CheckCircleOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CloseCircleOutlined.js
var CloseCircleOutlined = __webpack_require__("Z/ur");
var CloseCircleOutlined_default = /*#__PURE__*/__webpack_require__.n(CloseCircleOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/ExclamationCircleOutlined.js
var ExclamationCircleOutlined = __webpack_require__("xddM");
var ExclamationCircleOutlined_default = /*#__PURE__*/__webpack_require__.n(ExclamationCircleOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/InfoCircleOutlined.js
var InfoCircleOutlined = __webpack_require__("ESPI");
var InfoCircleOutlined_default = /*#__PURE__*/__webpack_require__.n(InfoCircleOutlined);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("J4zp");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/rc-notification/es/useNotification.js
var es_useNotification = __webpack_require__("8HVG");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var context = __webpack_require__("H84U");
// CONCATENATED MODULE: ./node_modules/antd/es/notification/hooks/useNotification.js
function createUseNotification(getNotificationInstance, getRCNoticeProps) {
var useNotification = function useNotification() {
// We can only get content by render
var getPrefixCls; // We create a proxy to handle delay created instance
var innerInstance = null;
var proxy = {
add: function add(noticeProps, holderCallback) {
innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback);
}
};
var _useRCNotification = Object(es_useNotification["a" /* default */])(proxy),
_useRCNotification2 = slicedToArray_default()(_useRCNotification, 2),
hookNotify = _useRCNotification2[0],
holder = _useRCNotification2[1];
function notify(args) {
var customizePrefixCls = args.prefixCls;
var mergedPrefixCls = getPrefixCls('notification', customizePrefixCls);
getNotificationInstance(extends_default()(extends_default()({}, args), {
prefixCls: mergedPrefixCls
}), function (_ref) {
var prefixCls = _ref.prefixCls,
instance = _ref.instance;
innerInstance = instance;
hookNotify(getRCNoticeProps(args, prefixCls));
});
} // Fill functions
var hookApiRef = react["useRef"]({});
hookApiRef.current.open = notify;
['success', 'info', 'warning', 'error'].forEach(function (type) {
hookApiRef.current[type] = function (args) {
return hookApiRef.current.open(extends_default()(extends_default()({}, args), {
type: type
}));
};
});
return [hookApiRef.current, /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], {
key: "holder"
}, function (context) {
getPrefixCls = context.getPrefixCls;
return holder;
})];
};
return useNotification;
}
// CONCATENATED MODULE: ./node_modules/antd/es/notification/index.js
var notificationInstance = {};
var defaultDuration = 4.5;
var defaultTop = 24;
var defaultBottom = 24;
var defaultPrefixCls = 'ant-notification';
var defaultPlacement = 'topRight';
var defaultGetContainer;
var defaultCloseIcon;
var rtl = false;
function setNotificationConfig(options) {
var duration = options.duration,
placement = options.placement,
bottom = options.bottom,
top = options.top,
getContainer = options.getContainer,
closeIcon = options.closeIcon,
prefixCls = options.prefixCls;
if (prefixCls !== undefined) {
defaultPrefixCls = prefixCls;
}
if (duration !== undefined) {
defaultDuration = duration;
}
if (placement !== undefined) {
defaultPlacement = placement;
} else if (options.rtl) {
defaultPlacement = 'topLeft';
}
if (bottom !== undefined) {
defaultBottom = bottom;
}
if (top !== undefined) {
defaultTop = top;
}
if (getContainer !== undefined) {
defaultGetContainer = getContainer;
}
if (closeIcon !== undefined) {
defaultCloseIcon = closeIcon;
}
if (options.rtl !== undefined) {
rtl = options.rtl;
}
}
function getPlacementStyle(placement) {
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;
var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
var style;
switch (placement) {
case 'topLeft':
style = {
left: 0,
top: top,
bottom: 'auto'
};
break;
case 'topRight':
style = {
right: 0,
top: top,
bottom: 'auto'
};
break;
case 'bottomLeft':
style = {
left: 0,
top: 'auto',
bottom: bottom
};
break;
default:
style = {
right: 0,
top: 'auto',
bottom: bottom
};
break;
}
return style;
}
function notification_getNotificationInstance(args, callback) {
var _args$placement = args.placement,
placement = _args$placement === void 0 ? defaultPlacement : _args$placement,
top = args.top,
bottom = args.bottom,
_args$getContainer = args.getContainer,
getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer,
_args$closeIcon = args.closeIcon,
closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon;
var outerPrefixCls = args.prefixCls || defaultPrefixCls;
var prefixCls = "".concat(outerPrefixCls, "-notice");
var cacheKey = "".concat(outerPrefixCls, "-").concat(placement);
var cacheInstance = notificationInstance[cacheKey];
if (cacheInstance) {
Promise.resolve(cacheInstance).then(function (instance) {
callback({
prefixCls: prefixCls,
instance: instance
});
});
return;
}
var closeIconToRender = /*#__PURE__*/react["createElement"]("span", {
className: "".concat(outerPrefixCls, "-close-x")
}, closeIcon || /*#__PURE__*/react["createElement"](CloseOutlined_default.a, {
className: "".concat(outerPrefixCls, "-close-icon")
}));
var notificationClass = classnames_default()("".concat(outerPrefixCls, "-").concat(placement), defineProperty_default()({}, "".concat(outerPrefixCls, "-rtl"), rtl === true));
notificationInstance[cacheKey] = new Promise(function (resolve) {
es["a" /* default */].newInstance({
prefixCls: outerPrefixCls,
className: notificationClass,
style: getPlacementStyle(placement, top, bottom),
getContainer: getContainer,
closeIcon: closeIconToRender
}, function (notification) {
resolve(notification);
callback({
prefixCls: prefixCls,
instance: notification
});
});
});
}
var typeToIcon = {
success: CheckCircleOutlined_default.a,
info: InfoCircleOutlined_default.a,
error: CloseCircleOutlined_default.a,
warning: ExclamationCircleOutlined_default.a
};
function notification_getRCNoticeProps(args, prefixCls) {
var duration = args.duration === undefined ? defaultDuration : args.duration;
var iconNode = null;
if (args.icon) {
iconNode = /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-icon")
}, args.icon);
} else if (args.type) {
iconNode = /*#__PURE__*/react["createElement"](typeToIcon[args.type] || null, {
className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(args.type)
});
}
var autoMarginTag = !args.description && iconNode ? /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-message-single-line-auto-margin")
}) : null;
return {
content: /*#__PURE__*/react["createElement"]("div", {
className: iconNode ? "".concat(prefixCls, "-with-icon") : '',
role: "alert"
}, iconNode, /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-message")
}, autoMarginTag, args.message), /*#__PURE__*/react["createElement"]("div", {
className: "".concat(prefixCls, "-description")
}, args.description), args.btn ? /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-btn")
}, args.btn) : null),
duration: duration,
closable: true,
onClose: args.onClose,
onClick: args.onClick,
key: args.key,
style: args.style || {},
className: args.className
};
}
function notice(args) {
notification_getNotificationInstance(args, function (_ref) {
var prefixCls = _ref.prefixCls,
instance = _ref.instance;
instance.notice(notification_getRCNoticeProps(args, prefixCls));
});
}
var api = {
open: notice,
close: function close(key) {
Object.keys(notificationInstance).forEach(function (cacheKey) {
return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
instance.removeNotice(key);
});
});
},
config: setNotificationConfig,
destroy: function destroy() {
Object.keys(notificationInstance).forEach(function (cacheKey) {
Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
instance.destroy();
});
delete notificationInstance[cacheKey]; // lgtm[js/missing-await]
});
}
};
['success', 'info', 'warning', 'error'].forEach(function (type) {
api[type] = function (args) {
return api.open(extends_default()(extends_default()({}, args), {
type: type
}));
};
});
api.warn = api.warning;
api.useNotification = createUseNotification(notification_getNotificationInstance, notification_getRCNoticeProps);
/* harmony default export */ var notification = __webpack_exports__["a"] = (api);
/***/ }),
/***/ "TfTi":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/array-from.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var callWithSafeIterationClosing = __webpack_require__(/*! ../internals/call-with-safe-iteration-closing */ "m92n");
var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "6VoE");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "hBjN");
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "NaFW");
// `Array.from` method implementation
// https://tc39.github.io/ecma262/#sec-array.from
module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) {
var O = toObject(arrayLike);
var C = typeof this == 'function' ? this : Array;
var argumentsLength = arguments.length;
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var iteratorMethod = getIteratorMethod(O);
var index = 0;
var length, result, step, iterator, next, value;
if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2);
// if the target is not iterable or it's an array with the default iterator - use a simple case
if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
iterator = iteratorMethod.call(O);
next = iterator.next;
result = new C();
for (;!(step = next.call(iterator)).done; index++) {
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
createProperty(result, index, value);
}
} else {
length = toLength(O.length);
result = new C(length);
for (;length > index; index++) {
value = mapping ? mapfn(O[index], index) : O[index];
createProperty(result, index, value);
}
}
result.length = index;
return result;
};
/***/ }),
/***/ "Thag":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.some.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.some` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
some: function some(callbackfn /* , thisArg */) {
var map = anObject(this);
var iterator = getMapIterator(map);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
return iterate(iterator, function (key, value) {
if (boundFunction(value, key, map)) return iterate.stop();
}, undefined, true, true).stopped;
}
});
/***/ }),
/***/ "To2U":
/*!**************************************************!*\
!*** ./src/models/resetFul/index.ts + 1 modules ***!
\**************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/restful.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function restful_getRestful(_x) {
return _getRestful.apply(this, arguments);
}
function _getRestful() {
_getRestful = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])('/api/restfuls.json', {
method: 'get',
params: params
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getRestful.apply(this, arguments);
}
function restful_getRestfulDetail(_x2) {
return _getRestfulDetail.apply(this, arguments);
}
function _getRestfulDetail() {
_getRestfulDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/restfuls/".concat(params.id, ".json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getRestfulDetail.apply(this, arguments);
}
function deleteRestFul(_x3) {
return _deleteRestFul.apply(this, arguments);
}
function _deleteRestFul() {
_deleteRestFul = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/restfuls/".concat(params.id, ".json"), {
method: 'delete',
params: params
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _deleteRestFul.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/resetFul/index.ts
function resetFul_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ resetFul_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var AccountModel = {
namespace: 'restful',
state: {
restful: undefined,
restfulDetail: {},
actionTabs: {
key: '',
params: {}
}
},
effects: {
getRestful: function getRestful(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/resetFul_regeneratorRuntime().mark(function _callee() {
var response;
return resetFul_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(restful_getRestful, payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
restful: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getRestfulDetail: function getRestfulDetail(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/resetFul_regeneratorRuntime().mark(function _callee2() {
var response;
return resetFul_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(restful_getRestfulDetail, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
restfulDetail: Object(objectSpread2["a" /* default */])({}, (response === null || response === void 0 ? void 0 : response.data) || {})
}
});
case 5:
return _context2.abrupt("return", (response === null || response === void 0 ? void 0 : response.data) || {});
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
setActionTabs: function setActionTabs(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/resetFul_regeneratorRuntime().mark(function _callee3() {
return resetFul_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context3.stop();
}
}, _callee3);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref7) {
var dispatch = _ref7.dispatch,
history = _ref7.history;
return history.listen(function (_ref8) {
var pathname = _ref8.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ var resetFul = __webpack_exports__["a"] = (AccountModel);
/***/ }),
/***/ "ToJy":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.array.sort.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn");
var test = [];
var nativeSort = test.sort;
// IE8-
var FAILS_ON_UNDEFINED = fails(function () {
test.sort(undefined);
});
// V8 bug
var FAILS_ON_NULL = fails(function () {
test.sort(null);
});
// Old WebKit
var STRICT_METHOD = arrayMethodIsStrict('sort');
var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD;
// `Array.prototype.sort` method
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
$({ target: 'Array', proto: true, forced: FORCED }, {
sort: function sort(comparefn) {
return comparefn === undefined
? nativeSort.call(toObject(this))
: nativeSort.call(toObject(this), aFunction(comparefn));
}
});
/***/ }),
/***/ "TqRt":
/*!**********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/interopRequireDefault.js ***!
\**********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
"default": obj
};
}
module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "Tskq":
/*!************************************************!*\
!*** ./node_modules/core-js/modules/es.map.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var collection = __webpack_require__(/*! ../internals/collection */ "bWFh");
var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "ZWaQ");
// `Map` constructor
// https://tc39.github.io/ecma262/#sec-map-objects
module.exports = collection('Map', function (init) {
return function Map() { return init(this, arguments.length ? arguments[0] : undefined); };
}, collectionStrong);
/***/ }),
/***/ "Ty5D":
/*!*******************************************************!*\
!*** ./node_modules/react-router/esm/react-router.js ***!
\*******************************************************/
/*! exports provided: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, __HistoryContext, __RouterContext, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter */
/*! exports used: MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, __RouterContext, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return MemoryRouter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Prompt; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Redirect; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return Route; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Router; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return StaticRouter; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return Switch; });
/* unused harmony export __HistoryContext */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return context; });
/* unused harmony export generatePath */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return matchPath; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return useHistory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return useLocation; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return useParams; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return useRouteMatch; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return withRouter; });
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "dI71");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var history__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! history */ "YS25");
/* harmony import */ var mini_create_react_context__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! mini-create-react-context */ "FUNW");
/* harmony import */ var tiny_invariant__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! tiny-invariant */ "9R94");
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "wx14");
/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! path-to-regexp */ "vRGJ");
/* harmony import */ var path_to_regexp__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(path_to_regexp__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! react-is */ "TOwV");
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutPropertiesLoose */ "zLVn");
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! hoist-non-react-statics */ "2mql");
/* harmony import */ var hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_9__);
// TODO: Replace with React.createContext once we can assume React 16+
var createNamedContext = function createNamedContext(name) {
var context = Object(mini_create_react_context__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])();
context.displayName = name;
return context;
};
var historyContext =
/*#__PURE__*/
createNamedContext("Router-History");
// TODO: Replace with React.createContext once we can assume React 16+
var createNamedContext$1 = function createNamedContext(name) {
var context = Object(mini_create_react_context__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])();
context.displayName = name;
return context;
};
var context =
/*#__PURE__*/
createNamedContext$1("Router");
/**
* The public API for putting history on context.
*/
var Router =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Router, _React$Component);
Router.computeRootMatch = function computeRootMatch(pathname) {
return {
path: "/",
url: "/",
params: {},
isExact: pathname === "/"
};
};
function Router(props) {
var _this;
_this = _React$Component.call(this, props) || this;
_this.state = {
location: props.history.location
}; // This is a bit of a hack. We have to start listening for location
// changes here in the constructor in case there are any <Redirect>s
// on the initial render. If there are, they will replace/push when
// they mount and since cDM fires in children before parents, we may
// get a new location before the <Router> is mounted.
_this._isMounted = false;
_this._pendingLocation = null;
if (!props.staticContext) {
_this.unlisten = props.history.listen(function (location) {
if (_this._isMounted) {
_this.setState({
location: location
});
} else {
_this._pendingLocation = location;
}
});
}
return _this;
}
var _proto = Router.prototype;
_proto.componentDidMount = function componentDidMount() {
this._isMounted = true;
if (this._pendingLocation) {
this.setState({
location: this._pendingLocation
});
}
};
_proto.componentWillUnmount = function componentWillUnmount() {
if (this.unlisten) this.unlisten();
};
_proto.render = function render() {
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Provider, {
value: {
history: this.props.history,
location: this.state.location,
match: Router.computeRootMatch(this.state.location.pathname),
staticContext: this.props.staticContext
}
}, react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(historyContext.Provider, {
children: this.props.children || null,
value: this.props.history
}));
};
return Router;
}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);
if (false) {}
/**
* The public API for a <Router> that stores location in memory.
*/
var MemoryRouter =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(MemoryRouter, _React$Component);
function MemoryRouter() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.history = Object(history__WEBPACK_IMPORTED_MODULE_2__[/* createMemoryHistory */ "d"])(_this.props);
return _this;
}
var _proto = MemoryRouter.prototype;
_proto.render = function render() {
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Router, {
history: this.history,
children: this.props.children
});
};
return MemoryRouter;
}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);
if (false) {}
var Lifecycle =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Lifecycle, _React$Component);
function Lifecycle() {
return _React$Component.apply(this, arguments) || this;
}
var _proto = Lifecycle.prototype;
_proto.componentDidMount = function componentDidMount() {
if (this.props.onMount) this.props.onMount.call(this, this);
};
_proto.componentDidUpdate = function componentDidUpdate(prevProps) {
if (this.props.onUpdate) this.props.onUpdate.call(this, this, prevProps);
};
_proto.componentWillUnmount = function componentWillUnmount() {
if (this.props.onUnmount) this.props.onUnmount.call(this, this);
};
_proto.render = function render() {
return null;
};
return Lifecycle;
}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);
/**
* The public API for prompting the user before navigating away from a screen.
*/
function Prompt(_ref) {
var message = _ref.message,
_ref$when = _ref.when,
when = _ref$when === void 0 ? true : _ref$when;
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false) : void 0;
if (!when || context.staticContext) return null;
var method = context.history.block;
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Lifecycle, {
onMount: function onMount(self) {
self.release = method(message);
},
onUpdate: function onUpdate(self, prevProps) {
if (prevProps.message !== message) {
self.release();
self.release = method(message);
}
},
onUnmount: function onUnmount(self) {
self.release();
},
message: message
});
});
}
if (false) { var messageType; }
var cache = {};
var cacheLimit = 10000;
var cacheCount = 0;
function compilePath(path) {
if (cache[path]) return cache[path];
var generator = path_to_regexp__WEBPACK_IMPORTED_MODULE_6___default.a.compile(path);
if (cacheCount < cacheLimit) {
cache[path] = generator;
cacheCount++;
}
return generator;
}
/**
* Public API for generating a URL pathname from a path and parameters.
*/
function generatePath(path, params) {
if (path === void 0) {
path = "/";
}
if (params === void 0) {
params = {};
}
return path === "/" ? path : compilePath(path)(params, {
pretty: true
});
}
/**
* The public API for navigating programmatically with a component.
*/
function Redirect(_ref) {
var computedMatch = _ref.computedMatch,
to = _ref.to,
_ref$push = _ref.push,
push = _ref$push === void 0 ? false : _ref$push;
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false) : void 0;
var history = context.history,
staticContext = context.staticContext;
var method = push ? history.push : history.replace;
var location = Object(history__WEBPACK_IMPORTED_MODULE_2__[/* createLocation */ "c"])(computedMatch ? typeof to === "string" ? generatePath(to, computedMatch.params) : Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, to, {
pathname: generatePath(to.pathname, computedMatch.params)
}) : to); // When rendering in a static context,
// set the new location immediately.
if (staticContext) {
method(location);
return null;
}
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Lifecycle, {
onMount: function onMount() {
method(location);
},
onUpdate: function onUpdate(self, prevProps) {
var prevLocation = Object(history__WEBPACK_IMPORTED_MODULE_2__[/* createLocation */ "c"])(prevProps.to);
if (!Object(history__WEBPACK_IMPORTED_MODULE_2__[/* locationsAreEqual */ "f"])(prevLocation, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, location, {
key: prevLocation.key
}))) {
method(location);
}
},
to: to
});
});
}
if (false) {}
var cache$1 = {};
var cacheLimit$1 = 10000;
var cacheCount$1 = 0;
function compilePath$1(path, options) {
var cacheKey = "" + options.end + options.strict + options.sensitive;
var pathCache = cache$1[cacheKey] || (cache$1[cacheKey] = {});
if (pathCache[path]) return pathCache[path];
var keys = [];
var regexp = path_to_regexp__WEBPACK_IMPORTED_MODULE_6___default()(path, keys, options);
var result = {
regexp: regexp,
keys: keys
};
if (cacheCount$1 < cacheLimit$1) {
pathCache[path] = result;
cacheCount$1++;
}
return result;
}
/**
* Public API for matching a URL pathname to a path.
*/
function matchPath(pathname, options) {
if (options === void 0) {
options = {};
}
if (typeof options === "string" || Array.isArray(options)) {
options = {
path: options
};
}
var _options = options,
path = _options.path,
_options$exact = _options.exact,
exact = _options$exact === void 0 ? false : _options$exact,
_options$strict = _options.strict,
strict = _options$strict === void 0 ? false : _options$strict,
_options$sensitive = _options.sensitive,
sensitive = _options$sensitive === void 0 ? false : _options$sensitive;
var paths = [].concat(path);
return paths.reduce(function (matched, path) {
if (!path && path !== "") return null;
if (matched) return matched;
var _compilePath = compilePath$1(path, {
end: exact,
strict: strict,
sensitive: sensitive
}),
regexp = _compilePath.regexp,
keys = _compilePath.keys;
var match = regexp.exec(pathname);
if (!match) return null;
var url = match[0],
values = match.slice(1);
var isExact = pathname === url;
if (exact && !isExact) return null;
return {
path: path,
// the path used to match
url: path === "/" && url === "" ? "/" : url,
// the matched portion of the URL
isExact: isExact,
// whether or not we matched exactly
params: keys.reduce(function (memo, key, index) {
memo[key.name] = values[index];
return memo;
}, {})
};
}, null);
}
function isEmptyChildren(children) {
return react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.count(children) === 0;
}
function evalChildrenDev(children, props, path) {
var value = children(props);
false ? undefined : void 0;
return value || null;
}
/**
* The public API for matching a single path and rendering.
*/
var Route =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Route, _React$Component);
function Route() {
return _React$Component.apply(this, arguments) || this;
}
var _proto = Route.prototype;
_proto.render = function render() {
var _this = this;
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context$1) {
!context$1 ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false) : void 0;
var location = _this.props.location || context$1.location;
var match = _this.props.computedMatch ? _this.props.computedMatch // <Switch> already computed the match for us
: _this.props.path ? matchPath(location.pathname, _this.props) : context$1.match;
var props = Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, context$1, {
location: location,
match: match
});
var _this$props = _this.props,
children = _this$props.children,
component = _this$props.component,
render = _this$props.render; // Preact uses an empty array as children by
// default, so use null if that's the case.
if (Array.isArray(children) && children.length === 0) {
children = null;
}
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Provider, {
value: props
}, props.match ? children ? typeof children === "function" ? false ? undefined : children(props) : children : component ? react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(component, props) : render ? render(props) : null : typeof children === "function" ? false ? undefined : children(props) : null);
});
};
return Route;
}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);
if (false) {}
function addLeadingSlash(path) {
return path.charAt(0) === "/" ? path : "/" + path;
}
function addBasename(basename, location) {
if (!basename) return location;
return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, location, {
pathname: addLeadingSlash(basename) + location.pathname
});
}
function stripBasename(basename, location) {
if (!basename) return location;
var base = addLeadingSlash(basename);
if (location.pathname.indexOf(base) !== 0) return location;
return Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, location, {
pathname: location.pathname.substr(base.length)
});
}
function createURL(location) {
return typeof location === "string" ? location : Object(history__WEBPACK_IMPORTED_MODULE_2__[/* createPath */ "e"])(location);
}
function staticHandler(methodName) {
return function () {
false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false) ;
};
}
function noop() {}
/**
* The public top-level API for a "static" <Router>, so-called because it
* can't actually change the current location. Instead, it just records
* location changes in a context object. Useful mainly in testing and
* server-rendering scenarios.
*/
var StaticRouter =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(StaticRouter, _React$Component);
function StaticRouter() {
var _this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
_this.handlePush = function (location) {
return _this.navigateTo(location, "PUSH");
};
_this.handleReplace = function (location) {
return _this.navigateTo(location, "REPLACE");
};
_this.handleListen = function () {
return noop;
};
_this.handleBlock = function () {
return noop;
};
return _this;
}
var _proto = StaticRouter.prototype;
_proto.navigateTo = function navigateTo(location, action) {
var _this$props = this.props,
_this$props$basename = _this$props.basename,
basename = _this$props$basename === void 0 ? "" : _this$props$basename,
_this$props$context = _this$props.context,
context = _this$props$context === void 0 ? {} : _this$props$context;
context.action = action;
context.location = addBasename(basename, Object(history__WEBPACK_IMPORTED_MODULE_2__[/* createLocation */ "c"])(location));
context.url = createURL(context.location);
};
_proto.render = function render() {
var _this$props2 = this.props,
_this$props2$basename = _this$props2.basename,
basename = _this$props2$basename === void 0 ? "" : _this$props2$basename,
_this$props2$context = _this$props2.context,
context = _this$props2$context === void 0 ? {} : _this$props2$context,
_this$props2$location = _this$props2.location,
location = _this$props2$location === void 0 ? "/" : _this$props2$location,
rest = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(_this$props2, ["basename", "context", "location"]);
var history = {
createHref: function createHref(path) {
return addLeadingSlash(basename + createURL(path));
},
action: "POP",
location: stripBasename(basename, Object(history__WEBPACK_IMPORTED_MODULE_2__[/* createLocation */ "c"])(location)),
push: this.handlePush,
replace: this.handleReplace,
go: staticHandler("go"),
goBack: staticHandler("goBack"),
goForward: staticHandler("goForward"),
listen: this.handleListen,
block: this.handleBlock
};
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Router, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, rest, {
history: history,
staticContext: context
}));
};
return StaticRouter;
}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);
if (false) {}
/**
* The public API for rendering the first <Route> that matches.
*/
var Switch =
/*#__PURE__*/
function (_React$Component) {
Object(_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Switch, _React$Component);
function Switch() {
return _React$Component.apply(this, arguments) || this;
}
var _proto = Switch.prototype;
_proto.render = function render() {
var _this = this;
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false) : void 0;
var location = _this.props.location || context.location;
var element, match; // We use React.Children.forEach instead of React.Children.toArray().find()
// here because toArray adds keys to all child elements and we do not want
// to trigger an unmount/remount for two <Route>s that render the same
// component at different URLs.
react__WEBPACK_IMPORTED_MODULE_1___default.a.Children.forEach(_this.props.children, function (child) {
if (match == null && react__WEBPACK_IMPORTED_MODULE_1___default.a.isValidElement(child)) {
element = child;
var path = child.props.path || child.props.from;
match = path ? matchPath(location.pathname, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, child.props, {
path: path
})) : context.match;
}
});
return match ? react__WEBPACK_IMPORTED_MODULE_1___default.a.cloneElement(element, {
location: location,
computedMatch: match
}) : null;
});
};
return Switch;
}(react__WEBPACK_IMPORTED_MODULE_1___default.a.Component);
if (false) {}
/**
* A public higher-order component to access the imperative API
*/
function withRouter(Component) {
var displayName = "withRouter(" + (Component.displayName || Component.name) + ")";
var C = function C(props) {
var wrappedComponentRef = props.wrappedComponentRef,
remainingProps = Object(_babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(props, ["wrappedComponentRef"]);
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(context.Consumer, null, function (context) {
!context ? false ? undefined : Object(tiny_invariant__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(false) : void 0;
return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])({}, remainingProps, context, {
ref: wrappedComponentRef
}));
});
};
C.displayName = displayName;
C.WrappedComponent = Component;
if (false) {}
return hoist_non_react_statics__WEBPACK_IMPORTED_MODULE_9___default()(C, Component);
}
var useContext = react__WEBPACK_IMPORTED_MODULE_1___default.a.useContext;
function useHistory() {
if (false) {}
return useContext(historyContext);
}
function useLocation() {
if (false) {}
return useContext(context).location;
}
function useParams() {
if (false) {}
var match = useContext(context).match;
return match ? match.params : {};
}
function useRouteMatch(path) {
if (false) {}
var location = useLocation();
var match = useContext(context).match;
return path ? matchPath(location.pathname, path) : match;
}
if (false) { var secondaryBuildName, initialBuildName, buildNames, key, global; }
//# sourceMappingURL=react-router.js.map
/***/ }),
/***/ "U3f4":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.regexp.flags.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var objectDefinePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var regExpFlags = __webpack_require__(/*! ../internals/regexp-flags */ "rW0t");
var UNSUPPORTED_Y = __webpack_require__(/*! ../internals/regexp-sticky-helpers */ "n3/R").UNSUPPORTED_Y;
// `RegExp.prototype.flags` getter
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
if (DESCRIPTORS && (/./g.flags != 'g' || UNSUPPORTED_Y)) {
objectDefinePropertyModule.f(RegExp.prototype, 'flags', {
configurable: true,
get: regExpFlags
});
}
/***/ }),
/***/ "U8pU":
/*!***********************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/typeof.js ***!
\***********************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _typeof; });
function _typeof(o) {
"@babel/helpers - typeof";
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
/***/ }),
/***/ "UF9F":
/*!*************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/CloseCircleFilled.js ***!
\*************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var CloseCircleFilled = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" } }] }, "name": "close-circle", "theme": "filled" };
exports.default = CloseCircleFilled;
/***/ }),
/***/ "UMSQ":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/to-length.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var min = Math.min;
// `ToLength` abstract operation
// https://tc39.github.io/ecma262/#sec-tolength
module.exports = function (argument) {
return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
};
/***/ }),
/***/ "UTVS":
/*!***********************************************!*\
!*** ./node_modules/core-js/internals/has.js ***!
\***********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
var hasOwnProperty = {}.hasOwnProperty;
module.exports = function (it, key) {
return hasOwnProperty.call(it, key);
};
/***/ }),
/***/ "UVaH":
/*!*******************************************!*\
!*** ./node_modules/has-symbols/index.js ***!
\*******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var origSymbol = typeof Symbol !== 'undefined' && Symbol;
var hasSymbolSham = __webpack_require__(/*! ./shams */ "FpZJ");
module.exports = function hasNativeSymbols() {
if (typeof origSymbol !== 'function') { return false; }
if (typeof Symbol !== 'function') { return false; }
if (typeof origSymbol('foo') !== 'symbol') { return false; }
if (typeof Symbol('bar') !== 'symbol') { return false; }
return hasSymbolSham();
};
/***/ }),
/***/ "Uaa1":
/*!***************************************************************************!*\
!*** ./node_modules/antd/node_modules/rc-trigger/es/index.js + 5 modules ***!
\***************************************************************************/
/*! exports provided: generateTrigger, default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-motion/es/index.js because of ./src/components/User/PopLoginRegister/PopLogin.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-align/es/index.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/Popup.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/findDOMNode.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// UNUSED EXPORTS: generateTrigger
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("VTBJ");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("1OyB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("vuIU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("JX7q");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("Ji7U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
var createSuper = __webpack_require__("LK+K");
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// EXTERNAL MODULE: ./node_modules/react-dom/index.js
var react_dom = __webpack_require__("i8i4");
var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/contains.js
var contains = __webpack_require__("l4aY");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/findDOMNode.js
var findDOMNode = __webpack_require__("m+aA");
// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js
var es_ref = __webpack_require__("c+Xe");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js
var addEventListener = __webpack_require__("zT1h");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Portal.js
var Portal = __webpack_require__("QC+M");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-trigger/es/utils/alignUtil.js
function isPointsEq(a1, a2, isAlignPoint) {
if (isAlignPoint) {
return a1[0] === a2[0];
}
return a1[0] === a2[0] && a1[1] === a2[1];
}
function getAlignFromPlacement(builtinPlacements, placementStr, align) {
var baseAlign = builtinPlacements[placementStr] || {};
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, baseAlign), align);
}
function getAlignPopupClassName(builtinPlacements, prefixCls, align, isAlignPoint) {
var points = align.points;
var placements = Object.keys(builtinPlacements);
for (var i = 0; i < placements.length; i += 1) {
var placement = placements[i];
if (isPointsEq(builtinPlacements[placement].points, points, isAlignPoint)) {
return "".concat(prefixCls, "-placement-").concat(placement);
}
}
return '';
}
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__("Ff2n");
// EXTERNAL MODULE: ./node_modules/raf/index.js
var raf = __webpack_require__("xEkU");
var raf_default = /*#__PURE__*/__webpack_require__.n(raf);
// EXTERNAL MODULE: ./node_modules/rc-align/es/index.js + 6 modules
var es = __webpack_require__("9mu1");
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-motion/es/index.js + 5 modules
var rc_motion_es = __webpack_require__("HTfv");
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-trigger/es/PopupInner.js
var PopupInner_PopupInner = function PopupInner(props, ref) {
var prefixCls = props.prefixCls,
className = props.className,
style = props.style,
children = props.children,
onMouseEnter = props.onMouseEnter,
onMouseLeave = props.onMouseLeave,
onMouseDown = props.onMouseDown,
onTouchStart = props.onTouchStart;
var childNode = children;
if (react["Children"].count(children) > 1) {
childNode = react["createElement"]("div", {
className: "".concat(prefixCls, "-content")
}, children);
}
return react["createElement"]("div", {
ref: ref,
className: className,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onMouseDown: onMouseDown,
onTouchStart: onTouchStart,
style: style
}, childNode);
};
var RefPopupInner = react["forwardRef"](PopupInner_PopupInner);
RefPopupInner.displayName = 'PopupInner';
/* harmony default export */ var es_PopupInner = (RefPopupInner);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-trigger/es/utils/legacyUtil.js
function getMotion(_ref) {
var prefixCls = _ref.prefixCls,
motion = _ref.motion,
animation = _ref.animation,
transitionName = _ref.transitionName;
if (motion) {
return motion;
}
if (animation) {
return {
motionName: "".concat(prefixCls, "-").concat(animation)
};
}
if (transitionName) {
return {
motionName: transitionName
};
}
return null;
}
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-trigger/es/Popup.js
/* eslint-disable no-param-reassign */
function supportMotion(motion) {
return motion && motion.motionName;
}
var Popup_Popup = /*#__PURE__*/function (_Component) {
Object(inherits["a" /* default */])(Popup, _Component);
var _super = Object(createSuper["a" /* default */])(Popup);
function Popup() {
var _this;
Object(classCallCheck["a" /* default */])(this, Popup);
_this = _super.apply(this, arguments);
_this.state = {
targetWidth: undefined,
targetHeight: undefined,
status: null,
prevVisible: null,
alignClassName: null,
inMotion: false
};
_this.popupRef = react_default.a.createRef();
_this.alignRef = react_default.a.createRef();
_this.nextFrameState = null;
_this.nextFrameId = null;
_this.onAlign = function (popupDomNode, align) {
var status = _this.state.status;
var _this$props = _this.props,
getClassNameFromAlign = _this$props.getClassNameFromAlign,
onAlign = _this$props.onAlign;
var alignClassName = getClassNameFromAlign(align);
if (status === 'align') {
_this.setState({
alignClassName: alignClassName,
status: 'aligned'
}, function () {
_this.alignRef.current.forceAlign();
});
} else if (status === 'aligned') {
_this.setState({
alignClassName: alignClassName,
status: 'afterAlign'
});
onAlign(popupDomNode, align);
} else {
_this.setState({
alignClassName: alignClassName
});
}
};
_this.onMotionEnd = function () {
var visible = _this.props.visible;
_this.setState({
status: visible ? 'AfterMotion' : 'stable',
inMotion: false
});
};
_this.setStateOnNextFrame = function (state) {
_this.cancelFrameState();
_this.nextFrameState = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, _this.nextFrameState), state);
_this.nextFrameId = raf_default()(function () {
var submitState = Object(objectSpread2["a" /* default */])({}, _this.nextFrameState);
_this.nextFrameState = null;
_this.setState(submitState);
});
};
_this.getMotion = function () {
return Object(objectSpread2["a" /* default */])({}, getMotion(_this.props));
}; // `target` on `rc-align` can accept as a function to get the bind element or a point.
// ref: https://www.npmjs.com/package/rc-align
_this.getAlignTarget = function () {
var _this$props2 = _this.props,
point = _this$props2.point,
getRootDomNode = _this$props2.getRootDomNode;
if (point) {
return point;
}
return getRootDomNode;
};
_this.cancelFrameState = function () {
raf_default.a.cancel(_this.nextFrameId);
};
_this.renderPopupElement = function () {
var _this$state = _this.state,
status = _this$state.status,
targetHeight = _this$state.targetHeight,
targetWidth = _this$state.targetWidth,
alignClassName = _this$state.alignClassName;
var _this$props3 = _this.props,
prefixCls = _this$props3.prefixCls,
className = _this$props3.className,
style = _this$props3.style,
stretch = _this$props3.stretch,
visible = _this$props3.visible,
align = _this$props3.align,
destroyPopupOnHide = _this$props3.destroyPopupOnHide,
onMouseEnter = _this$props3.onMouseEnter,
onMouseLeave = _this$props3.onMouseLeave,
onMouseDown = _this$props3.onMouseDown,
onTouchStart = _this$props3.onTouchStart,
children = _this$props3.children;
var mergedClassName = classnames_default()(prefixCls, className, alignClassName);
var hiddenClassName = "".concat(prefixCls, "-hidden"); // ================== Style ==================
var sizeStyle = {};
if (stretch) {
// Stretch with target
if (stretch.indexOf('height') !== -1) {
sizeStyle.height = targetHeight;
} else if (stretch.indexOf('minHeight') !== -1) {
sizeStyle.minHeight = targetHeight;
}
if (stretch.indexOf('width') !== -1) {
sizeStyle.width = targetWidth;
} else if (stretch.indexOf('minWidth') !== -1) {
sizeStyle.minWidth = targetWidth;
}
}
var mergedStyle = Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, sizeStyle), _this.getZIndexStyle()), style), {}, {
opacity: status === 'stable' || !visible ? undefined : 0,
pointerEvents: status === 'stable' || !visible ? undefined : 'none'
}); // ================= Motions =================
var mergedMotion = _this.getMotion();
var mergedMotionVisible = visible;
if (visible && status !== 'beforeMotion' && status !== 'motion' && status !== 'stable') {
mergedMotion.motionAppear = false;
mergedMotion.motionEnter = false;
mergedMotion.motionLeave = false;
}
if (status === 'afterAlign' || status === 'beforeMotion') {
mergedMotionVisible = false;
} // Update trigger to tell if is in motion
['onEnterStart', 'onAppearStart', 'onLeaveStart'].forEach(function (event) {
var originFunc = mergedMotion === null || mergedMotion === void 0 ? void 0 : mergedMotion[event];
mergedMotion[event] = function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
originFunc === null || originFunc === void 0 ? void 0 : originFunc.apply(void 0, args);
_this.setState({
inMotion: true
});
};
}); // ================== Align ==================
var mergedAlignDisabled = !visible || status !== 'align' && status !== 'aligned' && status !== 'stable'; // ================== Popup ==================
var mergedPopupVisible = true;
if (status === 'stable') {
mergedPopupVisible = visible;
} // Only remove popup since mask may still need animation
if (destroyPopupOnHide && !mergedPopupVisible) {
return null;
}
return react_default.a.createElement(rc_motion_es["b" /* default */], Object.assign({
visible: mergedMotionVisible
}, mergedMotion, {
removeOnLeave: false,
onEnterEnd: _this.onMotionEnd,
onLeaveEnd: _this.onMotionEnd,
leavedClassName: hiddenClassName
}), function (_ref, motionRef) {
var motionStyle = _ref.style,
motionClassName = _ref.className;
return react_default.a.createElement(es["a" /* default */], {
target: _this.getAlignTarget(),
key: "popup",
ref: _this.alignRef,
monitorWindowResize: true,
disabled: mergedAlignDisabled,
align: align,
onAlign: _this.onAlign
}, react_default.a.createElement(es_PopupInner, {
prefixCls: prefixCls,
className: classnames_default()(mergedClassName, motionClassName),
ref: Object(es_ref["a" /* composeRef */])(motionRef, _this.popupRef),
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave,
onMouseDown: onMouseDown,
onTouchStart: onTouchStart,
style: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, mergedStyle), motionStyle)
}, children));
});
};
_this.renderMaskElement = function () {
var _this$props4 = _this.props,
mask = _this$props4.mask,
maskMotion = _this$props4.maskMotion,
maskTransitionName = _this$props4.maskTransitionName,
maskAnimation = _this$props4.maskAnimation,
prefixCls = _this$props4.prefixCls,
visible = _this$props4.visible;
if (!mask) {
return null;
}
var motion = {};
if (maskMotion && maskMotion.motionName) {
motion = Object(objectSpread2["a" /* default */])({
motionAppear: true
}, getMotion({
motion: maskMotion,
prefixCls: prefixCls,
transitionName: maskTransitionName,
animation: maskAnimation
}));
}
return react_default.a.createElement(rc_motion_es["b" /* default */], Object.assign({}, motion, {
visible: visible,
removeOnLeave: true
}), function (_ref2) {
var className = _ref2.className;
return react_default.a.createElement("div", {
style: _this.getZIndexStyle(),
key: "mask",
className: classnames_default()("".concat(prefixCls, "-mask"), className)
});
});
};
return _this;
}
Object(createClass["a" /* default */])(Popup, [{
key: "componentDidMount",
value: function componentDidMount() {
this.componentDidUpdate();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
var status = this.state.status;
var _this$props5 = this.props,
getRootDomNode = _this$props5.getRootDomNode,
visible = _this$props5.visible,
stretch = _this$props5.stretch; // If there is a pending state update, cancel it, a new one will be set if necessary
this.cancelFrameState();
if (visible && status !== 'stable') {
switch (status) {
case null:
{
this.setStateOnNextFrame({
status: stretch ? 'measure' : 'align'
});
break;
}
case 'afterAlign':
{
this.setStateOnNextFrame({
status: supportMotion(this.getMotion()) ? 'beforeMotion' : 'stable'
});
break;
}
case 'AfterMotion':
{
this.setStateOnNextFrame({
status: 'stable'
});
break;
}
default:
{
// Go to next status
var queue = ['measure', 'align', null, 'beforeMotion', 'motion'];
var index = queue.indexOf(status);
var nextStatus = queue[index + 1];
if (index !== -1 && nextStatus) {
this.setStateOnNextFrame({
status: nextStatus
});
}
}
}
} // Measure stretch size
if (status === 'measure') {
var $ele = getRootDomNode();
if ($ele) {
this.setStateOnNextFrame({
targetHeight: $ele.offsetHeight,
targetWidth: $ele.offsetWidth
});
}
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.cancelFrameState();
}
}, {
key: "getZIndexStyle",
value: function getZIndexStyle() {
var zIndex = this.props.zIndex;
return {
zIndex: zIndex
};
}
}, {
key: "render",
value: function render() {
return react_default.a.createElement("div", null, this.renderMaskElement(), this.renderPopupElement());
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(_ref3, _ref4) {
var visible = _ref3.visible,
props = Object(objectWithoutProperties["a" /* default */])(_ref3, ["visible"]);
var prevVisible = _ref4.prevVisible,
status = _ref4.status,
inMotion = _ref4.inMotion;
var newState = {
prevVisible: visible,
status: status
};
var mergedMotion = getMotion(props);
if (prevVisible === null && visible === false) {
// Init render should always be stable
newState.status = 'stable';
newState.inMotion = false;
} else if (visible !== prevVisible) {
newState.inMotion = false;
if (visible || supportMotion(mergedMotion) && inMotion) {
newState.status = null;
} else {
newState.status = 'stable';
}
if (visible) {
newState.alignClassName = null;
}
}
return newState;
}
}]);
return Popup;
}(react["Component"]);
/* harmony default export */ var es_Popup = (Popup_Popup);
/* eslint-enable */
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-trigger/es/context.js
var TriggerContext = react["createContext"](null);
/* harmony default export */ var context = (TriggerContext);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-trigger/es/index.js
function noop() {}
function returnEmptyString() {
return '';
}
function returnDocument() {
return window.document;
}
var ALL_HANDLERS = ['onClick', 'onMouseDown', 'onTouchStart', 'onMouseEnter', 'onMouseLeave', 'onFocus', 'onBlur', 'onContextMenu'];
/**
* Internal usage. Do not use in your code since this will be removed.
*/
function generateTrigger(PortalComponent) {
var Trigger = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(Trigger, _React$Component);
var _super = Object(createSuper["a" /* default */])(Trigger);
function Trigger(props) {
var _this;
Object(classCallCheck["a" /* default */])(this, Trigger);
_this = _super.call(this, props);
_this.popupRef = react_default.a.createRef();
_this.triggerRef = react_default.a.createRef();
_this.onMouseEnter = function (e) {
var mouseEnterDelay = _this.props.mouseEnterDelay;
_this.fireEvents('onMouseEnter', e);
_this.delaySetPopupVisible(true, mouseEnterDelay, mouseEnterDelay ? null : e);
};
_this.onMouseMove = function (e) {
_this.fireEvents('onMouseMove', e);
_this.setPoint(e);
};
_this.onMouseLeave = function (e) {
_this.fireEvents('onMouseLeave', e);
_this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);
};
_this.onPopupMouseEnter = function () {
_this.clearDelayTimer();
};
_this.onPopupMouseLeave = function (e) {
// https://github.com/react-component/trigger/pull/13
// react bug?
if (e.relatedTarget && !e.relatedTarget.setTimeout && _this.popupRef.current && _this.popupRef.current.popupRef.current && Object(contains["a" /* default */])(_this.popupRef.current.popupRef.current, e.relatedTarget)) {
return;
}
_this.delaySetPopupVisible(false, _this.props.mouseLeaveDelay);
};
_this.onFocus = function (e) {
_this.fireEvents('onFocus', e); // incase focusin and focusout
_this.clearDelayTimer();
if (_this.isFocusToShow()) {
_this.focusTime = Date.now();
_this.delaySetPopupVisible(true, _this.props.focusDelay);
}
};
_this.onMouseDown = function (e) {
_this.fireEvents('onMouseDown', e);
_this.preClickTime = Date.now();
};
_this.onTouchStart = function (e) {
_this.fireEvents('onTouchStart', e);
_this.preTouchTime = Date.now();
};
_this.onBlur = function (e) {
_this.fireEvents('onBlur', e);
_this.clearDelayTimer();
if (_this.isBlurToHide()) {
_this.delaySetPopupVisible(false, _this.props.blurDelay);
}
};
_this.onContextMenu = function (e) {
e.preventDefault();
_this.fireEvents('onContextMenu', e);
_this.setPopupVisible(true, e);
};
_this.onContextMenuClose = function () {
if (_this.isContextMenuToShow()) {
_this.close();
}
};
_this.onClick = function (event) {
_this.fireEvents('onClick', event); // focus will trigger click
if (_this.focusTime) {
var preTime;
if (_this.preClickTime && _this.preTouchTime) {
preTime = Math.min(_this.preClickTime, _this.preTouchTime);
} else if (_this.preClickTime) {
preTime = _this.preClickTime;
} else if (_this.preTouchTime) {
preTime = _this.preTouchTime;
}
if (Math.abs(preTime - _this.focusTime) < 20) {
return;
}
_this.focusTime = 0;
}
_this.preClickTime = 0;
_this.preTouchTime = 0; // Only prevent default when all the action is click.
// https://github.com/ant-design/ant-design/issues/17043
// https://github.com/ant-design/ant-design/issues/17291
if (_this.isClickToShow() && (_this.isClickToHide() || _this.isBlurToHide()) && event && event.preventDefault) {
event.preventDefault();
}
var nextVisible = !_this.state.popupVisible;
if (_this.isClickToHide() && !nextVisible || nextVisible && _this.isClickToShow()) {
_this.setPopupVisible(!_this.state.popupVisible, event);
}
};
_this.onPopupMouseDown = function () {
_this.hasPopupMouseDown = true;
clearTimeout(_this.mouseDownTimeout);
_this.mouseDownTimeout = window.setTimeout(function () {
_this.hasPopupMouseDown = false;
}, 0);
if (_this.context) {
var _this$context;
(_this$context = _this.context).onPopupMouseDown.apply(_this$context, arguments);
}
};
_this.onDocumentClick = function (event) {
if (_this.props.mask && !_this.props.maskClosable) {
return;
}
var target = event.target;
var root = _this.getRootDomNode();
var popupNode = _this.getPopupDomNode();
if (!Object(contains["a" /* default */])(root, target) && !Object(contains["a" /* default */])(popupNode, target) && !_this.hasPopupMouseDown) {
_this.close();
}
};
_this.getRootDomNode = function () {
var getTriggerDOMNode = _this.props.getTriggerDOMNode;
if (getTriggerDOMNode) {
return getTriggerDOMNode(_this.triggerRef.current);
}
try {
var domNode = Object(findDOMNode["a" /* default */])(_this.triggerRef.current);
if (domNode) {
return domNode;
}
} catch (err) {// Do nothing
}
return react_dom_default.a.findDOMNode(Object(assertThisInitialized["a" /* default */])(_this));
};
_this.getPopupClassNameFromAlign = function (align) {
var className = [];
var _this$props = _this.props,
popupPlacement = _this$props.popupPlacement,
builtinPlacements = _this$props.builtinPlacements,
prefixCls = _this$props.prefixCls,
alignPoint = _this$props.alignPoint,
getPopupClassNameFromAlign = _this$props.getPopupClassNameFromAlign;
if (popupPlacement && builtinPlacements) {
className.push(getAlignPopupClassName(builtinPlacements, prefixCls, align, alignPoint));
}
if (getPopupClassNameFromAlign) {
className.push(getPopupClassNameFromAlign(align));
}
return className.join(' ');
};
_this.getComponent = function () {
var _this$props2 = _this.props,
prefixCls = _this$props2.prefixCls,
destroyPopupOnHide = _this$props2.destroyPopupOnHide,
popupClassName = _this$props2.popupClassName,
onPopupAlign = _this$props2.onPopupAlign,
popupMotion = _this$props2.popupMotion,
popupAnimation = _this$props2.popupAnimation,
popupTransitionName = _this$props2.popupTransitionName,
popupStyle = _this$props2.popupStyle,
mask = _this$props2.mask,
maskAnimation = _this$props2.maskAnimation,
maskTransitionName = _this$props2.maskTransitionName,
maskMotion = _this$props2.maskMotion,
zIndex = _this$props2.zIndex,
popup = _this$props2.popup,
stretch = _this$props2.stretch,
alignPoint = _this$props2.alignPoint;
var _this$state = _this.state,
popupVisible = _this$state.popupVisible,
point = _this$state.point;
var align = _this.getPopupAlign();
var mouseProps = {};
if (_this.isMouseEnterToShow()) {
mouseProps.onMouseEnter = _this.onPopupMouseEnter;
}
if (_this.isMouseLeaveToHide()) {
mouseProps.onMouseLeave = _this.onPopupMouseLeave;
}
mouseProps.onMouseDown = _this.onPopupMouseDown;
mouseProps.onTouchStart = _this.onPopupMouseDown;
return react_default.a.createElement(es_Popup, Object.assign({
prefixCls: prefixCls,
destroyPopupOnHide: destroyPopupOnHide,
visible: popupVisible,
point: alignPoint && point,
className: popupClassName,
align: align,
onAlign: onPopupAlign,
animation: popupAnimation,
getClassNameFromAlign: _this.getPopupClassNameFromAlign
}, mouseProps, {
stretch: stretch,
getRootDomNode: _this.getRootDomNode,
style: popupStyle,
mask: mask,
zIndex: zIndex,
transitionName: popupTransitionName,
maskAnimation: maskAnimation,
maskTransitionName: maskTransitionName,
maskMotion: maskMotion,
ref: _this.popupRef,
motion: popupMotion
}), typeof popup === 'function' ? popup() : popup);
};
_this.getContainer = function () {
var _assertThisInitialize = Object(assertThisInitialized["a" /* default */])(_this),
props = _assertThisInitialize.props;
var popupContainer = document.createElement('div'); // Make sure default popup container will never cause scrollbar appearing
// https://github.com/react-component/trigger/issues/41
popupContainer.style.position = 'absolute';
popupContainer.style.top = '0';
popupContainer.style.left = '0';
popupContainer.style.width = '100%';
var mountNode = props.getPopupContainer ? props.getPopupContainer(_this.getRootDomNode()) : props.getDocument().body;
mountNode.appendChild(popupContainer);
return popupContainer;
};
_this.setPoint = function (point) {
var alignPoint = _this.props.alignPoint;
if (!alignPoint || !point) return;
_this.setState({
point: {
pageX: point.pageX,
pageY: point.pageY
}
});
};
_this.handlePortalUpdate = function () {
if (_this.state.prevPopupVisible !== _this.state.popupVisible) {
_this.props.afterPopupVisibleChange(_this.state.popupVisible);
}
};
var popupVisible;
if ('popupVisible' in props) {
popupVisible = !!props.popupVisible;
} else {
popupVisible = !!props.defaultPopupVisible;
}
_this.state = {
prevPopupVisible: popupVisible,
popupVisible: popupVisible
};
ALL_HANDLERS.forEach(function (h) {
_this["fire".concat(h)] = function (e) {
_this.fireEvents(h, e);
};
});
return _this;
}
Object(createClass["a" /* default */])(Trigger, [{
key: "componentDidMount",
value: function componentDidMount() {
this.componentDidUpdate();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
var props = this.props;
var state = this.state; // We must listen to `mousedown` or `touchstart`, edge case:
// https://github.com/ant-design/ant-design/issues/5804
// https://github.com/react-component/calendar/issues/250
// https://github.com/react-component/trigger/issues/50
if (state.popupVisible) {
var currentDocument;
if (!this.clickOutsideHandler && (this.isClickToHide() || this.isContextMenuToShow())) {
currentDocument = props.getDocument();
this.clickOutsideHandler = Object(addEventListener["a" /* default */])(currentDocument, 'mousedown', this.onDocumentClick);
} // always hide on mobile
if (!this.touchOutsideHandler) {
currentDocument = currentDocument || props.getDocument();
this.touchOutsideHandler = Object(addEventListener["a" /* default */])(currentDocument, 'touchstart', this.onDocumentClick);
} // close popup when trigger type contains 'onContextMenu' and document is scrolling.
if (!this.contextMenuOutsideHandler1 && this.isContextMenuToShow()) {
currentDocument = currentDocument || props.getDocument();
this.contextMenuOutsideHandler1 = Object(addEventListener["a" /* default */])(currentDocument, 'scroll', this.onContextMenuClose);
} // close popup when trigger type contains 'onContextMenu' and window is blur.
if (!this.contextMenuOutsideHandler2 && this.isContextMenuToShow()) {
this.contextMenuOutsideHandler2 = Object(addEventListener["a" /* default */])(window, 'blur', this.onContextMenuClose);
}
return;
}
this.clearOutsideHandler();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.clearDelayTimer();
this.clearOutsideHandler();
clearTimeout(this.mouseDownTimeout);
}
}, {
key: "getPopupDomNode",
value: function getPopupDomNode() {
// for test
if (this.popupRef.current && this.popupRef.current.popupRef.current) {
return this.popupRef.current.popupRef.current;
}
return null;
}
}, {
key: "getPopupAlign",
value: function getPopupAlign() {
var props = this.props;
var popupPlacement = props.popupPlacement,
popupAlign = props.popupAlign,
builtinPlacements = props.builtinPlacements;
if (popupPlacement && builtinPlacements) {
return getAlignFromPlacement(builtinPlacements, popupPlacement, popupAlign);
}
return popupAlign;
}
/**
* @param popupVisible Show or not the popup element
* @param event SyntheticEvent, used for `pointAlign`
*/
}, {
key: "setPopupVisible",
value: function setPopupVisible(popupVisible, event) {
var alignPoint = this.props.alignPoint;
var prevPopupVisible = this.state.popupVisible;
this.clearDelayTimer();
if (prevPopupVisible !== popupVisible) {
if (!('popupVisible' in this.props)) {
this.setState({
popupVisible: popupVisible,
prevPopupVisible: prevPopupVisible
});
}
this.props.onPopupVisibleChange(popupVisible);
} // Always record the point position since mouseEnterDelay will delay the show
if (alignPoint && event) {
this.setPoint(event);
}
}
}, {
key: "delaySetPopupVisible",
value: function delaySetPopupVisible(visible, delayS, event) {
var _this2 = this;
var delay = delayS * 1000;
this.clearDelayTimer();
if (delay) {
var point = event ? {
pageX: event.pageX,
pageY: event.pageY
} : null;
this.delayTimer = window.setTimeout(function () {
_this2.setPopupVisible(visible, point);
_this2.clearDelayTimer();
}, delay);
} else {
this.setPopupVisible(visible, event);
}
}
}, {
key: "clearDelayTimer",
value: function clearDelayTimer() {
if (this.delayTimer) {
clearTimeout(this.delayTimer);
this.delayTimer = null;
}
}
}, {
key: "clearOutsideHandler",
value: function clearOutsideHandler() {
if (this.clickOutsideHandler) {
this.clickOutsideHandler.remove();
this.clickOutsideHandler = null;
}
if (this.contextMenuOutsideHandler1) {
this.contextMenuOutsideHandler1.remove();
this.contextMenuOutsideHandler1 = null;
}
if (this.contextMenuOutsideHandler2) {
this.contextMenuOutsideHandler2.remove();
this.contextMenuOutsideHandler2 = null;
}
if (this.touchOutsideHandler) {
this.touchOutsideHandler.remove();
this.touchOutsideHandler = null;
}
}
}, {
key: "createTwoChains",
value: function createTwoChains(event) {
var childPros = this.props.children.props;
var props = this.props;
if (childPros[event] && props[event]) {
return this["fire".concat(event)];
}
return childPros[event] || props[event];
}
}, {
key: "isClickToShow",
value: function isClickToShow() {
var _this$props3 = this.props,
action = _this$props3.action,
showAction = _this$props3.showAction;
return action.indexOf('click') !== -1 || showAction.indexOf('click') !== -1;
}
}, {
key: "isContextMenuToShow",
value: function isContextMenuToShow() {
var _this$props4 = this.props,
action = _this$props4.action,
showAction = _this$props4.showAction;
return action.indexOf('contextMenu') !== -1 || showAction.indexOf('contextMenu') !== -1;
}
}, {
key: "isClickToHide",
value: function isClickToHide() {
var _this$props5 = this.props,
action = _this$props5.action,
hideAction = _this$props5.hideAction;
return action.indexOf('click') !== -1 || hideAction.indexOf('click') !== -1;
}
}, {
key: "isMouseEnterToShow",
value: function isMouseEnterToShow() {
var _this$props6 = this.props,
action = _this$props6.action,
showAction = _this$props6.showAction;
return action.indexOf('hover') !== -1 || showAction.indexOf('mouseEnter') !== -1;
}
}, {
key: "isMouseLeaveToHide",
value: function isMouseLeaveToHide() {
var _this$props7 = this.props,
action = _this$props7.action,
hideAction = _this$props7.hideAction;
return action.indexOf('hover') !== -1 || hideAction.indexOf('mouseLeave') !== -1;
}
}, {
key: "isFocusToShow",
value: function isFocusToShow() {
var _this$props8 = this.props,
action = _this$props8.action,
showAction = _this$props8.showAction;
return action.indexOf('focus') !== -1 || showAction.indexOf('focus') !== -1;
}
}, {
key: "isBlurToHide",
value: function isBlurToHide() {
var _this$props9 = this.props,
action = _this$props9.action,
hideAction = _this$props9.hideAction;
return action.indexOf('focus') !== -1 || hideAction.indexOf('blur') !== -1;
}
}, {
key: "forcePopupAlign",
value: function forcePopupAlign() {
if (this.state.popupVisible && this.popupRef.current && this.popupRef.current.alignRef.current) {
this.popupRef.current.alignRef.current.forceAlign();
}
}
}, {
key: "fireEvents",
value: function fireEvents(type, e) {
var childCallback = this.props.children.props[type];
if (childCallback) {
childCallback(e);
}
var callback = this.props[type];
if (callback) {
callback(e);
}
}
}, {
key: "close",
value: function close() {
this.setPopupVisible(false);
}
}, {
key: "render",
value: function render() {
var popupVisible = this.state.popupVisible;
var _this$props10 = this.props,
children = _this$props10.children,
forceRender = _this$props10.forceRender,
alignPoint = _this$props10.alignPoint,
className = _this$props10.className,
autoDestroy = _this$props10.autoDestroy;
var child = react_default.a.Children.only(children);
var newChildProps = {
key: 'trigger'
};
if (this.isContextMenuToShow()) {
newChildProps.onContextMenu = this.onContextMenu;
} else {
newChildProps.onContextMenu = this.createTwoChains('onContextMenu');
}
if (this.isClickToHide() || this.isClickToShow()) {
newChildProps.onClick = this.onClick;
newChildProps.onMouseDown = this.onMouseDown;
newChildProps.onTouchStart = this.onTouchStart;
} else {
newChildProps.onClick = this.createTwoChains('onClick');
newChildProps.onMouseDown = this.createTwoChains('onMouseDown');
newChildProps.onTouchStart = this.createTwoChains('onTouchStart');
}
if (this.isMouseEnterToShow()) {
newChildProps.onMouseEnter = this.onMouseEnter;
if (alignPoint) {
newChildProps.onMouseMove = this.onMouseMove;
}
} else {
newChildProps.onMouseEnter = this.createTwoChains('onMouseEnter');
}
if (this.isMouseLeaveToHide()) {
newChildProps.onMouseLeave = this.onMouseLeave;
} else {
newChildProps.onMouseLeave = this.createTwoChains('onMouseLeave');
}
if (this.isFocusToShow() || this.isBlurToHide()) {
newChildProps.onFocus = this.onFocus;
newChildProps.onBlur = this.onBlur;
} else {
newChildProps.onFocus = this.createTwoChains('onFocus');
newChildProps.onBlur = this.createTwoChains('onBlur');
}
var childrenClassName = classnames_default()(child && child.props && child.props.className, className);
if (childrenClassName) {
newChildProps.className = childrenClassName;
}
var cloneProps = Object(objectSpread2["a" /* default */])({}, newChildProps);
if (Object(es_ref["c" /* supportRef */])(child)) {
cloneProps.ref = Object(es_ref["a" /* composeRef */])(this.triggerRef, child.ref);
}
var trigger = react_default.a.cloneElement(child, cloneProps);
var portal; // prevent unmounting after it's rendered
if (popupVisible || this.popupRef.current || forceRender) {
portal = react_default.a.createElement(PortalComponent, {
key: "portal",
getContainer: this.getContainer,
didUpdate: this.handlePortalUpdate
}, this.getComponent());
}
if (!popupVisible && autoDestroy) {
portal = null;
}
return react_default.a.createElement(context.Provider, {
value: {
onPopupMouseDown: this.onPopupMouseDown
}
}, trigger, portal);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(_ref, prevState) {
var popupVisible = _ref.popupVisible;
var newState = {};
if (popupVisible !== undefined && prevState.popupVisible !== popupVisible) {
newState.popupVisible = popupVisible;
newState.prevPopupVisible = prevState.popupVisible;
}
return newState;
}
}]);
return Trigger;
}(react_default.a.Component);
Trigger.contextType = context;
Trigger.defaultProps = {
prefixCls: 'rc-trigger-popup',
getPopupClassNameFromAlign: returnEmptyString,
getDocument: returnDocument,
onPopupVisibleChange: noop,
afterPopupVisibleChange: noop,
onPopupAlign: noop,
popupClassName: '',
mouseEnterDelay: 0,
mouseLeaveDelay: 0.1,
focusDelay: 0,
blurDelay: 0.15,
popupStyle: {},
destroyPopupOnHide: false,
popupAlign: {},
defaultPopupVisible: false,
mask: false,
maskClosable: true,
action: [],
showAction: [],
hideAction: [],
autoDestroy: false
};
return Trigger;
}
/* harmony default export */ var rc_trigger_es = __webpack_exports__["a"] = (generateTrigger(Portal["a" /* default */]));
/***/ }),
/***/ "UesL":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/date-to-primitive.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
module.exports = function (hint) {
if (hint !== 'string' && hint !== 'number' && hint !== 'default') {
throw TypeError('Incorrect hint');
} return toPrimitive(anObject(this), hint !== 'number');
};
/***/ }),
/***/ "UmKh":
/*!*****************************************************************************!*\
!*** ./node_modules/antd/node_modules/rc-animate/es/Animate.js + 4 modules ***!
\*****************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/css-animation/es/index.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-animate/node_modules/rc-util/es/unsafeLifecyclesPolyfill.js
var unsafeLifecyclesPolyfill_unsafeLifecyclesPolyfill = function unsafeLifecyclesPolyfill(Component) {
var prototype = Component.prototype;
if (!prototype || !prototype.isReactComponent) {
throw new Error('Can only polyfill class components');
} // only handle componentWillReceiveProps
if (typeof prototype.componentWillReceiveProps !== 'function') {
return Component;
} // In React 16.9, React.Profiler was introduced together with UNSAFE_componentWillReceiveProps
// https://reactjs.org/blog/2019/08/08/react-v16.9.0.html#performance-measurements-with-reactprofiler
if (!react_default.a.Profiler) {
return Component;
} // Here polyfill get started
prototype.UNSAFE_componentWillReceiveProps = prototype.componentWillReceiveProps;
delete prototype.componentWillReceiveProps;
return Component;
};
/* harmony default export */ var es_unsafeLifecyclesPolyfill = (unsafeLifecyclesPolyfill_unsafeLifecyclesPolyfill);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-animate/es/ChildrenUtils.js
function toArrayChildren(children) {
var ret = [];
react_default.a.Children.forEach(children, function (child) {
ret.push(child);
});
return ret;
}
function findChildInChildrenByKey(children, key) {
var ret = null;
if (children) {
children.forEach(function (child) {
if (ret) {
return;
}
if (child && child.key === key) {
ret = child;
}
});
}
return ret;
}
function findShownChildInChildrenByKey(children, key, showProp) {
var ret = null;
if (children) {
children.forEach(function (child) {
if (child && child.key === key && child.props[showProp]) {
if (ret) {
throw new Error('two child with same key for <rc-animate> children');
}
ret = child;
}
});
}
return ret;
}
function findHiddenChildInChildrenByKey(children, key, showProp) {
var found = 0;
if (children) {
children.forEach(function (child) {
if (found) {
return;
}
found = child && child.key === key && !child.props[showProp];
});
}
return found;
}
function isSameChildren(c1, c2, showProp) {
var same = c1.length === c2.length;
if (same) {
c1.forEach(function (child, index) {
var child2 = c2[index];
if (child && child2) {
if (child && !child2 || !child && child2) {
same = false;
} else if (child.key !== child2.key) {
same = false;
} else if (showProp && child.props[showProp] !== child2.props[showProp]) {
same = false;
}
}
});
}
return same;
}
function mergeChildren(prev, next) {
var ret = [];
// For each key of `next`, the list of keys to insert before that key in
// the combined list
var nextChildrenPending = {};
var pendingChildren = [];
prev.forEach(function (child) {
if (child && findChildInChildrenByKey(next, child.key)) {
if (pendingChildren.length) {
nextChildrenPending[child.key] = pendingChildren;
pendingChildren = [];
}
} else {
pendingChildren.push(child);
}
});
next.forEach(function (child) {
if (child && Object.prototype.hasOwnProperty.call(nextChildrenPending, child.key)) {
ret = ret.concat(nextChildrenPending[child.key]);
}
ret.push(child);
});
ret = ret.concat(pendingChildren);
return ret;
}
// EXTERNAL MODULE: ./node_modules/react-dom/index.js
var react_dom = __webpack_require__("i8i4");
var react_dom_default = /*#__PURE__*/__webpack_require__.n(react_dom);
// EXTERNAL MODULE: ./node_modules/@ant-design/css-animation/es/index.js
var es = __webpack_require__("UwPn");
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-animate/es/util/animate.js
var util = {
isAppearSupported: function isAppearSupported(props) {
return props.transitionName && props.transitionAppear || props.animation.appear;
},
isEnterSupported: function isEnterSupported(props) {
return props.transitionName && props.transitionEnter || props.animation.enter;
},
isLeaveSupported: function isLeaveSupported(props) {
return props.transitionName && props.transitionLeave || props.animation.leave;
},
allowAppearCallback: function allowAppearCallback(props) {
return props.transitionAppear || props.animation.appear;
},
allowEnterCallback: function allowEnterCallback(props) {
return props.transitionEnter || props.animation.enter;
},
allowLeaveCallback: function allowLeaveCallback(props) {
return props.transitionLeave || props.animation.leave;
}
};
/* harmony default export */ var animate = (util);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-animate/es/AnimateChild.js
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/* eslint react/prop-types: 0 */
var transitionMap = {
enter: 'transitionEnter',
appear: 'transitionAppear',
leave: 'transitionLeave'
};
var AnimateChild_AnimateChild = function (_React$Component) {
_inherits(AnimateChild, _React$Component);
function AnimateChild() {
_classCallCheck(this, AnimateChild);
return _possibleConstructorReturn(this, (AnimateChild.__proto__ || Object.getPrototypeOf(AnimateChild)).apply(this, arguments));
}
_createClass(AnimateChild, [{
key: 'componentWillUnmount',
value: function componentWillUnmount() {
this.stop();
}
}, {
key: 'componentWillEnter',
value: function componentWillEnter(done) {
if (animate.isEnterSupported(this.props)) {
this.transition('enter', done);
} else {
done();
}
}
}, {
key: 'componentWillAppear',
value: function componentWillAppear(done) {
if (animate.isAppearSupported(this.props)) {
this.transition('appear', done);
} else {
done();
}
}
}, {
key: 'componentWillLeave',
value: function componentWillLeave(done) {
if (animate.isLeaveSupported(this.props)) {
this.transition('leave', done);
} else {
// always sync, do not interupt with react component life cycle
// update hidden -> animate hidden ->
// didUpdate -> animate leave -> unmount (if animate is none)
done();
}
}
}, {
key: 'transition',
value: function transition(animationType, finishCallback) {
var _this2 = this;
var node = react_dom_default.a.findDOMNode(this);
var props = this.props;
var transitionName = props.transitionName;
var nameIsObj = typeof transitionName === 'object';
this.stop();
var end = function end() {
_this2.stopper = null;
finishCallback();
};
if ((es["b" /* isCssAnimationSupported */] || !props.animation[animationType]) && transitionName && props[transitionMap[animationType]]) {
var name = nameIsObj ? transitionName[animationType] : transitionName + '-' + animationType;
var activeName = name + '-active';
if (nameIsObj && transitionName[animationType + 'Active']) {
activeName = transitionName[animationType + 'Active'];
}
this.stopper = Object(es["a" /* default */])(node, {
name: name,
active: activeName
}, end);
} else {
this.stopper = props.animation[animationType](node, end);
}
}
}, {
key: 'stop',
value: function stop() {
var stopper = this.stopper;
if (stopper) {
this.stopper = null;
stopper.stop();
}
}
}, {
key: 'render',
value: function render() {
return this.props.children;
}
}]);
return AnimateChild;
}(react_default.a.Component);
/* harmony default export */ var es_AnimateChild = (AnimateChild_AnimateChild);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-animate/es/Animate.js
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
var Animate_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function Animate_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function Animate_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function Animate_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
/* eslint react/prop-types: 0 */
var defaultKey = 'rc_animate_' + Date.now();
function getChildrenFromProps(props) {
var children = props.children;
if (react_default.a.isValidElement(children)) {
if (!children.key) {
return react_default.a.cloneElement(children, {
key: defaultKey
});
}
}
return children;
}
function noop() {}
var Animate_Animate = function (_React$Component) {
Animate_inherits(Animate, _React$Component);
function Animate(props) {
Animate_classCallCheck(this, Animate);
var _this = Animate_possibleConstructorReturn(this, (Animate.__proto__ || Object.getPrototypeOf(Animate)).call(this, props));
Animate_initialiseProps.call(_this);
_this.currentlyAnimatingKeys = {};
_this.keysToEnter = [];
_this.keysToLeave = [];
_this.state = {
children: toArrayChildren(getChildrenFromProps(props))
};
_this.childrenRefs = {};
return _this;
} // eslint-disable-line
Animate_createClass(Animate, [{
key: 'componentDidMount',
value: function componentDidMount() {
var _this2 = this;
var showProp = this.props.showProp;
var children = this.state.children;
if (showProp) {
children = children.filter(function (child) {
return !!child.props[showProp];
});
}
children.forEach(function (child) {
if (child) {
_this2.performAppear(child.key);
}
});
}
}, {
key: 'componentWillReceiveProps',
value: function componentWillReceiveProps(nextProps) {
var _this3 = this;
this.nextProps = nextProps;
var nextChildren = toArrayChildren(getChildrenFromProps(nextProps));
var props = this.props;
// exclusive needs immediate response
if (props.exclusive) {
Object.keys(this.currentlyAnimatingKeys).forEach(function (key) {
_this3.stop(key);
});
}
var showProp = props.showProp;
var currentlyAnimatingKeys = this.currentlyAnimatingKeys;
// last props children if exclusive
var currentChildren = props.exclusive ? toArrayChildren(getChildrenFromProps(props)) : this.state.children;
// in case destroy in showProp mode
var newChildren = [];
if (showProp) {
currentChildren.forEach(function (currentChild) {
var nextChild = currentChild && findChildInChildrenByKey(nextChildren, currentChild.key);
var newChild = void 0;
if ((!nextChild || !nextChild.props[showProp]) && currentChild.props[showProp]) {
newChild = react_default.a.cloneElement(nextChild || currentChild, _defineProperty({}, showProp, true));
} else {
newChild = nextChild;
}
if (newChild) {
newChildren.push(newChild);
}
});
nextChildren.forEach(function (nextChild) {
if (!nextChild || !findChildInChildrenByKey(currentChildren, nextChild.key)) {
newChildren.push(nextChild);
}
});
} else {
newChildren = mergeChildren(currentChildren, nextChildren);
}
// need render to avoid update
this.setState({
children: newChildren
});
nextChildren.forEach(function (child) {
var key = child && child.key;
if (child && currentlyAnimatingKeys[key]) {
return;
}
var hasPrev = child && findChildInChildrenByKey(currentChildren, key);
if (showProp) {
var showInNext = child.props[showProp];
if (hasPrev) {
var showInNow = findShownChildInChildrenByKey(currentChildren, key, showProp);
if (!showInNow && showInNext) {
_this3.keysToEnter.push(key);
}
} else if (showInNext) {
_this3.keysToEnter.push(key);
}
} else if (!hasPrev) {
_this3.keysToEnter.push(key);
}
});
currentChildren.forEach(function (child) {
var key = child && child.key;
if (child && currentlyAnimatingKeys[key]) {
return;
}
var hasNext = child && findChildInChildrenByKey(nextChildren, key);
if (showProp) {
var showInNow = child.props[showProp];
if (hasNext) {
var showInNext = findShownChildInChildrenByKey(nextChildren, key, showProp);
if (!showInNext && showInNow) {
_this3.keysToLeave.push(key);
}
} else if (showInNow) {
_this3.keysToLeave.push(key);
}
} else if (!hasNext) {
_this3.keysToLeave.push(key);
}
});
}
}, {
key: 'componentDidUpdate',
value: function componentDidUpdate() {
var keysToEnter = this.keysToEnter;
this.keysToEnter = [];
keysToEnter.forEach(this.performEnter);
var keysToLeave = this.keysToLeave;
this.keysToLeave = [];
keysToLeave.forEach(this.performLeave);
}
}, {
key: 'isValidChildByKey',
value: function isValidChildByKey(currentChildren, key) {
var showProp = this.props.showProp;
if (showProp) {
return findShownChildInChildrenByKey(currentChildren, key, showProp);
}
return findChildInChildrenByKey(currentChildren, key);
}
}, {
key: 'stop',
value: function stop(key) {
delete this.currentlyAnimatingKeys[key];
var component = this.childrenRefs[key];
if (component) {
component.stop();
}
}
}, {
key: 'render',
value: function render() {
var _this4 = this;
var props = this.props;
this.nextProps = props;
var stateChildren = this.state.children;
var children = null;
if (stateChildren) {
children = stateChildren.map(function (child) {
if (child === null || child === undefined) {
return child;
}
if (!child.key) {
throw new Error('must set key for <rc-animate> children');
}
return react_default.a.createElement(
es_AnimateChild,
{
key: child.key,
ref: function ref(node) {
_this4.childrenRefs[child.key] = node;
},
animation: props.animation,
transitionName: props.transitionName,
transitionEnter: props.transitionEnter,
transitionAppear: props.transitionAppear,
transitionLeave: props.transitionLeave
},
child
);
});
}
var Component = props.component;
if (Component) {
var passedProps = props;
if (typeof Component === 'string') {
passedProps = _extends({
className: props.className,
style: props.style
}, props.componentProps);
}
return react_default.a.createElement(
Component,
passedProps,
children
);
}
return children[0] || null;
}
}]);
return Animate;
}(react_default.a.Component);
Animate_Animate.isAnimate = true;
Animate_Animate.defaultProps = {
animation: {},
component: 'span',
componentProps: {},
transitionEnter: true,
transitionLeave: true,
transitionAppear: false,
onEnd: noop,
onEnter: noop,
onLeave: noop,
onAppear: noop
};
var Animate_initialiseProps = function _initialiseProps() {
var _this5 = this;
this.performEnter = function (key) {
// may already remove by exclusive
if (_this5.childrenRefs[key]) {
_this5.currentlyAnimatingKeys[key] = true;
_this5.childrenRefs[key].componentWillEnter(_this5.handleDoneAdding.bind(_this5, key, 'enter'));
}
};
this.performAppear = function (key) {
if (_this5.childrenRefs[key]) {
_this5.currentlyAnimatingKeys[key] = true;
_this5.childrenRefs[key].componentWillAppear(_this5.handleDoneAdding.bind(_this5, key, 'appear'));
}
};
this.handleDoneAdding = function (key, type) {
var props = _this5.props;
delete _this5.currentlyAnimatingKeys[key];
// if update on exclusive mode, skip check
if (props.exclusive && props !== _this5.nextProps) {
return;
}
var currentChildren = toArrayChildren(getChildrenFromProps(props));
if (!_this5.isValidChildByKey(currentChildren, key)) {
// exclusive will not need this
_this5.performLeave(key);
} else if (type === 'appear') {
if (animate.allowAppearCallback(props)) {
props.onAppear(key);
props.onEnd(key, true);
}
} else if (animate.allowEnterCallback(props)) {
props.onEnter(key);
props.onEnd(key, true);
}
};
this.performLeave = function (key) {
// may already remove by exclusive
if (_this5.childrenRefs[key]) {
_this5.currentlyAnimatingKeys[key] = true;
_this5.childrenRefs[key].componentWillLeave(_this5.handleDoneLeaving.bind(_this5, key));
}
};
this.handleDoneLeaving = function (key) {
var props = _this5.props;
delete _this5.currentlyAnimatingKeys[key];
// if update on exclusive mode, skip check
if (props.exclusive && props !== _this5.nextProps) {
return;
}
var currentChildren = toArrayChildren(getChildrenFromProps(props));
// in case state change is too fast
if (_this5.isValidChildByKey(currentChildren, key)) {
_this5.performEnter(key);
} else {
var end = function end() {
if (animate.allowLeaveCallback(props)) {
props.onLeave(key);
props.onEnd(key, false);
}
};
if (!isSameChildren(_this5.state.children, currentChildren, props.showProp)) {
_this5.setState({
children: currentChildren
}, end);
} else {
end();
}
}
};
};
/* harmony default export */ var es_Animate = __webpack_exports__["a"] = (es_unsafeLifecyclesPolyfill(Animate_Animate));
/***/ }),
/***/ "Unfr":
/*!******************************************************************************************!*\
!*** ./node_modules/@umijs/renderer-react/node_modules/@umijs/runtime/dist/index.esm.js ***!
\******************************************************************************************/
/*! exports provided: Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, StaticRouter, Switch, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, __RouterContext, createBrowserHistory, createHashHistory, createMemoryHistory, ApplyPluginsType, Plugin, dynamic */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./node_modules/@umijs/renderer-react/dist/index.js (referenced with cjs require) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ApplyPluginsType", function() { return ApplyPluginsType; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Plugin", function() { return Plugin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "dynamic", function() { return dynamic; });
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router-dom */ "55Ip");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Link", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_0__["a"]; });
/* harmony import */ var react_router_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-router-dom */ "Ty5D");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "MemoryRouter", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["a"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "NavLink", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_0__["b"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Prompt", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["b"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Redirect", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["c"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Route", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["d"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Router", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["e"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "StaticRouter", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["f"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Switch", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["g"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "matchPath", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["i"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useHistory", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["j"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useLocation", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["k"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useParams", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["l"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useRouteMatch", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["m"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "withRouter", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["n"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "__RouterContext", function() { return react_router_dom__WEBPACK_IMPORTED_MODULE_1__["h"]; });
/* harmony import */ var history_with_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! history-with-query */ "YS25");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createBrowserHistory", function() { return history_with_query__WEBPACK_IMPORTED_MODULE_2__["a"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createHashHistory", function() { return history_with_query__WEBPACK_IMPORTED_MODULE_2__["b"]; });
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createMemoryHistory", function() { return history_with_query__WEBPACK_IMPORTED_MODULE_2__["d"]; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var use_subscription__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! use-subscription */ "auQ1");
/* harmony import */ var use_subscription__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(use_subscription__WEBPACK_IMPORTED_MODULE_4__);
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _toArray(arr) {
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _createForOfIteratorHelper(o) {
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
var i = 0;
var F = function () {};
return {
s: F,
n: function () {
if (i >= o.length) return {
done: true
};
return {
done: false,
value: o[i++]
};
},
e: function (e) {
throw e;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var it,
normalCompletion = true,
didErr = false,
err;
return {
s: function () {
it = o[Symbol.iterator]();
},
n: function () {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function (e) {
didErr = true;
err = e;
},
f: function () {
try {
if (!normalCompletion && it.return != null) it.return();
} finally {
if (didErr) throw err;
}
}
};
}
function assert(value, message) {
if (!value) throw new Error(message);
}
var ApplyPluginsType;
(function (ApplyPluginsType) {
ApplyPluginsType["compose"] = "compose";
ApplyPluginsType["modify"] = "modify";
ApplyPluginsType["event"] = "event";
})(ApplyPluginsType || (ApplyPluginsType = {}));
function _compose(_ref) {
var fns = _ref.fns,
args = _ref.args;
if (fns.length === 1) {
return fns[0];
}
var last = fns.pop();
return fns.reduce(function (a, b) {
return function () {
return b(a, args);
};
}, last);
}
function isPromiseLike(obj) {
return !!obj && _typeof(obj) === 'object' && typeof obj.then === 'function';
}
var Plugin = /*#__PURE__*/function () {
function Plugin(opts) {
_classCallCheck(this, Plugin);
this.hooks = {};
this.validKeys = (opts === null || opts === void 0 ? void 0 : opts.validKeys) || [];
}
_createClass(Plugin, [{
key: "register",
value: function register(plugin) {
var _this = this;
assert(!!plugin.apply, "register failed, plugin.apply must supplied");
assert(!!plugin.path, "register failed, plugin.path must supplied");
Object.keys(plugin.apply).forEach(function (key) {
assert(_this.validKeys.indexOf(key) > -1, "register failed, invalid key ".concat(key, " from plugin ").concat(plugin.path, "."));
if (!_this.hooks[key]) _this.hooks[key] = [];
_this.hooks[key] = _this.hooks[key].concat(plugin.apply[key]);
});
}
}, {
key: "getHooks",
value: function getHooks(keyWithDot) {
var _keyWithDot$split = keyWithDot.split('.'),
_keyWithDot$split2 = _toArray(_keyWithDot$split),
key = _keyWithDot$split2[0],
memberKeys = _keyWithDot$split2.slice(1);
var hooks = this.hooks[key] || [];
if (memberKeys.length) {
hooks = hooks.map(function (hook) {
try {
var ret = hook;
var _iterator = _createForOfIteratorHelper(memberKeys),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var memberKey = _step.value;
ret = ret[memberKey];
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return ret;
} catch (e) {
return null;
}
}).filter(Boolean);
}
return hooks;
}
}, {
key: "applyPlugins",
value: function applyPlugins(_ref2) {
var key = _ref2.key,
type = _ref2.type,
initialValue = _ref2.initialValue,
args = _ref2.args,
async = _ref2.async;
var hooks = this.getHooks(key) || [];
if (args) {
assert(_typeof(args) === 'object', "applyPlugins failed, args must be plain object.");
}
switch (type) {
case ApplyPluginsType.modify:
if (async) {
return hooks.reduce( /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(memo, hook) {
var ret;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
assert(typeof hook === 'function' || _typeof(hook) === 'object' || isPromiseLike(hook), "applyPlugins failed, all hooks for key ".concat(key, " must be function, plain object or Promise."));
if (!isPromiseLike(memo)) {
_context.next = 5;
break;
}
_context.next = 4;
return memo;
case 4:
memo = _context.sent;
case 5:
if (!(typeof hook === 'function')) {
_context.next = 16;
break;
}
ret = hook(memo, args);
if (!isPromiseLike(ret)) {
_context.next = 13;
break;
}
_context.next = 10;
return ret;
case 10:
return _context.abrupt("return", _context.sent);
case 13:
return _context.abrupt("return", ret);
case 14:
_context.next = 21;
break;
case 16:
if (!isPromiseLike(hook)) {
_context.next = 20;
break;
}
_context.next = 19;
return hook;
case 19:
hook = _context.sent;
case 20:
return _context.abrupt("return", _objectSpread2({}, memo, {}, hook));
case 21:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function (_x, _x2) {
return _ref3.apply(this, arguments);
};
}(), isPromiseLike(initialValue) ? initialValue : Promise.resolve(initialValue));
} else {
return hooks.reduce(function (memo, hook) {
assert(typeof hook === 'function' || _typeof(hook) === 'object', "applyPlugins failed, all hooks for key ".concat(key, " must be function or plain object."));
if (typeof hook === 'function') {
return hook(memo, args);
} else {
// TODO: deepmerge?
return _objectSpread2({}, memo, {}, hook);
}
}, initialValue);
}
case ApplyPluginsType.event:
return hooks.forEach(function (hook) {
assert(typeof hook === 'function', "applyPlugins failed, all hooks for key ".concat(key, " must be function."));
hook(args);
});
case ApplyPluginsType.compose:
return function () {
return _compose({
fns: hooks.concat(initialValue),
args: args
})();
};
}
}
}]);
return Plugin;
}();
var LoadableContext = Object(react__WEBPACK_IMPORTED_MODULE_3__["createContext"])(null);
var ALL_INITIALIZERS = [];
var READY_INITIALIZERS = [];
var initialized = false;
function load(loader) {
var promise = loader();
var state = {
loading: true,
loaded: null,
error: null
};
state.promise = promise.then(function (loaded) {
state.loading = false;
state.loaded = loaded;
return loaded;
}).catch(function (err) {
state.loading = false;
state.error = err;
throw err;
});
return state;
}
function loadMap(obj) {
var state = {
loading: false,
loaded: {},
error: null
};
var promises = [];
try {
Object.keys(obj).forEach(function (key) {
var result = load(obj[key]);
if (!result.loading) {
state.loaded[key] = result.loaded;
state.error = result.error;
} else {
state.loading = true;
}
promises.push(result.promise);
result.promise.then(function (res) {
state.loaded[key] = res;
}).catch(function (err) {
state.error = err;
});
});
} catch (err) {
state.error = err;
}
state.promise = Promise.all(promises).then(function (res) {
state.loading = false;
return res;
}).catch(function (err) {
state.loading = false;
throw err;
});
return state;
}
function resolve(obj) {
return obj && obj.__esModule ? obj.default : obj;
}
function render(loaded, props) {
return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(resolve(loaded), props);
}
function createLoadableComponent(loadFn, options) {
var opts = Object.assign({
loader: null,
loading: null,
delay: 200,
timeout: null,
render: render,
webpack: null,
modules: null
}, options);
var subscription = null;
function init() {
if (!subscription) {
var sub = new LoadableSubscription(loadFn, opts);
subscription = {
getCurrentValue: sub.getCurrentValue.bind(sub),
subscribe: sub.subscribe.bind(sub),
retry: sub.retry.bind(sub),
promise: sub.promise.bind(sub)
};
}
return subscription.promise();
} // Server only
if (typeof window === 'undefined') {
ALL_INITIALIZERS.push(init);
} // Client only
if (!initialized && typeof window !== 'undefined' && typeof opts.webpack === 'function') {
var moduleIds = opts.webpack();
READY_INITIALIZERS.push(function (ids) {
var _iterator = _createForOfIteratorHelper(moduleIds),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var moduleId = _step.value;
if (ids.indexOf(moduleId) !== -1) {
return init();
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
});
}
var LoadableComponent = function LoadableComponent(props, ref) {
init();
var context = react__WEBPACK_IMPORTED_MODULE_3___default.a.useContext(LoadableContext);
var state = Object(use_subscription__WEBPACK_IMPORTED_MODULE_4__["useSubscription"])(subscription);
react__WEBPACK_IMPORTED_MODULE_3___default.a.useImperativeHandle(ref, function () {
return {
retry: subscription.retry
};
});
if (context && Array.isArray(opts.modules)) {
opts.modules.forEach(function (moduleName) {
context(moduleName);
});
}
if (state.loading || state.error) {
return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(opts.loading, {
isLoading: state.loading,
pastDelay: state.pastDelay,
timedOut: state.timedOut,
error: state.error,
retry: subscription.retry
});
} else if (state.loaded) {
return opts.render(state.loaded, props);
} else {
return null;
}
};
var LoadableComponentWithRef = react__WEBPACK_IMPORTED_MODULE_3___default.a.forwardRef(LoadableComponent); // add static method in React.forwardRef
// https://github.com/facebook/react/issues/17830
LoadableComponentWithRef.preload = function () {
return init();
};
LoadableComponentWithRef.displayName = 'LoadableComponent';
return LoadableComponentWithRef;
}
var LoadableSubscription = /*#__PURE__*/function () {
function LoadableSubscription(loadFn, opts) {
_classCallCheck(this, LoadableSubscription);
this._loadFn = loadFn;
this._opts = opts;
this._callbacks = new Set();
this._delay = null;
this._timeout = null;
this.retry();
}
_createClass(LoadableSubscription, [{
key: "promise",
value: function promise() {
return this._res.promise;
}
}, {
key: "retry",
value: function retry() {
var _this = this;
this._clearTimeouts();
this._res = this._loadFn(this._opts.loader);
this._state = {
pastDelay: false,
timedOut: false
};
var res = this._res,
opts = this._opts;
if (res.loading) {
if (typeof opts.delay === 'number') {
if (opts.delay === 0) {
this._state.pastDelay = true;
} else {
this._delay = setTimeout(function () {
_this._update({
pastDelay: true
});
}, opts.delay);
}
}
if (typeof opts.timeout === 'number') {
this._timeout = setTimeout(function () {
_this._update({
timedOut: true
});
}, opts.timeout);
}
}
this._res.promise.then(function () {
_this._update();
_this._clearTimeouts();
}) // eslint-disable-next-line handle-callback-err
.catch(function (err) {
_this._update();
_this._clearTimeouts();
});
this._update({});
}
}, {
key: "_update",
value: function _update(partial) {
this._state = _objectSpread2({}, this._state, {}, partial);
this._callbacks.forEach(function (callback) {
return callback();
});
}
}, {
key: "_clearTimeouts",
value: function _clearTimeouts() {
clearTimeout(this._delay);
clearTimeout(this._timeout);
}
}, {
key: "getCurrentValue",
value: function getCurrentValue() {
return _objectSpread2({}, this._state, {
error: this._res.error,
loaded: this._res.loaded,
loading: this._res.loading
});
}
}, {
key: "subscribe",
value: function subscribe(callback) {
var _this2 = this;
this._callbacks.add(callback);
return function () {
_this2._callbacks.delete(callback);
};
}
}]);
return LoadableSubscription;
}();
function Loadable(opts) {
return createLoadableComponent(load, opts);
}
function LoadableMap(opts) {
if (typeof opts.render !== 'function') {
throw new Error('LoadableMap requires a `render(loaded, props)` function');
}
return createLoadableComponent(loadMap, opts);
}
Loadable.Map = LoadableMap;
function flushInitializers(initializers, ids) {
var promises = [];
while (initializers.length) {
var init = initializers.pop();
promises.push(init(ids));
}
return Promise.all(promises).then(function () {
if (initializers.length) {
return flushInitializers(initializers, ids);
}
});
}
Loadable.preloadAll = function () {
return new Promise(function (resolve, reject) {
flushInitializers(ALL_INITIALIZERS).then(resolve, reject);
});
};
Loadable.preloadReady = function () {
var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
return new Promise(function (resolve) {
var res = function res() {
initialized = true;
return resolve();
}; // We always will resolve, errors should be handled within loading UIs.
flushInitializers(READY_INITIALIZERS, ids).then(res, res);
});
};
if (typeof window !== 'undefined') {
window.__NEXT_PRELOADREADY = Loadable.preloadReady;
}
function dynamic (opts) {
var loadableFn = Loadable;
var loadableOptions = {
loading: function loading(_ref) {
var error = _ref.error,
isLoading = _ref.isLoading;
if (false) {}
return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_3__["createElement"])("p", null, "loading...");
}
}; // Support for direct import(),
// eg: dynamic(() => import('../hello-world'))
if (typeof opts === 'function') {
loadableOptions.loader = opts; // Support for having first argument being options,
// eg: dynamic({loader: import('../hello-world')})
} else if (_typeof(opts) === 'object') {
loadableOptions = _objectSpread2({}, loadableOptions, {}, opts);
} else {
throw new Error("Unexpect arguments ".concat(opts));
} // Support for passing options,
// eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>})
// loadableOptions = { ...loadableOptions, ...options };
return loadableFn(loadableOptions);
}
/***/ }),
/***/ "UwPn":
/*!************************************************************!*\
!*** ./node_modules/@ant-design/css-animation/es/index.js ***!
\************************************************************/
/*! exports provided: isCssAnimationSupported, default */
/*! exports used: default, isCssAnimationSupported */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isCssAnimationSupported; });
/* harmony import */ var _Event__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Event */ "KS4O");
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
var isCssAnimationSupported = _Event__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].endEvents.length !== 0;
var capitalPrefixes = ['Webkit', 'Moz', 'O',
// ms is special .... !
'ms'];
var prefixes = ['-webkit-', '-moz-', '-o-', 'ms-', ''];
function getStyleProperty(node, name) {
// old ff need null, https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle
var style = window.getComputedStyle(node, null);
var ret = '';
for (var i = 0; i < prefixes.length; i++) {
ret = style.getPropertyValue(prefixes[i] + name);
if (ret) {
break;
}
}
return ret;
}
function fixBrowserByTimeout(node) {
if (isCssAnimationSupported) {
var transitionDelay = parseFloat(getStyleProperty(node, 'transition-delay')) || 0;
var transitionDuration = parseFloat(getStyleProperty(node, 'transition-duration')) || 0;
var animationDelay = parseFloat(getStyleProperty(node, 'animation-delay')) || 0;
var animationDuration = parseFloat(getStyleProperty(node, 'animation-duration')) || 0;
var time = Math.max(transitionDuration + transitionDelay, animationDuration + animationDelay);
// sometimes, browser bug
node.rcEndAnimTimeout = setTimeout(function () {
node.rcEndAnimTimeout = null;
if (node.rcEndListener) {
node.rcEndListener();
}
}, time * 1000 + 200);
}
}
function clearBrowserBugTimeout(node) {
if (node.rcEndAnimTimeout) {
clearTimeout(node.rcEndAnimTimeout);
node.rcEndAnimTimeout = null;
}
}
var cssAnimation = function cssAnimation(node, transitionName, endCallback) {
var nameIsObj = (typeof transitionName === 'undefined' ? 'undefined' : _typeof(transitionName)) === 'object';
var className = nameIsObj ? transitionName.name : transitionName;
var activeClassName = nameIsObj ? transitionName.active : transitionName + '-active';
var end = endCallback;
var start = void 0;
var active = void 0;
if (endCallback && Object.prototype.toString.call(endCallback) === '[object Object]') {
end = endCallback.end;
start = endCallback.start;
active = endCallback.active;
}
if (node.rcEndListener) {
node.rcEndListener();
}
node.rcEndListener = function (e) {
if (e && e.target !== node) {
return;
}
if (node.rcAnimTimeout) {
clearTimeout(node.rcAnimTimeout);
node.rcAnimTimeout = null;
}
clearBrowserBugTimeout(node);
node.classList.remove(className);
node.classList.remove(activeClassName);
_Event__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].removeEndEventListener(node, node.rcEndListener);
node.rcEndListener = null;
// Usually this optional end is used for informing an owner of
// a leave animation and telling it to remove the child.
if (end) {
end();
}
};
_Event__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].addEndEventListener(node, node.rcEndListener);
if (start) {
start();
}
node.classList.add(className);
node.rcAnimTimeout = setTimeout(function () {
node.rcAnimTimeout = null;
node.classList.add(activeClassName);
if (active) {
active();
}
fixBrowserByTimeout(node);
}, 0);
return {
stop: function stop() {
if (node.rcEndListener) {
node.rcEndListener();
}
}
};
};
cssAnimation.style = function (node, style, callback) {
if (node.rcEndListener) {
node.rcEndListener();
}
node.rcEndListener = function (e) {
if (e && e.target !== node) {
return;
}
if (node.rcAnimTimeout) {
clearTimeout(node.rcAnimTimeout);
node.rcAnimTimeout = null;
}
clearBrowserBugTimeout(node);
_Event__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].removeEndEventListener(node, node.rcEndListener);
node.rcEndListener = null;
// Usually this optional callback is used for informing an owner of
// a leave animation and telling it to remove the child.
if (callback) {
callback();
}
};
_Event__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].addEndEventListener(node, node.rcEndListener);
node.rcAnimTimeout = setTimeout(function () {
for (var s in style) {
if (style.hasOwnProperty(s)) {
node.style[s] = style[s];
}
}
node.rcAnimTimeout = null;
fixBrowserByTimeout(node);
}, 0);
};
cssAnimation.setTransition = function (node, p, value) {
var property = p;
var v = value;
if (value === undefined) {
v = property;
property = '';
}
property = property || '';
capitalPrefixes.forEach(function (prefix) {
node.style[prefix + 'Transition' + property] = v;
});
};
cssAnimation.isCssAnimationSupported = isCssAnimationSupported;
/* harmony default export */ __webpack_exports__["a"] = (cssAnimation);
/***/ }),
/***/ "UxlC":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.replace.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "14Sl");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "iqWW");
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "FMNM");
var max = Math.max;
var min = Math.min;
var floor = Math.floor;
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d\d?|<[^>]*>)/g;
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d\d?)/g;
var maybeToString = function (it) {
return it === undefined ? it : String(it);
};
// @@replace logic
fixRegExpWellKnownSymbolLogic('replace', 2, function (REPLACE, nativeReplace, maybeCallNative, reason) {
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;
var REPLACE_KEEPS_$0 = reason.REPLACE_KEEPS_$0;
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
return [
// `String.prototype.replace` method
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
function replace(searchValue, replaceValue) {
var O = requireObjectCoercible(this);
var replacer = searchValue == undefined ? undefined : searchValue[REPLACE];
return replacer !== undefined
? replacer.call(searchValue, O, replaceValue)
: nativeReplace.call(String(O), searchValue, replaceValue);
},
// `RegExp.prototype[@@replace]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
function (regexp, replaceValue) {
if (
(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE && REPLACE_KEEPS_$0) ||
(typeof replaceValue === 'string' && replaceValue.indexOf(UNSAFE_SUBSTITUTE) === -1)
) {
var res = maybeCallNative(nativeReplace, regexp, this, replaceValue);
if (res.done) return res.value;
}
var rx = anObject(regexp);
var S = String(this);
var functionalReplace = typeof replaceValue === 'function';
if (!functionalReplace) replaceValue = String(replaceValue);
var global = rx.global;
if (global) {
var fullUnicode = rx.unicode;
rx.lastIndex = 0;
}
var results = [];
while (true) {
var result = regExpExec(rx, S);
if (result === null) break;
results.push(result);
if (!global) break;
var matchStr = String(result[0]);
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
}
var accumulatedResult = '';
var nextSourcePosition = 0;
for (var i = 0; i < results.length; i++) {
result = results[i];
var matched = String(result[0]);
var position = max(min(toInteger(result.index), S.length), 0);
var captures = [];
// NOTE: This is equivalent to
// captures = result.slice(1).map(maybeToString)
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
for (var j = 1; j < result.length; j++) captures.push(maybeToString(result[j]));
var namedCaptures = result.groups;
if (functionalReplace) {
var replacerArgs = [matched].concat(captures, position, S);
if (namedCaptures !== undefined) replacerArgs.push(namedCaptures);
var replacement = String(replaceValue.apply(undefined, replacerArgs));
} else {
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
}
if (position >= nextSourcePosition) {
accumulatedResult += S.slice(nextSourcePosition, position) + replacement;
nextSourcePosition = position + matched.length;
}
}
return accumulatedResult + S.slice(nextSourcePosition);
}
];
// https://tc39.github.io/ecma262/#sec-getsubstitution
function getSubstitution(matched, str, position, captures, namedCaptures, replacement) {
var tailPos = position + matched.length;
var m = captures.length;
var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
if (namedCaptures !== undefined) {
namedCaptures = toObject(namedCaptures);
symbols = SUBSTITUTION_SYMBOLS;
}
return nativeReplace.call(replacement, symbols, function (match, ch) {
var capture;
switch (ch.charAt(0)) {
case '$': return '$';
case '&': return matched;
case '`': return str.slice(0, position);
case "'": return str.slice(tailPos);
case '<':
capture = namedCaptures[ch.slice(1, -1)];
break;
default: // \d\d?
var n = +ch;
if (n === 0) return match;
if (n > m) {
var f = floor(n / 10);
if (f === 0) return match;
if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);
return match;
}
capture = captures[n - 1];
}
return capture === undefined ? '' : capture;
});
}
});
/***/ }),
/***/ "Uydy":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.acosh.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var log1p = __webpack_require__(/*! ../internals/math-log1p */ "HsHA");
var nativeAcosh = Math.acosh;
var log = Math.log;
var sqrt = Math.sqrt;
var LN2 = Math.LN2;
var FORCED = !nativeAcosh
// V8 bug: https://code.google.com/p/v8/issues/detail?id=3509
|| Math.floor(nativeAcosh(Number.MAX_VALUE)) != 710
// Tor Browser bug: Math.acosh(Infinity) -> NaN
|| nativeAcosh(Infinity) != Infinity;
// `Math.acosh` method
// https://tc39.github.io/ecma262/#sec-math.acosh
$({ target: 'Math', stat: true, forced: FORCED }, {
acosh: function acosh(x) {
return (x = +x) < 1 ? NaN : x > 94906265.62425156
? log(x) + LN2
: log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1));
}
});
/***/ }),
/***/ "UzNg":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.string.code-points.js ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "ntOU");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var StringMultibyteModule = __webpack_require__(/*! ../internals/string-multibyte */ "ZUd8");
var codeAt = StringMultibyteModule.codeAt;
var charAt = StringMultibyteModule.charAt;
var STRING_ITERATOR = 'String Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR);
// TODO: unify with String#@@iterator
var $StringIterator = createIteratorConstructor(function StringIterator(string) {
setInternalState(this, {
type: STRING_ITERATOR,
string: string,
index: 0
});
}, 'String', function next() {
var state = getInternalState(this);
var string = state.string;
var index = state.index;
var point;
if (index >= string.length) return { value: undefined, done: true };
point = charAt(string, index);
state.index += point.length;
return { value: { codePoint: codeAt(point, 0), position: index }, done: false };
});
// `String.prototype.codePoints` method
// https://github.com/tc39/proposal-string-prototype-codepoints
$({ target: 'String', proto: true }, {
codePoints: function codePoints() {
return new $StringIterator(String(requireObjectCoercible(this)));
}
});
/***/ }),
/***/ "V/uB":
/*!*********************************************************!*\
!*** ./node_modules/@ant-design/icons/CloseOutlined.js ***!
\*********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _CloseOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/CloseOutlined */ "+P9B"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _CloseOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "V0Rq":
/*!*********************************!*\
!*** ./src/service/exercise.ts ***!
\*********************************/
/*! exports provided: getExerciseList, getExerciseIdentityPhotos, getVideoPushUrl, queryIdentityPhotoState, getExerciseStatistics, getBrankList, saveBanks, getExerciseCourses, getCommonHeader, addExercise, putExercise, editExercise, getTagDiscipline, editExerciseQuestion, addExerciseQuestion, exeriseMoveUpDown, exeriseQuestionDelete, getEndGroups, getPublishGroups, getReviewExercise, putAdjustScore, putBatchAdjustScore, putExerciseAdjustScore, delayedTime, getWorkSetting, updateSetting, getReviewGroupExercise, exportList, getExerciseStartAnswer, updateExerciseAnswers, submitExerciseAnswer, submitSimulateExerciseAnswer, redoExercise, resetMyGame, startProgram, beginCommit, simulateBeginCommit, getExaminationIntelligentSettings, getRandomEditExercises, getObjectiveScores, getRedoModal, getUserExercise, getExerciseExportHeadData, allowCloseCamera, getExerciseUserInfo, recordScreen, unbindIp, checkIp, makeUpStudents, getCodeReviewDetail, changeScore, simulateExercise, startSimulateAnswer, exerciseLeftTime, commitScreenAt */
/*! exports used: addExercise, addExerciseQuestion, changeScore, checkIp, editExercise, editExerciseQuestion, exeriseMoveUpDown, getBrankList, getCodeReviewDetail, getCommonHeader, getEndGroups, getExaminationIntelligentSettings, getExerciseCourses, getExerciseExportHeadData, getExerciseIdentityPhotos, getExerciseList, getExerciseStatistics, getExerciseUserInfo, getPublishGroups, getRandomEditExercises, getRedoModal, getReviewExercise, getReviewGroupExercise, getTagDiscipline, getUserExercise, getWorkSetting, saveBanks */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getExerciseList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getExerciseIdentityPhotos; });
/* unused harmony export getVideoPushUrl */
/* unused harmony export queryIdentityPhotoState */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return getExerciseStatistics; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getBrankList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return saveBanks; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getExerciseCourses; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getCommonHeader; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addExercise; });
/* unused harmony export putExercise */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return editExercise; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getTagDiscipline; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return editExerciseQuestion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return addExerciseQuestion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return exeriseMoveUpDown; });
/* unused harmony export exeriseQuestionDelete */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getEndGroups; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return getPublishGroups; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getReviewExercise; });
/* unused harmony export putAdjustScore */
/* unused harmony export putBatchAdjustScore */
/* unused harmony export putExerciseAdjustScore */
/* unused harmony export delayedTime */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return getWorkSetting; });
/* unused harmony export updateSetting */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getReviewGroupExercise; });
/* unused harmony export exportList */
/* unused harmony export getExerciseStartAnswer */
/* unused harmony export updateExerciseAnswers */
/* unused harmony export submitExerciseAnswer */
/* unused harmony export submitSimulateExerciseAnswer */
/* unused harmony export redoExercise */
/* unused harmony export resetMyGame */
/* unused harmony export startProgram */
/* unused harmony export beginCommit */
/* unused harmony export simulateBeginCommit */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getExaminationIntelligentSettings; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getRandomEditExercises; });
/* unused harmony export getObjectiveScores */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getRedoModal; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return getUserExercise; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return getExerciseExportHeadData; });
/* unused harmony export allowCloseCamera */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return getExerciseUserInfo; });
/* unused harmony export recordScreen */
/* unused harmony export unbindIp */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return checkIp; });
/* unused harmony export makeUpStudents */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return getCodeReviewDetail; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return changeScore; });
/* unused harmony export simulateExercise */
/* unused harmony export startSimulateAnswer */
/* unused harmony export exerciseLeftTime */
/* unused harmony export commitScreenAt */
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
//试卷详情答题列表
function getExerciseList(_x) {
return _getExerciseList.apply(this, arguments);
}
// 人脸审核列表
function _getExerciseList() {
_getExerciseList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/exercise_lists.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getExerciseList.apply(this, arguments);
}
function getExerciseIdentityPhotos(_x2) {
return _getExerciseIdentityPhotos.apply(this, arguments);
}
function _getExerciseIdentityPhotos() {
_getExerciseIdentityPhotos = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/exercise_identity_photos.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getExerciseIdentityPhotos.apply(this, arguments);
}
function getVideoPushUrl(_x3) {
return _getVideoPushUrl.apply(this, arguments);
}
function _getVideoPushUrl() {
_getVideoPushUrl = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/video_push_url.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getVideoPushUrl.apply(this, arguments);
}
function queryIdentityPhotoState(_x4) {
return _queryIdentityPhotoState.apply(this, arguments);
}
//试卷统计
function _queryIdentityPhotoState() {
_queryIdentityPhotoState = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/query_identity_photo_state.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _queryIdentityPhotoState.apply(this, arguments);
}
function getExerciseStatistics(_x5) {
return _getExerciseStatistics.apply(this, arguments);
}
// 题库列表
function _getExerciseStatistics() {
_getExerciseStatistics = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/exercise_result.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getExerciseStatistics.apply(this, arguments);
}
function getBrankList(_x6) {
return _getBrankList.apply(this, arguments);
}
// 保存题库
function _getBrankList() {
_getBrankList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/question_banks/bank_list.json", {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _getBrankList.apply(this, arguments);
}
function saveBanks(_x7) {
return _saveBanks.apply(this, arguments);
}
// 获取班级列表 publish_modal
function _saveBanks() {
_saveBanks = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/question_banks/save_banks.json", {
method: 'POST',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _saveBanks.apply(this, arguments);
}
function getExerciseCourses(_x8) {
return _getExerciseCourses.apply(this, arguments);
}
function _getExerciseCourses() {
_getExerciseCourses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/exercises/publish_modal.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _getExerciseCourses.apply(this, arguments);
}
function getCommonHeader(_x9) {
return _getCommonHeader.apply(this, arguments);
}
// 试卷发送到课堂
// export async function postCoursesPublish(params: any) {
// return Fetch(`/api/courses/${params.coursesId}/exercises/publish.json`, {
// method: 'get',
// body: { ...params },
// });
// }
// 新建试卷
function _getCommonHeader() {
_getCommonHeader = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/common_header.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _getCommonHeader.apply(this, arguments);
}
function addExercise(_x10) {
return _addExercise.apply(this, arguments);
}
// 更新试卷
function _addExercise() {
_addExercise = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/exercises.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _addExercise.apply(this, arguments);
}
function putExercise(_x11) {
return _putExercise.apply(this, arguments);
}
// 编辑数据默认数据
function _putExercise() {
_putExercise = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.exerciseId, ".json"), {
method: 'put',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _putExercise.apply(this, arguments);
}
function editExercise(_x12) {
return _editExercise.apply(this, arguments);
}
//
function _editExercise() {
_editExercise = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, ".json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _editExercise.apply(this, arguments);
}
function getTagDiscipline(_x13) {
return _getTagDiscipline.apply(this, arguments);
}
// 编辑问题
function _getTagDiscipline() {
_getTagDiscipline = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/tag_disciplines.json", {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _getTagDiscipline.apply(this, arguments);
}
function editExerciseQuestion(_x14) {
return _editExerciseQuestion.apply(this, arguments);
}
// 添加问题
function _editExerciseQuestion() {
_editExerciseQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
var id;
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
id = params.id;
delete params.id;
return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercise_questions/".concat(id, ".json"), {
method: 'put',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 3:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _editExerciseQuestion.apply(this, arguments);
}
function addExerciseQuestion(_x15) {
return _addExerciseQuestion.apply(this, arguments);
}
// 上下移
function _addExerciseQuestion() {
_addExerciseQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/exercise_questions.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _addExerciseQuestion.apply(this, arguments);
}
function exeriseMoveUpDown(_x16) {
return _exeriseMoveUpDown.apply(this, arguments);
}
// 删除
function _exeriseMoveUpDown() {
_exeriseMoveUpDown = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercise_questions/".concat(params.id, "/up_down.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _exeriseMoveUpDown.apply(this, arguments);
}
function exeriseQuestionDelete(_x17) {
return _exeriseQuestionDelete.apply(this, arguments);
}
// 截止班级列表
function _exeriseQuestionDelete() {
_exeriseQuestionDelete = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercise_questions/".concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _exeriseQuestionDelete.apply(this, arguments);
}
function getEndGroups(_x18) {
return _getEndGroups.apply(this, arguments);
}
function _getEndGroups() {
_getEndGroups = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/exercises/end_modal.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _getEndGroups.apply(this, arguments);
}
function getPublishGroups(_x19) {
return _getPublishGroups.apply(this, arguments);
}
function _getPublishGroups() {
_getPublishGroups = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/publish_groups.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _getPublishGroups.apply(this, arguments);
}
function getReviewExercise(_x20) {
return _getReviewExercise.apply(this, arguments);
}
// 评阅调分
function _getReviewExercise() {
_getReviewExercise = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.exerciseId, "/review_exercise.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _getReviewExercise.apply(this, arguments);
}
function putAdjustScore(_x21) {
return _putAdjustScore.apply(this, arguments);
}
function _putAdjustScore() {
_putAdjustScore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercise_questions/".concat(params.id, "/adjust_score.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _putAdjustScore.apply(this, arguments);
}
function putBatchAdjustScore(_x22) {
return _putBatchAdjustScore.apply(this, arguments);
}
function _putBatchAdjustScore() {
_putBatchAdjustScore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercise_questions/".concat(params.id, "/batch_adjust_score.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _putBatchAdjustScore.apply(this, arguments);
}
function putExerciseAdjustScore(_x23) {
return _putExerciseAdjustScore.apply(this, arguments);
}
function _putExerciseAdjustScore() {
_putExerciseAdjustScore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/adjust_score.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _putExerciseAdjustScore.apply(this, arguments);
}
function delayedTime(_x24) {
return _delayedTime.apply(this, arguments);
}
function _delayedTime() {
_delayedTime = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/delayed_time.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _delayedTime.apply(this, arguments);
}
function getWorkSetting(_x25) {
return _getWorkSetting.apply(this, arguments);
}
function _getWorkSetting() {
_getWorkSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/exercise_setting.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _getWorkSetting.apply(this, arguments);
}
function updateSetting(_x26) {
return _updateSetting.apply(this, arguments);
}
function _updateSetting() {
_updateSetting = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/commit_setting.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _updateSetting.apply(this, arguments);
}
function getReviewGroupExercise(_x27) {
return _getReviewGroupExercise.apply(this, arguments);
}
function _getReviewGroupExercise() {
_getReviewGroupExercise = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.exerciseId, "/review_exercises_by_students.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _getReviewGroupExercise.apply(this, arguments);
}
function exportList(_x28) {
return _exportList.apply(this, arguments);
}
function _exportList() {
_exportList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
return _context28.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/exercise_lists.xlsx"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params), {}, {
export: true
})
}));
case 1:
case "end":
return _context28.stop();
}
}, _callee28);
}));
return _exportList.apply(this, arguments);
}
function getExerciseStartAnswer(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/start_answer.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function updateExerciseAnswers(_x29) {
return _updateExerciseAnswers.apply(this, arguments);
}
function _updateExerciseAnswers() {
_updateExerciseAnswers = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
return _context29.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercise_questions/".concat(params.questionId, "/exercise_answers.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context29.stop();
}
}, _callee29);
}));
return _updateExerciseAnswers.apply(this, arguments);
}
function submitExerciseAnswer(_x30) {
return _submitExerciseAnswer.apply(this, arguments);
}
function _submitExerciseAnswer() {
_submitExerciseAnswer = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
return _context30.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/commit_exercise.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context30.stop();
}
}, _callee30);
}));
return _submitExerciseAnswer.apply(this, arguments);
}
function submitSimulateExerciseAnswer(_x31) {
return _submitSimulateExerciseAnswer.apply(this, arguments);
}
function _submitSimulateExerciseAnswer() {
_submitSimulateExerciseAnswer = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(params) {
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
return _context31.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/simulate_commit_exercise.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context31.stop();
}
}, _callee31);
}));
return _submitSimulateExerciseAnswer.apply(this, arguments);
}
function redoExercise(_x32) {
return _redoExercise.apply(this, arguments);
}
function _redoExercise() {
_redoExercise = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) {
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
return _context32.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/redo_exercise.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context32.stop();
}
}, _callee32);
}));
return _redoExercise.apply(this, arguments);
}
function resetMyGame(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/".concat(params.url), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function startProgram(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/problems/".concat(params.id, "/start.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function beginCommit(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/begin_commit.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function simulateBeginCommit(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/simulate_begin_commit.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function getExaminationIntelligentSettings(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/examination_intelligent_settings/optional_items.json", {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function getRandomEditExercises(params) {
console.log("params:", params);
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/edit.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function getObjectiveScores(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/get_objective_scores.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function getRedoModal(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/redo_modal.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function getUserExercise(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/get_user_exercises.json", {
method: 'get',
params: params
});
}
function getExerciseExportHeadData(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/exercise_header.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
// 允许学员不开启摄像头 exercises/:exercise_id/allow_close_camera.json
function allowCloseCamera(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/allow_close_camera.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
// 检查学员是否需要打开摄像头考试
function getExerciseUserInfo(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/get_exercise_user_info.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function recordScreen(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/record_screen"), {
method: "post",
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function unbindIp(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/unbind_ip.json"), {
method: "post",
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function checkIp(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/check_ip.json"), {
method: "get",
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function makeUpStudents(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.id, "/make_up_students.json"), {
method: "get",
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
//试卷代码查重
function getCodeReviewDetail(_x33) {
return _getCodeReviewDetail.apply(this, arguments);
}
//试卷代码查重详情调分
function _getCodeReviewDetail() {
_getCodeReviewDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
return _context33.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/exercises/code_review_detail.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context33.stop();
}
}, _callee33);
}));
return _getCodeReviewDetail.apply(this, arguments);
}
function changeScore(_x34) {
return _changeScore.apply(this, arguments);
}
// 试卷库模拟考试生成模拟试卷
function _changeScore() {
_changeScore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(params) {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
return _context34.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercise_questions/".concat(params.question_id, "/adjust_score.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context34.stop();
}
}, _callee34);
}));
return _changeScore.apply(this, arguments);
}
function simulateExercise(_x35) {
return _simulateExercise.apply(this, arguments);
}
// 课堂试卷模拟考试生成模拟试卷
function _simulateExercise() {
_simulateExercise = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(params) {
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
return _context35.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/examination_banks/".concat(params.categoryId, "/simulate_exercise.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context35.stop();
}
}, _callee35);
}));
return _simulateExercise.apply(this, arguments);
}
function startSimulateAnswer(_x36) {
return _startSimulateAnswer.apply(this, arguments);
}
// 学生考试试卷剩余时间
function _startSimulateAnswer() {
_startSimulateAnswer = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(params) {
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
return _context36.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/simulate_start_answer.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context36.stop();
}
}, _callee36);
}));
return _startSimulateAnswer.apply(this, arguments);
}
function exerciseLeftTime(_x37) {
return _exerciseLeftTime.apply(this, arguments);
}
function _exerciseLeftTime() {
_exerciseLeftTime = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(params) {
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
while (1) switch (_context37.prev = _context37.next) {
case 0:
return _context37.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/exercise_time.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context37.stop();
}
}, _callee37);
}));
return _exerciseLeftTime.apply(this, arguments);
}
function commitScreenAt(_x38) {
return _commitScreenAt.apply(this, arguments);
}
function _commitScreenAt() {
_commitScreenAt = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(params) {
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
while (1) switch (_context38.prev = _context38.next) {
case 0:
return _context38.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/commit_screen_at.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context38.stop();
}
}, _callee38);
}));
return _commitScreenAt.apply(this, arguments);
}
/***/ }),
/***/ "VAJa":
/*!********************************************!*\
!*** ./node_modules/side-channel/index.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "AM7I");
var callBound = __webpack_require__(/*! call-bind/callBound */ "VF6F");
var inspect = __webpack_require__(/*! object-inspect */ "JxQ3");
var $TypeError = __webpack_require__(/*! es-errors/type */ "DSU0");
var $WeakMap = GetIntrinsic('%WeakMap%', true);
var $Map = GetIntrinsic('%Map%', true);
var $weakMapGet = callBound('WeakMap.prototype.get', true);
var $weakMapSet = callBound('WeakMap.prototype.set', true);
var $weakMapHas = callBound('WeakMap.prototype.has', true);
var $mapGet = callBound('Map.prototype.get', true);
var $mapSet = callBound('Map.prototype.set', true);
var $mapHas = callBound('Map.prototype.has', true);
/*
* This function traverses the list returning the node corresponding to the given key.
*
* That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
*/
/** @type {import('.').listGetNode} */
var listGetNode = function (list, key) { // eslint-disable-line consistent-return
/** @type {typeof list | NonNullable<(typeof list)['next']>} */
var prev = list;
/** @type {(typeof list)['next']} */
var curr;
for (; (curr = prev.next) !== null; prev = curr) {
if (curr.key === key) {
prev.next = curr.next;
// eslint-disable-next-line no-extra-parens
curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
list.next = curr; // eslint-disable-line no-param-reassign
return curr;
}
}
};
/** @type {import('.').listGet} */
var listGet = function (objects, key) {
var node = listGetNode(objects, key);
return node && node.value;
};
/** @type {import('.').listSet} */
var listSet = function (objects, key, value) {
var node = listGetNode(objects, key);
if (node) {
node.value = value;
} else {
// Prepend the new node to the beginning of the list
objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
key: key,
next: objects.next,
value: value
});
}
};
/** @type {import('.').listHas} */
var listHas = function (objects, key) {
return !!listGetNode(objects, key);
};
/** @type {import('.')} */
module.exports = function getSideChannel() {
/** @type {WeakMap<object, unknown>} */ var $wm;
/** @type {Map<object, unknown>} */ var $m;
/** @type {import('.').RootNode<unknown>} */ var $o;
/** @type {import('.').Channel} */
var channel = {
assert: function (key) {
if (!channel.has(key)) {
throw new $TypeError('Side channel does not contain ' + inspect(key));
}
},
get: function (key) { // eslint-disable-line consistent-return
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
if ($wm) {
return $weakMapGet($wm, key);
}
} else if ($Map) {
if ($m) {
return $mapGet($m, key);
}
} else {
if ($o) { // eslint-disable-line no-lonely-if
return listGet($o, key);
}
}
},
has: function (key) {
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
if ($wm) {
return $weakMapHas($wm, key);
}
} else if ($Map) {
if ($m) {
return $mapHas($m, key);
}
} else {
if ($o) { // eslint-disable-line no-lonely-if
return listHas($o, key);
}
}
return false;
},
set: function (key, value) {
if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
if (!$wm) {
$wm = new $WeakMap();
}
$weakMapSet($wm, key, value);
} else if ($Map) {
if (!$m) {
$m = new $Map();
}
$mapSet($m, key, value);
} else {
if (!$o) {
// Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
$o = { key: {}, next: null };
}
listSet($o, key, value);
}
}
};
return channel;
};
/***/ }),
/***/ "VF6F":
/*!*********************************************!*\
!*** ./node_modules/call-bind/callBound.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "AM7I");
var callBind = __webpack_require__(/*! ./ */ "PrET");
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
module.exports = function callBoundIntrinsic(name, allowMissing) {
var intrinsic = GetIntrinsic(name, !!allowMissing);
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
return callBind(intrinsic);
}
return intrinsic;
};
/***/ }),
/***/ "VOz1":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.reduce.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.reduce` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
reduce: function reduce(callbackfn /* , initialValue */) {
var map = anObject(this);
var iterator = getMapIterator(map);
var noInitial = arguments.length < 2;
var accumulator = noInitial ? undefined : arguments[1];
aFunction(callbackfn);
iterate(iterator, function (key, value) {
if (noInitial) {
noInitial = false;
accumulator = value;
} else {
accumulator = callbackfn(accumulator, value, key, map);
}
}, undefined, true, true);
if (noInitial) throw TypeError('Reduce of empty map with no initial value');
return accumulator;
}
});
/***/ }),
/***/ "VTBJ":
/*!******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
\******************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread2; });
/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty.js */ "rePB");
function ownKeys(e, r) {
var t = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var o = Object.getOwnPropertySymbols(e);
r && (o = o.filter(function (r) {
return Object.getOwnPropertyDescriptor(e, r).enumerable;
})), t.push.apply(t, o);
}
return t;
}
function _objectSpread2(e) {
for (var r = 1; r < arguments.length; r++) {
var t = null != arguments[r] ? arguments[r] : {};
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
Object(_defineProperty_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(e, r, t[r]);
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
});
}
return e;
}
/***/ }),
/***/ "VWci":
/*!*****************************************************************************************!*\
!*** ./node_modules/@umijs/preset-built-in/node_modules/regenerator-runtime/runtime.js ***!
\*****************************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/**
* Copyright (c) 2014-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var runtime = (function (exports) {
"use strict";
var Op = Object.prototype;
var hasOwn = Op.hasOwnProperty;
var undefined; // More compressible than void 0.
var $Symbol = typeof Symbol === "function" ? Symbol : {};
var iteratorSymbol = $Symbol.iterator || "@@iterator";
var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator";
var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
function wrap(innerFn, outerFn, self, tryLocsList) {
// If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.
var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;
var generator = Object.create(protoGenerator.prototype);
var context = new Context(tryLocsList || []);
// The ._invoke method unifies the implementations of the .next,
// .throw, and .return methods.
generator._invoke = makeInvokeMethod(innerFn, self, context);
return generator;
}
exports.wrap = wrap;
// Try/catch helper to minimize deoptimizations. Returns a completion
// record like context.tryEntries[i].completion. This interface could
// have been (and was previously) designed to take a closure to be
// invoked without arguments, but in all the cases we care about we
// already have an existing method we want to call, so there's no need
// to create a new function object. We can even get away with assuming
// the method takes exactly one argument, since that happens to be true
// in every case, so we don't have to touch the arguments object. The
// only additional allocation required is the completion record, which
// has a stable shape and so hopefully should be cheap to allocate.
function tryCatch(fn, obj, arg) {
try {
return { type: "normal", arg: fn.call(obj, arg) };
} catch (err) {
return { type: "throw", arg: err };
}
}
var GenStateSuspendedStart = "suspendedStart";
var GenStateSuspendedYield = "suspendedYield";
var GenStateExecuting = "executing";
var GenStateCompleted = "completed";
// Returning this object from the innerFn has the same effect as
// breaking out of the dispatch switch statement.
var ContinueSentinel = {};
// Dummy constructor functions that we use as the .constructor and
// .constructor.prototype properties for functions that return Generator
// objects. For full spec compliance, you may wish to configure your
// minifier not to mangle the names of these two functions.
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
// This is a polyfill for %IteratorPrototype% for environments that
// don't natively support it.
var IteratorPrototype = {};
IteratorPrototype[iteratorSymbol] = function () {
return this;
};
var getProto = Object.getPrototypeOf;
var NativeIteratorPrototype = getProto && getProto(getProto(values([])));
if (NativeIteratorPrototype &&
NativeIteratorPrototype !== Op &&
hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {
// This environment has a native %IteratorPrototype%; use it instead
// of the polyfill.
IteratorPrototype = NativeIteratorPrototype;
}
var Gp = GeneratorFunctionPrototype.prototype =
Generator.prototype = Object.create(IteratorPrototype);
GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;
GeneratorFunctionPrototype.constructor = GeneratorFunction;
GeneratorFunctionPrototype[toStringTagSymbol] =
GeneratorFunction.displayName = "GeneratorFunction";
// Helper for defining the .next, .throw, and .return methods of the
// Iterator interface in terms of a single ._invoke method.
function defineIteratorMethods(prototype) {
["next", "throw", "return"].forEach(function(method) {
prototype[method] = function(arg) {
return this._invoke(method, arg);
};
});
}
exports.isGeneratorFunction = function(genFun) {
var ctor = typeof genFun === "function" && genFun.constructor;
return ctor
? ctor === GeneratorFunction ||
// For the native GeneratorFunction constructor, the best we can
// do is to check its .name property.
(ctor.displayName || ctor.name) === "GeneratorFunction"
: false;
};
exports.mark = function(genFun) {
if (Object.setPrototypeOf) {
Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);
} else {
genFun.__proto__ = GeneratorFunctionPrototype;
if (!(toStringTagSymbol in genFun)) {
genFun[toStringTagSymbol] = "GeneratorFunction";
}
}
genFun.prototype = Object.create(Gp);
return genFun;
};
// Within the body of any async function, `await x` is transformed to
// `yield regeneratorRuntime.awrap(x)`, so that the runtime can test
// `hasOwn.call(value, "__await")` to determine if the yielded value is
// meant to be awaited.
exports.awrap = function(arg) {
return { __await: arg };
};
function AsyncIterator(generator, PromiseImpl) {
function invoke(method, arg, resolve, reject) {
var record = tryCatch(generator[method], generator, arg);
if (record.type === "throw") {
reject(record.arg);
} else {
var result = record.arg;
var value = result.value;
if (value &&
typeof value === "object" &&
hasOwn.call(value, "__await")) {
return PromiseImpl.resolve(value.__await).then(function(value) {
invoke("next", value, resolve, reject);
}, function(err) {
invoke("throw", err, resolve, reject);
});
}
return PromiseImpl.resolve(value).then(function(unwrapped) {
// When a yielded Promise is resolved, its final value becomes
// the .value of the Promise<{value,done}> result for the
// current iteration.
result.value = unwrapped;
resolve(result);
}, function(error) {
// If a rejected Promise was yielded, throw the rejection back
// into the async generator function so it can be handled there.
return invoke("throw", error, resolve, reject);
});
}
}
var previousPromise;
function enqueue(method, arg) {
function callInvokeWithMethodAndArg() {
return new PromiseImpl(function(resolve, reject) {
invoke(method, arg, resolve, reject);
});
}
return previousPromise =
// If enqueue has been called before, then we want to wait until
// all previous Promises have been resolved before calling invoke,
// so that results are always delivered in the correct order. If
// enqueue has not been called before, then it is important to
// call invoke immediately, without waiting on a callback to fire,
// so that the async generator function has the opportunity to do
// any necessary setup in a predictable way. This predictability
// is why the Promise constructor synchronously invokes its
// executor callback, and why async functions synchronously
// execute code before the first await. Since we implement simple
// async functions in terms of async generators, it is especially
// important to get this right, even though it requires care.
previousPromise ? previousPromise.then(
callInvokeWithMethodAndArg,
// Avoid propagating failures to Promises returned by later
// invocations of the iterator.
callInvokeWithMethodAndArg
) : callInvokeWithMethodAndArg();
}
// Define the unified helper method that is used to implement .next,
// .throw, and .return (see defineIteratorMethods).
this._invoke = enqueue;
}
defineIteratorMethods(AsyncIterator.prototype);
AsyncIterator.prototype[asyncIteratorSymbol] = function () {
return this;
};
exports.AsyncIterator = AsyncIterator;
// Note that simple async functions are implemented on top of
// AsyncIterator objects; they just return a Promise for the value of
// the final result produced by the iterator.
exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {
if (PromiseImpl === void 0) PromiseImpl = Promise;
var iter = new AsyncIterator(
wrap(innerFn, outerFn, self, tryLocsList),
PromiseImpl
);
return exports.isGeneratorFunction(outerFn)
? iter // If outerFn is a generator, return the full iterator.
: iter.next().then(function(result) {
return result.done ? result.value : iter.next();
});
};
function makeInvokeMethod(innerFn, self, context) {
var state = GenStateSuspendedStart;
return function invoke(method, arg) {
if (state === GenStateExecuting) {
throw new Error("Generator is already running");
}
if (state === GenStateCompleted) {
if (method === "throw") {
throw arg;
}
// Be forgiving, per 25.3.3.3.3 of the spec:
// https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume
return doneResult();
}
context.method = method;
context.arg = arg;
while (true) {
var delegate = context.delegate;
if (delegate) {
var delegateResult = maybeInvokeDelegate(delegate, context);
if (delegateResult) {
if (delegateResult === ContinueSentinel) continue;
return delegateResult;
}
}
if (context.method === "next") {
// Setting context._sent for legacy support of Babel's
// function.sent implementation.
context.sent = context._sent = context.arg;
} else if (context.method === "throw") {
if (state === GenStateSuspendedStart) {
state = GenStateCompleted;
throw context.arg;
}
context.dispatchException(context.arg);
} else if (context.method === "return") {
context.abrupt("return", context.arg);
}
state = GenStateExecuting;
var record = tryCatch(innerFn, self, context);
if (record.type === "normal") {
// If an exception is thrown from innerFn, we leave state ===
// GenStateExecuting and loop back for another invocation.
state = context.done
? GenStateCompleted
: GenStateSuspendedYield;
if (record.arg === ContinueSentinel) {
continue;
}
return {
value: record.arg,
done: context.done
};
} else if (record.type === "throw") {
state = GenStateCompleted;
// Dispatch the exception by looping back around to the
// context.dispatchException(context.arg) call above.
context.method = "throw";
context.arg = record.arg;
}
}
};
}
// Call delegate.iterator[context.method](context.arg) and handle the
// result, either by returning a { value, done } result from the
// delegate iterator, or by modifying context.method and context.arg,
// setting context.delegate to null, and returning the ContinueSentinel.
function maybeInvokeDelegate(delegate, context) {
var method = delegate.iterator[context.method];
if (method === undefined) {
// A .throw or .return when the delegate iterator has no .throw
// method always terminates the yield* loop.
context.delegate = null;
if (context.method === "throw") {
// Note: ["return"] must be used for ES3 parsing compatibility.
if (delegate.iterator["return"]) {
// If the delegate iterator has a return method, give it a
// chance to clean up.
context.method = "return";
context.arg = undefined;
maybeInvokeDelegate(delegate, context);
if (context.method === "throw") {
// If maybeInvokeDelegate(context) changed context.method from
// "return" to "throw", let that override the TypeError below.
return ContinueSentinel;
}
}
context.method = "throw";
context.arg = new TypeError(
"The iterator does not provide a 'throw' method");
}
return ContinueSentinel;
}
var record = tryCatch(method, delegate.iterator, context.arg);
if (record.type === "throw") {
context.method = "throw";
context.arg = record.arg;
context.delegate = null;
return ContinueSentinel;
}
var info = record.arg;
if (! info) {
context.method = "throw";
context.arg = new TypeError("iterator result is not an object");
context.delegate = null;
return ContinueSentinel;
}
if (info.done) {
// Assign the result of the finished delegate to the temporary
// variable specified by delegate.resultName (see delegateYield).
context[delegate.resultName] = info.value;
// Resume execution at the desired location (see delegateYield).
context.next = delegate.nextLoc;
// If context.method was "throw" but the delegate handled the
// exception, let the outer generator proceed normally. If
// context.method was "next", forget context.arg since it has been
// "consumed" by the delegate iterator. If context.method was
// "return", allow the original .return call to continue in the
// outer generator.
if (context.method !== "return") {
context.method = "next";
context.arg = undefined;
}
} else {
// Re-yield the result returned by the delegate method.
return info;
}
// The delegate iterator is finished, so forget it and continue with
// the outer generator.
context.delegate = null;
return ContinueSentinel;
}
// Define Generator.prototype.{next,throw,return} in terms of the
// unified ._invoke helper method.
defineIteratorMethods(Gp);
Gp[toStringTagSymbol] = "Generator";
// A Generator should always return itself as the iterator object when the
// @@iterator function is called on it. Some browsers' implementations of the
// iterator prototype chain incorrectly implement this, causing the Generator
// object to not be returned from this call. This ensures that doesn't happen.
// See https://github.com/facebook/regenerator/issues/274 for more details.
Gp[iteratorSymbol] = function() {
return this;
};
Gp.toString = function() {
return "[object Generator]";
};
function pushTryEntry(locs) {
var entry = { tryLoc: locs[0] };
if (1 in locs) {
entry.catchLoc = locs[1];
}
if (2 in locs) {
entry.finallyLoc = locs[2];
entry.afterLoc = locs[3];
}
this.tryEntries.push(entry);
}
function resetTryEntry(entry) {
var record = entry.completion || {};
record.type = "normal";
delete record.arg;
entry.completion = record;
}
function Context(tryLocsList) {
// The root entry object (effectively a try statement without a catch
// or a finally block) gives us a place to store values thrown from
// locations where there is no enclosing try statement.
this.tryEntries = [{ tryLoc: "root" }];
tryLocsList.forEach(pushTryEntry, this);
this.reset(true);
}
exports.keys = function(object) {
var keys = [];
for (var key in object) {
keys.push(key);
}
keys.reverse();
// Rather than returning an object with a next method, we keep
// things simple and return the next function itself.
return function next() {
while (keys.length) {
var key = keys.pop();
if (key in object) {
next.value = key;
next.done = false;
return next;
}
}
// To avoid creating an additional object, we just hang the .value
// and .done properties off the next function object itself. This
// also ensures that the minifier will not anonymize the function.
next.done = true;
return next;
};
};
function values(iterable) {
if (iterable) {
var iteratorMethod = iterable[iteratorSymbol];
if (iteratorMethod) {
return iteratorMethod.call(iterable);
}
if (typeof iterable.next === "function") {
return iterable;
}
if (!isNaN(iterable.length)) {
var i = -1, next = function next() {
while (++i < iterable.length) {
if (hasOwn.call(iterable, i)) {
next.value = iterable[i];
next.done = false;
return next;
}
}
next.value = undefined;
next.done = true;
return next;
};
return next.next = next;
}
}
// Return an iterator with no values.
return { next: doneResult };
}
exports.values = values;
function doneResult() {
return { value: undefined, done: true };
}
Context.prototype = {
constructor: Context,
reset: function(skipTempReset) {
this.prev = 0;
this.next = 0;
// Resetting context._sent for legacy support of Babel's
// function.sent implementation.
this.sent = this._sent = undefined;
this.done = false;
this.delegate = null;
this.method = "next";
this.arg = undefined;
this.tryEntries.forEach(resetTryEntry);
if (!skipTempReset) {
for (var name in this) {
// Not sure about the optimal order of these conditions:
if (name.charAt(0) === "t" &&
hasOwn.call(this, name) &&
!isNaN(+name.slice(1))) {
this[name] = undefined;
}
}
}
},
stop: function() {
this.done = true;
var rootEntry = this.tryEntries[0];
var rootRecord = rootEntry.completion;
if (rootRecord.type === "throw") {
throw rootRecord.arg;
}
return this.rval;
},
dispatchException: function(exception) {
if (this.done) {
throw exception;
}
var context = this;
function handle(loc, caught) {
record.type = "throw";
record.arg = exception;
context.next = loc;
if (caught) {
// If the dispatched exception was caught by a catch block,
// then let that catch block handle the exception normally.
context.method = "next";
context.arg = undefined;
}
return !! caught;
}
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
var record = entry.completion;
if (entry.tryLoc === "root") {
// Exception thrown outside of any try block that could handle
// it, so set the completion value of the entire function to
// throw the exception.
return handle("end");
}
if (entry.tryLoc <= this.prev) {
var hasCatch = hasOwn.call(entry, "catchLoc");
var hasFinally = hasOwn.call(entry, "finallyLoc");
if (hasCatch && hasFinally) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
} else if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else if (hasCatch) {
if (this.prev < entry.catchLoc) {
return handle(entry.catchLoc, true);
}
} else if (hasFinally) {
if (this.prev < entry.finallyLoc) {
return handle(entry.finallyLoc);
}
} else {
throw new Error("try statement without catch or finally");
}
}
}
},
abrupt: function(type, arg) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc <= this.prev &&
hasOwn.call(entry, "finallyLoc") &&
this.prev < entry.finallyLoc) {
var finallyEntry = entry;
break;
}
}
if (finallyEntry &&
(type === "break" ||
type === "continue") &&
finallyEntry.tryLoc <= arg &&
arg <= finallyEntry.finallyLoc) {
// Ignore the finally entry if control is not jumping to a
// location outside the try/catch block.
finallyEntry = null;
}
var record = finallyEntry ? finallyEntry.completion : {};
record.type = type;
record.arg = arg;
if (finallyEntry) {
this.method = "next";
this.next = finallyEntry.finallyLoc;
return ContinueSentinel;
}
return this.complete(record);
},
complete: function(record, afterLoc) {
if (record.type === "throw") {
throw record.arg;
}
if (record.type === "break" ||
record.type === "continue") {
this.next = record.arg;
} else if (record.type === "return") {
this.rval = this.arg = record.arg;
this.method = "return";
this.next = "end";
} else if (record.type === "normal" && afterLoc) {
this.next = afterLoc;
}
return ContinueSentinel;
},
finish: function(finallyLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.finallyLoc === finallyLoc) {
this.complete(entry.completion, entry.afterLoc);
resetTryEntry(entry);
return ContinueSentinel;
}
}
},
"catch": function(tryLoc) {
for (var i = this.tryEntries.length - 1; i >= 0; --i) {
var entry = this.tryEntries[i];
if (entry.tryLoc === tryLoc) {
var record = entry.completion;
if (record.type === "throw") {
var thrown = record.arg;
resetTryEntry(entry);
}
return thrown;
}
}
// The context.catch method must only be called with a location
// argument that corresponds to a known catch block.
throw new Error("illegal catch attempt");
},
delegateYield: function(iterable, resultName, nextLoc) {
this.delegate = {
iterator: values(iterable),
resultName: resultName,
nextLoc: nextLoc
};
if (this.method === "next") {
// Deliberately forget the last sent value so that we don't
// accidentally pass it on to the delegate.
this.arg = undefined;
}
return ContinueSentinel;
}
};
// Regardless of whether this script is executing as a CommonJS module
// or not, return the runtime object so that we can declare the variable
// regeneratorRuntime in the outer scope, which allows this module to be
// injected easily by `bin/regenerator --include-runtime script.js`.
return exports;
}(
// If this script is executing as a CommonJS module, use module.exports
// as the regeneratorRuntime namespace. Otherwise create a new empty
// object. Either way, the resulting object will be used to initialize
// the regeneratorRuntime variable at the top of this file.
true ? module.exports : undefined
));
try {
regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
// This module should not be running in strict mode, so the above
// assignment should always work unless something is misconfigured. Just
// in case runtime.js accidentally runs in strict mode, we can escape
// strict mode using a global Function call. This could conceivably fail
// if a Content Security Policy forbids using Function, but in that case
// the proper solution is to fix the accidental strict mode problem. If
// you've misconfigured your bundler to force strict mode and applied a
// CSP to forbid Function, and you're not willing to fix either of those
// problems, please detail your unique predicament in a GitHub issue.
Function("r", "regeneratorRuntime = r")(runtime);
}
/***/ }),
/***/ "Vnov":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.key-of.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.includes` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
keyOf: function keyOf(searchElement) {
return iterate(getMapIterator(anObject(this)), function (key, value) {
if (value === searchElement) return iterate.stop(key);
}, undefined, true, true).result;
}
});
/***/ }),
/***/ "VpIT":
/*!**************************************************!*\
!*** ./node_modules/core-js/internals/shared.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var store = __webpack_require__(/*! ../internals/shared-store */ "xs3f");
(module.exports = function (key, value) {
return store[key] || (store[key] = value !== undefined ? value : {});
})('versions', []).push({
version: '3.6.5',
mode: IS_PURE ? 'pure' : 'global',
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
});
/***/ }),
/***/ "Vu81":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/own-keys.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "JBy8");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "dBg+");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
// all object keys, includes non-enumerable and symbols
module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
var keys = getOwnPropertyNamesModule.f(anObject(it));
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
};
/***/ }),
/***/ "W/eh":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.lookup-setter.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var FORCED = __webpack_require__(/*! ../internals/object-prototype-accessors-forced */ "6x0u");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
// `Object.prototype.__lookupSetter__` method
// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupSetter__
if (DESCRIPTORS) {
$({ target: 'Object', proto: true, forced: FORCED }, {
__lookupSetter__: function __lookupSetter__(P) {
var O = toObject(this);
var key = toPrimitive(P, true);
var desc;
do {
if (desc = getOwnPropertyDescriptor(O, key)) return desc.set;
} while (O = getPrototypeOf(O));
}
});
}
/***/ }),
/***/ "W8MJ":
/*!************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/createClass.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "o5UB");
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "W9HT":
/*!********************************************!*\
!*** ./node_modules/antd/es/spin/index.js ***!
\********************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "pVnL");
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "lSNA");
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ "lwsE");
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ "W8MJ");
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/inherits */ "7W2i");
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var _babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/createSuper */ "LQ03");
/* harmony import */ var _babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! classnames */ "TSYQ");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var omit_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! omit.js */ "BGR+");
/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! lodash/debounce */ "sEfC");
/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_9__);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../config-provider */ "H84U");
/* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../_util/type */ "CWQg");
/* harmony import */ var _util_reactNode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../_util/reactNode */ "0n0R");
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var SpinSizes = Object(_util_type__WEBPACK_IMPORTED_MODULE_11__[/* tuple */ "a"])('small', 'default', 'large'); // Render indicator
var defaultIndicator = null;
function renderIndicator(prefixCls, props) {
var indicator = props.indicator;
var dotClassName = "".concat(prefixCls, "-dot"); // should not be render default indicator when indicator value is null
if (indicator === null) {
return null;
}
if (Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_12__[/* isValidElement */ "b"])(indicator)) {
return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_12__[/* cloneElement */ "a"])(indicator, {
className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(indicator.props.className, dotClassName)
});
}
if (Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_12__[/* isValidElement */ "b"])(defaultIndicator)) {
return Object(_util_reactNode__WEBPACK_IMPORTED_MODULE_12__[/* cloneElement */ "a"])(defaultIndicator, {
className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(defaultIndicator.props.className, dotClassName)
});
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("span", {
className: classnames__WEBPACK_IMPORTED_MODULE_7___default()(dotClassName, "".concat(prefixCls, "-dot-spin"))
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("i", {
className: "".concat(prefixCls, "-dot-item")
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("i", {
className: "".concat(prefixCls, "-dot-item")
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("i", {
className: "".concat(prefixCls, "-dot-item")
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("i", {
className: "".concat(prefixCls, "-dot-item")
}));
}
function shouldDelay(spinning, delay) {
return !!spinning && !!delay && !isNaN(Number(delay));
}
var Spin = /*#__PURE__*/function (_React$Component) {
_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_4___default()(Spin, _React$Component);
var _super = _babel_runtime_helpers_createSuper__WEBPACK_IMPORTED_MODULE_5___default()(Spin);
function Spin(props) {
var _this;
_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_2___default()(this, Spin);
_this = _super.call(this, props);
_this.debouncifyUpdateSpinning = function (props) {
var _ref = props || _this.props,
delay = _ref.delay;
if (delay) {
_this.cancelExistingSpin();
_this.updateSpinning = lodash_debounce__WEBPACK_IMPORTED_MODULE_9___default()(_this.originalUpdateSpinning, delay);
}
};
_this.updateSpinning = function () {
var spinning = _this.props.spinning;
var currentSpinning = _this.state.spinning;
if (currentSpinning !== spinning) {
_this.setState({
spinning: spinning
});
}
};
_this.renderSpin = function (_ref2) {
var _classNames;
var getPrefixCls = _ref2.getPrefixCls,
direction = _ref2.direction;
var _a = _this.props,
customizePrefixCls = _a.prefixCls,
className = _a.className,
size = _a.size,
tip = _a.tip,
wrapperClassName = _a.wrapperClassName,
style = _a.style,
restProps = __rest(_a, ["prefixCls", "className", "size", "tip", "wrapperClassName", "style"]);
var spinning = _this.state.spinning;
var prefixCls = getPrefixCls('spin', customizePrefixCls);
var spinClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()(prefixCls, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-sm"), size === 'small'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-lg"), size === 'large'), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-spinning"), spinning), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-show-text"), !!tip), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className); // fix https://fb.me/react-unknown-prop
var divProps = Object(omit_js__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])(restProps, ['spinning', 'delay', 'indicator']);
var spinElement = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, divProps, {
style: style,
className: spinClassName
}), renderIndicator(prefixCls, _this.props), tip ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", {
className: "".concat(prefixCls, "-text")
}, tip) : null);
if (_this.isNestedPattern()) {
var containerClassName = classnames__WEBPACK_IMPORTED_MODULE_7___default()("".concat(prefixCls, "-container"), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()({}, "".concat(prefixCls, "-blur"), spinning));
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, divProps, {
className: classnames__WEBPACK_IMPORTED_MODULE_7___default()("".concat(prefixCls, "-nested-loading"), wrapperClassName)
}), spinning && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", {
key: "loading"
}, spinElement), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"]("div", {
className: containerClassName,
key: "container"
}, _this.props.children));
}
return spinElement;
};
var spinning = props.spinning,
delay = props.delay;
var shouldBeDelayed = shouldDelay(spinning, delay);
_this.state = {
spinning: spinning && !shouldBeDelayed
};
_this.originalUpdateSpinning = _this.updateSpinning;
_this.debouncifyUpdateSpinning(props);
return _this;
}
_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_3___default()(Spin, [{
key: "componentDidMount",
value: function componentDidMount() {
this.updateSpinning();
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate() {
this.debouncifyUpdateSpinning();
this.updateSpinning();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
this.cancelExistingSpin();
}
}, {
key: "cancelExistingSpin",
value: function cancelExistingSpin() {
var updateSpinning = this.updateSpinning;
if (updateSpinning && updateSpinning.cancel) {
updateSpinning.cancel();
}
}
}, {
key: "isNestedPattern",
value: function isNestedPattern() {
return !!(this.props && this.props.children);
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_6__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_10__[/* ConfigConsumer */ "a"], null, this.renderSpin);
}
}], [{
key: "setDefaultIndicator",
value: function setDefaultIndicator(indicator) {
defaultIndicator = indicator;
}
}]);
return Spin;
}(react__WEBPACK_IMPORTED_MODULE_6__["Component"]);
Spin.defaultProps = {
spinning: true,
size: 'default',
wrapperClassName: ''
};
/* harmony default export */ __webpack_exports__["a"] = (Spin);
/***/ }),
/***/ "WCUW":
/*!***********************************!*\
!*** ./src/service/problemset.ts ***!
\***********************************/
/*! exports provided: getDisciplines, getBasketList, getItemBanks, setPrivate, setPublic, handleDelete, startExperience, cancel, select, examUnselectAll, basketDelete, unselectAll, addKnowledge, editProblemset, addProblemset, getEditData, getPaperData, setScore, setChallengeScore, handleDeletePreviewQuestion, batchSetScore, batchDelete, adjustPosition, newPreviewProblemset, revokeItem, examinationItems, joinCollection, cancelCollection, getPaperList, getGroupList, joinGroup, updateGroup, createGroup, createFeedback, getTeachGroupData, batchShare, batchQuestionsDelete, batchGroup, batchPublic, getTeachGroupDataById, programPublish, programCancelPublish, moveUp, moveDown */
/*! exports used: addKnowledge, addProblemset, adjustPosition, basketDelete, batchDelete, batchSetScore, cancel, editProblemset, examUnselectAll, getBasketList, getDisciplines, getEditData, getGroupList, getItemBanks, getPaperData, getTeachGroupData, handleDelete, handleDeletePreviewQuestion, newPreviewProblemset, select, setPrivate, setPublic, setScore, startExperience, unselectAll */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getDisciplines; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return getBasketList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return getItemBanks; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return setPrivate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return setPublic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return handleDelete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return startExperience; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return cancel; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return select; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return examUnselectAll; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return basketDelete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return unselectAll; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addKnowledge; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return editProblemset; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return addProblemset; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getEditData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getPaperData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return setScore; });
/* unused harmony export setChallengeScore */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return handleDeletePreviewQuestion; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return batchSetScore; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return batchDelete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return adjustPosition; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return newPreviewProblemset; });
/* unused harmony export revokeItem */
/* unused harmony export examinationItems */
/* unused harmony export joinCollection */
/* unused harmony export cancelCollection */
/* unused harmony export getPaperList */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getGroupList; });
/* unused harmony export joinGroup */
/* unused harmony export updateGroup */
/* unused harmony export createGroup */
/* unused harmony export createFeedback */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getTeachGroupData; });
/* unused harmony export batchShare */
/* unused harmony export batchQuestionsDelete */
/* unused harmony export batchGroup */
/* unused harmony export batchPublic */
/* unused harmony export getTeachGroupDataById */
/* unused harmony export programPublish */
/* unused harmony export programCancelPublish */
/* unused harmony export moveUp */
/* unused harmony export moveDown */
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function getDisciplines(_x) {
return _getDisciplines.apply(this, arguments);
}
function _getDisciplines() {
_getDisciplines = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/disciplines.json', {
method: 'get',
params: params
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getDisciplines.apply(this, arguments);
}
function getBasketList(_x2) {
return _getBasketList.apply(this, arguments);
}
function _getBasketList() {
_getBasketList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/item_baskets/basket_list.json', {
method: 'get',
params: params
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getBasketList.apply(this, arguments);
}
function getItemBanks(_x3) {
return _getItemBanks.apply(this, arguments);
}
function _getItemBanks() {
_getItemBanks = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/item_banks.json', {
method: 'get',
params: params
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getItemBanks.apply(this, arguments);
}
function setPrivate(_x4) {
return _setPrivate.apply(this, arguments);
}
function _setPrivate() {
_setPrivate = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/".concat(params.id, "/set_private.json"), {
method: 'post'
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _setPrivate.apply(this, arguments);
}
function setPublic(_x5) {
return _setPublic.apply(this, arguments);
}
function _setPublic() {
_setPublic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/".concat(params.id, "/set_public.json"), {
method: 'post'
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _setPublic.apply(this, arguments);
}
function handleDelete(_x6) {
return _handleDelete.apply(this, arguments);
}
function _handleDelete() {
_handleDelete = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/".concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _handleDelete.apply(this, arguments);
}
function startExperience(_x7) {
return _startExperience.apply(this, arguments);
}
function _startExperience() {
_startExperience = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/problems/".concat(params.id, "/start.json"), {
method: 'get'
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _startExperience.apply(this, arguments);
}
function cancel(_x8) {
return _cancel.apply(this, arguments);
}
function _cancel() {
_cancel = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets/".concat(params.id, ".json"), {
method: 'delete',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _cancel.apply(this, arguments);
}
function select(_x9) {
return _select.apply(this, arguments);
}
function _select() {
_select = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _select.apply(this, arguments);
}
function examUnselectAll(_x10) {
return _examUnselectAll.apply(this, arguments);
}
function _examUnselectAll() {
_examUnselectAll = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/examination_banks/cancel_items.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _examUnselectAll.apply(this, arguments);
}
function basketDelete(_x11) {
return _basketDelete.apply(this, arguments);
}
function _basketDelete() {
_basketDelete = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets/delete_item_type.json", {
method: 'delete',
body: {
item_type: params.type
}
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _basketDelete.apply(this, arguments);
}
function unselectAll(_x12) {
return _unselectAll.apply(this, arguments);
}
function _unselectAll() {
_unselectAll = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/examination_banks/cancel_items.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _unselectAll.apply(this, arguments);
}
function addKnowledge(_x13) {
return _addKnowledge.apply(this, arguments);
}
function _addKnowledge() {
_addKnowledge = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/tag_disciplines.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _addKnowledge.apply(this, arguments);
}
function editProblemset(_x14) {
return _editProblemset.apply(this, arguments);
}
function _editProblemset() {
_editProblemset = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/".concat(params.id, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _editProblemset.apply(this, arguments);
}
function addProblemset(_x15) {
return _addProblemset.apply(this, arguments);
}
function _addProblemset() {
_addProblemset = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _addProblemset.apply(this, arguments);
}
function getEditData(_x16) {
return _getEditData.apply(this, arguments);
}
function _getEditData() {
_getEditData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/".concat(params.id, "/edit.json"), {
method: 'get'
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _getEditData.apply(this, arguments);
}
function getPaperData(_x17) {
return _getPaperData.apply(this, arguments);
}
function _getPaperData() {
_getPaperData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _getPaperData.apply(this, arguments);
}
function setScore(_x18) {
return _setScore.apply(this, arguments);
}
function _setScore() {
_setScore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets/".concat(params.id, "/set_score.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _setScore.apply(this, arguments);
}
function setChallengeScore(_x19) {
return _setChallengeScore.apply(this, arguments);
}
function _setChallengeScore() {
_setChallengeScore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets/".concat(params.id, "/set_challenge_score.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _setChallengeScore.apply(this, arguments);
}
function handleDeletePreviewQuestion(_x20) {
return _handleDeletePreviewQuestion.apply(this, arguments);
}
function _handleDeletePreviewQuestion() {
_handleDeletePreviewQuestion = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets/".concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _handleDeletePreviewQuestion.apply(this, arguments);
}
function batchSetScore(_x21) {
return _batchSetScore.apply(this, arguments);
}
function _batchSetScore() {
_batchSetScore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets/batch_set_score.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _batchSetScore.apply(this, arguments);
}
function batchDelete(_x22) {
return _batchDelete.apply(this, arguments);
}
function _batchDelete() {
_batchDelete = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets/delete_item_type.json", {
method: 'delete',
body: params
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _batchDelete.apply(this, arguments);
}
function adjustPosition(_x23) {
return _adjustPosition.apply(this, arguments);
}
function _adjustPosition() {
_adjustPosition = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_baskets/".concat(params.id, "/adjust_position.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _adjustPosition.apply(this, arguments);
}
function newPreviewProblemset(_x24) {
return _newPreviewProblemset.apply(this, arguments);
}
function _newPreviewProblemset() {
_newPreviewProblemset = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/examination_banks.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _newPreviewProblemset.apply(this, arguments);
}
function revokeItem(_x25) {
return _revokeItem.apply(this, arguments);
}
function _revokeItem() {
_revokeItem = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/examination_banks/".concat(params.id, "/revoke_item.json"), {
method: 'delete',
body: params
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _revokeItem.apply(this, arguments);
}
function examinationItems(_x26) {
return _examinationItems.apply(this, arguments);
}
function _examinationItems() {
_examinationItems = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/examination_banks/".concat(params.exam_id, "/examination_banks_item_banks.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _examinationItems.apply(this, arguments);
}
function joinCollection(_x27) {
return _joinCollection.apply(this, arguments);
}
function _joinCollection() {
_joinCollection = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/".concat(params.id, "/join_to_collection.json"), {
method: 'post',
params: params
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _joinCollection.apply(this, arguments);
}
function cancelCollection(_x28) {
return _cancelCollection.apply(this, arguments);
}
function _cancelCollection() {
_cancelCollection = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
return _context28.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/".concat(params.id, "/cancel_collection.json"), {
method: 'post',
params: params
}));
case 1:
case "end":
return _context28.stop();
}
}, _callee28);
}));
return _cancelCollection.apply(this, arguments);
}
function getPaperList(_x29) {
return _getPaperList.apply(this, arguments);
}
function _getPaperList() {
_getPaperList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
return _context29.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks_groups.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context29.stop();
}
}, _callee29);
}));
return _getPaperList.apply(this, arguments);
}
function getGroupList(_x30) {
return _getGroupList.apply(this, arguments);
}
function _getGroupList() {
_getGroupList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
return _context30.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks_groups/mine.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context30.stop();
}
}, _callee30);
}));
return _getGroupList.apply(this, arguments);
}
function joinGroup(_x31) {
return _joinGroup.apply(this, arguments);
}
function _joinGroup() {
_joinGroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(params) {
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
return _context31.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/".concat(params.id, "/join_to_group.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context31.stop();
}
}, _callee31);
}));
return _joinGroup.apply(this, arguments);
}
function updateGroup(_x32) {
return _updateGroup.apply(this, arguments);
}
function _updateGroup() {
_updateGroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) {
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
return _context32.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks_groups/".concat(params.id, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context32.stop();
}
}, _callee32);
}));
return _updateGroup.apply(this, arguments);
}
function createGroup(_x33) {
return _createGroup.apply(this, arguments);
}
function _createGroup() {
_createGroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
return _context33.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks_groups.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context33.stop();
}
}, _callee33);
}));
return _createGroup.apply(this, arguments);
}
function createFeedback(_x34) {
return _createFeedback.apply(this, arguments);
}
function _createFeedback() {
_createFeedback = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(params) {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
return _context34.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/".concat(params.id, "/feedback.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context34.stop();
}
}, _callee34);
}));
return _createFeedback.apply(this, arguments);
}
function getTeachGroupData(_x35) {
return _getTeachGroupData.apply(this, arguments);
}
function _getTeachGroupData() {
_getTeachGroupData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(params) {
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
return _context35.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/teach_group_shares.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context35.stop();
}
}, _callee35);
}));
return _getTeachGroupData.apply(this, arguments);
}
function batchShare(_x36) {
return _batchShare.apply(this, arguments);
}
//试题库批量删除
function _batchShare() {
_batchShare = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(params) {
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
return _context36.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/teach_group_shares.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context36.stop();
}
}, _callee36);
}));
return _batchShare.apply(this, arguments);
}
function batchQuestionsDelete(_x37) {
return _batchQuestionsDelete.apply(this, arguments);
}
function _batchQuestionsDelete() {
_batchQuestionsDelete = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(params) {
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
while (1) switch (_context37.prev = _context37.next) {
case 0:
return _context37.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/batch_delete.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context37.stop();
}
}, _callee37);
}));
return _batchQuestionsDelete.apply(this, arguments);
}
function batchGroup(_x38) {
return _batchGroup.apply(this, arguments);
}
function _batchGroup() {
_batchGroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(params) {
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
while (1) switch (_context38.prev = _context38.next) {
case 0:
return _context38.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/batch_to_group.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context38.stop();
}
}, _callee38);
}));
return _batchGroup.apply(this, arguments);
}
function batchPublic(_x39) {
return _batchPublic.apply(this, arguments);
}
function _batchPublic() {
_batchPublic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(params) {
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
while (1) switch (_context39.prev = _context39.next) {
case 0:
return _context39.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks/set_batch_public.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context39.stop();
}
}, _callee39);
}));
return _batchPublic.apply(this, arguments);
}
function getTeachGroupDataById(_x40) {
return _getTeachGroupDataById.apply(this, arguments);
}
function _getTeachGroupDataById() {
_getTeachGroupDataById = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(params) {
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
while (1) switch (_context40.prev = _context40.next) {
case 0:
return _context40.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/teach_group_shares/show_groups.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context40.stop();
}
}, _callee40);
}));
return _getTeachGroupDataById.apply(this, arguments);
}
function programPublish(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/problems/".concat(params.identifier, "/publish.json"), {
method: 'post',
body: params
});
}
function programCancelPublish(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/problems/".concat(params.identifier, "/cancel_publish.json"), {
method: 'post',
body: params
});
}
function moveUp(_x41) {
return _moveUp.apply(this, arguments);
}
function _moveUp() {
_moveUp = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(params) {
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
while (1) switch (_context41.prev = _context41.next) {
case 0:
return _context41.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks_groups/".concat(params.id, "/up_position.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context41.stop();
}
}, _callee41);
}));
return _moveUp.apply(this, arguments);
}
function moveDown(_x42) {
return _moveDown.apply(this, arguments);
}
function _moveDown() {
_moveDown = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(params) {
return _regeneratorRuntime().wrap(function _callee42$(_context42) {
while (1) switch (_context42.prev = _context42.next) {
case 0:
return _context42.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/item_banks_groups/".concat(params.id, "/down_position.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context42.stop();
}
}, _callee42);
}));
return _moveDown.apply(this, arguments);
}
/***/ }),
/***/ "WDsR":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/es.number.is-safe-integer.js ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var isInteger = __webpack_require__(/*! ../internals/is-integer */ "Xol8");
var abs = Math.abs;
// `Number.isSafeInteger` method
// https://tc39.github.io/ecma262/#sec-number.issafeinteger
$({ target: 'Number', stat: true }, {
isSafeInteger: function isSafeInteger(number) {
return isInteger(number) && abs(number) <= 0x1FFFFFFFFFFFFF;
}
});
/***/ }),
/***/ "WFqU":
/*!********************************************!*\
!*** ./node_modules/lodash/_freeGlobal.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
module.exports = freeGlobal;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "WGBp":
/*!************************************************************!*\
!*** ./node_modules/core-js/internals/get-set-iterator.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getIterator = __webpack_require__(/*! ../internals/get-iterator */ "mh/w");
module.exports = IS_PURE ? getIterator : function (it) {
// eslint-disable-next-line no-undef
return Set.prototype.values.call(it);
};
/***/ }),
/***/ "WJkJ":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/whitespaces.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
// a string of all valid unicode whitespaces
// eslint-disable-next-line max-len
module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
/***/ }),
/***/ "WKiH":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/string-trim.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "WJkJ");
var whitespace = '[' + whitespaces + ']';
var ltrim = RegExp('^' + whitespace + whitespace + '*');
var rtrim = RegExp(whitespace + whitespace + '*$');
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
var createMethod = function (TYPE) {
return function ($this) {
var string = String(requireObjectCoercible($this));
if (TYPE & 1) string = string.replace(ltrim, '');
if (TYPE & 2) string = string.replace(rtrim, '');
return string;
};
};
module.exports = {
// `String.prototype.{ trimLeft, trimStart }` methods
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
start: createMethod(1),
// `String.prototype.{ trimRight, trimEnd }` methods
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
end: createMethod(2),
// `String.prototype.trim` method
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
trim: createMethod(3)
};
/***/ }),
/***/ "WPzJ":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.scale.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var scale = __webpack_require__(/*! ../internals/math-scale */ "voyM");
// `Math.scale` method
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true }, {
scale: scale
});
/***/ }),
/***/ "WRKT":
/*!******************************************************!*\
!*** ./src/models/paperlibrary/index.ts + 2 modules ***!
\******************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/problemset/util.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/paperlibrary.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function paperlibrary_getDisciplines(_x) {
return _getDisciplines.apply(this, arguments);
}
function _getDisciplines() {
_getDisciplines = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])('/api/disciplines.json', {
method: 'get',
params: params
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getDisciplines.apply(this, arguments);
}
function paperlibrary_getCustomDisciplines(_x2) {
return _getCustomDisciplines.apply(this, arguments);
}
function _getCustomDisciplines() {
_getCustomDisciplines = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])('/api/disciplines/by_examination_banks.json', {
method: 'get',
params: params
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getCustomDisciplines.apply(this, arguments);
}
function paperlibrary_getPaperlibraryList(_x3) {
return _getPaperlibraryList.apply(this, arguments);
}
function _getPaperlibraryList() {
_getPaperlibraryList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])('/api/examination_banks.json', {
method: 'get',
params: params
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getPaperlibraryList.apply(this, arguments);
}
function paperlibrary_setPublic(_x4) {
return _setPublic.apply(this, arguments);
}
function _setPublic() {
_setPublic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, "/set_public.json"), {
method: 'post'
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _setPublic.apply(this, arguments);
}
function setPrivate(_x5) {
return _setPrivate.apply(this, arguments);
}
function _setPrivate() {
_setPrivate = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, "/set_private.json"), {
method: 'post'
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _setPrivate.apply(this, arguments);
}
function paperlibrary_handleDelete(_x6) {
return _handleDelete.apply(this, arguments);
}
function _handleDelete() {
_handleDelete = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _handleDelete.apply(this, arguments);
}
function paperlibrary_getCourseList(_x7) {
return _getCourseList.apply(this, arguments);
}
function _getCourseList() {
_getCourseList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/question_banks/my_courses.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getCourseList.apply(this, arguments);
}
function paperlibrary_sendToClass(_x8) {
return _sendToClass.apply(this, arguments);
}
function _sendToClass() {
_sendToClass = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, "/send_to_course.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _sendToClass.apply(this, arguments);
}
function paperlibrary_getPaperData(_x9) {
return _getPaperData.apply(this, arguments);
}
function _getPaperData() {
_getPaperData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, ".json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _getPaperData.apply(this, arguments);
}
function paperlibrary_setScore(_x10) {
return _setScore.apply(this, arguments);
}
function _setScore() {
_setScore = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, "/examination_banks_item_banks/").concat(params.itemId, "/set_score"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _setScore.apply(this, arguments);
}
function setShixunScore(_x11) {
return _setShixunScore.apply(this, arguments);
}
function _setShixunScore() {
_setShixunScore = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, "/examination_banks_item_banks/").concat(params.itemId, "/set_shixun_score.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _setShixunScore.apply(this, arguments);
}
function paperlibrary_handleDeleteEditQuestion(_x12) {
return _handleDeleteEditQuestion.apply(this, arguments);
}
function _handleDeleteEditQuestion() {
_handleDeleteEditQuestion = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, "/examination_banks_item_banks/").concat(params.itemId, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _handleDeleteEditQuestion.apply(this, arguments);
}
function paperlibrary_batchSetScore(_x13) {
return _batchSetScore.apply(this, arguments);
}
function _batchSetScore() {
_batchSetScore = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, "/examination_banks_item_banks/batch_set_score.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _batchSetScore.apply(this, arguments);
}
function paperlibrary_batchDelete(_x14) {
return _batchDelete.apply(this, arguments);
}
function _batchDelete() {
_batchDelete = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, "/examination_banks_item_banks/destroy_by_item_type.json"), {
method: 'delete',
body: params
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _batchDelete.apply(this, arguments);
}
function paperlibrary_adjustPosition(_x15) {
return _adjustPosition.apply(this, arguments);
}
function _adjustPosition() {
_adjustPosition = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, "/examination_banks_item_banks/").concat(params.itemId, "/adjust_position.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _adjustPosition.apply(this, arguments);
}
function paperlibrary_updatePaper(_x16) {
return _updatePaper.apply(this, arguments);
}
function _updatePaper() {
_updatePaper = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/".concat(params.id, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _updatePaper.apply(this, arguments);
}
function paperlibrary_getTeachGroupData(_x17) {
return _getTeachGroupData.apply(this, arguments);
}
function _getTeachGroupData() {
_getTeachGroupData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(fetch["a" /* default */])("/api/teach_group_shares.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _getTeachGroupData.apply(this, arguments);
}
function batchPublic(_x18) {
return _batchPublic.apply(this, arguments);
}
function _batchPublic() {
_batchPublic = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(fetch["a" /* default */])("/api/examination_banks/set_batch_public.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _batchPublic.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/paperlibrary/util.ts
var numberFormatChinese = {
1: '一',
2: '二',
3: '三',
4: '四',
5: '五',
6: '六',
7: '七'
};
var util_formatPaperData = function formatPaperData(originData) {
if (!originData) {
return;
}
var _ref = originData || {},
exam = _ref.exam,
single_questions = _ref.single_questions,
multiple_questions = _ref.multiple_questions,
judgement_questions = _ref.judgement_questions,
program_questions = _ref.program_questions,
completion_questions = _ref.completion_questions,
subjective_questions = _ref.subjective_questions,
practical_questions = _ref.practical_questions;
var questionData = [Object(objectSpread2["a" /* default */])({
type: 'SINGLE',
name: '单选题'
}, single_questions), Object(objectSpread2["a" /* default */])({
type: 'MULTIPLE',
name: '多选题'
}, multiple_questions), Object(objectSpread2["a" /* default */])({
type: 'JUDGMENT',
name: '判断题'
}, judgement_questions), Object(objectSpread2["a" /* default */])({
type: 'PROGRAM',
name: '编程题'
}, program_questions), Object(objectSpread2["a" /* default */])({
type: 'COMPLETION',
name: '填空题'
}, completion_questions), Object(objectSpread2["a" /* default */])({
type: 'SUBJECTIVE',
name: '简答题'
}, subjective_questions), Object(objectSpread2["a" /* default */])({
type: 'PRACTICAL',
name: '实训题'
}, practical_questions)];
var questionList = questionData.filter(function (item) {
return item.questions_count > 0;
}).map(function (item, index) {
var _item$questions;
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, item), {
number: numberFormatChinese[index + 1],
questions: item === null || item === void 0 ? void 0 : (_item$questions = item.questions) === null || _item$questions === void 0 ? void 0 : _item$questions.map(function (question) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, question), {}, {
shixun: question.examination_bank_shixun_challenges
});
})
});
});
return {
exam: exam,
questionList: questionList
};
};
// EXTERNAL MODULE: ./src/models/problemset/util.ts
var util = __webpack_require__("6fQ5");
// CONCATENATED MODULE: ./src/models/paperlibrary/index.ts
function paperlibrary_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ paperlibrary_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var PaperlibraryModel = {
namespace: 'paperlibrary',
state: {
paperData: undefined,
disciplinesData: undefined,
teachGroupData: undefined,
courseOptions: [],
actionTabs: {
key: '',
params: {}
}
},
effects: {
getDisciplines: function getDisciplines(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee() {
var response;
return paperlibrary_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(paperlibrary_getDisciplines, payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
disciplinesData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getCustomDisciplines: function getCustomDisciplines(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee2() {
var response;
return paperlibrary_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(paperlibrary_getCustomDisciplines, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
disciplinesData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context2.abrupt("return", response);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getEditDisciplines: function getEditDisciplines(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee3() {
var response, disciplines, courseOptions;
return paperlibrary_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(paperlibrary_getDisciplines, payload);
case 2:
response = _context3.sent;
disciplines = response === null || response === void 0 ? void 0 : response.disciplines;
courseOptions = Object(util["a" /* formatCourseOptions */])(disciplines);
_context3.next = 7;
return put({
type: 'save',
payload: {
courseOptions: courseOptions,
disciplinesData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 7:
return _context3.abrupt("return", response);
case 8:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
getTeachGroupData: function getTeachGroupData(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee4() {
var response;
return paperlibrary_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(paperlibrary_getTeachGroupData, payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
teachGroupData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
getPaperData: function getPaperData(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee5() {
var response, data;
return paperlibrary_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(paperlibrary_getPaperData, payload);
case 2:
response = _context5.sent;
data = util_formatPaperData(response);
_context5.next = 6;
return put({
type: 'save',
payload: {
paperData: data
}
});
case 6:
return _context5.abrupt("return", response);
case 7:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
getPaperlibraryList: function getPaperlibraryList(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee6() {
return paperlibrary_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(paperlibrary_getPaperlibraryList, payload);
case 2:
return _context6.abrupt("return", _context6.sent);
case 3:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
setPublic: function setPublic(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee7() {
return paperlibrary_regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(paperlibrary_setPublic, payload);
case 2:
return _context7.abrupt("return", _context7.sent);
case 3:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
handleDelete: function handleDelete(_ref15, _ref16) {
var payload = _ref15.payload;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee8() {
return paperlibrary_regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(paperlibrary_handleDelete, payload);
case 2:
return _context8.abrupt("return", _context8.sent);
case 3:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
getCourseList: function getCourseList(_ref17, _ref18) {
var payload = _ref17.payload;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee9() {
return paperlibrary_regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(paperlibrary_getCourseList, payload);
case 2:
return _context9.abrupt("return", _context9.sent);
case 3:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
sendToClass: function sendToClass(_ref19, _ref20) {
var payload = _ref19.payload;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee10() {
return paperlibrary_regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(paperlibrary_sendToClass, payload);
case 2:
return _context10.abrupt("return", _context10.sent);
case 3:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
adjustPosition: function adjustPosition(_ref21, _ref22) {
var payload = _ref21.payload;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee11() {
return paperlibrary_regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(paperlibrary_adjustPosition, payload);
case 2:
return _context11.abrupt("return", _context11.sent);
case 3:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
setScore: function setScore(_ref23, _ref24) {
var payload = _ref23.payload;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee12() {
return paperlibrary_regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(paperlibrary_setScore, payload);
case 2:
return _context12.abrupt("return", _context12.sent);
case 3:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
handleDeleteEditQuestion: function handleDeleteEditQuestion(_ref25, _ref26) {
var payload = _ref25.payload;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee13() {
return paperlibrary_regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(paperlibrary_handleDeleteEditQuestion, payload);
case 2:
return _context13.abrupt("return", _context13.sent);
case 3:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
batchSetScore: function batchSetScore(_ref27, _ref28) {
var payload = _ref27.payload;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee14() {
return paperlibrary_regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(paperlibrary_batchSetScore, payload);
case 2:
return _context14.abrupt("return", _context14.sent);
case 3:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
batchDelete: function batchDelete(_ref29, _ref30) {
var payload = _ref29.payload;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee15() {
return paperlibrary_regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(paperlibrary_batchDelete, payload);
case 2:
return _context15.abrupt("return", _context15.sent);
case 3:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
updatePaper: function updatePaper(_ref31, _ref32) {
var payload = _ref31.payload;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee16() {
return paperlibrary_regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(paperlibrary_updatePaper, payload);
case 2:
return _context16.abrupt("return", _context16.sent);
case 3:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
setActionTabs: function setActionTabs(_ref33, _ref34) {
var payload = _ref33.payload;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/paperlibrary_regeneratorRuntime().mark(function _callee17() {
return paperlibrary_regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context17.stop();
}
}, _callee17);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref35) {
var dispatch = _ref35.dispatch,
history = _ref35.history;
// console.log("subscriptions:", dispatch, history)
return history.listen(function (_ref36) {
var pathname = _ref36.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ var paperlibrary = __webpack_exports__["a"] = (PaperlibraryModel);
/***/ }),
/***/ "WRkp":
/*!**********************************************!*\
!*** ./node_modules/hash.js/lib/hash/sha.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
exports.sha1 = __webpack_require__(/*! ./sha/1 */ "E+IA");
exports.sha224 = __webpack_require__(/*! ./sha/224 */ "B/J0");
exports.sha256 = __webpack_require__(/*! ./sha/256 */ "bu2F");
exports.sha384 = __webpack_require__(/*! ./sha/384 */ "i5UE");
exports.sha512 = __webpack_require__(/*! ./sha/512 */ "tSWc");
/***/ }),
/***/ "WbBG":
/*!*************************************************************!*\
!*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
module.exports = ReactPropTypesSecret;
/***/ }),
/***/ "WjRb":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/not-a-regexp.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "ROdP");
module.exports = function (it) {
if (isRegExp(it)) {
throw TypeError("The method doesn't accept regular expressions");
} return it;
};
/***/ }),
/***/ "WkPL":
/*!*****************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/arrayLikeToArray.js ***!
\*****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "X5Zq":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.join.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $join = [].join;
// `%TypedArray%.prototype.join` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.join
// eslint-disable-next-line no-unused-vars
exportTypedArrayMethod('join', function join(separator) {
return $join.apply(aTypedArray(this), arguments);
});
/***/ }),
/***/ "X7LM":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/string-punycode-to-ascii.js ***!
\********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
var maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1
var base = 36;
var tMin = 1;
var tMax = 26;
var skew = 38;
var damp = 700;
var initialBias = 72;
var initialN = 128; // 0x80
var delimiter = '-'; // '\x2D'
var regexNonASCII = /[^\0-\u007E]/; // non-ASCII chars
var regexSeparators = /[.\u3002\uFF0E\uFF61]/g; // RFC 3490 separators
var OVERFLOW_ERROR = 'Overflow: input needs wider integers to process';
var baseMinusTMin = base - tMin;
var floor = Math.floor;
var stringFromCharCode = String.fromCharCode;
/**
* Creates an array containing the numeric code points of each Unicode
* character in the string. While JavaScript uses UCS-2 internally,
* this function will convert a pair of surrogate halves (each of which
* UCS-2 exposes as separate characters) into a single code point,
* matching UTF-16.
*/
var ucs2decode = function (string) {
var output = [];
var counter = 0;
var length = string.length;
while (counter < length) {
var value = string.charCodeAt(counter++);
if (value >= 0xD800 && value <= 0xDBFF && counter < length) {
// It's a high surrogate, and there is a next character.
var extra = string.charCodeAt(counter++);
if ((extra & 0xFC00) == 0xDC00) { // Low surrogate.
output.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);
} else {
// It's an unmatched surrogate; only append this code unit, in case the
// next code unit is the high surrogate of a surrogate pair.
output.push(value);
counter--;
}
} else {
output.push(value);
}
}
return output;
};
/**
* Converts a digit/integer into a basic code point.
*/
var digitToBasic = function (digit) {
// 0..25 map to ASCII a..z or A..Z
// 26..35 map to ASCII 0..9
return digit + 22 + 75 * (digit < 26);
};
/**
* Bias adaptation function as per section 3.4 of RFC 3492.
* https://tools.ietf.org/html/rfc3492#section-3.4
*/
var adapt = function (delta, numPoints, firstTime) {
var k = 0;
delta = firstTime ? floor(delta / damp) : delta >> 1;
delta += floor(delta / numPoints);
for (; delta > baseMinusTMin * tMax >> 1; k += base) {
delta = floor(delta / baseMinusTMin);
}
return floor(k + (baseMinusTMin + 1) * delta / (delta + skew));
};
/**
* Converts a string of Unicode symbols (e.g. a domain name label) to a
* Punycode string of ASCII-only symbols.
*/
// eslint-disable-next-line max-statements
var encode = function (input) {
var output = [];
// Convert the input in UCS-2 to an array of Unicode code points.
input = ucs2decode(input);
// Cache the length.
var inputLength = input.length;
// Initialize the state.
var n = initialN;
var delta = 0;
var bias = initialBias;
var i, currentValue;
// Handle the basic code points.
for (i = 0; i < input.length; i++) {
currentValue = input[i];
if (currentValue < 0x80) {
output.push(stringFromCharCode(currentValue));
}
}
var basicLength = output.length; // number of basic code points.
var handledCPCount = basicLength; // number of code points that have been handled;
// Finish the basic string with a delimiter unless it's empty.
if (basicLength) {
output.push(delimiter);
}
// Main encoding loop:
while (handledCPCount < inputLength) {
// All non-basic code points < n have been handled already. Find the next larger one:
var m = maxInt;
for (i = 0; i < input.length; i++) {
currentValue = input[i];
if (currentValue >= n && currentValue < m) {
m = currentValue;
}
}
// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
var handledCPCountPlusOne = handledCPCount + 1;
if (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {
throw RangeError(OVERFLOW_ERROR);
}
delta += (m - n) * handledCPCountPlusOne;
n = m;
for (i = 0; i < input.length; i++) {
currentValue = input[i];
if (currentValue < n && ++delta > maxInt) {
throw RangeError(OVERFLOW_ERROR);
}
if (currentValue == n) {
// Represent delta as a generalized variable-length integer.
var q = delta;
for (var k = base; /* no condition */; k += base) {
var t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);
if (q < t) break;
var qMinusT = q - t;
var baseMinusT = base - t;
output.push(stringFromCharCode(digitToBasic(t + qMinusT % baseMinusT)));
q = floor(qMinusT / baseMinusT);
}
output.push(stringFromCharCode(digitToBasic(q)));
bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
delta = 0;
++handledCPCount;
}
}
++delta;
++n;
}
return output.join('');
};
module.exports = function (input) {
var encoded = [];
var labels = input.toLowerCase().replace(regexSeparators, '\u002E').split('.');
var i, label;
for (i = 0; i < labels.length; i++) {
label = labels[i];
encoded.push(regexNonASCII.test(label) ? 'xn--' + encode(label) : label);
}
return encoded.join('.');
};
/***/ }),
/***/ "XBQK":
/*!***************************************************************!*\
!*** ./node_modules/antd/es/dropdown/dropdown.js + 4 modules ***!
\***************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/EllipsisOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/RightOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./node_modules/@ant-design/icons/es/components/twoTonePrimaryColor.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./node_modules/antd/es/_util/colors.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js because of ./src/pages/Competitions/Detail/SubmitResult.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-trigger/es/index.js because of ./node_modules/antd/node_modules/rc-menu/es/SubMenu.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var esm_defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("ODXe");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js
var objectWithoutProperties = __webpack_require__("Ff2n");
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-trigger/es/index.js + 5 modules
var es = __webpack_require__("Uaa1");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/es/placements.js
var autoAdjustOverflow = {
adjustX: 1,
adjustY: 1
};
var targetOffset = [0, 0];
var placements_placements = {
topLeft: {
points: ['bl', 'tl'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: targetOffset
},
topCenter: {
points: ['bc', 'tc'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: targetOffset
},
topRight: {
points: ['br', 'tr'],
overflow: autoAdjustOverflow,
offset: [0, -4],
targetOffset: targetOffset
},
bottomLeft: {
points: ['tl', 'bl'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: targetOffset
},
bottomCenter: {
points: ['tc', 'bc'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: targetOffset
},
bottomRight: {
points: ['tr', 'br'],
overflow: autoAdjustOverflow,
offset: [0, 4],
targetOffset: targetOffset
}
};
/* harmony default export */ var es_placements = (placements_placements);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/es/Dropdown.js
function Dropdown_Dropdown(props, ref) {
var _props$arrow = props.arrow,
arrow = _props$arrow === void 0 ? false : _props$arrow,
_props$prefixCls = props.prefixCls,
prefixCls = _props$prefixCls === void 0 ? 'rc-dropdown' : _props$prefixCls,
transitionName = props.transitionName,
animation = props.animation,
align = props.align,
_props$placement = props.placement,
placement = _props$placement === void 0 ? 'bottomLeft' : _props$placement,
_props$placements = props.placements,
placements = _props$placements === void 0 ? es_placements : _props$placements,
getPopupContainer = props.getPopupContainer,
showAction = props.showAction,
hideAction = props.hideAction,
overlayClassName = props.overlayClassName,
overlayStyle = props.overlayStyle,
visible = props.visible,
_props$trigger = props.trigger,
trigger = _props$trigger === void 0 ? ['hover'] : _props$trigger,
otherProps = Object(objectWithoutProperties["a" /* default */])(props, ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger"]);
var _React$useState = react["useState"](),
_React$useState2 = Object(slicedToArray["a" /* default */])(_React$useState, 2),
triggerVisible = _React$useState2[0],
setTriggerVisible = _React$useState2[1];
var mergedVisible = 'visible' in props ? visible : triggerVisible;
var triggerRef = react["useRef"](null);
react["useImperativeHandle"](ref, function () {
return triggerRef.current;
});
var getOverlayElement = function getOverlayElement() {
var overlay = props.overlay;
var overlayElement;
if (typeof overlay === 'function') {
overlayElement = overlay();
} else {
overlayElement = overlay;
}
return overlayElement;
};
var onClick = function onClick(e) {
var onOverlayClick = props.onOverlayClick;
var overlayProps = getOverlayElement().props;
setTriggerVisible(false);
if (onOverlayClick) {
onOverlayClick(e);
}
if (overlayProps.onClick) {
overlayProps.onClick(e);
}
};
var onVisibleChange = function onVisibleChange(visible) {
var onVisibleChange = props.onVisibleChange;
setTriggerVisible(visible);
if (typeof onVisibleChange === 'function') {
onVisibleChange(visible);
}
};
var getMenuElement = function getMenuElement() {
var overlayElement = getOverlayElement();
var extraOverlayProps = {
prefixCls: "".concat(prefixCls, "-menu"),
onClick: onClick
};
if (typeof overlayElement.type === 'string') {
delete extraOverlayProps.prefixCls;
}
return react["createElement"](react["Fragment"], null, arrow && react["createElement"]("div", {
className: "".concat(prefixCls, "-arrow")
}), react["cloneElement"](overlayElement, extraOverlayProps));
};
var getMenuElementOrLambda = function getMenuElementOrLambda() {
var overlay = props.overlay;
if (typeof overlay === 'function') {
return getMenuElement;
}
return getMenuElement();
};
var getMinOverlayWidthMatchTrigger = function getMinOverlayWidthMatchTrigger() {
var minOverlayWidthMatchTrigger = props.minOverlayWidthMatchTrigger,
alignPoint = props.alignPoint;
if ('minOverlayWidthMatchTrigger' in props) {
return minOverlayWidthMatchTrigger;
}
return !alignPoint;
};
var getOpenClassName = function getOpenClassName() {
var openClassName = props.openClassName;
if (openClassName !== undefined) {
return openClassName;
}
return "".concat(prefixCls, "-open");
};
var renderChildren = function renderChildren() {
var children = props.children;
var childrenProps = children.props ? children.props : {};
var childClassName = classnames_default()(childrenProps.className, getOpenClassName());
return triggerVisible && children ? react["cloneElement"](children, {
className: childClassName
}) : children;
};
var triggerHideAction = hideAction;
if (!triggerHideAction && trigger.indexOf('contextMenu') !== -1) {
triggerHideAction = ['click'];
}
return react["createElement"](es["a" /* default */], Object.assign({}, otherProps, {
prefixCls: prefixCls,
ref: triggerRef,
popupClassName: classnames_default()(overlayClassName, Object(esm_defineProperty["a" /* default */])({}, "".concat(prefixCls, "-show-arrow"), arrow)),
popupStyle: overlayStyle,
builtinPlacements: placements,
action: trigger,
showAction: showAction,
hideAction: triggerHideAction || [],
popupPlacement: placement,
popupAlign: align,
popupTransitionName: transitionName,
popupAnimation: animation,
popupVisible: mergedVisible,
stretch: getMinOverlayWidthMatchTrigger() ? 'minWidth' : '',
popup: getMenuElementOrLambda(),
onPopupVisibleChange: onVisibleChange,
getPopupContainer: getPopupContainer
}), renderChildren());
}
/* harmony default export */ var es_Dropdown = (react["forwardRef"](Dropdown_Dropdown));
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dropdown/es/index.js
/* harmony default export */ var rc_dropdown_es = (es_Dropdown);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/RightOutlined.js
var RightOutlined = __webpack_require__("fEPi");
var RightOutlined_default = /*#__PURE__*/__webpack_require__.n(RightOutlined);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var helpers_slicedToArray = __webpack_require__("J4zp");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(helpers_slicedToArray);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/EllipsisOutlined.js
var EllipsisOutlined = __webpack_require__("cCPh");
var EllipsisOutlined_default = /*#__PURE__*/__webpack_require__.n(EllipsisOutlined);
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__("2/Rp");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var context = __webpack_require__("H84U");
// CONCATENATED MODULE: ./node_modules/antd/es/dropdown/dropdown-button.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var ButtonGroup = es_button["a" /* default */].Group;
var dropdown_button_DropdownButton = function DropdownButton(props) {
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getContextPopupContainer = _React$useContext.getPopupContainer,
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var customizePrefixCls = props.prefixCls,
type = props.type,
disabled = props.disabled,
onClick = props.onClick,
htmlType = props.htmlType,
children = props.children,
className = props.className,
overlay = props.overlay,
trigger = props.trigger,
align = props.align,
visible = props.visible,
onVisibleChange = props.onVisibleChange,
placement = props.placement,
getPopupContainer = props.getPopupContainer,
href = props.href,
_props$icon = props.icon,
icon = _props$icon === void 0 ? /*#__PURE__*/react["createElement"](EllipsisOutlined_default.a, null) : _props$icon,
title = props.title,
buttonsRender = props.buttonsRender,
restProps = __rest(props, ["prefixCls", "type", "disabled", "onClick", "htmlType", "children", "className", "overlay", "trigger", "align", "visible", "onVisibleChange", "placement", "getPopupContainer", "href", "icon", "title", "buttonsRender"]);
var prefixCls = getPrefixCls('dropdown-button', customizePrefixCls);
var dropdownProps = {
align: align,
overlay: overlay,
disabled: disabled,
trigger: disabled ? [] : trigger,
onVisibleChange: onVisibleChange,
getPopupContainer: getPopupContainer || getContextPopupContainer
};
if ('visible' in props) {
dropdownProps.visible = visible;
}
if ('placement' in props) {
dropdownProps.placement = placement;
} else {
dropdownProps.placement = direction === 'rtl' ? 'bottomLeft' : 'bottomRight';
}
var leftButton = /*#__PURE__*/react["createElement"](es_button["a" /* default */], {
type: type,
disabled: disabled,
onClick: onClick,
htmlType: htmlType,
href: href,
title: title
}, children);
var rightButton = /*#__PURE__*/react["createElement"](es_button["a" /* default */], {
type: type,
icon: icon
});
var _buttonsRender = buttonsRender([leftButton, rightButton]),
_buttonsRender2 = slicedToArray_default()(_buttonsRender, 2),
leftButtonToRender = _buttonsRender2[0],
rightButtonToRender = _buttonsRender2[1];
return /*#__PURE__*/react["createElement"](ButtonGroup, extends_default()({}, restProps, {
className: classnames_default()(prefixCls, className)
}), leftButtonToRender, /*#__PURE__*/react["createElement"](dropdown, dropdownProps, rightButtonToRender));
};
dropdown_button_DropdownButton.__ANT_BUTTON = true;
dropdown_button_DropdownButton.defaultProps = {
type: 'default',
buttonsRender: function buttonsRender(buttons) {
return buttons;
}
};
/* harmony default export */ var dropdown_button = (dropdown_button_DropdownButton);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/devWarning.js
var devWarning = __webpack_require__("uaoM");
// EXTERNAL MODULE: ./node_modules/antd/es/_util/type.js
var _util_type = __webpack_require__("CWQg");
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
var reactNode = __webpack_require__("0n0R");
// CONCATENATED MODULE: ./node_modules/antd/es/dropdown/dropdown.js
var Placements = Object(_util_type["a" /* tuple */])('topLeft', 'topCenter', 'topRight', 'bottomLeft', 'bottomCenter', 'bottomRight');
var dropdown_Dropdown = function Dropdown(props) {
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getContextPopupContainer = _React$useContext.getPopupContainer,
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var getTransitionName = function getTransitionName() {
var _props$placement = props.placement,
placement = _props$placement === void 0 ? '' : _props$placement,
transitionName = props.transitionName;
if (transitionName !== undefined) {
return transitionName;
}
if (placement.indexOf('top') >= 0) {
return 'slide-down';
}
return 'slide-up';
};
var renderOverlay = function renderOverlay(prefixCls) {
// rc-dropdown already can process the function of overlay, but we have check logic here.
// So we need render the element to check and pass back to rc-dropdown.
var overlay = props.overlay;
var overlayNode;
if (typeof overlay === 'function') {
overlayNode = overlay();
} else {
overlayNode = overlay;
}
overlayNode = react["Children"].only(typeof overlayNode === 'string' ? /*#__PURE__*/react["createElement"]("span", null, overlayNode) : overlayNode);
var overlayProps = overlayNode.props; // Warning if use other mode
Object(devWarning["a" /* default */])(!overlayProps.mode || overlayProps.mode === 'vertical', 'Dropdown', "mode=\"".concat(overlayProps.mode, "\" is not supported for Dropdown's Menu.")); // menu cannot be selectable in dropdown defaultly
// menu should be focusable in dropdown defaultly
var _overlayProps$selecta = overlayProps.selectable,
selectable = _overlayProps$selecta === void 0 ? false : _overlayProps$selecta,
_overlayProps$focusab = overlayProps.focusable,
focusable = _overlayProps$focusab === void 0 ? true : _overlayProps$focusab;
var expandIcon = /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-menu-submenu-arrow")
}, /*#__PURE__*/react["createElement"](RightOutlined_default.a, {
className: "".concat(prefixCls, "-menu-submenu-arrow-icon")
}));
var fixedModeOverlay = typeof overlayNode.type === 'string' ? overlayNode : Object(reactNode["a" /* cloneElement */])(overlayNode, {
mode: 'vertical',
selectable: selectable,
focusable: focusable,
expandIcon: expandIcon
});
return fixedModeOverlay;
};
var getPlacement = function getPlacement() {
var placement = props.placement;
if (placement !== undefined) {
return placement;
}
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
};
var arrow = props.arrow,
customizePrefixCls = props.prefixCls,
children = props.children,
trigger = props.trigger,
disabled = props.disabled,
getPopupContainer = props.getPopupContainer,
overlayClassName = props.overlayClassName;
var prefixCls = getPrefixCls('dropdown', customizePrefixCls);
var child = react["Children"].only(children);
var dropdownTrigger = Object(reactNode["a" /* cloneElement */])(child, {
className: classnames_default()(child.props.className, "".concat(prefixCls, "-trigger"), defineProperty_default()({}, "".concat(prefixCls, "-rtl"), direction === 'rtl')),
disabled: disabled
});
var overlayClassNameCustomized = classnames_default()(overlayClassName, defineProperty_default()({}, "".concat(prefixCls, "-rtl"), direction === 'rtl'));
var triggerActions = disabled ? [] : trigger;
var alignPoint;
if (triggerActions && triggerActions.indexOf('contextMenu') !== -1) {
alignPoint = true;
}
return /*#__PURE__*/react["createElement"](rc_dropdown_es, extends_default()({
arrow: arrow,
alignPoint: alignPoint
}, props, {
overlayClassName: overlayClassNameCustomized,
prefixCls: prefixCls,
getPopupContainer: getPopupContainer || getContextPopupContainer,
transitionName: getTransitionName(),
trigger: triggerActions,
overlay: function overlay() {
return renderOverlay(prefixCls);
},
placement: getPlacement()
}), dropdownTrigger);
};
dropdown_Dropdown.Button = dropdown_button;
dropdown_Dropdown.defaultProps = {
mouseEnterDelay: 0.15,
mouseLeaveDelay: 0.1
};
/* harmony default export */ var dropdown = __webpack_exports__["a"] = (dropdown_Dropdown);
/***/ }),
/***/ "XDpg":
/*!*********************************************!*\
!*** ./node_modules/moment/locale/zh-cn.js ***!
\*********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
//! moment.js locale configuration
//! locale : Chinese (China) [zh-cn]
//! author : suupic : https://github.com/suupic
//! author : Zeno Zeng : https://github.com/zenozeng
//! author : uu109 : https://github.com/uu109
;(function (global, factory) {
true ? factory(__webpack_require__(/*! ../moment */ "wd/R")) :
undefined
}(this, (function (moment) { 'use strict';
//! moment.js locale configuration
var zhCn = moment.defineLocale('zh-cn', {
months: '一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月'.split(
'_'
),
monthsShort: '1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月'.split(
'_'
),
weekdays: '星期日_星期一_星期二_星期三_星期四_星期五_星期六'.split('_'),
weekdaysShort: '周日_周一_周二_周三_周四_周五_周六'.split('_'),
weekdaysMin: '日_一_二_三_四_五_六'.split('_'),
longDateFormat: {
LT: 'HH:mm',
LTS: 'HH:mm:ss',
L: 'YYYY/MM/DD',
LL: 'YYYY年M月D日',
LLL: 'YYYY年M月D日Ah点mm分',
LLLL: 'YYYY年M月D日ddddAh点mm分',
l: 'YYYY/M/D',
ll: 'YYYY年M月D日',
lll: 'YYYY年M月D日 HH:mm',
llll: 'YYYY年M月D日dddd HH:mm',
},
meridiemParse: /凌晨|早上|上午|中午|下午|晚上/,
meridiemHour: function (hour, meridiem) {
if (hour === 12) {
hour = 0;
}
if (meridiem === '凌晨' || meridiem === '早上' || meridiem === '上午') {
return hour;
} else if (meridiem === '下午' || meridiem === '晚上') {
return hour + 12;
} else {
// '中午'
return hour >= 11 ? hour : hour + 12;
}
},
meridiem: function (hour, minute, isLower) {
var hm = hour * 100 + minute;
if (hm < 600) {
return '凌晨';
} else if (hm < 900) {
return '早上';
} else if (hm < 1130) {
return '上午';
} else if (hm < 1230) {
return '中午';
} else if (hm < 1800) {
return '下午';
} else {
return '晚上';
}
},
calendar: {
sameDay: '[今天]LT',
nextDay: '[明天]LT',
nextWeek: function (now) {
if (now.week() !== this.week()) {
return '[下]dddLT';
} else {
return '[本]dddLT';
}
},
lastDay: '[昨天]LT',
lastWeek: function (now) {
if (this.week() !== now.week()) {
return '[上]dddLT';
} else {
return '[本]dddLT';
}
},
sameElse: 'L',
},
dayOfMonthOrdinalParse: /\d{1,2}(日|月|周)/,
ordinal: function (number, period) {
switch (period) {
case 'd':
case 'D':
case 'DDD':
return number + '日';
case 'M':
return number + '月';
case 'w':
case 'W':
return number + '周';
default:
return number;
}
},
relativeTime: {
future: '%s后',
past: '%s前',
s: '几秒',
ss: '%d 秒',
m: '1 分钟',
mm: '%d 分钟',
h: '1 小时',
hh: '%d 小时',
d: '1 天',
dd: '%d 天',
w: '1 周',
ww: '%d 周',
M: '1 个月',
MM: '%d 个月',
y: '1 年',
yy: '%d 年',
},
week: {
// GB/T 7408-1994《数据元和交换格式·信息交换·日期和时间表示法》与ISO 8601:1988等效
dow: 1, // Monday is the first day of the week.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
});
return zhCn;
})));
/***/ }),
/***/ "XGwC":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/internals/create-property-descriptor.js ***!
\**********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = function (bitmap, value) {
return {
enumerable: !(bitmap & 1),
configurable: !(bitmap & 2),
writable: !(bitmap & 4),
value: value
};
};
/***/ }),
/***/ "XMab":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.uint8-array.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj");
// `Uint8Array` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Uint8', function (init) {
return function Uint8Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "XUE8":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.get.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
// `Reflect.get` method
// https://tc39.github.io/ecma262/#sec-reflect.get
function get(target, propertyKey /* , receiver */) {
var receiver = arguments.length < 3 ? target : arguments[2];
var descriptor, prototype;
if (anObject(target) === receiver) return target[propertyKey];
if (descriptor = getOwnPropertyDescriptorModule.f(target, propertyKey)) return has(descriptor, 'value')
? descriptor.value
: descriptor.get === undefined
? undefined
: descriptor.get.call(receiver);
if (isObject(prototype = getPrototypeOf(target))) return get(prototype, propertyKey, receiver);
}
$({ target: 'Reflect', stat: true }, {
get: get
});
/***/ }),
/***/ "XWE6":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/nonIterableSpread.js ***!
\*******************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableSpread;
/***/ }),
/***/ "XbcX":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.array.flat-map.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var flattenIntoArray = __webpack_require__(/*! ../internals/flatten-into-array */ "or9q");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "ZfDv");
// `Array.prototype.flatMap` method
// https://github.com/tc39/proposal-flatMap
$({ target: 'Array', proto: true }, {
flatMap: function flatMap(callbackfn /* , thisArg */) {
var O = toObject(this);
var sourceLen = toLength(O.length);
var A;
aFunction(callbackfn);
A = arraySpeciesCreate(O, 0);
A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
return A;
}
});
/***/ }),
/***/ "Xe3L":
/*!*****************************************************!*\
!*** ./node_modules/core-js/modules/es.array.of.js ***!
\*****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "hBjN");
var ISNT_GENERIC = fails(function () {
function F() { /* empty */ }
return !(Array.of.call(F) instanceof F);
});
// `Array.of` method
// https://tc39.github.io/ecma262/#sec-array.of
// WebKit Array.of isn't generic
$({ target: 'Array', stat: true, forced: ISNT_GENERIC }, {
of: function of(/* ...args */) {
var index = 0;
var argumentsLength = arguments.length;
var result = new (typeof this == 'function' ? this : Array)(argumentsLength);
while (argumentsLength > index) createProperty(result, index, arguments[index++]);
result.length = argumentsLength;
return result;
}
});
/***/ }),
/***/ "Xol8":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/is-integer.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var floor = Math.floor;
// `Number.isInteger` method implementation
// https://tc39.github.io/ecma262/#sec-number.isinteger
module.exports = function isInteger(it) {
return !isObject(it) && isFinite(it) && floor(it) === it;
};
/***/ }),
/***/ "Xq8t":
/*!************************************!*\
!*** ./src/models/forums/index.ts ***!
\************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_forums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/forums */ "h+Ho");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var ForumsListModal = {
namespace: 'forumsList',
state: {
forumsData: {},
listParams: {
page: 1,
order: 'updated_at'
}
},
effects: {
getForumsData: function getForumsData(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response, listParams;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(payload.memoType === 'shixun_discuss' ? _service_forums__WEBPACK_IMPORTED_MODULE_1__[/* getForumsShixunData */ "c"] : _service_forums__WEBPACK_IMPORTED_MODULE_1__[/* getForumsData */ "a"], payload);
case 2:
response = _context.sent;
// 获取页面数据
delete payload.memoType;
listParams = payload;
_context.next = 7;
return put({
type: "save",
payload: {
listParams: listParams,
forumsData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 7:
return _context.abrupt("return", response);
case 8:
case "end":
return _context.stop();
}
}, _callee);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref3) {
var dispatch = _ref3.dispatch,
history = _ref3.history;
return history.listen(function (_ref4) {
var pathname = _ref4.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (ForumsListModal);
/***/ }),
/***/ "XuYy":
/*!***********************************!*\
!*** ./src/models/user/detail.ts ***!
\***********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_user__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/user */ "jb+D");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var UserDetailModel = {
namespace: 'userDetail',
state: {
systemUpdate: undefined,
homepageInfo: undefined,
homeworkBanksDetail: {},
actionTabs: {
key: '',
params: {}
}
},
effects: {
getHomeworkBanksDetail: function getHomeworkBanksDetail(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getHomeworkBanksDetail */ "p"], payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
homeworkBanksDetail: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getSystemUpdate: function getSystemUpdate(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getSystemUpdate */ "w"], payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
systemUpdate: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context2.abrupt("return", response);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getHomepageInfo: function getHomepageInfo(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getHomepageInfo */ "o"], payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
homepageInfo: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
// 签到
signed: function signed(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* signed */ "E"], payload);
case 2:
return _context4.abrupt("return", _context4.sent);
case 3:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
getCourses: function getCourses(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getCourses */ "l"], payload);
case 2:
return _context5.abrupt("return", _context5.sent);
case 3:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
getShixuns: function getShixuns(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getShixuns */ "v"], payload);
case 2:
return _context6.abrupt("return", _context6.sent);
case 3:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
getPaths: function getPaths(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getPaths */ "r"], payload);
case 2:
return _context7.abrupt("return", _context7.sent);
case 3:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
getProjects: function getProjects(_ref15, _ref16) {
var payload = _ref15.payload;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getProjects */ "s"], payload);
case 2:
return _context8.abrupt("return", _context8.sent);
case 3:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
getVideos: function getVideos(_ref17, _ref18) {
var payload = _ref17.payload;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getVideos */ "z"], payload);
case 2:
return _context9.abrupt("return", _context9.sent);
case 3:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
getReviewVideos: function getReviewVideos(_ref19, _ref20) {
var payload = _ref19.payload;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getReviewVideos */ "u"], payload);
case 2:
return _context10.abrupt("return", _context10.sent);
case 3:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
deleteVideo: function deleteVideo(_ref21, _ref22) {
var payload = _ref21.payload;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* deleteVideo */ "j"], payload);
case 2:
return _context11.abrupt("return", _context11.sent);
case 3:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
getQuestionBanks: function getQuestionBanks(_ref23, _ref24) {
var payload = _ref23.payload;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* getQuestionBanks */ "t"], payload);
case 2:
return _context12.abrupt("return", _context12.sent);
case 3:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
topicsSetPublic: function topicsSetPublic(_ref25, _ref26) {
var payload = _ref25.payload;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* topicsSetPublic */ "I"], payload);
case 2:
return _context13.abrupt("return", _context13.sent);
case 3:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
topicsDelete: function topicsDelete(_ref27, _ref28) {
var payload = _ref27.payload;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* topicsDelete */ "H"], payload);
case 2:
return _context14.abrupt("return", _context14.sent);
case 3:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
topicGetCourseList: function topicGetCourseList(_ref29, _ref30) {
var payload = _ref29.payload;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* topicGetCourseList */ "F"], payload);
case 2:
return _context15.abrupt("return", _context15.sent);
case 3:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
topicSendToClass: function topicSendToClass(_ref31, _ref32) {
var payload = _ref31.payload;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* topicSendToClass */ "G"], payload);
case 2:
return _context16.abrupt("return", _context16.sent);
case 3:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
logWatchHistory: function logWatchHistory(_ref33, _ref34) {
var payload = _ref33.payload;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
var response;
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return call(_service_user__WEBPACK_IMPORTED_MODULE_1__[/* logWatchHistory */ "B"], payload);
case 2:
response = _context17.sent;
return _context17.abrupt("return", response === null || response === void 0 ? void 0 : response.log_id);
case 4:
case "end":
return _context17.stop();
}
}, _callee17);
})();
},
setActionTabs: function setActionTabs(_ref35, _ref36) {
var payload = _ref35.payload;
var call = _ref36.call,
put = _ref36.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context18.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context18.stop();
}
}, _callee18);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref37) {
var dispatch = _ref37.dispatch,
history = _ref37.history;
return history.listen(function (_ref38) {
var pathname = _ref38.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (UserDetailModel);
/***/ }),
/***/ "Y4C7":
/*!************************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.reflect.delete-metadata.js ***!
\************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toMetadataKey = ReflectMetadataModule.toKey;
var getOrCreateMetadataMap = ReflectMetadataModule.getMap;
var store = ReflectMetadataModule.store;
// `Reflect.deleteMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
deleteMetadata: function deleteMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
var metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false);
if (metadataMap === undefined || !metadataMap['delete'](metadataKey)) return false;
if (metadataMap.size) return true;
var targetMetadata = store.get(target);
targetMetadata['delete'](targetKey);
return !!targetMetadata.size || store['delete'](target);
}
});
/***/ }),
/***/ "Y9hK":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js ***!
\*********************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _iterableToArray; });
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
/***/ }),
/***/ "YBTB":
/*!****************************************************!*\
!*** ./node_modules/antd/es/spin/style/index.less ***!
\****************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "YGK4":
/*!************************************************!*\
!*** ./node_modules/core-js/modules/es.set.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var collection = __webpack_require__(/*! ../internals/collection */ "bWFh");
var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "ZWaQ");
// `Set` constructor
// https://tc39.github.io/ecma262/#sec-set-objects
module.exports = collection('Set', function (init) {
return function Set() { return init(this, arguments.length ? arguments[0] : undefined); };
}, collectionStrong);
/***/ }),
/***/ "YL0P":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.iterator.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var ArrayIterators = __webpack_require__(/*! ../modules/es.array.iterator */ "4mDm");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var ITERATOR = wellKnownSymbol('iterator');
var Uint8Array = global.Uint8Array;
var arrayValues = ArrayIterators.values;
var arrayKeys = ArrayIterators.keys;
var arrayEntries = ArrayIterators.entries;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR];
var CORRECT_ITER_NAME = !!nativeTypedArrayIterator
&& (nativeTypedArrayIterator.name == 'values' || nativeTypedArrayIterator.name == undefined);
var typedArrayValues = function values() {
return arrayValues.call(aTypedArray(this));
};
// `%TypedArray%.prototype.entries` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.entries
exportTypedArrayMethod('entries', function entries() {
return arrayEntries.call(aTypedArray(this));
});
// `%TypedArray%.prototype.keys` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.keys
exportTypedArrayMethod('keys', function keys() {
return arrayKeys.call(aTypedArray(this));
});
// `%TypedArray%.prototype.values` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.values
exportTypedArrayMethod('values', typedArrayValues, !CORRECT_ITER_NAME);
// `%TypedArray%.prototype[@@iterator]` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype-@@iterator
exportTypedArrayMethod(ITERATOR, typedArrayValues, !CORRECT_ITER_NAME);
/***/ }),
/***/ "YMnH":
/*!****************************************************************************!*\
!*** ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules ***!
\****************************************************************************/
/*! exports provided: default, useLocaleReceiver */
/*! exports used: default, useLocaleReceiver */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/classCallCheck.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createClass.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createSuper.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/context.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./src/components/User/PopLoginRegister/PopLogin.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ LocaleReceiver_LocaleReceiver; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ useLocaleReceiver; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
var classCallCheck = __webpack_require__("lwsE");
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
var createClass = __webpack_require__("W8MJ");
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
var inherits = __webpack_require__("7W2i");
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createSuper.js
var createSuper = __webpack_require__("LQ03");
var createSuper_default = /*#__PURE__*/__webpack_require__.n(createSuper);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/antd/es/locale/default.js + 4 modules
var locale_default = __webpack_require__("ZvpZ");
// CONCATENATED MODULE: ./node_modules/antd/es/locale-provider/default.js
/* harmony default export */ var locale_provider_default = (locale_default["a" /* default */]);
// EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/context.js
var context = __webpack_require__("YlG9");
// CONCATENATED MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js
var LocaleReceiver_LocaleReceiver = /*#__PURE__*/function (_React$Component) {
inherits_default()(LocaleReceiver, _React$Component);
var _super = createSuper_default()(LocaleReceiver);
function LocaleReceiver() {
classCallCheck_default()(this, LocaleReceiver);
return _super.apply(this, arguments);
}
createClass_default()(LocaleReceiver, [{
key: "getLocale",
value: function getLocale() {
var _this$props = this.props,
componentName = _this$props.componentName,
defaultLocale = _this$props.defaultLocale;
var locale = defaultLocale || locale_provider_default[componentName || 'global'];
var antLocale = this.context;
var localeFromContext = componentName && antLocale ? antLocale[componentName] : {};
return extends_default()(extends_default()({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {});
}
}, {
key: "getLocaleCode",
value: function getLocaleCode() {
var antLocale = this.context;
var localeCode = antLocale && antLocale.locale; // Had use LocaleProvide but didn't set locale
if (antLocale && antLocale.exist && !localeCode) {
return locale_provider_default.locale;
}
return localeCode;
}
}, {
key: "render",
value: function render() {
return this.props.children(this.getLocale(), this.getLocaleCode(), this.context);
}
}]);
return LocaleReceiver;
}(react["Component"]);
LocaleReceiver_LocaleReceiver.defaultProps = {
componentName: 'global'
};
LocaleReceiver_LocaleReceiver.contextType = context["a" /* default */];
function useLocaleReceiver(componentName, defaultLocale) {
var antLocale = react["useContext"](context["a" /* default */]);
var componentLocale = react["useMemo"](function () {
var locale = defaultLocale || locale_provider_default[componentName || 'global'];
var localeFromContext = componentName && antLocale ? antLocale[componentName] : {};
return extends_default()(extends_default()({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {});
}, [componentName, defaultLocale, antLocale]);
return [componentLocale];
}
/***/ }),
/***/ "YNrV":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/object-assign.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "33Wh");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "dBg+");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "0eef");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "RK3t");
var nativeAssign = Object.assign;
var defineProperty = Object.defineProperty;
// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
module.exports = !nativeAssign || fails(function () {
// should have correct order of operations (Edge bug)
if (DESCRIPTORS && nativeAssign({ b: 1 }, nativeAssign(defineProperty({}, 'a', {
enumerable: true,
get: function () {
defineProperty(this, 'b', {
value: 3,
enumerable: false
});
}
}), { b: 2 })).b !== 1) return true;
// should work with symbols and should have deterministic property order (V8 bug)
var A = {};
var B = {};
// eslint-disable-next-line no-undef
var symbol = Symbol();
var alphabet = 'abcdefghijklmnopqrst';
A[symbol] = 7;
alphabet.split('').forEach(function (chr) { B[chr] = chr; });
return nativeAssign({}, A)[symbol] != 7 || objectKeys(nativeAssign({}, B)).join('') != alphabet;
}) ? function assign(target, source) { // eslint-disable-line no-unused-vars
var T = toObject(target);
var argumentsLength = arguments.length;
var index = 1;
var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
var propertyIsEnumerable = propertyIsEnumerableModule.f;
while (argumentsLength > index) {
var S = IndexedObject(arguments[index++]);
var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);
var length = keys.length;
var j = 0;
var key;
while (length > j) {
key = keys[j++];
if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];
}
} return T;
} : nativeAssign;
/***/ }),
/***/ "YS25":
/*!********************************************************************!*\
!*** ./node_modules/history-with-query/esm/history.js + 2 modules ***!
\********************************************************************/
/*! exports provided: createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath */
/*! exports used: createBrowserHistory, createHashHistory, createLocation, createMemoryHistory, createPath, locationsAreEqual */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/extends.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/query-string/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ createBrowserHistory; });
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ createHashHistory; });
__webpack_require__.d(__webpack_exports__, "d", function() { return /* binding */ createMemoryHistory; });
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ createLocation; });
__webpack_require__.d(__webpack_exports__, "f", function() { return /* binding */ locationsAreEqual; });
__webpack_require__.d(__webpack_exports__, "e", function() { return /* binding */ createPath; });
// UNUSED EXPORTS: parsePath
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__("wx14");
// CONCATENATED MODULE: ./node_modules/resolve-pathname/esm/resolve-pathname.js
function isAbsolute(pathname) {
return pathname.charAt(0) === '/';
}
// About 1.5x faster than the two-arg version of Array#splice()
function spliceOne(list, index) {
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
list[i] = list[k];
}
list.pop();
}
// This implementation is based heavily on node's url.parse
function resolvePathname(to, from) {
if (from === undefined) from = '';
var toParts = (to && to.split('/')) || [];
var fromParts = (from && from.split('/')) || [];
var isToAbs = to && isAbsolute(to);
var isFromAbs = from && isAbsolute(from);
var mustEndAbs = isToAbs || isFromAbs;
if (to && isAbsolute(to)) {
// to is absolute
fromParts = toParts;
} else if (toParts.length) {
// to is relative, drop the filename
fromParts.pop();
fromParts = fromParts.concat(toParts);
}
if (!fromParts.length) return '/';
var hasTrailingSlash;
if (fromParts.length) {
var last = fromParts[fromParts.length - 1];
hasTrailingSlash = last === '.' || last === '..' || last === '';
} else {
hasTrailingSlash = false;
}
var up = 0;
for (var i = fromParts.length; i >= 0; i--) {
var part = fromParts[i];
if (part === '.') {
spliceOne(fromParts, i);
} else if (part === '..') {
spliceOne(fromParts, i);
up++;
} else if (up) {
spliceOne(fromParts, i);
up--;
}
}
if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');
if (
mustEndAbs &&
fromParts[0] !== '' &&
(!fromParts[0] || !isAbsolute(fromParts[0]))
)
fromParts.unshift('');
var result = fromParts.join('/');
if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
return result;
}
/* harmony default export */ var resolve_pathname = (resolvePathname);
// CONCATENATED MODULE: ./node_modules/value-equal/esm/value-equal.js
function value_equal_valueOf(obj) {
return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);
}
function valueEqual(a, b) {
// Test for strict equality first.
if (a === b) return true;
// Otherwise, if either of them == null they are not equal.
if (a == null || b == null) return false;
if (Array.isArray(a)) {
return (
Array.isArray(b) &&
a.length === b.length &&
a.every(function(item, index) {
return valueEqual(item, b[index]);
})
);
}
if (typeof a === 'object' || typeof b === 'object') {
var aValue = value_equal_valueOf(a);
var bValue = value_equal_valueOf(b);
if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);
return Object.keys(Object.assign({}, a, b)).every(function(key) {
return valueEqual(a[key], b[key]);
});
}
return false;
}
/* harmony default export */ var value_equal = (valueEqual);
// EXTERNAL MODULE: ./node_modules/query-string/index.js
var query_string = __webpack_require__("cr+I");
var query_string_default = /*#__PURE__*/__webpack_require__.n(query_string);
// EXTERNAL MODULE: ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js
var tiny_invariant_esm = __webpack_require__("9R94");
// CONCATENATED MODULE: ./node_modules/history-with-query/esm/history.js
function addLeadingSlash(path) {
return path.charAt(0) === '/' ? path : '/' + path;
}
function stripLeadingSlash(path) {
return path.charAt(0) === '/' ? path.substr(1) : path;
}
function hasBasename(path, prefix) {
return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;
}
function stripBasename(path, prefix) {
return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
}
function stripTrailingSlash(path) {
return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
}
function parsePath(path) {
var pathname = path || '/';
var search = '';
var hash = '';
var hashIndex = pathname.indexOf('#');
if (hashIndex !== -1) {
hash = pathname.substr(hashIndex);
pathname = pathname.substr(0, hashIndex);
}
var searchIndex = pathname.indexOf('?');
if (searchIndex !== -1) {
search = pathname.substr(searchIndex);
pathname = pathname.substr(0, searchIndex);
}
return {
pathname: pathname,
search: search === '?' ? '' : search,
hash: hash === '#' ? '' : hash
};
}
function createPath(location) {
var pathname = location.pathname,
search = location.search,
hash = location.hash;
var path = pathname || '/';
if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
return path;
}
function createLocation(path, state, key, currentLocation) {
var location;
if (typeof path === 'string') {
// Two-arg form: push(path, state)
location = parsePath(path);
location.query = location.search ? query_string_default.a.parse(location.search) : {};
location.state = state;
} else {
// One-arg form: push(location)
location = Object(esm_extends["a" /* default */])({}, path);
if (location.pathname === undefined) location.pathname = '';
if (location.search) {
if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
location.query = query_string_default.a.parse(location.search);
} else {
location.search = location.query ? query_string_default.a.stringify(location.query) : '';
location.query = location.query || {};
}
if (location.hash) {
if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
} else {
location.hash = '';
}
if (state !== undefined && location.state === undefined) location.state = state;
}
try {
location.pathname = decodeURI(location.pathname);
} catch (e) {
if (e instanceof URIError) {
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
} else {
throw e;
}
}
if (key) location.key = key;
if (currentLocation) {
// Resolve incomplete/relative pathname relative to current location.
if (!location.pathname) {
location.pathname = currentLocation.pathname;
} else if (location.pathname.charAt(0) !== '/') {
location.pathname = resolve_pathname(location.pathname, currentLocation.pathname);
}
} else {
// When there is no prior location and pathname is empty, set it to /
if (!location.pathname) {
location.pathname = '/';
}
}
return location;
}
function locationsAreEqual(a, b) {
return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && value_equal(a.state, b.state);
}
function createTransitionManager() {
var prompt = null;
function setPrompt(nextPrompt) {
false ? undefined : void 0;
prompt = nextPrompt;
return function () {
if (prompt === nextPrompt) prompt = null;
};
}
function confirmTransitionTo(location, action, getUserConfirmation, callback) {
// TODO: If another transition starts while we're still confirming
// the previous one, we may end up in a weird state. Figure out the
// best way to handle this.
if (prompt != null) {
var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
if (typeof result === 'string') {
if (typeof getUserConfirmation === 'function') {
getUserConfirmation(result, callback);
} else {
false ? undefined : void 0;
callback(true);
}
} else {
// Return false from a transition hook to cancel the transition.
callback(result !== false);
}
} else {
callback(true);
}
}
var listeners = [];
function appendListener(fn) {
var isActive = true;
function listener() {
if (isActive) fn.apply(void 0, arguments);
}
listeners.push(listener);
return function () {
isActive = false;
listeners = listeners.filter(function (item) {
return item !== listener;
});
};
}
function notifyListeners() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
listeners.forEach(function (listener) {
return listener.apply(void 0, args);
});
}
return {
setPrompt: setPrompt,
confirmTransitionTo: confirmTransitionTo,
appendListener: appendListener,
notifyListeners: notifyListeners
};
}
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
function getConfirmation(message, callback) {
callback(window.confirm(message)); // eslint-disable-line no-alert
}
/**
* Returns true if the HTML5 history API is supported. Taken from Modernizr.
*
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
* changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
*/
function supportsHistory() {
var ua = window.navigator.userAgent;
if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
return window.history && 'pushState' in window.history;
}
/**
* Returns true if browser fires popstate on hash change.
* IE10 and IE11 do not.
*/
function supportsPopStateOnHashChange() {
return window.navigator.userAgent.indexOf('Trident') === -1;
}
/**
* Returns false if using go(n) with hash history causes a full page reload.
*/
function supportsGoWithoutReloadUsingHash() {
return window.navigator.userAgent.indexOf('Firefox') === -1;
}
/**
* Returns true if a given popstate event is an extraneous WebKit event.
* Accounts for the fact that Chrome on iOS fires real popstate events
* containing undefined state when pressing the back button.
*/
function isExtraneousPopstateEvent(event) {
return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
}
var PopStateEvent = 'popstate';
var HashChangeEvent = 'hashchange';
function getHistoryState() {
try {
return window.history.state || {};
} catch (e) {
// IE 11 sometimes throws when accessing window.history.state
// See https://github.com/ReactTraining/history/pull/289
return {};
}
}
/**
* Creates a history object that uses the HTML5 history API including
* pushState, replaceState, and the popstate event.
*/
function createBrowserHistory(props) {
if (props === void 0) {
props = {};
}
!canUseDOM ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
var globalHistory = window.history;
var canUseHistory = supportsHistory();
var needsHashChangeListener = !supportsPopStateOnHashChange();
var _props = props,
_props$forceRefresh = _props.forceRefresh,
forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
_props$getUserConfirm = _props.getUserConfirmation,
getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
_props$keyLength = _props.keyLength,
keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
function getDOMLocation(historyState) {
var _ref = historyState || {},
key = _ref.key,
state = _ref.state;
var _window$location = window.location,
pathname = _window$location.pathname,
search = _window$location.search,
hash = _window$location.hash;
var path = pathname + search + hash;
false ? undefined : void 0;
if (basename) path = stripBasename(path, basename);
return createLocation(path, state, key);
}
function createKey() {
return Math.random().toString(36).substr(2, keyLength);
}
var transitionManager = createTransitionManager();
function setState(nextState) {
Object(esm_extends["a" /* default */])(history, nextState);
history.length = globalHistory.length;
transitionManager.notifyListeners(history.location, history.action);
}
function handlePopState(event) {
// Ignore extraneous popstate events in WebKit.
if (isExtraneousPopstateEvent(event)) return;
handlePop(getDOMLocation(event.state));
}
function handleHashChange() {
handlePop(getDOMLocation(getHistoryState()));
}
var forceNextPop = false;
function handlePop(location) {
if (forceNextPop) {
forceNextPop = false;
setState();
} else {
var action = 'POP';
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
if (ok) {
setState({
action: action,
location: location
});
} else {
revertPop(location);
}
});
}
}
function revertPop(fromLocation) {
var toLocation = history.location; // TODO: We could probably make this more reliable by
// keeping a list of keys we've seen in sessionStorage.
// Instead, we just default to 0 for keys we don't know.
var toIndex = allKeys.indexOf(toLocation.key);
if (toIndex === -1) toIndex = 0;
var fromIndex = allKeys.indexOf(fromLocation.key);
if (fromIndex === -1) fromIndex = 0;
var delta = toIndex - fromIndex;
if (delta) {
forceNextPop = true;
go(delta);
}
}
var initialLocation = getDOMLocation(getHistoryState());
var allKeys = [initialLocation.key]; // Public interface
function createHref(location) {
return basename + createPath(location);
}
function push(path, state) {
false ? undefined : void 0;
var action = 'PUSH';
var location = createLocation(path, state, createKey(), history.location);
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
if (!ok) return;
var href = createHref(location);
var key = location.key,
state = location.state;
if (canUseHistory) {
globalHistory.pushState({
key: key,
state: state
}, null, href);
if (forceRefresh) {
window.location.href = href;
} else {
var prevIndex = allKeys.indexOf(history.location.key);
var nextKeys = allKeys.slice(0, prevIndex + 1);
nextKeys.push(location.key);
allKeys = nextKeys;
setState({
action: action,
location: location
});
}
} else {
false ? undefined : void 0;
window.location.href = href;
}
});
}
function replace(path, state) {
false ? undefined : void 0;
var action = 'REPLACE';
var location = createLocation(path, state, createKey(), history.location);
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
if (!ok) return;
var href = createHref(location);
var key = location.key,
state = location.state;
if (canUseHistory) {
globalHistory.replaceState({
key: key,
state: state
}, null, href);
if (forceRefresh) {
window.location.replace(href);
} else {
var prevIndex = allKeys.indexOf(history.location.key);
if (prevIndex !== -1) allKeys[prevIndex] = location.key;
setState({
action: action,
location: location
});
}
} else {
false ? undefined : void 0;
window.location.replace(href);
}
});
}
function go(n) {
globalHistory.go(n);
}
function goBack() {
go(-1);
}
function goForward() {
go(1);
}
var listenerCount = 0;
function checkDOMListeners(delta) {
listenerCount += delta;
if (listenerCount === 1 && delta === 1) {
window.addEventListener(PopStateEvent, handlePopState);
if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
} else if (listenerCount === 0) {
window.removeEventListener(PopStateEvent, handlePopState);
if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
}
}
var isBlocked = false;
function block(prompt) {
if (prompt === void 0) {
prompt = false;
}
var unblock = transitionManager.setPrompt(prompt);
if (!isBlocked) {
checkDOMListeners(1);
isBlocked = true;
}
return function () {
if (isBlocked) {
isBlocked = false;
checkDOMListeners(-1);
}
return unblock();
};
}
function listen(listener) {
var unlisten = transitionManager.appendListener(listener);
checkDOMListeners(1);
return function () {
checkDOMListeners(-1);
unlisten();
};
}
var history = {
length: globalHistory.length,
action: 'POP',
location: initialLocation,
createHref: createHref,
push: push,
replace: replace,
go: go,
goBack: goBack,
goForward: goForward,
block: block,
listen: listen
};
return history;
}
var HashChangeEvent$1 = 'hashchange';
var HashPathCoders = {
hashbang: {
encodePath: function encodePath(path) {
return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);
},
decodePath: function decodePath(path) {
return path.charAt(0) === '!' ? path.substr(1) : path;
}
},
noslash: {
encodePath: stripLeadingSlash,
decodePath: addLeadingSlash
},
slash: {
encodePath: addLeadingSlash,
decodePath: addLeadingSlash
}
};
function stripHash(url) {
var hashIndex = url.indexOf('#');
return hashIndex === -1 ? url : url.slice(0, hashIndex);
}
function getHashPath() {
// We can't use window.location.hash here because it's not
// consistent across browsers - Firefox will pre-decode it!
var href = window.location.href;
var hashIndex = href.indexOf('#');
return hashIndex === -1 ? '' : href.substring(hashIndex + 1);
}
function pushHashPath(path) {
window.location.hash = path;
}
function replaceHashPath(path) {
window.location.replace(stripHash(window.location.href) + '#' + path);
}
function createHashHistory(props) {
if (props === void 0) {
props = {};
}
!canUseDOM ? false ? undefined : Object(tiny_invariant_esm["a" /* default */])(false) : void 0;
var globalHistory = window.history;
var canGoWithoutReload = supportsGoWithoutReloadUsingHash();
var _props = props,
_props$getUserConfirm = _props.getUserConfirmation,
getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
_props$hashType = _props.hashType,
hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;
var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
var _HashPathCoders$hashT = HashPathCoders[hashType],
encodePath = _HashPathCoders$hashT.encodePath,
decodePath = _HashPathCoders$hashT.decodePath;
function getDOMLocation() {
var path = decodePath(getHashPath());
false ? undefined : void 0;
if (basename) path = stripBasename(path, basename);
return createLocation(path);
}
var transitionManager = createTransitionManager();
function setState(nextState) {
Object(esm_extends["a" /* default */])(history, nextState);
history.length = globalHistory.length;
transitionManager.notifyListeners(history.location, history.action);
}
var forceNextPop = false;
var ignorePath = null;
function locationsAreEqual$$1(a, b) {
return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;
}
function handleHashChange() {
var path = getHashPath();
var encodedPath = encodePath(path);
if (path !== encodedPath) {
// Ensure we always have a properly-encoded hash.
replaceHashPath(encodedPath);
} else {
var location = getDOMLocation();
var prevLocation = history.location;
if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.
if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.
ignorePath = null;
handlePop(location);
}
}
function handlePop(location) {
if (forceNextPop) {
forceNextPop = false;
setState();
} else {
var action = 'POP';
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
if (ok) {
setState({
action: action,
location: location
});
} else {
revertPop(location);
}
});
}
}
function revertPop(fromLocation) {
var toLocation = history.location; // TODO: We could probably make this more reliable by
// keeping a list of paths we've seen in sessionStorage.
// Instead, we just default to 0 for paths we don't know.
var toIndex = allPaths.lastIndexOf(createPath(toLocation));
if (toIndex === -1) toIndex = 0;
var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));
if (fromIndex === -1) fromIndex = 0;
var delta = toIndex - fromIndex;
if (delta) {
forceNextPop = true;
go(delta);
}
} // Ensure the hash is encoded properly before doing anything else.
var path = getHashPath();
var encodedPath = encodePath(path);
if (path !== encodedPath) replaceHashPath(encodedPath);
var initialLocation = getDOMLocation();
var allPaths = [createPath(initialLocation)]; // Public interface
function createHref(location) {
var baseTag = document.querySelector('base');
var href = '';
if (baseTag && baseTag.getAttribute('href')) {
href = stripHash(window.location.href);
}
return href + '#' + encodePath(basename + createPath(location));
}
function push(path, state) {
false ? undefined : void 0;
var action = 'PUSH';
var location = createLocation(path, undefined, undefined, history.location);
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
if (!ok) return;
var path = createPath(location);
var encodedPath = encodePath(basename + path);
var hashChanged = getHashPath() !== encodedPath;
if (hashChanged) {
// We cannot tell if a hashchange was caused by a PUSH, so we'd
// rather setState here and ignore the hashchange. The caveat here
// is that other hash histories in the page will consider it a POP.
ignorePath = path;
pushHashPath(encodedPath);
var prevIndex = allPaths.lastIndexOf(createPath(history.location));
var nextPaths = allPaths.slice(0, prevIndex + 1);
nextPaths.push(path);
allPaths = nextPaths;
setState({
action: action,
location: location
});
} else {
false ? undefined : void 0;
setState();
}
});
}
function replace(path, state) {
false ? undefined : void 0;
var action = 'REPLACE';
var location = createLocation(path, undefined, undefined, history.location);
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
if (!ok) return;
var path = createPath(location);
var encodedPath = encodePath(basename + path);
var hashChanged = getHashPath() !== encodedPath;
if (hashChanged) {
// We cannot tell if a hashchange was caused by a REPLACE, so we'd
// rather setState here and ignore the hashchange. The caveat here
// is that other hash histories in the page will consider it a POP.
ignorePath = path;
replaceHashPath(encodedPath);
}
var prevIndex = allPaths.indexOf(createPath(history.location));
if (prevIndex !== -1) allPaths[prevIndex] = path;
setState({
action: action,
location: location
});
});
}
function go(n) {
false ? undefined : void 0;
globalHistory.go(n);
}
function goBack() {
go(-1);
}
function goForward() {
go(1);
}
var listenerCount = 0;
function checkDOMListeners(delta) {
listenerCount += delta;
if (listenerCount === 1 && delta === 1) {
window.addEventListener(HashChangeEvent$1, handleHashChange);
} else if (listenerCount === 0) {
window.removeEventListener(HashChangeEvent$1, handleHashChange);
}
}
var isBlocked = false;
function block(prompt) {
if (prompt === void 0) {
prompt = false;
}
var unblock = transitionManager.setPrompt(prompt);
if (!isBlocked) {
checkDOMListeners(1);
isBlocked = true;
}
return function () {
if (isBlocked) {
isBlocked = false;
checkDOMListeners(-1);
}
return unblock();
};
}
function listen(listener) {
var unlisten = transitionManager.appendListener(listener);
checkDOMListeners(1);
return function () {
checkDOMListeners(-1);
unlisten();
};
}
var history = {
length: globalHistory.length,
action: 'POP',
location: initialLocation,
createHref: createHref,
push: push,
replace: replace,
go: go,
goBack: goBack,
goForward: goForward,
block: block,
listen: listen
};
return history;
}
function clamp(n, lowerBound, upperBound) {
return Math.min(Math.max(n, lowerBound), upperBound);
}
/**
* Creates a history object that stores locations in memory.
*/
function createMemoryHistory(props) {
if (props === void 0) {
props = {};
}
var _props = props,
getUserConfirmation = _props.getUserConfirmation,
_props$initialEntries = _props.initialEntries,
initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,
_props$initialIndex = _props.initialIndex,
initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,
_props$keyLength = _props.keyLength,
keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
var transitionManager = createTransitionManager();
function setState(nextState) {
Object(esm_extends["a" /* default */])(history, nextState);
history.length = history.entries.length;
transitionManager.notifyListeners(history.location, history.action);
}
function createKey() {
return Math.random().toString(36).substr(2, keyLength);
}
var index = clamp(initialIndex, 0, initialEntries.length - 1);
var entries = initialEntries.map(function (entry) {
return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());
}); // Public interface
var createHref = createPath;
function push(path, state) {
false ? undefined : void 0;
var action = 'PUSH';
var location = createLocation(path, state, createKey(), history.location);
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
if (!ok) return;
var prevIndex = history.index;
var nextIndex = prevIndex + 1;
var nextEntries = history.entries.slice(0);
if (nextEntries.length > nextIndex) {
nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);
} else {
nextEntries.push(location);
}
setState({
action: action,
location: location,
index: nextIndex,
entries: nextEntries
});
});
}
function replace(path, state) {
false ? undefined : void 0;
var action = 'REPLACE';
var location = createLocation(path, state, createKey(), history.location);
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
if (!ok) return;
history.entries[history.index] = location;
setState({
action: action,
location: location
});
});
}
function go(n) {
var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);
var action = 'POP';
var location = history.entries[nextIndex];
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
if (ok) {
setState({
action: action,
location: location,
index: nextIndex
});
} else {
// Mimic the behavior of DOM histories by
// causing a render after a cancelled POP.
setState();
}
});
}
function goBack() {
go(-1);
}
function goForward() {
go(1);
}
function canGo(n) {
var nextIndex = history.index + n;
return nextIndex >= 0 && nextIndex < history.entries.length;
}
function block(prompt) {
if (prompt === void 0) {
prompt = false;
}
return transitionManager.setPrompt(prompt);
}
function listen(listener) {
return transitionManager.appendListener(listener);
}
var history = {
length: entries.length,
action: 'POP',
location: entries[index],
index: index,
entries: entries,
createHref: createHref,
push: push,
replace: replace,
go: go,
goBack: goBack,
goForward: goForward,
canGo: canGo,
block: block,
listen: listen
};
return history;
}
/***/ }),
/***/ "YdpX":
/*!**********************************!*\
!*** ./src/styles/animated.less ***!
\**********************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "Yhre":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/array-buffer.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var NATIVE_ARRAY_BUFFER = __webpack_require__(/*! ../internals/array-buffer-native */ "qYE9");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "4syw");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toIndex = __webpack_require__(/*! ../internals/to-index */ "CyXQ");
var IEEE754 = __webpack_require__(/*! ../internals/ieee754 */ "d6cI");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr");
var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "JBy8").f;
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
var arrayFill = __webpack_require__(/*! ../internals/array-fill */ "gdVl");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var ARRAY_BUFFER = 'ArrayBuffer';
var DATA_VIEW = 'DataView';
var PROTOTYPE = 'prototype';
var WRONG_LENGTH = 'Wrong length';
var WRONG_INDEX = 'Wrong index';
var NativeArrayBuffer = global[ARRAY_BUFFER];
var $ArrayBuffer = NativeArrayBuffer;
var $DataView = global[DATA_VIEW];
var $DataViewPrototype = $DataView && $DataView[PROTOTYPE];
var ObjectPrototype = Object.prototype;
var RangeError = global.RangeError;
var packIEEE754 = IEEE754.pack;
var unpackIEEE754 = IEEE754.unpack;
var packInt8 = function (number) {
return [number & 0xFF];
};
var packInt16 = function (number) {
return [number & 0xFF, number >> 8 & 0xFF];
};
var packInt32 = function (number) {
return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF];
};
var unpackInt32 = function (buffer) {
return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0];
};
var packFloat32 = function (number) {
return packIEEE754(number, 23, 4);
};
var packFloat64 = function (number) {
return packIEEE754(number, 52, 8);
};
var addGetter = function (Constructor, key) {
defineProperty(Constructor[PROTOTYPE], key, { get: function () { return getInternalState(this)[key]; } });
};
var get = function (view, count, index, isLittleEndian) {
var intIndex = toIndex(index);
var store = getInternalState(view);
if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
var bytes = getInternalState(store.buffer).bytes;
var start = intIndex + store.byteOffset;
var pack = bytes.slice(start, start + count);
return isLittleEndian ? pack : pack.reverse();
};
var set = function (view, count, index, conversion, value, isLittleEndian) {
var intIndex = toIndex(index);
var store = getInternalState(view);
if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX);
var bytes = getInternalState(store.buffer).bytes;
var start = intIndex + store.byteOffset;
var pack = conversion(+value);
for (var i = 0; i < count; i++) bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
};
if (!NATIVE_ARRAY_BUFFER) {
$ArrayBuffer = function ArrayBuffer(length) {
anInstance(this, $ArrayBuffer, ARRAY_BUFFER);
var byteLength = toIndex(length);
setInternalState(this, {
bytes: arrayFill.call(new Array(byteLength), 0),
byteLength: byteLength
});
if (!DESCRIPTORS) this.byteLength = byteLength;
};
$DataView = function DataView(buffer, byteOffset, byteLength) {
anInstance(this, $DataView, DATA_VIEW);
anInstance(buffer, $ArrayBuffer, DATA_VIEW);
var bufferLength = getInternalState(buffer).byteLength;
var offset = toInteger(byteOffset);
if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset');
byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH);
setInternalState(this, {
buffer: buffer,
byteLength: byteLength,
byteOffset: offset
});
if (!DESCRIPTORS) {
this.buffer = buffer;
this.byteLength = byteLength;
this.byteOffset = offset;
}
};
if (DESCRIPTORS) {
addGetter($ArrayBuffer, 'byteLength');
addGetter($DataView, 'buffer');
addGetter($DataView, 'byteLength');
addGetter($DataView, 'byteOffset');
}
redefineAll($DataView[PROTOTYPE], {
getInt8: function getInt8(byteOffset) {
return get(this, 1, byteOffset)[0] << 24 >> 24;
},
getUint8: function getUint8(byteOffset) {
return get(this, 1, byteOffset)[0];
},
getInt16: function getInt16(byteOffset /* , littleEndian */) {
var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
return (bytes[1] << 8 | bytes[0]) << 16 >> 16;
},
getUint16: function getUint16(byteOffset /* , littleEndian */) {
var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined);
return bytes[1] << 8 | bytes[0];
},
getInt32: function getInt32(byteOffset /* , littleEndian */) {
return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined));
},
getUint32: function getUint32(byteOffset /* , littleEndian */) {
return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0;
},
getFloat32: function getFloat32(byteOffset /* , littleEndian */) {
return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23);
},
getFloat64: function getFloat64(byteOffset /* , littleEndian */) {
return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52);
},
setInt8: function setInt8(byteOffset, value) {
set(this, 1, byteOffset, packInt8, value);
},
setUint8: function setUint8(byteOffset, value) {
set(this, 1, byteOffset, packInt8, value);
},
setInt16: function setInt16(byteOffset, value /* , littleEndian */) {
set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
},
setUint16: function setUint16(byteOffset, value /* , littleEndian */) {
set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined);
},
setInt32: function setInt32(byteOffset, value /* , littleEndian */) {
set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
},
setUint32: function setUint32(byteOffset, value /* , littleEndian */) {
set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined);
},
setFloat32: function setFloat32(byteOffset, value /* , littleEndian */) {
set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined);
},
setFloat64: function setFloat64(byteOffset, value /* , littleEndian */) {
set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined);
}
});
} else {
if (!fails(function () {
NativeArrayBuffer(1);
}) || !fails(function () {
new NativeArrayBuffer(-1); // eslint-disable-line no-new
}) || fails(function () {
new NativeArrayBuffer(); // eslint-disable-line no-new
new NativeArrayBuffer(1.5); // eslint-disable-line no-new
new NativeArrayBuffer(NaN); // eslint-disable-line no-new
return NativeArrayBuffer.name != ARRAY_BUFFER;
})) {
$ArrayBuffer = function ArrayBuffer(length) {
anInstance(this, $ArrayBuffer);
return new NativeArrayBuffer(toIndex(length));
};
var ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE] = NativeArrayBuffer[PROTOTYPE];
for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) {
if (!((key = keys[j++]) in $ArrayBuffer)) {
createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]);
}
}
ArrayBufferPrototype.constructor = $ArrayBuffer;
}
// WebKit bug - the same parent prototype for typed arrays and data view
if (setPrototypeOf && getPrototypeOf($DataViewPrototype) !== ObjectPrototype) {
setPrototypeOf($DataViewPrototype, ObjectPrototype);
}
// iOS Safari 7.x bug
var testView = new $DataView(new $ArrayBuffer(2));
var nativeSetInt8 = $DataViewPrototype.setInt8;
testView.setInt8(0, 2147483648);
testView.setInt8(1, 2147483649);
if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll($DataViewPrototype, {
setInt8: function setInt8(byteOffset, value) {
nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
},
setUint8: function setUint8(byteOffset, value) {
nativeSetInt8.call(this, byteOffset, value << 24 >> 24);
}
}, { unsafe: true });
}
setToStringTag($ArrayBuffer, ARRAY_BUFFER);
setToStringTag($DataView, DATA_VIEW);
module.exports = {
ArrayBuffer: $ArrayBuffer,
DataView: $DataView
};
/***/ }),
/***/ "YlG9":
/*!*********************************************************!*\
!*** ./node_modules/antd/es/locale-provider/context.js ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var LocaleContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(undefined);
/* harmony default export */ __webpack_exports__["a"] = (LocaleContext);
/***/ }),
/***/ "YrtM":
/*!**************************************************!*\
!*** ./node_modules/rc-util/es/hooks/useMemo.js ***!
\**************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return useMemo; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
function useMemo(getValue, condition, shouldUpdate) {
var cacheRef = react__WEBPACK_IMPORTED_MODULE_0__["useRef"]({});
if (!('value' in cacheRef.current) || shouldUpdate(cacheRef.current.condition, condition)) {
cacheRef.current.value = getValue();
cacheRef.current.condition = condition;
}
return cacheRef.current.value;
}
/***/ }),
/***/ "YuTi":
/*!***********************************!*\
!*** (webpack)/buildin/module.js ***!
\***********************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = function(module) {
if (!module.webpackPolyfill) {
module.deprecate = function() {};
module.paths = [];
// module.parent = undefined by default
if (!module.children) module.children = [];
Object.defineProperty(module, "loaded", {
enumerable: true,
get: function() {
return module.l;
}
});
Object.defineProperty(module, "id", {
enumerable: true,
get: function() {
return module.i;
}
});
module.webpackPolyfill = 1;
}
return module;
};
/***/ }),
/***/ "Z+6F":
/*!******************************************!*\
!*** ./node_modules/es-errors/syntax.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @type {import('./syntax')} */
module.exports = SyntaxError;
/***/ }),
/***/ "Z/ur":
/*!***************************************************************!*\
!*** ./node_modules/@ant-design/icons/CloseCircleOutlined.js ***!
\***************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _CloseCircleOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/CloseCircleOutlined */ "z/XJ"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _CloseCircleOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "Z0cm":
/*!****************************************!*\
!*** ./node_modules/lodash/isArray.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ }),
/***/ "Z4nd":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.weak-set.add-all.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var collectionAddAll = __webpack_require__(/*! ../internals/collection-add-all */ "fXLg");
// `WeakSet.prototype.addAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'WeakSet', proto: true, real: true, forced: IS_PURE }, {
addAll: function addAll(/* ...elements */) {
return collectionAddAll.apply(this, arguments);
}
});
/***/ }),
/***/ "Z9lY":
/*!***************************************!*\
!*** ./node_modules/es-errors/uri.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @type {import('./uri')} */
module.exports = URIError;
/***/ }),
/***/ "ZFOp":
/*!*************************************************!*\
!*** ./node_modules/strict-uri-encode/index.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (str) {
return encodeURIComponent(str).replace(/[!'()*]/g, function (x) {
return "%".concat(x.charCodeAt(0).toString(16).toUpperCase());
});
};
/***/ }),
/***/ "ZJ55":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.some.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $some = __webpack_require__(/*! ../internals/array-iteration */ "tycR").some;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.some` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.some
exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) {
return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/***/ "ZLCw":
/*!********************************************************!*\
!*** ./node_modules/has-property-descriptors/index.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $defineProperty = __webpack_require__(/*! es-define-property */ "cckQ");
var hasPropertyDescriptors = function hasPropertyDescriptors() {
return !!$defineProperty;
};
hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
// node v0.6 has a bug where array lengths can be Set but not Defined
if (!$defineProperty) {
return null;
}
try {
return $defineProperty([], 'length', { value: 1 }).length !== 1;
} catch (e) {
// In Firefox 4-22, defining length on an array throws an exception.
return true;
}
};
module.exports = hasPropertyDescriptors;
/***/ }),
/***/ "ZUd8":
/*!************************************************************!*\
!*** ./node_modules/core-js/internals/string-multibyte.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
// `String.prototype.{ codePointAt, at }` methods implementation
var createMethod = function (CONVERT_TO_STRING) {
return function ($this, pos) {
var S = String(requireObjectCoercible($this));
var position = toInteger(pos);
var size = S.length;
var first, second;
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
first = S.charCodeAt(position);
return first < 0xD800 || first > 0xDBFF || position + 1 === size
|| (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF
? CONVERT_TO_STRING ? S.charAt(position) : first
: CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
};
};
module.exports = {
// `String.prototype.codePointAt` method
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
codeAt: createMethod(false),
// `String.prototype.at` method
// https://github.com/mathiasbynens/String.prototype.at
charAt: createMethod(true)
};
/***/ }),
/***/ "ZW6p":
/*!******************************************************!*\
!*** ./src/.umi-production/plugin-locale/locale.tsx ***!
\******************************************************/
/*! exports provided: event, LANG_CHANGE_EVENT, _onCreate, _LocaleContainer */
/*! exports used: LANG_CHANGE_EVENT, _LocaleContainer, _onCreate, event */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return event; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return LANG_CHANGE_EVENT; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return _onCreate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return _LocaleContainer; });
/* harmony import */ var antd_es_config_provider_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! antd/es/config-provider/style */ "GNNt");
/* harmony import */ var antd_es_config_provider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd/es/config-provider */ "wEI+");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "tJVT");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! events */ "+qE3");
/* harmony import */ var events__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(events__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! moment */ "wd/R");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var moment_locale_zh_cn__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! moment/locale/zh-cn */ "XDpg");
/* harmony import */ var moment_locale_zh_cn__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(moment_locale_zh_cn__WEBPACK_IMPORTED_MODULE_7__);
/* harmony import */ var _localeExports__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./localeExports */ "Fghh");
// @ts-nocheck
// @ts-ignore
var event = new events__WEBPACK_IMPORTED_MODULE_5___default.a();
event.setMaxListeners(5);
var LANG_CHANGE_EVENT = Symbol('LANG_CHANGE');
function _onCreate() {
var locale = Object(_localeExports__WEBPACK_IMPORTED_MODULE_8__[/* getLocale */ "d"])();
if (moment__WEBPACK_IMPORTED_MODULE_6___default.a === null || moment__WEBPACK_IMPORTED_MODULE_6___default.a === void 0 ? void 0 : moment__WEBPACK_IMPORTED_MODULE_6___default.a.locale) {
var _localeInfo$locale;
moment__WEBPACK_IMPORTED_MODULE_6___default.a.locale(((_localeInfo$locale = _localeExports__WEBPACK_IMPORTED_MODULE_8__[/* localeInfo */ "e"][locale]) === null || _localeInfo$locale === void 0 ? void 0 : _localeInfo$locale.momentLocale) || 'zh-cn');
}
Object(_localeExports__WEBPACK_IMPORTED_MODULE_8__[/* setIntl */ "f"])(locale);
}
var _LocaleContainer = function _LocaleContainer(props) {
var _localeInfo$locale3;
var _React$useState = react__WEBPACK_IMPORTED_MODULE_4___default.a.useState(function () {
return Object(_localeExports__WEBPACK_IMPORTED_MODULE_8__[/* getLocale */ "d"])();
}),
_React$useState2 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState, 2),
locale = _React$useState2[0],
setLocale = _React$useState2[1];
var _React$useState3 = react__WEBPACK_IMPORTED_MODULE_4___default.a.useState(function () {
return Object(_localeExports__WEBPACK_IMPORTED_MODULE_8__[/* getIntl */ "c"])(locale, true);
}),
_React$useState4 = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(_React$useState3, 2),
intl = _React$useState4[0],
setContainerIntl = _React$useState4[1];
var handleLangChange = function handleLangChange(locale) {
if (moment__WEBPACK_IMPORTED_MODULE_6___default.a === null || moment__WEBPACK_IMPORTED_MODULE_6___default.a === void 0 ? void 0 : moment__WEBPACK_IMPORTED_MODULE_6___default.a.locale) {
var _localeInfo$locale2;
moment__WEBPACK_IMPORTED_MODULE_6___default.a.locale(((_localeInfo$locale2 = _localeExports__WEBPACK_IMPORTED_MODULE_8__[/* localeInfo */ "e"][locale]) === null || _localeInfo$locale2 === void 0 ? void 0 : _localeInfo$locale2.momentLocale) || 'en');
}
setLocale(locale);
setContainerIntl(Object(_localeExports__WEBPACK_IMPORTED_MODULE_8__[/* getIntl */ "c"])(locale));
};
react__WEBPACK_IMPORTED_MODULE_4___default.a.useLayoutEffect(function () {
event.on(LANG_CHANGE_EVENT, handleLangChange);
return function () {
event.off(LANG_CHANGE_EVENT, handleLangChange);
};
}, []);
var defaultAntdLocale = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, __webpack_require__(/*! antd/es/locale/zh_CN */ "+Gva").default);
var direcition = Object(_localeExports__WEBPACK_IMPORTED_MODULE_8__[/* getDirection */ "b"])();
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(antd_es_config_provider__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"], {
direction: direcition,
locale: ((_localeInfo$locale3 = _localeExports__WEBPACK_IMPORTED_MODULE_8__[/* localeInfo */ "e"][locale]) === null || _localeInfo$locale3 === void 0 ? void 0 : _localeInfo$locale3.antd) || defaultAntdLocale
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(_localeExports__WEBPACK_IMPORTED_MODULE_8__[/* RawIntlProvider */ "a"], {
value: intl
}, props.children));
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default.a.createElement(_localeExports__WEBPACK_IMPORTED_MODULE_8__[/* RawIntlProvider */ "a"], {
value: intl
}, props.children);
};
/***/ }),
/***/ "ZWaQ":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/collection-strong.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "4syw");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "fdAy");
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JiZb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var fastKey = __webpack_require__(/*! ../internals/internal-metadata */ "8YOa").fastKey;
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var setInternalState = InternalStateModule.set;
var internalStateGetterFor = InternalStateModule.getterFor;
module.exports = {
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
var C = wrapper(function (that, iterable) {
anInstance(that, C, CONSTRUCTOR_NAME);
setInternalState(that, {
type: CONSTRUCTOR_NAME,
index: create(null),
first: undefined,
last: undefined,
size: 0
});
if (!DESCRIPTORS) that.size = 0;
if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);
});
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
var define = function (that, key, value) {
var state = getInternalState(that);
var entry = getEntry(that, key);
var previous, index;
// change existing entry
if (entry) {
entry.value = value;
// create new entry
} else {
state.last = entry = {
index: index = fastKey(key, true),
key: key,
value: value,
previous: previous = state.last,
next: undefined,
removed: false
};
if (!state.first) state.first = entry;
if (previous) previous.next = entry;
if (DESCRIPTORS) state.size++;
else that.size++;
// add to index
if (index !== 'F') state.index[index] = entry;
} return that;
};
var getEntry = function (that, key) {
var state = getInternalState(that);
// fast case
var index = fastKey(key);
var entry;
if (index !== 'F') return state.index[index];
// frozen object case
for (entry = state.first; entry; entry = entry.next) {
if (entry.key == key) return entry;
}
};
redefineAll(C.prototype, {
// 23.1.3.1 Map.prototype.clear()
// 23.2.3.2 Set.prototype.clear()
clear: function clear() {
var that = this;
var state = getInternalState(that);
var data = state.index;
var entry = state.first;
while (entry) {
entry.removed = true;
if (entry.previous) entry.previous = entry.previous.next = undefined;
delete data[entry.index];
entry = entry.next;
}
state.first = state.last = undefined;
if (DESCRIPTORS) state.size = 0;
else that.size = 0;
},
// 23.1.3.3 Map.prototype.delete(key)
// 23.2.3.4 Set.prototype.delete(value)
'delete': function (key) {
var that = this;
var state = getInternalState(that);
var entry = getEntry(that, key);
if (entry) {
var next = entry.next;
var prev = entry.previous;
delete state.index[entry.index];
entry.removed = true;
if (prev) prev.next = next;
if (next) next.previous = prev;
if (state.first == entry) state.first = next;
if (state.last == entry) state.last = prev;
if (DESCRIPTORS) state.size--;
else that.size--;
} return !!entry;
},
// 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)
// 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)
forEach: function forEach(callbackfn /* , that = undefined */) {
var state = getInternalState(this);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
var entry;
while (entry = entry ? entry.next : state.first) {
boundFunction(entry.value, entry.key, this);
// revert to the last existing entry
while (entry && entry.removed) entry = entry.previous;
}
},
// 23.1.3.7 Map.prototype.has(key)
// 23.2.3.7 Set.prototype.has(value)
has: function has(key) {
return !!getEntry(this, key);
}
});
redefineAll(C.prototype, IS_MAP ? {
// 23.1.3.6 Map.prototype.get(key)
get: function get(key) {
var entry = getEntry(this, key);
return entry && entry.value;
},
// 23.1.3.9 Map.prototype.set(key, value)
set: function set(key, value) {
return define(this, key === 0 ? 0 : key, value);
}
} : {
// 23.2.3.1 Set.prototype.add(value)
add: function add(value) {
return define(this, value = value === 0 ? 0 : value, value);
}
});
if (DESCRIPTORS) defineProperty(C.prototype, 'size', {
get: function () {
return getInternalState(this).size;
}
});
return C;
},
setStrong: function (C, CONSTRUCTOR_NAME, IS_MAP) {
var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator';
var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME);
var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME);
// add .keys, .values, .entries, [@@iterator]
// 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11
defineIterator(C, CONSTRUCTOR_NAME, function (iterated, kind) {
setInternalState(this, {
type: ITERATOR_NAME,
target: iterated,
state: getInternalCollectionState(iterated),
kind: kind,
last: undefined
});
}, function () {
var state = getInternalIteratorState(this);
var kind = state.kind;
var entry = state.last;
// revert to the last existing entry
while (entry && entry.removed) entry = entry.previous;
// get next entry
if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) {
// or finish the iteration
state.target = undefined;
return { value: undefined, done: true };
}
// return step by kind
if (kind == 'keys') return { value: entry.key, done: false };
if (kind == 'values') return { value: entry.value, done: false };
return { value: [entry.key, entry.value], done: false };
}, IS_MAP ? 'entries' : 'values', !IS_MAP, true);
// add [@@species], 23.1.2.2, 23.2.2.2
setSpecies(CONSTRUCTOR_NAME);
}
};
/***/ }),
/***/ "ZY7T":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.intersection.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.intersection` method
// https://github.com/tc39/proposal-set-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
intersection: function intersection(iterable) {
var set = anObject(this);
var newSet = new (speciesConstructor(set, getBuiltIn('Set')))();
var hasCheck = aFunction(set.has);
var adder = aFunction(newSet.add);
iterate(iterable, function (value) {
if (hasCheck.call(set, value)) adder.call(newSet, value);
});
return newSet;
}
});
/***/ }),
/***/ "ZfDv":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/array-species-create.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var isArray = __webpack_require__(/*! ../internals/is-array */ "6LWA");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var SPECIES = wellKnownSymbol('species');
// `ArraySpeciesCreate` abstract operation
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
module.exports = function (originalArray, length) {
var C;
if (isArray(originalArray)) {
C = originalArray.constructor;
// cross-realm fallback
if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;
else if (isObject(C)) {
C = C[SPECIES];
if (C === null) C = undefined;
}
} return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
};
/***/ }),
/***/ "ZhPi":
/*!***************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
\***************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray.js */ "WkPL");
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
}
module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "Zk8X":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.string.sup.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.sup` method
// https://tc39.github.io/ecma262/#sec-string.prototype.sup
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('sup') }, {
sup: function sup() {
return createHTML(this, 'sup', '', '');
}
});
/***/ }),
/***/ "Zkxe":
/*!******************************************!*\
!*** ./src/models/problemset/preview.ts ***!
\******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_problemset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/problemset */ "WCUW");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "6fQ5");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var ProblemsetPreviewModel = {
namespace: 'problemsetPreview',
state: {
disciplinesData: undefined,
courseOptions: [],
paperData: undefined,
actionTabs: {
key: '',
params: {}
}
},
effects: {
getPaperData: function getPaperData(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response, data;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* getPaperData */ "o"], payload);
case 2:
response = _context.sent;
data = Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* formatPaperData */ "b"])(response);
_context.next = 6;
return put({
type: 'save',
payload: {
paperData: data
}
});
case 6:
return _context.abrupt("return", response);
case 7:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getEditDisciplines: function getEditDisciplines(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response, disciplines, courseOptions;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* getDisciplines */ "k"], payload);
case 2:
response = _context2.sent;
disciplines = response === null || response === void 0 ? void 0 : response.disciplines;
courseOptions = Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* formatCourseOptions */ "a"])(disciplines);
_context2.next = 7;
return put({
type: 'save',
payload: {
courseOptions: courseOptions,
disciplinesData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 7:
return _context2.abrupt("return", response);
case 8:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
setScore: function setScore(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* setScore */ "w"], payload);
case 2:
return _context3.abrupt("return", _context3.sent);
case 3:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
handleDelete: function handleDelete(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* handleDeletePreviewQuestion */ "r"], payload);
case 2:
return _context4.abrupt("return", _context4.sent);
case 3:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
batchSetScore: function batchSetScore(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* batchSetScore */ "f"], payload);
case 2:
return _context5.abrupt("return", _context5.sent);
case 3:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
batchDelete: function batchDelete(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* batchDelete */ "e"], payload);
case 2:
return _context6.abrupt("return", _context6.sent);
case 3:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
adjustPosition: function adjustPosition(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* adjustPosition */ "c"], payload);
case 2:
return _context7.abrupt("return", _context7.sent);
case 3:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
newPreviewProblemset: function newPreviewProblemset(_ref15, _ref16) {
var payload = _ref15.payload;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* newPreviewProblemset */ "s"], payload);
case 2:
return _context8.abrupt("return", _context8.sent);
case 3:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
setActionTabs: function setActionTabs(_ref17, _ref18) {
var payload = _ref17.payload;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context9.stop();
}
}, _callee9);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref19) {
var dispatch = _ref19.dispatch,
history = _ref19.history;
return history.listen(function (_ref20) {
var pathname = _ref20.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (ProblemsetPreviewModel);
/***/ }),
/***/ "Zm9Q":
/*!*****************************************************!*\
!*** ./node_modules/rc-util/es/Children/toArray.js ***!
\*****************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return toArray; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-is */ "t6Hw");
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_1__);
function toArray(children) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var ret = [];
react__WEBPACK_IMPORTED_MODULE_0___default.a.Children.forEach(children, function (child) {
if ((child === undefined || child === null) && !option.keepEmpty) {
return;
}
if (Array.isArray(child)) {
ret = ret.concat(toArray(child));
} else if (Object(react_is__WEBPACK_IMPORTED_MODULE_1__["isFragment"])(child) && child.props) {
ret = ret.concat(toArray(child.props.children, option));
} else {
ret.push(child);
}
});
return ret;
}
/***/ }),
/***/ "ZqBY":
/*!****************************************************!*\
!*** ./node_modules/umi-request/dist/index.esm.js ***!
\****************************************************/
/*! exports provided: default, Onion, RequestError, ResponseError, extend, fetch */
/*! exports used: extend */
/*! ModuleConcatenation bailout: Module uses injected variables (process) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(process) {/* unused harmony export Onion */
/* unused harmony export RequestError */
/* unused harmony export ResponseError */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return extend; });
/* unused harmony export fetch */
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qs */ "Qyje");
/* harmony import */ var qs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qs__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var isomorphic_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! isomorphic-fetch */ "LpSC");
/* harmony import */ var isomorphic_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(isomorphic_fetch__WEBPACK_IMPORTED_MODULE_1__);
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) {
symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
}
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
if (superClass) _setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _construct(Parent, args, Class) {
if (_isNativeReflectConstruct()) {
_construct = Reflect.construct;
} else {
_construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) _setPrototypeOf(instance, Class.prototype);
return instance;
};
}
return _construct.apply(null, arguments);
}
function _isNativeFunction(fn) {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
}
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? new Map() : undefined;
_wrapNativeSuper = function _wrapNativeSuper(Class) {
if (Class === null || !_isNativeFunction(Class)) return Class;
if (typeof Class !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class)) return _cache.get(Class);
_cache.set(Class, Wrapper);
}
function Wrapper() {
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
}
Wrapper.prototype = Object.create(Class.prototype, {
constructor: {
value: Wrapper,
enumerable: false,
writable: true,
configurable: true
}
});
return _setPrototypeOf(Wrapper, Class);
};
return _wrapNativeSuper(Class);
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _possibleConstructorReturn(self, call) {
if (call && (typeof call === "object" || typeof call === "function")) {
return call;
} else if (call !== void 0) {
throw new TypeError("Derived constructors may only return object or undefined");
}
return _assertThisInitialized(self);
}
function _createSuper(Derived) {
var hasNativeReflectConstruct = _isNativeReflectConstruct();
return function _createSuperInternal() {
var Super = _getPrototypeOf(Derived),
result;
if (hasNativeReflectConstruct) {
var NewTarget = _getPrototypeOf(this).constructor;
result = Reflect.construct(Super, arguments, NewTarget);
} else {
result = Super.apply(this, arguments);
}
return _possibleConstructorReturn(this, result);
};
}
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
}
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
}
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// 返回一个组合了所有插件的“插件”
function compose(middlewares) {
if (!Array.isArray(middlewares)) throw new TypeError('Middlewares must be an array!');
var middlewaresLen = middlewares.length;
for (var i = 0; i < middlewaresLen; i++) {
if (typeof middlewares[i] !== 'function') {
throw new TypeError('Middleware must be componsed of function');
}
}
return function wrapMiddlewares(params, next) {
var index = -1;
function dispatch(i) {
if (i <= index) {
return Promise.reject(new Error('next() should not be called multiple times in one middleware!'));
}
index = i;
var fn = middlewares[i] || next;
if (!fn) return Promise.resolve();
try {
return Promise.resolve(fn(params, function () {
return dispatch(i + 1);
}));
} catch (err) {
return Promise.reject(err);
}
}
return dispatch(0);
};
}
var Onion = /*#__PURE__*/function () {
function Onion(defaultMiddlewares) {
_classCallCheck(this, Onion);
if (!Array.isArray(defaultMiddlewares)) throw new TypeError('Default middlewares must be an array!');
this.defaultMiddlewares = _toConsumableArray(defaultMiddlewares);
this.middlewares = [];
}
_createClass(Onion, [{
key: "use",
value: // 内置内核中间件长度
function use(newMiddleware) {
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
global: false,
core: false,
defaultInstance: false
};
var core = false;
var global = false;
var defaultInstance = false;
if (typeof opts === 'number') {
if (process && Object({"NODE_ENV":"production"}) && "production" === 'development') {
console.warn('use() options should be object, number property would be deprecated in futureplease update use() options to "{ core: true }".');
}
core = true;
global = false;
} else if (_typeof(opts) === 'object' && opts) {
global = opts.global || false;
core = opts.core || false;
defaultInstance = opts.defaultInstance || false;
} // 全局中间件
if (global) {
Onion.globalMiddlewares.splice(Onion.globalMiddlewares.length - Onion.defaultGlobalMiddlewaresLength, 0, newMiddleware);
return;
} // 内核中间件
if (core) {
Onion.coreMiddlewares.splice(Onion.coreMiddlewares.length - Onion.defaultCoreMiddlewaresLength, 0, newMiddleware);
return;
} // 默认实例中间件,供开发者使用
if (defaultInstance) {
this.defaultMiddlewares.push(newMiddleware);
return;
} // 实例中间件
this.middlewares.push(newMiddleware);
}
}, {
key: "execute",
value: function execute() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
var fn = compose([].concat(_toConsumableArray(this.middlewares), _toConsumableArray(this.defaultMiddlewares), _toConsumableArray(Onion.globalMiddlewares), _toConsumableArray(Onion.coreMiddlewares)));
return fn(params);
}
}]);
return Onion;
}();
Onion.globalMiddlewares = [];
Onion.defaultGlobalMiddlewaresLength = 0;
Onion.coreMiddlewares = [];
Onion.defaultCoreMiddlewaresLength = 0;
var MapCache = /*#__PURE__*/function () {
function MapCache(options) {
_classCallCheck(this, MapCache);
this.cache = new Map();
this.timer = {};
this.extendOptions(options);
}
_createClass(MapCache, [{
key: "extendOptions",
value: function extendOptions(options) {
this.maxCache = options.maxCache || 0;
}
}, {
key: "get",
value: function get(key) {
return this.cache.get(JSON.stringify(key));
}
}, {
key: "set",
value: function set(key, value) {
var _this = this;
var ttl = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 60000;
// 如果超过最大缓存数, 删除头部的第一个缓存.
if (this.maxCache > 0 && this.cache.size >= this.maxCache) {
var deleteKey = _toConsumableArray(this.cache.keys())[0];
this.cache.delete(deleteKey);
if (this.timer[deleteKey]) {
clearTimeout(this.timer[deleteKey]);
}
}
var cacheKey = JSON.stringify(key);
this.cache.set(cacheKey, value);
if (ttl > 0) {
this.timer[cacheKey] = setTimeout(function () {
_this.cache.delete(cacheKey);
delete _this.timer[cacheKey];
}, ttl);
}
}
}, {
key: "delete",
value: function _delete(key) {
var cacheKey = JSON.stringify(key);
delete this.timer[cacheKey];
return this.cache.delete(cacheKey);
}
}, {
key: "clear",
value: function clear() {
this.timer = {};
return this.cache.clear();
}
}]);
return MapCache;
}();
/**
* 请求异常
*/
var RequestError = /*#__PURE__*/function (_Error) {
_inherits(RequestError, _Error);
var _super = _createSuper(RequestError);
function RequestError(text, request) {
var _this2;
var type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'RequestError';
_classCallCheck(this, RequestError);
_this2 = _super.call(this, text);
_this2.name = 'RequestError';
_this2.request = request;
_this2.type = type;
return _this2;
}
return RequestError;
}( /*#__PURE__*/_wrapNativeSuper(Error));
/**
* 响应异常
*/
var ResponseError = /*#__PURE__*/function (_Error2) {
_inherits(ResponseError, _Error2);
var _super2 = _createSuper(ResponseError);
function ResponseError(response, text, data, request) {
var _this3;
var type = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 'ResponseError';
_classCallCheck(this, ResponseError);
_this3 = _super2.call(this, text || response.statusText);
_this3.name = 'ResponseError';
_this3.data = data;
_this3.response = response;
_this3.request = request;
_this3.type = type;
return _this3;
}
return ResponseError;
}( /*#__PURE__*/_wrapNativeSuper(Error));
/**
* http://gitlab.alipay-inc.com/KBSJ/gxt/blob/release_gxt_S8928905_20180531/src/util/request.js#L63
* 支持gbk
*/
function readerGBK(file) {
return new Promise(function (resolve, reject) {
var reader = new FileReader();
reader.onload = function () {
resolve(reader.result);
};
reader.onerror = reject;
reader.readAsText(file, 'GBK'); // setup GBK decoding
});
}
/**
* 安全的JSON.parse
*/
function safeJsonParse(data) {
var throwErrIfParseFail = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
var response = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
var request = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
try {
return JSON.parse(data);
} catch (e) {
if (throwErrIfParseFail) {
throw new ResponseError(response, 'JSON.parse fail', data, request, 'ParseError');
}
} // eslint-disable-line no-empty
return data;
}
function timeout2Throw(msec, timeoutMessage, request) {
return new Promise(function (_, reject) {
setTimeout(function () {
reject(new RequestError(timeoutMessage || "timeout of ".concat(msec, "ms exceeded"), request, 'Timeout'));
}, msec);
});
} // If request options contain 'cancelToken', reject request when token has been canceled
function cancel2Throw(opt) {
return new Promise(function (_, reject) {
if (opt.cancelToken) {
opt.cancelToken.promise.then(function (cancel) {
reject(cancel);
});
}
});
}
var toString = Object.prototype.toString; // Check env is browser or node
function getEnv() {
var env; // Only Node.JS has a process variable that is of [[Class]] process
if (typeof process !== 'undefined' && toString.call(process) === '[object process]') {
// For node use HTTP adapter
env = 'NODE';
}
if (typeof XMLHttpRequest !== 'undefined') {
env = 'BROWSER';
}
return env;
}
function isArray(val) {
return _typeof(val) === 'object' && Object.prototype.toString.call(val) === '[object Array]';
}
function isURLSearchParams(val) {
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
}
function isDate(val) {
return _typeof(val) === 'object' && Object.prototype.toString.call(val) === '[object Date]';
}
function isObject(val) {
return val !== null && _typeof(val) === 'object';
}
function forEach2ObjArr(target, callback) {
if (!target) return;
if (_typeof(target) !== 'object') {
target = [target];
}
if (isArray(target)) {
for (var i = 0; i < target.length; i++) {
callback.call(null, target[i], i, target);
}
} else {
for (var key in target) {
if (Object.prototype.hasOwnProperty.call(target, key)) {
callback.call(null, target[key], key, target);
}
}
}
}
function getParamObject(val) {
if (isURLSearchParams(val)) {
return Object(qs__WEBPACK_IMPORTED_MODULE_0__["parse"])(val.toString(), {
strictNullHandling: true
});
}
if (typeof val === 'string') {
return [val];
}
return val;
}
function reqStringify(val) {
return Object(qs__WEBPACK_IMPORTED_MODULE_0__["stringify"])(val, {
arrayFormat: 'repeat',
strictNullHandling: true
});
}
function mergeRequestOptions(options, options2Merge) {
return _objectSpread2(_objectSpread2(_objectSpread2({}, options), options2Merge), {}, {
headers: _objectSpread2(_objectSpread2({}, options.headers), options2Merge.headers),
params: _objectSpread2(_objectSpread2({}, getParamObject(options.params)), getParamObject(options2Merge.params)),
method: (options2Merge.method || options.method || 'get').toLowerCase()
});
}
// 前后缀拦截
var addfix = function addfix(url) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var prefix = options.prefix,
suffix = options.suffix;
if (prefix) {
url = "".concat(prefix).concat(url);
}
if (suffix) {
url = "".concat(url).concat(suffix);
}
return {
url: url,
options: options
};
};
var warnedCoreType = false; // 默认缓存判断,开放缓存判断给非 get 请求使用
function __defaultValidateCache(url, options) {
var _options$method = options.method,
method = _options$method === void 0 ? 'get' : _options$method;
return method.toLowerCase() === 'get';
}
function fetchMiddleware(ctx, next) {
if (!ctx) return next();
var _ctx$req = ctx.req;
_ctx$req = _ctx$req === void 0 ? {} : _ctx$req;
var _ctx$req$options = _ctx$req.options,
options = _ctx$req$options === void 0 ? {} : _ctx$req$options,
_ctx$req$url = _ctx$req.url,
url = _ctx$req$url === void 0 ? '' : _ctx$req$url,
cache = ctx.cache,
responseInterceptors = ctx.responseInterceptors;
var _options$timeout = options.timeout,
timeout = _options$timeout === void 0 ? 0 : _options$timeout,
timeoutMessage = options.timeoutMessage,
_options$__umiRequest = options.__umiRequestCoreType__,
__umiRequestCoreType__ = _options$__umiRequest === void 0 ? 'normal' : _options$__umiRequest,
_options$useCache = options.useCache,
useCache = _options$useCache === void 0 ? false : _options$useCache,
_options$method2 = options.method,
method = _options$method2 === void 0 ? 'get' : _options$method2,
params = options.params,
ttl = options.ttl,
_options$validateCach = options.validateCache,
validateCache = _options$validateCach === void 0 ? __defaultValidateCache : _options$validateCach;
if (__umiRequestCoreType__ !== 'normal') {
if (process && Object({"NODE_ENV":"production"}) && "production" === 'development' && warnedCoreType === false) {
warnedCoreType = true;
console.warn('__umiRequestCoreType__ is a internal property that use in umi-request, change its value would affect the behavior of request! It only use when you want to extend or use request core.');
}
return next();
}
var adapter = fetch;
if (!adapter) {
throw new Error('Global fetch not exist!');
} // 从缓存池检查是否有缓存数据
var isBrowser = getEnv() === 'BROWSER';
var needCache = validateCache(url, options) && useCache && isBrowser;
if (needCache) {
var responseCache = cache.get({
url: url,
params: params,
method: method
});
if (responseCache) {
responseCache = responseCache.clone();
responseCache.useCache = true;
ctx.res = responseCache;
return next();
}
}
var response; // 超时处理、取消请求处理
if (timeout > 0) {
response = Promise.race([cancel2Throw(options), adapter(url, options), timeout2Throw(timeout, timeoutMessage, ctx.req)]);
} else {
response = Promise.race([cancel2Throw(options), adapter(url, options)]);
} // 兼容老版本 response.interceptor
responseInterceptors.forEach(function (handler) {
response = response.then(function (res) {
// Fix multiple clones not working, issue: https://github.com/github/fetch/issues/504
var clonedRes = typeof res.clone === 'function' ? res.clone() : res;
return handler(clonedRes, options);
});
});
return response.then(function (res) {
// 是否存入缓存池
if (needCache) {
if (res.status === 200) {
var copy = res.clone();
copy.useCache = true;
cache.set({
url: url,
params: params,
method: method
}, copy, ttl);
}
}
ctx.res = res;
return next();
});
}
function parseResponseMiddleware(ctx, next) {
var copy;
return next().then(function () {
if (!ctx) return;
var _ctx$res = ctx.res,
res = _ctx$res === void 0 ? {} : _ctx$res,
_ctx$req = ctx.req,
req = _ctx$req === void 0 ? {} : _ctx$req;
var _ref = req || {},
_ref$options = _ref.options;
_ref$options = _ref$options === void 0 ? {} : _ref$options;
var _ref$options$response = _ref$options.responseType,
responseType = _ref$options$response === void 0 ? 'json' : _ref$options$response,
_ref$options$charset = _ref$options.charset,
charset = _ref$options$charset === void 0 ? 'utf8' : _ref$options$charset,
_ref$options$getRespo = _ref$options.getResponse,
_ref$options$throwErr = _ref$options.throwErrIfParseFail,
throwErrIfParseFail = _ref$options$throwErr === void 0 ? false : _ref$options$throwErr,
_ref$options$parseRes = _ref$options.parseResponse,
parseResponse = _ref$options$parseRes === void 0 ? true : _ref$options$parseRes;
if (!parseResponse) {
return;
}
if (!res || !res.clone) {
return;
} // 只在浏览器环境对 response 做克隆, node 环境如果对 response 克隆会有问题https://github.com/bitinn/node-fetch/issues/553
copy = getEnv() === 'BROWSER' ? res.clone() : res;
copy.useCache = res.useCache || false; // 解析数据
if (charset === 'gbk') {
try {
return res.blob().then(readerGBK).then(function (d) {
return safeJsonParse(d, false, copy, req);
});
} catch (e) {
throw new ResponseError(copy, e.message, null, req, 'ParseError');
}
} else if (responseType === 'json') {
return res.text().then(function (d) {
return safeJsonParse(d, throwErrIfParseFail, copy, req);
});
}
try {
// 其他如text, blob, arrayBuffer, formData
return res[responseType]();
} catch (e) {
throw new ResponseError(copy, 'responseType not support', null, req, 'ParseError');
}
}).then(function (body) {
if (!ctx) return;
var _ctx$res2 = ctx.res,
_ctx$req2 = ctx.req,
req = _ctx$req2 === void 0 ? {} : _ctx$req2;
var _ref2 = req || {},
_ref2$options = _ref2.options;
_ref2$options = _ref2$options === void 0 ? {} : _ref2$options;
var _ref2$options$getResp = _ref2$options.getResponse,
getResponse = _ref2$options$getResp === void 0 ? false : _ref2$options$getResp;
if (!copy) {
return;
}
if (copy.status >= 200 && copy.status < 300) {
// 提供源response, 以便自定义处理
if (getResponse) {
ctx.res = {
data: body,
response: copy
};
return;
}
ctx.res = body;
return;
}
throw new ResponseError(copy, 'http error', body, req, 'HttpError');
}).catch(function (e) {
if (e instanceof RequestError || e instanceof ResponseError) {
throw e;
} // 对未知错误进行处理
var req = ctx.req,
res = ctx.res;
e.request = e.request || req;
e.response = e.response || res;
e.type = e.type || e.name;
e.data = e.data || undefined;
throw e;
});
}
function simplePostMiddleware(ctx, next) {
if (!ctx) return next();
var _ctx$req = ctx.req;
_ctx$req = _ctx$req === void 0 ? {} : _ctx$req;
var _ctx$req$options = _ctx$req.options,
options = _ctx$req$options === void 0 ? {} : _ctx$req$options;
var _options$method = options.method,
method = _options$method === void 0 ? 'get' : _options$method;
if (['post', 'put', 'patch', 'delete'].indexOf(method.toLowerCase()) === -1) {
return next();
}
var _options$requestType = options.requestType,
requestType = _options$requestType === void 0 ? 'json' : _options$requestType,
data = options.data; // 数据使用类axios的新字段data, 避免引用后影响旧代码, 如将body stringify多次
if (data) {
var dataType = Object.prototype.toString.call(data);
if (dataType === '[object Object]' || dataType === '[object Array]') {
if (requestType === 'json') {
options.headers = _objectSpread2({
Accept: 'application/json',
'Content-Type': 'application/json;charset=UTF-8'
}, options.headers);
options.body = JSON.stringify(data);
} else if (requestType === 'form') {
options.headers = _objectSpread2({
Accept: 'application/json',
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'
}, options.headers);
options.body = reqStringify(data);
}
} else {
// 其他 requestType 自定义header
options.headers = _objectSpread2({
Accept: 'application/json'
}, options.headers);
options.body = data;
}
}
ctx.req.options = options;
return next();
}
function paramsSerialize(params, paramsSerializer) {
var serializedParams;
var jsonStringifiedParams; // 支持参数自动拼装,其他 method 也可用,不冲突
if (params) {
if (paramsSerializer) {
serializedParams = paramsSerializer(params);
} else if (isURLSearchParams(params)) {
serializedParams = params.toString();
} else {
if (isArray(params)) {
jsonStringifiedParams = [];
forEach2ObjArr(params, function (item) {
if (item === null || typeof item === 'undefined') {
jsonStringifiedParams.push(item);
} else {
jsonStringifiedParams.push(isObject(item) ? JSON.stringify(item) : item);
}
}); // a: [1,2,3] => a=1&a=2&a=3
serializedParams = reqStringify(jsonStringifiedParams);
} else {
jsonStringifiedParams = {};
forEach2ObjArr(params, function (value, key) {
var jsonStringifiedValue = value;
if (value === null || typeof value === 'undefined') {
jsonStringifiedParams[key] = value;
} else if (isDate(value)) {
jsonStringifiedValue = value.toISOString();
} else if (isArray(value)) {
jsonStringifiedValue = value;
} else if (isObject(value)) {
jsonStringifiedValue = JSON.stringify(value);
}
jsonStringifiedParams[key] = jsonStringifiedValue;
});
var tmp = reqStringify(jsonStringifiedParams);
serializedParams = tmp;
}
}
}
return serializedParams;
} // 对请求参数做处理,实现 query 简化、 post 简化
function simpleGetMiddleware(ctx, next) {
if (!ctx) return next();
var _ctx$req = ctx.req;
_ctx$req = _ctx$req === void 0 ? {} : _ctx$req;
var _ctx$req$options = _ctx$req.options,
options = _ctx$req$options === void 0 ? {} : _ctx$req$options;
var paramsSerializer = options.paramsSerializer,
params = options.params;
var _ctx$req2 = ctx.req;
_ctx$req2 = _ctx$req2 === void 0 ? {} : _ctx$req2;
var _ctx$req2$url = _ctx$req2.url,
url = _ctx$req2$url === void 0 ? '' : _ctx$req2$url; // 将 method 改为大写
options.method = options.method ? options.method.toUpperCase() : 'GET'; // 设置 credentials 默认值为 same-origin确保当开发者没有设置时各浏览器对请求是否发送 cookies 保持一致的行为
// - omit: 从不发送cookies.
// - same-origin: 只有当URL与响应脚本同源才发送 cookies、 HTTP Basic authentication 等验证信息.(浏览器默认值,在旧版本浏览器例如safari 11依旧是omitsafari 12已更改)
// - include: 不论是不是跨域的请求,总是发送请求资源域在本地的 cookies、 HTTP Basic authentication 等验证信息.
options.credentials = options.credentials || 'same-origin'; // 支持类似axios 参数自动拼装, 其他method也可用, 不冲突.
var serializedParams = paramsSerialize(params, paramsSerializer);
ctx.req.originUrl = url;
if (serializedParams) {
var urlSign = url.indexOf('?') !== -1 ? '&' : '?';
ctx.req.url = "".concat(url).concat(urlSign).concat(serializedParams);
}
ctx.req.options = options;
return next();
}
var globalMiddlewares = [simplePostMiddleware, simpleGetMiddleware, parseResponseMiddleware];
var coreMiddlewares = [fetchMiddleware];
Onion.globalMiddlewares = globalMiddlewares;
Onion.defaultGlobalMiddlewaresLength = globalMiddlewares.length;
Onion.coreMiddlewares = coreMiddlewares;
Onion.defaultCoreMiddlewaresLength = coreMiddlewares.length;
var Core = /*#__PURE__*/function () {
function Core(initOptions) {
_classCallCheck(this, Core);
this.onion = new Onion([]);
this.fetchIndex = 0; // 【即将废弃】请求中间件位置
this.mapCache = new MapCache(initOptions);
this.initOptions = initOptions;
this.instanceRequestInterceptors = [];
this.instanceResponseInterceptors = [];
} // 旧版拦截器为共享
_createClass(Core, [{
key: "use",
value: function use(newMiddleware) {
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
global: false,
core: false
};
this.onion.use(newMiddleware, opt);
return this;
}
}, {
key: "extendOptions",
value: function extendOptions(options) {
this.initOptions = mergeRequestOptions(this.initOptions, options);
this.mapCache.extendOptions(options);
} // 执行请求前拦截器
}, {
key: "dealRequestInterceptors",
value: function dealRequestInterceptors(ctx) {
var reducer = function reducer(p1, p2) {
return p1.then(function () {
var ret = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
ctx.req.url = ret.url || ctx.req.url;
ctx.req.options = ret.options || ctx.req.options;
return p2(ctx.req.url, ctx.req.options);
});
};
var allInterceptors = [].concat(_toConsumableArray(Core.requestInterceptors), _toConsumableArray(this.instanceRequestInterceptors));
return allInterceptors.reduce(reducer, Promise.resolve()).then(function () {
var ret = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
ctx.req.url = ret.url || ctx.req.url;
ctx.req.options = ret.options || ctx.req.options;
return Promise.resolve();
});
}
}, {
key: "request",
value: function request(url, options) {
var _this = this;
var onion = this.onion;
var obj = {
req: {
url: url,
options: _objectSpread2(_objectSpread2({}, options), {}, {
url: url
})
},
res: null,
cache: this.mapCache,
responseInterceptors: [].concat(_toConsumableArray(Core.responseInterceptors), _toConsumableArray(this.instanceResponseInterceptors))
};
if (typeof url !== 'string') {
throw new Error('url MUST be a string');
}
return new Promise(function (resolve, reject) {
_this.dealRequestInterceptors(obj).then(function () {
return onion.execute(obj);
}).then(function () {
resolve(obj.res);
}).catch(function (error) {
var errorHandler = obj.req.options.errorHandler;
if (errorHandler) {
try {
var data = errorHandler(error);
resolve(data);
} catch (e) {
reject(e);
}
} else {
reject(error);
}
});
});
}
}], [{
key: "requestUse",
value: // 请求拦截器 默认 { global: true } 兼容旧版本拦截器
function requestUse(handler) {
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
global: true
};
if (typeof handler !== 'function') throw new TypeError('Interceptor must be function!');
if (opt.global) {
Core.requestInterceptors.push(handler);
} else {
this.instanceRequestInterceptors.push(handler);
}
} // 响应拦截器 默认 { global: true } 兼容旧版本拦截器
}, {
key: "responseUse",
value: function responseUse(handler) {
var opt = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
global: true
};
if (typeof handler !== 'function') throw new TypeError('Interceptor must be function!');
if (opt.global) {
Core.responseInterceptors.push(handler);
} else {
this.instanceResponseInterceptors.push(handler);
}
}
}]);
return Core;
}();
Core.requestInterceptors = [addfix];
Core.responseInterceptors = [];
/**
* 当执行 “取消请求” 操作时会抛出 Cancel 对象作为一场
* @class
* @param {string=} message The message.
*/
function Cancel(message) {
this.message = message;
}
Cancel.prototype.toString = function toString() {
return this.message ? "Cancel: ".concat(this.message) : 'Cancel';
};
Cancel.prototype.__CANCEL__ = true;
/**
* 通过 CancelToken 来取消请求操作
*
* @class
* @param {Function} executor The executor function.
*/
function CancelToken(executor) {
if (typeof executor !== 'function') {
throw new TypeError('executor must be a function.');
}
var resolvePromise;
this.promise = new Promise(function promiseExecutor(resolve) {
resolvePromise = resolve;
});
var token = this;
executor(function cancel(message) {
if (token.reason) {
// 取消操作已被调用过
return;
}
token.reason = new Cancel(message);
resolvePromise(token.reason);
});
}
/**
* 如果请求已经取消,抛出 Cancel 异常
*/
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
if (this.reason) {
throw this.reason;
}
};
/**
* 通过 source 来返回 CancelToken 实例和取消 CancelToken 的函数
*/
CancelToken.source = function source() {
var cancel;
var token = new CancelToken(function executor(c) {
cancel = c;
});
return {
token: token,
cancel: cancel
};
};
function isCancel(value) {
return !!(value && value.__CANCEL__);
}
var request = function request() {
var initOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var coreInstance = new Core(initOptions);
var umiInstance = function umiInstance(url) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var mergeOptions = mergeRequestOptions(coreInstance.initOptions, options);
return coreInstance.request(url, mergeOptions);
}; // 中间件
umiInstance.use = coreInstance.use.bind(coreInstance);
umiInstance.fetchIndex = coreInstance.fetchIndex; // 拦截器
umiInstance.interceptors = {
request: {
use: Core.requestUse.bind(coreInstance)
},
response: {
use: Core.responseUse.bind(coreInstance)
}
}; // 请求语法糖: reguest.get request.post ……
var METHODS = ['get', 'post', 'delete', 'put', 'patch', 'head', 'options', 'rpc'];
METHODS.forEach(function (method) {
umiInstance[method] = function (url, options) {
return umiInstance(url, _objectSpread2(_objectSpread2({}, options), {}, {
method: method
}));
};
});
umiInstance.Cancel = Cancel;
umiInstance.CancelToken = CancelToken;
umiInstance.isCancel = isCancel;
umiInstance.extendOptions = coreInstance.extendOptions.bind(coreInstance); // 暴露各个实例的中间件,供开发者自由组合
umiInstance.middlewares = {
instance: coreInstance.onion.middlewares,
defaultInstance: coreInstance.onion.defaultMiddlewares,
global: Onion.globalMiddlewares,
core: Onion.coreMiddlewares
};
return umiInstance;
};
/**
* extend 方法参考了ky, 让用户可以定制配置.
* initOpions 初始化参数
* @param {number} maxCache 最大缓存数
* @param {string} prefix url前缀
* @param {function} errorHandler 统一错误处理方法
* @param {object} headers 统一的headers
*/
var extend = function extend(initOptions) {
return request(initOptions);
};
/**
* 暴露 fetch 中间件,保障依旧可以使用
*/
var fetch$1 = request({
parseResponse: false
});
var request$1 = request({});
/* unused harmony default export */ var _unused_webpack_default_export = (request$1);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ "Q2Ig")))
/***/ }),
/***/ "ZsH6":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.reflect.get-metadata.js ***!
\*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var ordinaryHasOwnMetadata = ReflectMetadataModule.has;
var ordinaryGetOwnMetadata = ReflectMetadataModule.get;
var toMetadataKey = ReflectMetadataModule.toKey;
var ordinaryGetMetadata = function (MetadataKey, O, P) {
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
if (hasOwn) return ordinaryGetOwnMetadata(MetadataKey, O, P);
var parent = getPrototypeOf(O);
return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined;
};
// `Reflect.getMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
getMetadata: function getMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
return ordinaryGetMetadata(metadataKey, anObject(target), targetKey);
}
});
/***/ }),
/***/ "ZvpZ":
/*!************************************************************!*\
!*** ./node_modules/antd/es/locale/default.js + 4 modules ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-pagination/es/locale/en_US.js because of ./node_modules/antd/es/pagination/Pagination.js */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/rc-pagination/es/locale/en_US.js
var en_US = __webpack_require__("H4fg");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// CONCATENATED MODULE: ./node_modules/rc-picker/es/locale/en_US.js
var locale = {
locale: 'en_US',
today: 'Today',
now: 'Now',
backToToday: 'Back to today',
ok: 'Ok',
clear: 'Clear',
month: 'Month',
year: 'Year',
timeSelect: 'select time',
dateSelect: 'select date',
weekSelect: 'Choose a week',
monthSelect: 'Choose a month',
yearSelect: 'Choose a year',
decadeSelect: 'Choose a decade',
yearFormat: 'YYYY',
dateFormat: 'M/D/YYYY',
dayFormat: 'D',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Previous month (PageUp)',
nextMonth: 'Next month (PageDown)',
previousYear: 'Last year (Control + left)',
nextYear: 'Next year (Control + right)',
previousDecade: 'Last decade',
nextDecade: 'Next decade',
previousCentury: 'Last century',
nextCentury: 'Next century'
};
/* harmony default export */ var locale_en_US = (locale);
// CONCATENATED MODULE: ./node_modules/antd/es/time-picker/locale/en_US.js
var en_US_locale = {
placeholder: 'Select time',
rangePlaceholder: ['Start time', 'End time']
};
/* harmony default export */ var time_picker_locale_en_US = (en_US_locale);
// CONCATENATED MODULE: ./node_modules/antd/es/date-picker/locale/en_US.js
// Merge into a locale object
var locale_en_US_locale = {
lang: extends_default()({
placeholder: 'Select date',
yearPlaceholder: 'Select year',
quarterPlaceholder: 'Select quarter',
monthPlaceholder: 'Select month',
weekPlaceholder: 'Select week',
rangePlaceholder: ['Start date', 'End date'],
rangeYearPlaceholder: ['Start year', 'End year'],
rangeMonthPlaceholder: ['Start month', 'End month'],
rangeWeekPlaceholder: ['Start week', 'End week']
}, locale_en_US),
timePickerLocale: extends_default()({}, time_picker_locale_en_US)
}; // All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_en_US = (locale_en_US_locale);
// CONCATENATED MODULE: ./node_modules/antd/es/calendar/locale/en_US.js
/* harmony default export */ var calendar_locale_en_US = (date_picker_locale_en_US);
// CONCATENATED MODULE: ./node_modules/antd/es/locale/default.js
/* eslint-disable no-template-curly-in-string */
var typeTemplate = '${label} is not a valid ${type}';
var localeValues = {
locale: 'en',
Pagination: en_US["a" /* default */],
DatePicker: date_picker_locale_en_US,
TimePicker: time_picker_locale_en_US,
Calendar: calendar_locale_en_US,
global: {
placeholder: 'Please select'
},
Table: {
filterTitle: 'Filter menu',
filterConfirm: 'OK',
filterReset: 'Reset',
filterEmptyText: 'No filters',
emptyText: 'No data',
selectAll: 'Select current page',
selectInvert: 'Invert current page',
selectionAll: 'Select all data',
sortTitle: 'Sort',
expand: 'Expand row',
collapse: 'Collapse row',
triggerDesc: 'Click sort by descend',
triggerAsc: 'Click sort by ascend',
cancelSort: 'Click to cancel sort'
},
Modal: {
okText: 'OK',
cancelText: 'Cancel',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancel'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Search here',
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Remove',
selectCurrent: 'Select current page',
removeCurrent: 'Remove current page',
selectAll: 'Select all data',
removeAll: 'Remove all data',
selectInvert: 'Invert current page'
},
Upload: {
uploading: 'Uploading...',
removeFile: 'Remove file',
uploadError: 'Upload error',
previewFile: 'Preview file',
downloadFile: 'Download file'
},
Empty: {
description: 'No Data'
},
Icon: {
icon: 'icon'
},
Text: {
edit: 'Edit',
copy: 'Copy',
copied: 'Copied',
expand: 'Expand'
},
PageHeader: {
back: 'Back'
},
Form: {
optional: '(optional)',
defaultValidateMessages: {
"default": 'Field validation error ${label}',
required: 'Please enter ${label}',
"enum": '${label} must be one of [${enum}]',
whitespace: '${label} cannot be a blank character',
date: {
format: '${label} date format is invalid',
parse: '${label} cannot be converted to a date',
invalid: '${label} is an invalid date'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
"boolean": typeTemplate,
integer: typeTemplate,
"float": typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} must be ${len} characters',
min: '${label} at least ${min} characters',
max: '${label} up to ${max} characters',
range: '${label} must be between ${min}-${max} characters'
},
number: {
len: '${label} must be equal to ${len}',
min: '${label} minimum value is ${min}',
max: '${label} maximum value is ${max}',
range: '${label} must be between ${min}-${max}'
},
array: {
len: 'Must be ${len} ${label}',
min: 'At least ${min} ${label}',
max: 'At most ${max} ${label}',
range: 'The amount of ${label} must be between ${min}-${max}'
},
pattern: {
mismatch: '${label} does not match the pattern ${pattern}'
}
}
}
};
/* harmony default export */ var locale_default = __webpack_exports__["a"] = (localeValues);
/***/ }),
/***/ "a1gu":
/*!**************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/possibleConstructorReturn.js ***!
\**************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var _typeof = __webpack_require__(/*! ./typeof.js */ "cDf5")["default"];
var assertThisInitialized = __webpack_require__(/*! ./assertThisInitialized.js */ "PJYZ");
function _possibleConstructorReturn(self, call) {
if (call && (_typeof(call) === "object" || typeof call === "function")) {
return call;
} else if (call !== void 0) {
throw new TypeError("Derived constructors may only return object or undefined");
}
return assertThisInitialized(self);
}
module.exports = _possibleConstructorReturn, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "a3WO":
/*!*********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
\*********************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
/***/ }),
/***/ "a5/B":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.umulh.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Math.umulh` method
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
// TODO: Remove from `core-js@4`
$({ target: 'Math', stat: true }, {
umulh: function umulh(u, v) {
var UINT16 = 0xFFFF;
var $u = +u;
var $v = +v;
var u0 = $u & UINT16;
var v0 = $v & UINT16;
var u1 = $u >>> 16;
var v1 = $v >>> 16;
var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16);
}
});
/***/ }),
/***/ "a57n":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.search.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.search` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.search
defineWellKnownSymbol('search');
/***/ }),
/***/ "a5NK":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.log10.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var log = Math.log;
var LOG10E = Math.LOG10E;
// `Math.log10` method
// https://tc39.github.io/ecma262/#sec-math.log10
$({ target: 'Math', stat: true }, {
log10: function log10(x) {
return log(x) * LOG10E;
}
});
/***/ }),
/***/ "aCH8":
/*!*********************************!*\
!*** ./node_modules/md5/md5.js ***!
\*********************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
(function(){
var crypt = __webpack_require__(/*! crypt */ "ANhw"),
utf8 = __webpack_require__(/*! charenc */ "mmNF").utf8,
isBuffer = __webpack_require__(/*! is-buffer */ "BEtg"),
bin = __webpack_require__(/*! charenc */ "mmNF").bin,
// The core
md5 = function (message, options) {
// Convert to byte array
if (message.constructor == String)
if (options && options.encoding === 'binary')
message = bin.stringToBytes(message);
else
message = utf8.stringToBytes(message);
else if (isBuffer(message))
message = Array.prototype.slice.call(message, 0);
else if (!Array.isArray(message) && message.constructor !== Uint8Array)
message = message.toString();
// else, assume byte array already
var m = crypt.bytesToWords(message),
l = message.length * 8,
a = 1732584193,
b = -271733879,
c = -1732584194,
d = 271733878;
// Swap endian
for (var i = 0; i < m.length; i++) {
m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF |
((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00;
}
// Padding
m[l >>> 5] |= 0x80 << (l % 32);
m[(((l + 64) >>> 9) << 4) + 14] = l;
// Method shortcuts
var FF = md5._ff,
GG = md5._gg,
HH = md5._hh,
II = md5._ii;
for (var i = 0; i < m.length; i += 16) {
var aa = a,
bb = b,
cc = c,
dd = d;
a = FF(a, b, c, d, m[i+ 0], 7, -680876936);
d = FF(d, a, b, c, m[i+ 1], 12, -389564586);
c = FF(c, d, a, b, m[i+ 2], 17, 606105819);
b = FF(b, c, d, a, m[i+ 3], 22, -1044525330);
a = FF(a, b, c, d, m[i+ 4], 7, -176418897);
d = FF(d, a, b, c, m[i+ 5], 12, 1200080426);
c = FF(c, d, a, b, m[i+ 6], 17, -1473231341);
b = FF(b, c, d, a, m[i+ 7], 22, -45705983);
a = FF(a, b, c, d, m[i+ 8], 7, 1770035416);
d = FF(d, a, b, c, m[i+ 9], 12, -1958414417);
c = FF(c, d, a, b, m[i+10], 17, -42063);
b = FF(b, c, d, a, m[i+11], 22, -1990404162);
a = FF(a, b, c, d, m[i+12], 7, 1804603682);
d = FF(d, a, b, c, m[i+13], 12, -40341101);
c = FF(c, d, a, b, m[i+14], 17, -1502002290);
b = FF(b, c, d, a, m[i+15], 22, 1236535329);
a = GG(a, b, c, d, m[i+ 1], 5, -165796510);
d = GG(d, a, b, c, m[i+ 6], 9, -1069501632);
c = GG(c, d, a, b, m[i+11], 14, 643717713);
b = GG(b, c, d, a, m[i+ 0], 20, -373897302);
a = GG(a, b, c, d, m[i+ 5], 5, -701558691);
d = GG(d, a, b, c, m[i+10], 9, 38016083);
c = GG(c, d, a, b, m[i+15], 14, -660478335);
b = GG(b, c, d, a, m[i+ 4], 20, -405537848);
a = GG(a, b, c, d, m[i+ 9], 5, 568446438);
d = GG(d, a, b, c, m[i+14], 9, -1019803690);
c = GG(c, d, a, b, m[i+ 3], 14, -187363961);
b = GG(b, c, d, a, m[i+ 8], 20, 1163531501);
a = GG(a, b, c, d, m[i+13], 5, -1444681467);
d = GG(d, a, b, c, m[i+ 2], 9, -51403784);
c = GG(c, d, a, b, m[i+ 7], 14, 1735328473);
b = GG(b, c, d, a, m[i+12], 20, -1926607734);
a = HH(a, b, c, d, m[i+ 5], 4, -378558);
d = HH(d, a, b, c, m[i+ 8], 11, -2022574463);
c = HH(c, d, a, b, m[i+11], 16, 1839030562);
b = HH(b, c, d, a, m[i+14], 23, -35309556);
a = HH(a, b, c, d, m[i+ 1], 4, -1530992060);
d = HH(d, a, b, c, m[i+ 4], 11, 1272893353);
c = HH(c, d, a, b, m[i+ 7], 16, -155497632);
b = HH(b, c, d, a, m[i+10], 23, -1094730640);
a = HH(a, b, c, d, m[i+13], 4, 681279174);
d = HH(d, a, b, c, m[i+ 0], 11, -358537222);
c = HH(c, d, a, b, m[i+ 3], 16, -722521979);
b = HH(b, c, d, a, m[i+ 6], 23, 76029189);
a = HH(a, b, c, d, m[i+ 9], 4, -640364487);
d = HH(d, a, b, c, m[i+12], 11, -421815835);
c = HH(c, d, a, b, m[i+15], 16, 530742520);
b = HH(b, c, d, a, m[i+ 2], 23, -995338651);
a = II(a, b, c, d, m[i+ 0], 6, -198630844);
d = II(d, a, b, c, m[i+ 7], 10, 1126891415);
c = II(c, d, a, b, m[i+14], 15, -1416354905);
b = II(b, c, d, a, m[i+ 5], 21, -57434055);
a = II(a, b, c, d, m[i+12], 6, 1700485571);
d = II(d, a, b, c, m[i+ 3], 10, -1894986606);
c = II(c, d, a, b, m[i+10], 15, -1051523);
b = II(b, c, d, a, m[i+ 1], 21, -2054922799);
a = II(a, b, c, d, m[i+ 8], 6, 1873313359);
d = II(d, a, b, c, m[i+15], 10, -30611744);
c = II(c, d, a, b, m[i+ 6], 15, -1560198380);
b = II(b, c, d, a, m[i+13], 21, 1309151649);
a = II(a, b, c, d, m[i+ 4], 6, -145523070);
d = II(d, a, b, c, m[i+11], 10, -1120210379);
c = II(c, d, a, b, m[i+ 2], 15, 718787259);
b = II(b, c, d, a, m[i+ 9], 21, -343485551);
a = (a + aa) >>> 0;
b = (b + bb) >>> 0;
c = (c + cc) >>> 0;
d = (d + dd) >>> 0;
}
return crypt.endian([a, b, c, d]);
};
// Auxiliary functions
md5._ff = function (a, b, c, d, x, s, t) {
var n = a + (b & c | ~b & d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._gg = function (a, b, c, d, x, s, t) {
var n = a + (b & d | c & ~d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._hh = function (a, b, c, d, x, s, t) {
var n = a + (b ^ c ^ d) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
md5._ii = function (a, b, c, d, x, s, t) {
var n = a + (c ^ (b | ~d)) + (x >>> 0) + t;
return ((n << s) | (n >>> (32 - s))) + b;
};
// Package private blocksize
md5._blocksize = 16;
md5._digestsize = 16;
module.exports = function (message, options) {
if (message === undefined || message === null)
throw new Error('Illegal argument ' + message);
var digestbytes = crypt.wordsToBytes(md5(message, options));
return options && options.asBytes ? digestbytes :
options && options.asString ? bin.bytesToString(digestbytes) :
crypt.bytesToHex(digestbytes);
};
})();
/***/ }),
/***/ "aI7X":
/*!******************************************************!*\
!*** ./node_modules/function-bind/implementation.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* eslint no-invalid-this: 1 */
var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
var toStr = Object.prototype.toString;
var max = Math.max;
var funcType = '[object Function]';
var concatty = function concatty(a, b) {
var arr = [];
for (var i = 0; i < a.length; i += 1) {
arr[i] = a[i];
}
for (var j = 0; j < b.length; j += 1) {
arr[j + a.length] = b[j];
}
return arr;
};
var slicy = function slicy(arrLike, offset) {
var arr = [];
for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
arr[j] = arrLike[i];
}
return arr;
};
var joiny = function (arr, joiner) {
var str = '';
for (var i = 0; i < arr.length; i += 1) {
str += arr[i];
if (i + 1 < arr.length) {
str += joiner;
}
}
return str;
};
module.exports = function bind(that) {
var target = this;
if (typeof target !== 'function' || toStr.apply(target) !== funcType) {
throw new TypeError(ERROR_MESSAGE + target);
}
var args = slicy(arguments, 1);
var bound;
var binder = function () {
if (this instanceof bound) {
var result = target.apply(
this,
concatty(args, arguments)
);
if (Object(result) === result) {
return result;
}
return this;
}
return target.apply(
that,
concatty(args, arguments)
);
};
var boundLength = max(0, target.length - args.length);
var boundArgs = [];
for (var i = 0; i < boundLength; i++) {
boundArgs[i] = '$' + i;
}
bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);
if (target.prototype) {
var Empty = function Empty() {};
Empty.prototype = target.prototype;
bound.prototype = new Empty();
Empty.prototype = null;
}
return bound;
};
/***/ }),
/***/ "aZPP":
/*!***********************************!*\
!*** ./src/models/shixuns/new.ts ***!
\***********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_shixuns__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/shixuns */ "HBuW");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var NewShixunsModel = {
namespace: 'newShixuns',
state: {
newData: {},
actionTabs: {
key: '',
params: {}
},
environmentData: {}
},
effects: {
getNewShixunsData: function getNewShixunsData(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_shixuns__WEBPACK_IMPORTED_MODULE_1__[/* getNewShixunsData */ "H"], payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
newData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
deleteAttachment: function deleteAttachment(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_shixuns__WEBPACK_IMPORTED_MODULE_1__[/* deleteAttachment */ "m"], payload);
case 2:
return _context2.abrupt("return", _context2.sent);
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
applyShixunMirror: function applyShixunMirror(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_shixuns__WEBPACK_IMPORTED_MODULE_1__[/* applyShixunMirror */ "e"], payload);
case 2:
return _context3.abrupt("return", _context3.sent);
case 3:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
submitShixuns: function submitShixuns(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_shixuns__WEBPACK_IMPORTED_MODULE_1__[/* submitShixuns */ "bb"], payload);
case 2:
return _context4.abrupt("return", _context4.sent);
case 3:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
getShixunsJupyterLab: function getShixunsJupyterLab(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var response;
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_shixuns__WEBPACK_IMPORTED_MODULE_1__[/* getShixunsJupyterLab */ "S"], payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return put({
type: 'save',
payload: {
newData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context5.abrupt("return", response);
case 6:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
setActionTabs: function setActionTabs(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
getEnvironmentData: function getEnvironmentData(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var response;
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(_service_shixuns__WEBPACK_IMPORTED_MODULE_1__[/* getEnvironmentData */ "C"], payload);
case 2:
response = _context7.sent;
// 获取data
console.log(response, 'response');
_context7.next = 6;
return put({
type: 'save',
payload: {
environmentData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response.data)
}
});
case 6:
case "end":
return _context7.stop();
}
}, _callee7);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref15) {
var dispatch = _ref15.dispatch,
history = _ref15.history;
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (NewShixunsModel);
/***/ }),
/***/ "afO8":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/internal-state.js ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "f5p1");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var objectHas = __webpack_require__(/*! ../internals/has */ "UTVS");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "93I0");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "0BK2");
var WeakMap = global.WeakMap;
var set, get, has;
var enforce = function (it) {
return has(it) ? get(it) : set(it, {});
};
var getterFor = function (TYPE) {
return function (it) {
var state;
if (!isObject(it) || (state = get(it)).type !== TYPE) {
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
} return state;
};
};
if (NATIVE_WEAK_MAP) {
var store = new WeakMap();
var wmget = store.get;
var wmhas = store.has;
var wmset = store.set;
set = function (it, metadata) {
wmset.call(store, it, metadata);
return metadata;
};
get = function (it) {
return wmget.call(store, it) || {};
};
has = function (it) {
return wmhas.call(store, it);
};
} else {
var STATE = sharedKey('state');
hiddenKeys[STATE] = true;
set = function (it, metadata) {
createNonEnumerableProperty(it, STATE, metadata);
return metadata;
};
get = function (it) {
return objectHas(it, STATE) ? it[STATE] : {};
};
has = function (it) {
return objectHas(it, STATE);
};
}
module.exports = {
set: set,
get: get,
has: has,
enforce: enforce,
getterFor: getterFor
};
/***/ }),
/***/ "amTc":
/*!*****************************************!*\
!*** ./src/models/engineering/index.ts ***!
\*****************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var EngineeringModal = {
namespace: 'engineering',
state: {
showMenu: true,
actionTabs: {
key: '',
params: {}
}
},
effects: {
setActionTabs: function setActionTabs(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context.stop();
}
}, _callee);
})();
},
setShowMenu: function setShowMenu(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return put({
type: "save",
payload: {
showMenu: payload
}
});
case 2:
case "end":
return _context2.stop();
}
}, _callee2);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref5) {
var dispatch = _ref5.dispatch,
history = _ref5.history;
return history.listen(function (_ref6) {
var pathname = _ref6.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (EngineeringModal);
/***/ }),
/***/ "apDx":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.symbol.dispose.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.dispose` well-known symbol
// https://github.com/tc39/proposal-using-statement
defineWellKnownSymbol('dispose');
/***/ }),
/***/ "asDA":
/*!*********************************************!*\
!*** ./node_modules/lodash/_arrayReduce.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/**
* A specialized version of `_.reduce` for arrays without support for
* iteratee shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @param {*} [accumulator] The initial value.
* @param {boolean} [initAccum] Specify using the first element of `array` as
* the initial value.
* @returns {*} Returns the accumulated value.
*/
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1,
length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
module.exports = arrayReduce;
/***/ }),
/***/ "auQ1":
/*!***********************************************************************************!*\
!*** ./node_modules/@umijs/renderer-react/node_modules/use-subscription/index.js ***!
\***********************************************************************************/
/*! no static exports found */
/*! exports used: useSubscription */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(/*! ./cjs/use-subscription.production.min.js */ "L8im");
} else {}
/***/ }),
/***/ "aztm":
/*!********************************************************************************************************!*\
!*** ./node_modules/@umijs/renderer-react/node_modules/react-router-config/esm/react-router-config.js ***!
\********************************************************************************************************/
/*! exports provided: matchRoutes, renderRoutes */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is referenced from these modules with unsupported syntax: ./node_modules/@umijs/renderer-react/dist/index.js (referenced with cjs require) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchRoutes", function() { return matchRoutes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "renderRoutes", function() { return renderRoutes; });
/* harmony import */ var react_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-router */ "Ty5D");
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "wx14");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
function matchRoutes(routes, pathname,
/*not public API*/
branch) {
if (branch === void 0) {
branch = [];
}
routes.some(function (route) {
var match = route.path ? Object(react_router__WEBPACK_IMPORTED_MODULE_0__[/* matchPath */ "i"])(pathname, route) : branch.length ? branch[branch.length - 1].match // use parent match
: react_router__WEBPACK_IMPORTED_MODULE_0__[/* Router */ "e"].computeRootMatch(pathname); // use default "root" match
if (match) {
branch.push({
route: route,
match: match
});
if (route.routes) {
matchRoutes(route.routes, pathname, branch);
}
}
return match;
});
return branch;
}
function renderRoutes(routes, extraProps, switchProps) {
if (extraProps === void 0) {
extraProps = {};
}
if (switchProps === void 0) {
switchProps = {};
}
return routes ? react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Switch */ "g"], switchProps, routes.map(function (route, i) {
return react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(react_router__WEBPACK_IMPORTED_MODULE_0__[/* Route */ "d"], {
key: route.key || i,
path: route.path,
exact: route.exact,
strict: route.strict,
render: function render(props) {
return route.render ? route.render(Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, props, {}, extraProps, {
route: route
})) : react__WEBPACK_IMPORTED_MODULE_2___default.a.createElement(route.component, Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, props, extraProps, {
route: route
}));
}
});
})) : null;
}
//# sourceMappingURL=react-router-config.js.map
/***/ }),
/***/ "b/UD":
/*!*****************************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/ExclamationCircleFilled.js ***!
\*****************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _ExclamationCircleFilled = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/ExclamationCircleFilled */ "R80K"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ExclamationCircleFilled = function ExclamationCircleFilled(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _ExclamationCircleFilled.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(ExclamationCircleFilled);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "b1O7":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/object-to-array.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "33Wh");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var propertyIsEnumerable = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "0eef").f;
// `Object.{ entries, values }` methods implementation
var createMethod = function (TO_ENTRIES) {
return function (it) {
var O = toIndexedObject(it);
var keys = objectKeys(O);
var length = keys.length;
var i = 0;
var result = [];
var key;
while (length > i) {
key = keys[i++];
if (!DESCRIPTORS || propertyIsEnumerable.call(O, key)) {
result.push(TO_ENTRIES ? [key, O[key]] : O[key]);
}
}
return result;
};
};
module.exports = {
// `Object.entries` method
// https://tc39.github.io/ecma262/#sec-object.entries
entries: createMethod(true),
// `Object.values` method
// https://tc39.github.io/ecma262/#sec-object.values
values: createMethod(false)
};
/***/ }),
/***/ "b48C":
/*!*************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/isNativeReflectConstruct.js ***!
\*************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _isNativeReflectConstruct() {
try {
var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
} catch (t) {}
return (module.exports = _isNativeReflectConstruct = function _isNativeReflectConstruct() {
return !!t;
}, module.exports.__esModule = true, module.exports["default"] = module.exports)();
}
module.exports = _isNativeReflectConstruct, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "b6mv":
/*!********************************!*\
!*** ./src/models/homePage.ts ***!
\********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_home__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/home */ "6CvP");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var IndexModel = {
namespace: 'homePage',
state: {
name: '首页',
loading: true
},
effects: {
home: function home(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_home__WEBPACK_IMPORTED_MODULE_1__[/* HomeIndex */ "a"], {
payload: payload
});
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
});
case 5:
case "end":
return _context.stop();
}
}, _callee);
})();
},
query: function query(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return put({
type: 'save',
payload: {
name: 'linlu'
}
});
case 2:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getHomeNotice: function getHomeNotice(_ref5, _ref6) {
var payload = _ref5.payload,
callback = _ref5.callback;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_home__WEBPACK_IMPORTED_MODULE_1__[/* getHomeNotice */ "d"], payload);
case 2:
response = _context3.sent;
return _context3.abrupt("return", response);
case 4:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
UploadNotice: function UploadNotice(_ref7, _ref8) {
var payload = _ref7.payload,
callback = _ref7.callback;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var response;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_home__WEBPACK_IMPORTED_MODULE_1__[/* UploadNotice */ "b"], payload);
case 2:
response = _context4.sent;
return _context4.abrupt("return", response);
case 4:
case "end":
return _context4.stop();
}
}, _callee4);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
} // 启用 immer 之后
// save(state, action) {
// state.name = action.payload;
// },
},
subscriptions: {
setup: function setup(_ref9) {
var dispatch = _ref9.dispatch,
history = _ref9.history;
return history.listen(function (_ref10) {
var pathname = _ref10.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (IndexModel);
/***/ }),
/***/ "bCY9":
/*!********************************************!*\
!*** ./src/.umi-production/core/plugin.ts ***!
\********************************************/
/*! exports provided: plugin */
/*! exports used: plugin */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return plugin; });
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_preset_built_in_node_modules_umijs_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/preset-built-in/node_modules/@umijs/runtime */ "HyNC");
// @ts-nocheck
var plugin = new D_projects_competitions_forgeplus_react_node_modules_umijs_preset_built_in_node_modules_umijs_runtime__WEBPACK_IMPORTED_MODULE_0__[/* Plugin */ "b"]({
validKeys: ['modifyClientRenderOpts', 'patchRoutes', 'rootContainer', 'render', 'onRouteChange', 'dva', 'getInitialState', 'locale', 'locale', 'request']
});
/***/ }),
/***/ "bFeb":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.global-this.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
// `globalThis` object
// https://github.com/tc39/proposal-global
$({ global: true }, {
globalThis: global
});
/***/ }),
/***/ "bG1m":
/*!**********************************************!*\
!*** ./node_modules/rc-util/es/utils/set.js ***!
\**********************************************/
/*! exports provided: default, merge */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return set; });
/* unused harmony export merge */
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "U8pU");
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ");
/* harmony import */ var _babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toConsumableArray */ "KQm4");
/* harmony import */ var _babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/toArray */ "T5bk");
/* harmony import */ var _get__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./get */ "ub+h");
function internalSet(entity, paths, value, removeIfUndefined) {
if (!paths.length) {
return value;
}
var _paths = Object(_babel_runtime_helpers_esm_toArray__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(paths),
path = _paths[0],
restPath = _paths.slice(1);
var clone;
if (!entity && typeof path === 'number') {
clone = [];
} else if (Array.isArray(entity)) {
clone = Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(entity);
} else {
clone = Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, entity);
}
// Delete prop if `removeIfUndefined` and value is undefined
if (removeIfUndefined && value === undefined && restPath.length === 1) {
delete clone[path][restPath[0]];
} else {
clone[path] = internalSet(clone[path], restPath, value, removeIfUndefined);
}
return clone;
}
function set(entity, paths, value) {
var removeIfUndefined = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
// Do nothing if `removeIfUndefined` and parent object not exist
if (paths.length && removeIfUndefined && value === undefined && !Object(_get__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(entity, paths.slice(0, -1))) {
return entity;
}
return internalSet(entity, paths, value, removeIfUndefined);
}
function isObject(obj) {
return Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(obj) === 'object' && obj !== null && Object.getPrototypeOf(obj) === Object.prototype;
}
function createEmpty(source) {
return Array.isArray(source) ? [] : {};
}
var keys = typeof Reflect === 'undefined' ? Object.keys : Reflect.ownKeys;
/**
* Merge objects which will create
*/
function merge() {
for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) {
sources[_key] = arguments[_key];
}
var clone = createEmpty(sources[0]);
sources.forEach(function (src) {
function internalMerge(path, parentLoopSet) {
var loopSet = new Set(parentLoopSet);
var value = Object(_get__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(src, path);
var isArr = Array.isArray(value);
if (isArr || isObject(value)) {
// Only add not loop obj
if (!loopSet.has(value)) {
loopSet.add(value);
var originValue = Object(_get__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(clone, path);
if (isArr) {
// Array will always be override
clone = set(clone, path, []);
} else if (!originValue || Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(originValue) !== 'object') {
// Init container if not exist
clone = set(clone, path, createEmpty(value));
}
keys(value).forEach(function (key) {
internalMerge([].concat(Object(_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(path), [key]), loopSet);
});
}
} else {
clone = set(clone, path, value);
}
}
internalMerge([]);
});
return clone;
}
/***/ }),
/***/ "bKFb":
/*!**************************************************!*\
!*** ./node_modules/rc-util/lib/Dom/contains.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = contains;
function contains(root, n) {
if (!root) {
return false;
}
// Use native if support
if (root.contains) {
return root.contains(n);
}
// `document.contains` not support with IE11
var node = n;
while (node) {
if (node === root) {
return true;
}
node = node.parentNode;
}
return false;
}
/***/ }),
/***/ "bQgK":
/*!*************************************************************!*\
!*** ./node_modules/performance-now/lib/performance-now.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(process) {// Generated by CoffeeScript 1.12.2
(function() {
var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;
if ((typeof performance !== "undefined" && performance !== null) && performance.now) {
module.exports = function() {
return performance.now();
};
} else if ((typeof process !== "undefined" && process !== null) && process.hrtime) {
module.exports = function() {
return (getNanoSeconds() - nodeLoadTime) / 1e6;
};
hrtime = process.hrtime;
getNanoSeconds = function() {
var hr;
hr = hrtime();
return hr[0] * 1e9 + hr[1];
};
moduleLoadTime = getNanoSeconds();
upTime = process.uptime() * 1e9;
nodeLoadTime = moduleLoadTime - upTime;
} else if (Date.now) {
module.exports = function() {
return Date.now() - loadTime;
};
loadTime = Date.now();
} else {
module.exports = function() {
return new Date().getTime() - loadTime;
};
loadTime = new Date().getTime();
}
}).call(this);
//# sourceMappingURL=performance-now.js.map
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../node-libs-browser/mock/process.js */ "Q2Ig")))
/***/ }),
/***/ "bWFh":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/collection.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var isForced = __webpack_require__(/*! ../internals/is-forced */ "lMq5");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "8YOa");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "HH4o");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "cVYH");
module.exports = function (CONSTRUCTOR_NAME, wrapper, common) {
var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
var ADDER = IS_MAP ? 'set' : 'add';
var NativeConstructor = global[CONSTRUCTOR_NAME];
var NativePrototype = NativeConstructor && NativeConstructor.prototype;
var Constructor = NativeConstructor;
var exported = {};
var fixMethod = function (KEY) {
var nativeMethod = NativePrototype[KEY];
redefine(NativePrototype, KEY,
KEY == 'add' ? function add(value) {
nativeMethod.call(this, value === 0 ? 0 : value);
return this;
} : KEY == 'delete' ? function (key) {
return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
} : KEY == 'get' ? function get(key) {
return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);
} : KEY == 'has' ? function has(key) {
return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);
} : function set(key, value) {
nativeMethod.call(this, key === 0 ? 0 : key, value);
return this;
}
);
};
// eslint-disable-next-line max-len
if (isForced(CONSTRUCTOR_NAME, typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {
new NativeConstructor().entries().next();
})))) {
// create collection constructor
Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);
InternalMetadataModule.REQUIRED = true;
} else if (isForced(CONSTRUCTOR_NAME, true)) {
var instance = new Constructor();
// early implementations not supports chaining
var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
// V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });
// most early implementations doesn't supports iterables, most modern - not close it correctly
// eslint-disable-next-line no-new
var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });
// for early implementations -0 and +0 not the same
var BUGGY_ZERO = !IS_WEAK && fails(function () {
// V8 ~ Chromium 42- fails only with 5+ elements
var $instance = new NativeConstructor();
var index = 5;
while (index--) $instance[ADDER](index, index);
return !$instance.has(-0);
});
if (!ACCEPT_ITERABLES) {
Constructor = wrapper(function (dummy, iterable) {
anInstance(dummy, Constructor, CONSTRUCTOR_NAME);
var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);
if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);
return that;
});
Constructor.prototype = NativePrototype;
NativePrototype.constructor = Constructor;
}
if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {
fixMethod('delete');
fixMethod('has');
IS_MAP && fixMethod('get');
}
if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);
// weak collections should not contains .clear method
if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;
}
exported[CONSTRUCTOR_NAME] = Constructor;
$({ global: true, forced: Constructor != NativeConstructor }, exported);
setToStringTag(Constructor, CONSTRUCTOR_NAME);
if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);
return Constructor;
};
/***/ }),
/***/ "bXwC":
/*!*******************************************************!*\
!*** ./node_modules/antd/es/message/style/index.less ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "bZMm":
/*!********************************************!*\
!*** ./node_modules/whatwg-fetch/fetch.js ***!
\********************************************/
/*! exports provided: Headers, Request, Response, DOMException, fetch */
/*! all exports used */
/*! ModuleConcatenation bailout: Module uses injected variables (global) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Headers", function() { return Headers; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Request", function() { return Request; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Response", function() { return Response; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DOMException", function() { return DOMException; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetch", function() { return fetch; });
/* eslint-disable no-prototype-builtins */
var g =
(typeof globalThis !== 'undefined' && globalThis) ||
(typeof self !== 'undefined' && self) ||
// eslint-disable-next-line no-undef
(typeof global !== 'undefined' && global) ||
{}
var support = {
searchParams: 'URLSearchParams' in g,
iterable: 'Symbol' in g && 'iterator' in Symbol,
blob:
'FileReader' in g &&
'Blob' in g &&
(function() {
try {
new Blob()
return true
} catch (e) {
return false
}
})(),
formData: 'FormData' in g,
arrayBuffer: 'ArrayBuffer' in g
}
function isDataView(obj) {
return obj && DataView.prototype.isPrototypeOf(obj)
}
if (support.arrayBuffer) {
var viewClasses = [
'[object Int8Array]',
'[object Uint8Array]',
'[object Uint8ClampedArray]',
'[object Int16Array]',
'[object Uint16Array]',
'[object Int32Array]',
'[object Uint32Array]',
'[object Float32Array]',
'[object Float64Array]'
]
var isArrayBufferView =
ArrayBuffer.isView ||
function(obj) {
return obj && viewClasses.indexOf(Object.prototype.toString.call(obj)) > -1
}
}
function normalizeName(name) {
if (typeof name !== 'string') {
name = String(name)
}
if (/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(name) || name === '') {
throw new TypeError('Invalid character in header field name: "' + name + '"')
}
return name.toLowerCase()
}
function normalizeValue(value) {
if (typeof value !== 'string') {
value = String(value)
}
return value
}
// Build a destructive iterator for the value list
function iteratorFor(items) {
var iterator = {
next: function() {
var value = items.shift()
return {done: value === undefined, value: value}
}
}
if (support.iterable) {
iterator[Symbol.iterator] = function() {
return iterator
}
}
return iterator
}
function Headers(headers) {
this.map = {}
if (headers instanceof Headers) {
headers.forEach(function(value, name) {
this.append(name, value)
}, this)
} else if (Array.isArray(headers)) {
headers.forEach(function(header) {
if (header.length != 2) {
throw new TypeError('Headers constructor: expected name/value pair to be length 2, found' + header.length)
}
this.append(header[0], header[1])
}, this)
} else if (headers) {
Object.getOwnPropertyNames(headers).forEach(function(name) {
this.append(name, headers[name])
}, this)
}
}
Headers.prototype.append = function(name, value) {
name = normalizeName(name)
value = normalizeValue(value)
var oldValue = this.map[name]
this.map[name] = oldValue ? oldValue + ', ' + value : value
}
Headers.prototype['delete'] = function(name) {
delete this.map[normalizeName(name)]
}
Headers.prototype.get = function(name) {
name = normalizeName(name)
return this.has(name) ? this.map[name] : null
}
Headers.prototype.has = function(name) {
return this.map.hasOwnProperty(normalizeName(name))
}
Headers.prototype.set = function(name, value) {
this.map[normalizeName(name)] = normalizeValue(value)
}
Headers.prototype.forEach = function(callback, thisArg) {
for (var name in this.map) {
if (this.map.hasOwnProperty(name)) {
callback.call(thisArg, this.map[name], name, this)
}
}
}
Headers.prototype.keys = function() {
var items = []
this.forEach(function(value, name) {
items.push(name)
})
return iteratorFor(items)
}
Headers.prototype.values = function() {
var items = []
this.forEach(function(value) {
items.push(value)
})
return iteratorFor(items)
}
Headers.prototype.entries = function() {
var items = []
this.forEach(function(value, name) {
items.push([name, value])
})
return iteratorFor(items)
}
if (support.iterable) {
Headers.prototype[Symbol.iterator] = Headers.prototype.entries
}
function consumed(body) {
if (body._noBody) return
if (body.bodyUsed) {
return Promise.reject(new TypeError('Already read'))
}
body.bodyUsed = true
}
function fileReaderReady(reader) {
return new Promise(function(resolve, reject) {
reader.onload = function() {
resolve(reader.result)
}
reader.onerror = function() {
reject(reader.error)
}
})
}
function readBlobAsArrayBuffer(blob) {
var reader = new FileReader()
var promise = fileReaderReady(reader)
reader.readAsArrayBuffer(blob)
return promise
}
function readBlobAsText(blob) {
var reader = new FileReader()
var promise = fileReaderReady(reader)
var match = /charset=([A-Za-z0-9_-]+)/.exec(blob.type)
var encoding = match ? match[1] : 'utf-8'
reader.readAsText(blob, encoding)
return promise
}
function readArrayBufferAsText(buf) {
var view = new Uint8Array(buf)
var chars = new Array(view.length)
for (var i = 0; i < view.length; i++) {
chars[i] = String.fromCharCode(view[i])
}
return chars.join('')
}
function bufferClone(buf) {
if (buf.slice) {
return buf.slice(0)
} else {
var view = new Uint8Array(buf.byteLength)
view.set(new Uint8Array(buf))
return view.buffer
}
}
function Body() {
this.bodyUsed = false
this._initBody = function(body) {
/*
fetch-mock wraps the Response object in an ES6 Proxy to
provide useful test harness features such as flush. However, on
ES5 browsers without fetch or Proxy support pollyfills must be used;
the proxy-pollyfill is unable to proxy an attribute unless it exists
on the object before the Proxy is created. This change ensures
Response.bodyUsed exists on the instance, while maintaining the
semantic of setting Request.bodyUsed in the constructor before
_initBody is called.
*/
// eslint-disable-next-line no-self-assign
this.bodyUsed = this.bodyUsed
this._bodyInit = body
if (!body) {
this._noBody = true;
this._bodyText = ''
} else if (typeof body === 'string') {
this._bodyText = body
} else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
this._bodyBlob = body
} else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
this._bodyFormData = body
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this._bodyText = body.toString()
} else if (support.arrayBuffer && support.blob && isDataView(body)) {
this._bodyArrayBuffer = bufferClone(body.buffer)
// IE 10-11 can't handle a DataView body.
this._bodyInit = new Blob([this._bodyArrayBuffer])
} else if (support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body))) {
this._bodyArrayBuffer = bufferClone(body)
} else {
this._bodyText = body = Object.prototype.toString.call(body)
}
if (!this.headers.get('content-type')) {
if (typeof body === 'string') {
this.headers.set('content-type', 'text/plain;charset=UTF-8')
} else if (this._bodyBlob && this._bodyBlob.type) {
this.headers.set('content-type', this._bodyBlob.type)
} else if (support.searchParams && URLSearchParams.prototype.isPrototypeOf(body)) {
this.headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8')
}
}
}
if (support.blob) {
this.blob = function() {
var rejected = consumed(this)
if (rejected) {
return rejected
}
if (this._bodyBlob) {
return Promise.resolve(this._bodyBlob)
} else if (this._bodyArrayBuffer) {
return Promise.resolve(new Blob([this._bodyArrayBuffer]))
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as blob')
} else {
return Promise.resolve(new Blob([this._bodyText]))
}
}
}
this.arrayBuffer = function() {
if (this._bodyArrayBuffer) {
var isConsumed = consumed(this)
if (isConsumed) {
return isConsumed
} else if (ArrayBuffer.isView(this._bodyArrayBuffer)) {
return Promise.resolve(
this._bodyArrayBuffer.buffer.slice(
this._bodyArrayBuffer.byteOffset,
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength
)
)
} else {
return Promise.resolve(this._bodyArrayBuffer)
}
} else if (support.blob) {
return this.blob().then(readBlobAsArrayBuffer)
} else {
throw new Error('could not read as ArrayBuffer')
}
}
this.text = function() {
var rejected = consumed(this)
if (rejected) {
return rejected
}
if (this._bodyBlob) {
return readBlobAsText(this._bodyBlob)
} else if (this._bodyArrayBuffer) {
return Promise.resolve(readArrayBufferAsText(this._bodyArrayBuffer))
} else if (this._bodyFormData) {
throw new Error('could not read FormData body as text')
} else {
return Promise.resolve(this._bodyText)
}
}
if (support.formData) {
this.formData = function() {
return this.text().then(decode)
}
}
this.json = function() {
return this.text().then(JSON.parse)
}
return this
}
// HTTP methods whose capitalization should be normalized
var methods = ['CONNECT', 'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PATCH', 'POST', 'PUT', 'TRACE']
function normalizeMethod(method) {
var upcased = method.toUpperCase()
return methods.indexOf(upcased) > -1 ? upcased : method
}
function Request(input, options) {
if (!(this instanceof Request)) {
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
}
options = options || {}
var body = options.body
if (input instanceof Request) {
if (input.bodyUsed) {
throw new TypeError('Already read')
}
this.url = input.url
this.credentials = input.credentials
if (!options.headers) {
this.headers = new Headers(input.headers)
}
this.method = input.method
this.mode = input.mode
this.signal = input.signal
if (!body && input._bodyInit != null) {
body = input._bodyInit
input.bodyUsed = true
}
} else {
this.url = String(input)
}
this.credentials = options.credentials || this.credentials || 'same-origin'
if (options.headers || !this.headers) {
this.headers = new Headers(options.headers)
}
this.method = normalizeMethod(options.method || this.method || 'GET')
this.mode = options.mode || this.mode || null
this.signal = options.signal || this.signal || (function () {
if ('AbortController' in g) {
var ctrl = new AbortController();
return ctrl.signal;
}
}());
this.referrer = null
if ((this.method === 'GET' || this.method === 'HEAD') && body) {
throw new TypeError('Body not allowed for GET or HEAD requests')
}
this._initBody(body)
if (this.method === 'GET' || this.method === 'HEAD') {
if (options.cache === 'no-store' || options.cache === 'no-cache') {
// Search for a '_' parameter in the query string
var reParamSearch = /([?&])_=[^&]*/
if (reParamSearch.test(this.url)) {
// If it already exists then set the value with the current time
this.url = this.url.replace(reParamSearch, '$1_=' + new Date().getTime())
} else {
// Otherwise add a new '_' parameter to the end with the current time
var reQueryString = /\?/
this.url += (reQueryString.test(this.url) ? '&' : '?') + '_=' + new Date().getTime()
}
}
}
}
Request.prototype.clone = function() {
return new Request(this, {body: this._bodyInit})
}
function decode(body) {
var form = new FormData()
body
.trim()
.split('&')
.forEach(function(bytes) {
if (bytes) {
var split = bytes.split('=')
var name = split.shift().replace(/\+/g, ' ')
var value = split.join('=').replace(/\+/g, ' ')
form.append(decodeURIComponent(name), decodeURIComponent(value))
}
})
return form
}
function parseHeaders(rawHeaders) {
var headers = new Headers()
// Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space
// https://tools.ietf.org/html/rfc7230#section-3.2
var preProcessedHeaders = rawHeaders.replace(/\r?\n[\t ]+/g, ' ')
// Avoiding split via regex to work around a common IE11 bug with the core-js 3.6.0 regex polyfill
// https://github.com/github/fetch/issues/748
// https://github.com/zloirock/core-js/issues/751
preProcessedHeaders
.split('\r')
.map(function(header) {
return header.indexOf('\n') === 0 ? header.substr(1, header.length) : header
})
.forEach(function(line) {
var parts = line.split(':')
var key = parts.shift().trim()
if (key) {
var value = parts.join(':').trim()
try {
headers.append(key, value)
} catch (error) {
console.warn('Response ' + error.message)
}
}
})
return headers
}
Body.call(Request.prototype)
function Response(bodyInit, options) {
if (!(this instanceof Response)) {
throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.')
}
if (!options) {
options = {}
}
this.type = 'default'
this.status = options.status === undefined ? 200 : options.status
if (this.status < 200 || this.status > 599) {
throw new RangeError("Failed to construct 'Response': The status provided (0) is outside the range [200, 599].")
}
this.ok = this.status >= 200 && this.status < 300
this.statusText = options.statusText === undefined ? '' : '' + options.statusText
this.headers = new Headers(options.headers)
this.url = options.url || ''
this._initBody(bodyInit)
}
Body.call(Response.prototype)
Response.prototype.clone = function() {
return new Response(this._bodyInit, {
status: this.status,
statusText: this.statusText,
headers: new Headers(this.headers),
url: this.url
})
}
Response.error = function() {
var response = new Response(null, {status: 200, statusText: ''})
response.ok = false
response.status = 0
response.type = 'error'
return response
}
var redirectStatuses = [301, 302, 303, 307, 308]
Response.redirect = function(url, status) {
if (redirectStatuses.indexOf(status) === -1) {
throw new RangeError('Invalid status code')
}
return new Response(null, {status: status, headers: {location: url}})
}
var DOMException = g.DOMException
try {
new DOMException()
} catch (err) {
DOMException = function(message, name) {
this.message = message
this.name = name
var error = Error(message)
this.stack = error.stack
}
DOMException.prototype = Object.create(Error.prototype)
DOMException.prototype.constructor = DOMException
}
function fetch(input, init) {
return new Promise(function(resolve, reject) {
var request = new Request(input, init)
if (request.signal && request.signal.aborted) {
return reject(new DOMException('Aborted', 'AbortError'))
}
var xhr = new XMLHttpRequest()
function abortXhr() {
xhr.abort()
}
xhr.onload = function() {
var options = {
statusText: xhr.statusText,
headers: parseHeaders(xhr.getAllResponseHeaders() || '')
}
// This check if specifically for when a user fetches a file locally from the file system
// Only if the status is out of a normal range
if (request.url.indexOf('file://') === 0 && (xhr.status < 200 || xhr.status > 599)) {
options.status = 200;
} else {
options.status = xhr.status;
}
options.url = 'responseURL' in xhr ? xhr.responseURL : options.headers.get('X-Request-URL')
var body = 'response' in xhr ? xhr.response : xhr.responseText
setTimeout(function() {
resolve(new Response(body, options))
}, 0)
}
xhr.onerror = function() {
setTimeout(function() {
reject(new TypeError('Network request failed'))
}, 0)
}
xhr.ontimeout = function() {
setTimeout(function() {
reject(new TypeError('Network request timed out'))
}, 0)
}
xhr.onabort = function() {
setTimeout(function() {
reject(new DOMException('Aborted', 'AbortError'))
}, 0)
}
function fixUrl(url) {
try {
return url === '' && g.location.href ? g.location.href : url
} catch (e) {
return url
}
}
xhr.open(request.method, fixUrl(request.url), true)
if (request.credentials === 'include') {
xhr.withCredentials = true
} else if (request.credentials === 'omit') {
xhr.withCredentials = false
}
if ('responseType' in xhr) {
if (support.blob) {
xhr.responseType = 'blob'
} else if (
support.arrayBuffer
) {
xhr.responseType = 'arraybuffer'
}
}
if (init && typeof init.headers === 'object' && !(init.headers instanceof Headers || (g.Headers && init.headers instanceof g.Headers))) {
var names = [];
Object.getOwnPropertyNames(init.headers).forEach(function(name) {
names.push(normalizeName(name))
xhr.setRequestHeader(name, normalizeValue(init.headers[name]))
})
request.headers.forEach(function(value, name) {
if (names.indexOf(name) === -1) {
xhr.setRequestHeader(name, value)
}
})
} else {
request.headers.forEach(function(value, name) {
xhr.setRequestHeader(name, value)
})
}
if (request.signal) {
request.signal.addEventListener('abort', abortXhr)
xhr.onreadystatechange = function() {
// DONE (success or failure)
if (xhr.readyState === 4) {
request.signal.removeEventListener('abort', abortXhr)
}
}
}
xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit)
})
}
fetch.polyfill = true
if (!g.fetch) {
g.fetch = fetch
g.Headers = Headers
g.Request = Request
g.Response = Response
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "bahg":
/*!**********************************************!*\
!*** ./node_modules/lodash/_asciiToArray.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/**
* Converts an ASCII `string` to an array.
*
* @private
* @param {string} string The string to convert.
* @returns {Array} Returns the converted array.
*/
function asciiToArray(string) {
return string.split('');
}
module.exports = asciiToArray;
/***/ }),
/***/ "bbMD":
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/LoadingOutlined.js ***!
\*********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _LoadingOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/LoadingOutlined */ "sM0O"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var LoadingOutlined = function LoadingOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _LoadingOutlined.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(LoadingOutlined);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "bdeN":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.reflect.has-metadata.js ***!
\*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var ordinaryHasOwnMetadata = ReflectMetadataModule.has;
var toMetadataKey = ReflectMetadataModule.toKey;
var ordinaryHasMetadata = function (MetadataKey, O, P) {
var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P);
if (hasOwn) return true;
var parent = getPrototypeOf(O);
return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false;
};
// `Reflect.hasMetadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
hasMetadata: function hasMetadata(metadataKey, target /* , targetKey */) {
var targetKey = arguments.length < 3 ? undefined : toMetadataKey(arguments[2]);
return ordinaryHasMetadata(metadataKey, anObject(target), targetKey);
}
});
/***/ }),
/***/ "bdgK":
/*!*************************************************************************!*\
!*** ./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js ***!
\*************************************************************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Module uses injected variables (global) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(global) {/**
* A collection of shims that provide minimal functionality of the ES6 collections.
*
* These implementations are not meant to be used outside of the ResizeObserver
* modules as they cover only a limited range of use cases.
*/
/* eslint-disable require-jsdoc, valid-jsdoc */
var MapShim = (function () {
if (typeof Map !== 'undefined') {
return Map;
}
/**
* Returns index in provided array that matches the specified key.
*
* @param {Array<Array>} arr
* @param {*} key
* @returns {number}
*/
function getIndex(arr, key) {
var result = -1;
arr.some(function (entry, index) {
if (entry[0] === key) {
result = index;
return true;
}
return false;
});
return result;
}
return /** @class */ (function () {
function class_1() {
this.__entries__ = [];
}
Object.defineProperty(class_1.prototype, "size", {
/**
* @returns {boolean}
*/
get: function () {
return this.__entries__.length;
},
enumerable: true,
configurable: true
});
/**
* @param {*} key
* @returns {*}
*/
class_1.prototype.get = function (key) {
var index = getIndex(this.__entries__, key);
var entry = this.__entries__[index];
return entry && entry[1];
};
/**
* @param {*} key
* @param {*} value
* @returns {void}
*/
class_1.prototype.set = function (key, value) {
var index = getIndex(this.__entries__, key);
if (~index) {
this.__entries__[index][1] = value;
}
else {
this.__entries__.push([key, value]);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.delete = function (key) {
var entries = this.__entries__;
var index = getIndex(entries, key);
if (~index) {
entries.splice(index, 1);
}
};
/**
* @param {*} key
* @returns {void}
*/
class_1.prototype.has = function (key) {
return !!~getIndex(this.__entries__, key);
};
/**
* @returns {void}
*/
class_1.prototype.clear = function () {
this.__entries__.splice(0);
};
/**
* @param {Function} callback
* @param {*} [ctx=null]
* @returns {void}
*/
class_1.prototype.forEach = function (callback, ctx) {
if (ctx === void 0) { ctx = null; }
for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {
var entry = _a[_i];
callback.call(ctx, entry[1], entry[0]);
}
};
return class_1;
}());
})();
/**
* Detects whether window and document objects are available in current environment.
*/
var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document;
// Returns global object of a current environment.
var global$1 = (function () {
if (typeof global !== 'undefined' && global.Math === Math) {
return global;
}
if (typeof self !== 'undefined' && self.Math === Math) {
return self;
}
if (typeof window !== 'undefined' && window.Math === Math) {
return window;
}
// eslint-disable-next-line no-new-func
return Function('return this')();
})();
/**
* A shim for the requestAnimationFrame which falls back to the setTimeout if
* first one is not supported.
*
* @returns {number} Requests' identifier.
*/
var requestAnimationFrame$1 = (function () {
if (typeof requestAnimationFrame === 'function') {
// It's required to use a bounded function because IE sometimes throws
// an "Invalid calling object" error if rAF is invoked without the global
// object on the left hand side.
return requestAnimationFrame.bind(global$1);
}
return function (callback) { return setTimeout(function () { return callback(Date.now()); }, 1000 / 60); };
})();
// Defines minimum timeout before adding a trailing call.
var trailingTimeout = 2;
/**
* Creates a wrapper function which ensures that provided callback will be
* invoked only once during the specified delay period.
*
* @param {Function} callback - Function to be invoked after the delay period.
* @param {number} delay - Delay after which to invoke callback.
* @returns {Function}
*/
function throttle (callback, delay) {
var leadingCall = false, trailingCall = false, lastCallTime = 0;
/**
* Invokes the original callback function and schedules new invocation if
* the "proxy" was called during current request.
*
* @returns {void}
*/
function resolvePending() {
if (leadingCall) {
leadingCall = false;
callback();
}
if (trailingCall) {
proxy();
}
}
/**
* Callback invoked after the specified delay. It will further postpone
* invocation of the original function delegating it to the
* requestAnimationFrame.
*
* @returns {void}
*/
function timeoutCallback() {
requestAnimationFrame$1(resolvePending);
}
/**
* Schedules invocation of the original function.
*
* @returns {void}
*/
function proxy() {
var timeStamp = Date.now();
if (leadingCall) {
// Reject immediately following calls.
if (timeStamp - lastCallTime < trailingTimeout) {
return;
}
// Schedule new call to be in invoked when the pending one is resolved.
// This is important for "transitions" which never actually start
// immediately so there is a chance that we might miss one if change
// happens amids the pending invocation.
trailingCall = true;
}
else {
leadingCall = true;
trailingCall = false;
setTimeout(timeoutCallback, delay);
}
lastCallTime = timeStamp;
}
return proxy;
}
// Minimum delay before invoking the update of observers.
var REFRESH_DELAY = 20;
// A list of substrings of CSS properties used to find transition events that
// might affect dimensions of observed elements.
var transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight'];
// Check if MutationObserver is available.
var mutationObserverSupported = typeof MutationObserver !== 'undefined';
/**
* Singleton controller class which handles updates of ResizeObserver instances.
*/
var ResizeObserverController = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserverController.
*
* @private
*/
function ResizeObserverController() {
/**
* Indicates whether DOM listeners have been added.
*
* @private {boolean}
*/
this.connected_ = false;
/**
* Tells that controller has subscribed for Mutation Events.
*
* @private {boolean}
*/
this.mutationEventsAdded_ = false;
/**
* Keeps reference to the instance of MutationObserver.
*
* @private {MutationObserver}
*/
this.mutationsObserver_ = null;
/**
* A list of connected observers.
*
* @private {Array<ResizeObserverSPI>}
*/
this.observers_ = [];
this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);
this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);
}
/**
* Adds observer to observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be added.
* @returns {void}
*/
ResizeObserverController.prototype.addObserver = function (observer) {
if (!~this.observers_.indexOf(observer)) {
this.observers_.push(observer);
}
// Add listeners if they haven't been added yet.
if (!this.connected_) {
this.connect_();
}
};
/**
* Removes observer from observers list.
*
* @param {ResizeObserverSPI} observer - Observer to be removed.
* @returns {void}
*/
ResizeObserverController.prototype.removeObserver = function (observer) {
var observers = this.observers_;
var index = observers.indexOf(observer);
// Remove observer if it's present in registry.
if (~index) {
observers.splice(index, 1);
}
// Remove listeners if controller has no connected observers.
if (!observers.length && this.connected_) {
this.disconnect_();
}
};
/**
* Invokes the update of observers. It will continue running updates insofar
* it detects changes.
*
* @returns {void}
*/
ResizeObserverController.prototype.refresh = function () {
var changesDetected = this.updateObservers_();
// Continue running updates if changes have been detected as there might
// be future ones caused by CSS transitions.
if (changesDetected) {
this.refresh();
}
};
/**
* Updates every observer from observers list and notifies them of queued
* entries.
*
* @private
* @returns {boolean} Returns "true" if any observer has detected changes in
* dimensions of it's elements.
*/
ResizeObserverController.prototype.updateObservers_ = function () {
// Collect observers that have active observations.
var activeObservers = this.observers_.filter(function (observer) {
return observer.gatherActive(), observer.hasActive();
});
// Deliver notifications in a separate cycle in order to avoid any
// collisions between observers, e.g. when multiple instances of
// ResizeObserver are tracking the same element and the callback of one
// of them changes content dimensions of the observed target. Sometimes
// this may result in notifications being blocked for the rest of observers.
activeObservers.forEach(function (observer) { return observer.broadcastActive(); });
return activeObservers.length > 0;
};
/**
* Initializes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.connect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already added.
if (!isBrowser || this.connected_) {
return;
}
// Subscription to the "Transitionend" event is used as a workaround for
// delayed transitions. This way it's possible to capture at least the
// final state of an element.
document.addEventListener('transitionend', this.onTransitionEnd_);
window.addEventListener('resize', this.refresh);
if (mutationObserverSupported) {
this.mutationsObserver_ = new MutationObserver(this.refresh);
this.mutationsObserver_.observe(document, {
attributes: true,
childList: true,
characterData: true,
subtree: true
});
}
else {
document.addEventListener('DOMSubtreeModified', this.refresh);
this.mutationEventsAdded_ = true;
}
this.connected_ = true;
};
/**
* Removes DOM listeners.
*
* @private
* @returns {void}
*/
ResizeObserverController.prototype.disconnect_ = function () {
// Do nothing if running in a non-browser environment or if listeners
// have been already removed.
if (!isBrowser || !this.connected_) {
return;
}
document.removeEventListener('transitionend', this.onTransitionEnd_);
window.removeEventListener('resize', this.refresh);
if (this.mutationsObserver_) {
this.mutationsObserver_.disconnect();
}
if (this.mutationEventsAdded_) {
document.removeEventListener('DOMSubtreeModified', this.refresh);
}
this.mutationsObserver_ = null;
this.mutationEventsAdded_ = false;
this.connected_ = false;
};
/**
* "Transitionend" event handler.
*
* @private
* @param {TransitionEvent} event
* @returns {void}
*/
ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {
var _b = _a.propertyName, propertyName = _b === void 0 ? '' : _b;
// Detect whether transition may affect dimensions of an element.
var isReflowProperty = transitionKeys.some(function (key) {
return !!~propertyName.indexOf(key);
});
if (isReflowProperty) {
this.refresh();
}
};
/**
* Returns instance of the ResizeObserverController.
*
* @returns {ResizeObserverController}
*/
ResizeObserverController.getInstance = function () {
if (!this.instance_) {
this.instance_ = new ResizeObserverController();
}
return this.instance_;
};
/**
* Holds reference to the controller's instance.
*
* @private {ResizeObserverController}
*/
ResizeObserverController.instance_ = null;
return ResizeObserverController;
}());
/**
* Defines non-writable/enumerable properties of the provided target object.
*
* @param {Object} target - Object for which to define properties.
* @param {Object} props - Properties to be defined.
* @returns {Object} Target object.
*/
var defineConfigurable = (function (target, props) {
for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {
var key = _a[_i];
Object.defineProperty(target, key, {
value: props[key],
enumerable: false,
writable: false,
configurable: true
});
}
return target;
});
/**
* Returns the global object associated with provided element.
*
* @param {Object} target
* @returns {Object}
*/
var getWindowOf = (function (target) {
// Assume that the element is an instance of Node, which means that it
// has the "ownerDocument" property from which we can retrieve a
// corresponding global object.
var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView;
// Return the local global object if it's not possible extract one from
// provided element.
return ownerGlobal || global$1;
});
// Placeholder of an empty content rectangle.
var emptyRect = createRectInit(0, 0, 0, 0);
/**
* Converts provided string to a number.
*
* @param {number|string} value
* @returns {number}
*/
function toFloat(value) {
return parseFloat(value) || 0;
}
/**
* Extracts borders size from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @param {...string} positions - Borders positions (top, right, ...)
* @returns {number}
*/
function getBordersSize(styles) {
var positions = [];
for (var _i = 1; _i < arguments.length; _i++) {
positions[_i - 1] = arguments[_i];
}
return positions.reduce(function (size, position) {
var value = styles['border-' + position + '-width'];
return size + toFloat(value);
}, 0);
}
/**
* Extracts paddings sizes from provided styles.
*
* @param {CSSStyleDeclaration} styles
* @returns {Object} Paddings box.
*/
function getPaddings(styles) {
var positions = ['top', 'right', 'bottom', 'left'];
var paddings = {};
for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {
var position = positions_1[_i];
var value = styles['padding-' + position];
paddings[position] = toFloat(value);
}
return paddings;
}
/**
* Calculates content rectangle of provided SVG element.
*
* @param {SVGGraphicsElement} target - Element content rectangle of which needs
* to be calculated.
* @returns {DOMRectInit}
*/
function getSVGContentRect(target) {
var bbox = target.getBBox();
return createRectInit(0, 0, bbox.width, bbox.height);
}
/**
* Calculates content rectangle of provided HTMLElement.
*
* @param {HTMLElement} target - Element for which to calculate the content rectangle.
* @returns {DOMRectInit}
*/
function getHTMLElementContentRect(target) {
// Client width & height properties can't be
// used exclusively as they provide rounded values.
var clientWidth = target.clientWidth, clientHeight = target.clientHeight;
// By this condition we can catch all non-replaced inline, hidden and
// detached elements. Though elements with width & height properties less
// than 0.5 will be discarded as well.
//
// Without it we would need to implement separate methods for each of
// those cases and it's not possible to perform a precise and performance
// effective test for hidden elements. E.g. even jQuery's ':visible' filter
// gives wrong results for elements with width & height less than 0.5.
if (!clientWidth && !clientHeight) {
return emptyRect;
}
var styles = getWindowOf(target).getComputedStyle(target);
var paddings = getPaddings(styles);
var horizPad = paddings.left + paddings.right;
var vertPad = paddings.top + paddings.bottom;
// Computed styles of width & height are being used because they are the
// only dimensions available to JS that contain non-rounded values. It could
// be possible to utilize the getBoundingClientRect if only it's data wasn't
// affected by CSS transformations let alone paddings, borders and scroll bars.
var width = toFloat(styles.width), height = toFloat(styles.height);
// Width & height include paddings and borders when the 'border-box' box
// model is applied (except for IE).
if (styles.boxSizing === 'border-box') {
// Following conditions are required to handle Internet Explorer which
// doesn't include paddings and borders to computed CSS dimensions.
//
// We can say that if CSS dimensions + paddings are equal to the "client"
// properties then it's either IE, and thus we don't need to subtract
// anything, or an element merely doesn't have paddings/borders styles.
if (Math.round(width + horizPad) !== clientWidth) {
width -= getBordersSize(styles, 'left', 'right') + horizPad;
}
if (Math.round(height + vertPad) !== clientHeight) {
height -= getBordersSize(styles, 'top', 'bottom') + vertPad;
}
}
// Following steps can't be applied to the document's root element as its
// client[Width/Height] properties represent viewport area of the window.
// Besides, it's as well not necessary as the <html> itself neither has
// rendered scroll bars nor it can be clipped.
if (!isDocumentElement(target)) {
// In some browsers (only in Firefox, actually) CSS width & height
// include scroll bars size which can be removed at this step as scroll
// bars are the only difference between rounded dimensions + paddings
// and "client" properties, though that is not always true in Chrome.
var vertScrollbar = Math.round(width + horizPad) - clientWidth;
var horizScrollbar = Math.round(height + vertPad) - clientHeight;
// Chrome has a rather weird rounding of "client" properties.
// E.g. for an element with content width of 314.2px it sometimes gives
// the client width of 315px and for the width of 314.7px it may give
// 314px. And it doesn't happen all the time. So just ignore this delta
// as a non-relevant.
if (Math.abs(vertScrollbar) !== 1) {
width -= vertScrollbar;
}
if (Math.abs(horizScrollbar) !== 1) {
height -= horizScrollbar;
}
}
return createRectInit(paddings.left, paddings.top, width, height);
}
/**
* Checks whether provided element is an instance of the SVGGraphicsElement.
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
var isSVGGraphicsElement = (function () {
// Some browsers, namely IE and Edge, don't have the SVGGraphicsElement
// interface.
if (typeof SVGGraphicsElement !== 'undefined') {
return function (target) { return target instanceof getWindowOf(target).SVGGraphicsElement; };
}
// If it's so, then check that element is at least an instance of the
// SVGElement and that it has the "getBBox" method.
// eslint-disable-next-line no-extra-parens
return function (target) { return (target instanceof getWindowOf(target).SVGElement &&
typeof target.getBBox === 'function'); };
})();
/**
* Checks whether provided element is a document element (<html>).
*
* @param {Element} target - Element to be checked.
* @returns {boolean}
*/
function isDocumentElement(target) {
return target === getWindowOf(target).document.documentElement;
}
/**
* Calculates an appropriate content rectangle for provided html or svg element.
*
* @param {Element} target - Element content rectangle of which needs to be calculated.
* @returns {DOMRectInit}
*/
function getContentRect(target) {
if (!isBrowser) {
return emptyRect;
}
if (isSVGGraphicsElement(target)) {
return getSVGContentRect(target);
}
return getHTMLElementContentRect(target);
}
/**
* Creates rectangle with an interface of the DOMRectReadOnly.
* Spec: https://drafts.fxtf.org/geometry/#domrectreadonly
*
* @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.
* @returns {DOMRectReadOnly}
*/
function createReadOnlyRect(_a) {
var x = _a.x, y = _a.y, width = _a.width, height = _a.height;
// If DOMRectReadOnly is available use it as a prototype for the rectangle.
var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;
var rect = Object.create(Constr.prototype);
// Rectangle's properties are not writable and non-enumerable.
defineConfigurable(rect, {
x: x, y: y, width: width, height: height,
top: y,
right: x + width,
bottom: height + y,
left: x
});
return rect;
}
/**
* Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.
* Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit
*
* @param {number} x - X coordinate.
* @param {number} y - Y coordinate.
* @param {number} width - Rectangle's width.
* @param {number} height - Rectangle's height.
* @returns {DOMRectInit}
*/
function createRectInit(x, y, width, height) {
return { x: x, y: y, width: width, height: height };
}
/**
* Class that is responsible for computations of the content rectangle of
* provided DOM element and for keeping track of it's changes.
*/
var ResizeObservation = /** @class */ (function () {
/**
* Creates an instance of ResizeObservation.
*
* @param {Element} target - Element to be observed.
*/
function ResizeObservation(target) {
/**
* Broadcasted width of content rectangle.
*
* @type {number}
*/
this.broadcastWidth = 0;
/**
* Broadcasted height of content rectangle.
*
* @type {number}
*/
this.broadcastHeight = 0;
/**
* Reference to the last observed content rectangle.
*
* @private {DOMRectInit}
*/
this.contentRect_ = createRectInit(0, 0, 0, 0);
this.target = target;
}
/**
* Updates content rectangle and tells whether it's width or height properties
* have changed since the last broadcast.
*
* @returns {boolean}
*/
ResizeObservation.prototype.isActive = function () {
var rect = getContentRect(this.target);
this.contentRect_ = rect;
return (rect.width !== this.broadcastWidth ||
rect.height !== this.broadcastHeight);
};
/**
* Updates 'broadcastWidth' and 'broadcastHeight' properties with a data
* from the corresponding properties of the last observed content rectangle.
*
* @returns {DOMRectInit} Last observed content rectangle.
*/
ResizeObservation.prototype.broadcastRect = function () {
var rect = this.contentRect_;
this.broadcastWidth = rect.width;
this.broadcastHeight = rect.height;
return rect;
};
return ResizeObservation;
}());
var ResizeObserverEntry = /** @class */ (function () {
/**
* Creates an instance of ResizeObserverEntry.
*
* @param {Element} target - Element that is being observed.
* @param {DOMRectInit} rectInit - Data of the element's content rectangle.
*/
function ResizeObserverEntry(target, rectInit) {
var contentRect = createReadOnlyRect(rectInit);
// According to the specification following properties are not writable
// and are also not enumerable in the native implementation.
//
// Property accessors are not being used as they'd require to define a
// private WeakMap storage which may cause memory leaks in browsers that
// don't support this type of collections.
defineConfigurable(this, { target: target, contentRect: contentRect });
}
return ResizeObserverEntry;
}());
var ResizeObserverSPI = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback function that is invoked
* when one of the observed elements changes it's content dimensions.
* @param {ResizeObserverController} controller - Controller instance which
* is responsible for the updates of observer.
* @param {ResizeObserver} callbackCtx - Reference to the public
* ResizeObserver instance which will be passed to callback function.
*/
function ResizeObserverSPI(callback, controller, callbackCtx) {
/**
* Collection of resize observations that have detected changes in dimensions
* of elements.
*
* @private {Array<ResizeObservation>}
*/
this.activeObservations_ = [];
/**
* Registry of the ResizeObservation instances.
*
* @private {Map<Element, ResizeObservation>}
*/
this.observations_ = new MapShim();
if (typeof callback !== 'function') {
throw new TypeError('The callback provided as parameter 1 is not a function.');
}
this.callback_ = callback;
this.controller_ = controller;
this.callbackCtx_ = callbackCtx;
}
/**
* Starts observing provided element.
*
* @param {Element} target - Element to be observed.
* @returns {void}
*/
ResizeObserverSPI.prototype.observe = function (target) {
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
// Do nothing if current environment doesn't have the Element interface.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError('parameter 1 is not of type "Element".');
}
var observations = this.observations_;
// Do nothing if element is already being observed.
if (observations.has(target)) {
return;
}
observations.set(target, new ResizeObservation(target));
this.controller_.addObserver(this);
// Force the update of observations.
this.controller_.refresh();
};
/**
* Stops observing provided element.
*
* @param {Element} target - Element to stop observing.
* @returns {void}
*/
ResizeObserverSPI.prototype.unobserve = function (target) {
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
// Do nothing if current environment doesn't have the Element interface.
if (typeof Element === 'undefined' || !(Element instanceof Object)) {
return;
}
if (!(target instanceof getWindowOf(target).Element)) {
throw new TypeError('parameter 1 is not of type "Element".');
}
var observations = this.observations_;
// Do nothing if element is not being observed.
if (!observations.has(target)) {
return;
}
observations.delete(target);
if (!observations.size) {
this.controller_.removeObserver(this);
}
};
/**
* Stops observing all elements.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.disconnect = function () {
this.clearActive();
this.observations_.clear();
this.controller_.removeObserver(this);
};
/**
* Collects observation instances the associated element of which has changed
* it's content rectangle.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.gatherActive = function () {
var _this = this;
this.clearActive();
this.observations_.forEach(function (observation) {
if (observation.isActive()) {
_this.activeObservations_.push(observation);
}
});
};
/**
* Invokes initial callback function with a list of ResizeObserverEntry
* instances collected from active resize observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.broadcastActive = function () {
// Do nothing if observer doesn't have active observations.
if (!this.hasActive()) {
return;
}
var ctx = this.callbackCtx_;
// Create ResizeObserverEntry instance for every active observation.
var entries = this.activeObservations_.map(function (observation) {
return new ResizeObserverEntry(observation.target, observation.broadcastRect());
});
this.callback_.call(ctx, entries, ctx);
this.clearActive();
};
/**
* Clears the collection of active observations.
*
* @returns {void}
*/
ResizeObserverSPI.prototype.clearActive = function () {
this.activeObservations_.splice(0);
};
/**
* Tells whether observer has active observations.
*
* @returns {boolean}
*/
ResizeObserverSPI.prototype.hasActive = function () {
return this.activeObservations_.length > 0;
};
return ResizeObserverSPI;
}());
// Registry of internal observers. If WeakMap is not available use current shim
// for the Map collection as it has all required methods and because WeakMap
// can't be fully polyfilled anyway.
var observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();
/**
* ResizeObserver API. Encapsulates the ResizeObserver SPI implementation
* exposing only those methods and properties that are defined in the spec.
*/
var ResizeObserver = /** @class */ (function () {
/**
* Creates a new instance of ResizeObserver.
*
* @param {ResizeObserverCallback} callback - Callback that is invoked when
* dimensions of the observed elements change.
*/
function ResizeObserver(callback) {
if (!(this instanceof ResizeObserver)) {
throw new TypeError('Cannot call a class as a function.');
}
if (!arguments.length) {
throw new TypeError('1 argument required, but only 0 present.');
}
var controller = ResizeObserverController.getInstance();
var observer = new ResizeObserverSPI(callback, controller, this);
observers.set(this, observer);
}
return ResizeObserver;
}());
// Expose public methods of ResizeObserver.
[
'observe',
'unobserve',
'disconnect'
].forEach(function (method) {
ResizeObserver.prototype[method] = function () {
var _a;
return (_a = observers.get(this))[method].apply(_a, arguments);
};
});
var index = (function () {
// Export existing implementation if available.
if (typeof global$1.ResizeObserver !== 'undefined') {
return global$1.ResizeObserver;
}
return ResizeObserver;
})();
/* harmony default export */ __webpack_exports__["default"] = (index);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "bfL6":
/*!***************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/createForOfIteratorHelper.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "mGKP");
function _createForOfIteratorHelper(o, allowArrayLike) {
var it;
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
if (Array.isArray(o) || (it = unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") {
if (it) o = it;
var i = 0;
var F = function F() {};
return {
s: F,
n: function n() {
if (i >= o.length) return {
done: true
};
return {
done: false,
value: o[i++]
};
},
e: function e(_e) {
throw _e;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var normalCompletion = true,
didErr = false,
err;
return {
s: function s() {
it = o[Symbol.iterator]();
},
n: function n() {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function e(_e2) {
didErr = true;
err = _e2;
},
f: function f() {
try {
if (!normalCompletion && it["return"] != null) it["return"]();
} finally {
if (didErr) throw err;
}
}
};
}
module.exports = _createForOfIteratorHelper;
/***/ }),
/***/ "bmMU":
/*!**************************************************!*\
!*** ./node_modules/react-fast-compare/index.js ***!
\**************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */
var hasElementType = typeof Element !== 'undefined';
var hasMap = typeof Map === 'function';
var hasSet = typeof Set === 'function';
var hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;
// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js
function equal(a, b) {
// START: fast-deep-equal es6/index.js 3.1.3
if (a === b) return true;
if (a && b && typeof a == 'object' && typeof b == 'object') {
if (a.constructor !== b.constructor) return false;
var length, i, keys;
if (Array.isArray(a)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (!equal(a[i], b[i])) return false;
return true;
}
// START: Modifications:
// 1. Extra `has<Type> &&` helpers in initial condition allow es6 code
// to co-exist with es5.
// 2. Replace `for of` with es5 compliant iteration using `for`.
// Basically, take:
//
// ```js
// for (i of a.entries())
// if (!b.has(i[0])) return false;
// ```
//
// ... and convert to:
//
// ```js
// it = a.entries();
// while (!(i = it.next()).done)
// if (!b.has(i.value[0])) return false;
// ```
//
// **Note**: `i` access switches to `i.value`.
var it;
if (hasMap && (a instanceof Map) && (b instanceof Map)) {
if (a.size !== b.size) return false;
it = a.entries();
while (!(i = it.next()).done)
if (!b.has(i.value[0])) return false;
it = a.entries();
while (!(i = it.next()).done)
if (!equal(i.value[1], b.get(i.value[0]))) return false;
return true;
}
if (hasSet && (a instanceof Set) && (b instanceof Set)) {
if (a.size !== b.size) return false;
it = a.entries();
while (!(i = it.next()).done)
if (!b.has(i.value[0])) return false;
return true;
}
// END: Modifications
if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
length = a.length;
if (length != b.length) return false;
for (i = length; i-- !== 0;)
if (a[i] !== b[i]) return false;
return true;
}
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
// START: Modifications:
// Apply guards for `Object.create(null)` handling. See:
// - https://github.com/FormidableLabs/react-fast-compare/issues/64
// - https://github.com/epoberezkin/fast-deep-equal/issues/49
if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === 'function' && typeof b.valueOf === 'function') return a.valueOf() === b.valueOf();
if (a.toString !== Object.prototype.toString && typeof a.toString === 'function' && typeof b.toString === 'function') return a.toString() === b.toString();
// END: Modifications
keys = Object.keys(a);
length = keys.length;
if (length !== Object.keys(b).length) return false;
for (i = length; i-- !== 0;)
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
// END: fast-deep-equal
// START: react-fast-compare
// custom handling for DOM elements
if (hasElementType && a instanceof Element) return false;
// custom handling for React/Preact
for (i = length; i-- !== 0;) {
if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {
// React-specific: avoid traversing React elements' _owner
// Preact-specific: avoid traversing Preact elements' __v and __o
// __v = $_original / $_vnode
// __o = $_owner
// These properties contain circular references and are not needed when
// comparing the actual elements (and not their owners)
// .$$typeof and ._store on just reasonable markers of elements
continue;
}
// all other properties should be traversed as usual
if (!equal(a[keys[i]], b[keys[i]])) return false;
}
// END: react-fast-compare
// START: fast-deep-equal
return true;
}
return a !== a && b !== b;
}
// end fast-deep-equal
module.exports = function isEqual(a, b) {
try {
return equal(a, b);
} catch (error) {
if (((error.message || '').match(/stack|recursion/i))) {
// warn on circular references, don't crash
// browsers give this different errors name and messages:
// chrome/safari: "RangeError", "Maximum call stack size exceeded"
// firefox: "InternalError", too much recursion"
// edge: "Error", "Out of stack space"
console.warn('react-fast-compare cannot handle circular refs');
return false;
}
// some other error. we should definitely know about these
throw error;
}
};
/***/ }),
/***/ "bu2F":
/*!**************************************************!*\
!*** ./node_modules/hash.js/lib/hash/sha/256.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ "w8CP");
var common = __webpack_require__(/*! ../common */ "7ckf");
var shaCommon = __webpack_require__(/*! ./common */ "qlaj");
var assert = __webpack_require__(/*! minimalistic-assert */ "2j6C");
var sum32 = utils.sum32;
var sum32_4 = utils.sum32_4;
var sum32_5 = utils.sum32_5;
var ch32 = shaCommon.ch32;
var maj32 = shaCommon.maj32;
var s0_256 = shaCommon.s0_256;
var s1_256 = shaCommon.s1_256;
var g0_256 = shaCommon.g0_256;
var g1_256 = shaCommon.g1_256;
var BlockHash = common.BlockHash;
var sha256_K = [
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
];
function SHA256() {
if (!(this instanceof SHA256))
return new SHA256();
BlockHash.call(this);
this.h = [
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
];
this.k = sha256_K;
this.W = new Array(64);
}
utils.inherits(SHA256, BlockHash);
module.exports = SHA256;
SHA256.blockSize = 512;
SHA256.outSize = 256;
SHA256.hmacStrength = 192;
SHA256.padLength = 64;
SHA256.prototype._update = function _update(msg, start) {
var W = this.W;
for (var i = 0; i < 16; i++)
W[i] = msg[start + i];
for (; i < W.length; i++)
W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);
var a = this.h[0];
var b = this.h[1];
var c = this.h[2];
var d = this.h[3];
var e = this.h[4];
var f = this.h[5];
var g = this.h[6];
var h = this.h[7];
assert(this.k.length === W.length);
for (i = 0; i < W.length; i++) {
var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);
var T2 = sum32(s0_256(a), maj32(a, b, c));
h = g;
g = f;
f = e;
e = sum32(d, T1);
d = c;
c = b;
b = a;
a = sum32(T1, T2);
}
this.h[0] = sum32(this.h[0], a);
this.h[1] = sum32(this.h[1], b);
this.h[2] = sum32(this.h[2], c);
this.h[3] = sum32(this.h[3], d);
this.h[4] = sum32(this.h[4], e);
this.h[5] = sum32(this.h[5], f);
this.h[6] = sum32(this.h[6], g);
this.h[7] = sum32(this.h[7], h);
};
SHA256.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'big');
else
return utils.split32(this.h, 'big');
};
/***/ }),
/***/ "busE":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/redefine.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "zk60");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "iSVu");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var getInternalState = InternalStateModule.get;
var enforceInternalState = InternalStateModule.enforce;
var TEMPLATE = String(String).split('String');
(module.exports = function (O, key, value, options) {
var unsafe = options ? !!options.unsafe : false;
var simple = options ? !!options.enumerable : false;
var noTargetGet = options ? !!options.noTargetGet : false;
if (typeof value == 'function') {
if (typeof key == 'string' && !has(value, 'name')) createNonEnumerableProperty(value, 'name', key);
enforceInternalState(value).source = TEMPLATE.join(typeof key == 'string' ? key : '');
}
if (O === global) {
if (simple) O[key] = value;
else setGlobal(key, value);
return;
} else if (!unsafe) {
delete O[key];
} else if (!noTargetGet && O[key]) {
simple = true;
}
if (simple) O[key] = value;
else createNonEnumerableProperty(O, key, value);
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
})(Function.prototype, 'toString', function toString() {
return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
});
/***/ }),
/***/ "bw0O":
/*!*****************************************************************!*\
!*** ./node_modules/umi/node_modules/use-subscription/index.js ***!
\*****************************************************************/
/*! no static exports found */
/*! exports used: useSubscription */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(/*! ./cjs/use-subscription.production.min.js */ "mW11");
} else {}
/***/ }),
/***/ "bz9Y":
/*!***********************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/CheckCircleFilled.js ***!
\***********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _CheckCircleFilled = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/CheckCircleFilled */ "gEhQ"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CheckCircleFilled = function CheckCircleFilled(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _CheckCircleFilled.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(CheckCircleFilled);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "c+Xe":
/*!****************************************!*\
!*** ./node_modules/rc-util/es/ref.js ***!
\****************************************/
/*! exports provided: fillRef, composeRef, useComposeRef, supportRef, supportNodeRef */
/*! exports used: composeRef, fillRef, supportRef, useComposeRef */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return fillRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return composeRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return useComposeRef; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return supportRef; });
/* unused harmony export supportNodeRef */
/* harmony import */ var _babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/typeof */ "U8pU");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-is */ "t6Hw");
/* harmony import */ var react_is__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_is__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./hooks/useMemo */ "YrtM");
/* eslint-disable no-param-reassign */
function fillRef(ref, node) {
if (typeof ref === 'function') {
ref(node);
} else if (Object(_babel_runtime_helpers_esm_typeof__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(ref) === 'object' && ref && 'current' in ref) {
ref.current = node;
}
}
/**
* Merge refs into one ref function to support ref passing.
*/
function composeRef() {
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
refs[_key] = arguments[_key];
}
var refList = refs.filter(function (ref) {
return ref;
});
if (refList.length <= 1) {
return refList[0];
}
return function (node) {
refs.forEach(function (ref) {
fillRef(ref, node);
});
};
}
function useComposeRef() {
for (var _len2 = arguments.length, refs = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
refs[_key2] = arguments[_key2];
}
return Object(_hooks_useMemo__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(function () {
return composeRef.apply(void 0, refs);
}, refs, function (prev, next) {
return prev.length !== next.length || prev.every(function (ref, i) {
return ref !== next[i];
});
});
}
function supportRef(nodeOrComponent) {
var _type$prototype, _nodeOrComponent$prot;
var type = Object(react_is__WEBPACK_IMPORTED_MODULE_2__["isMemo"])(nodeOrComponent) ? nodeOrComponent.type.type : nodeOrComponent.type;
// Function component node
if (typeof type === 'function' && !((_type$prototype = type.prototype) !== null && _type$prototype !== void 0 && _type$prototype.render) && type.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__["ForwardRef"]) {
return false;
}
// Class component
if (typeof nodeOrComponent === 'function' && !((_nodeOrComponent$prot = nodeOrComponent.prototype) !== null && _nodeOrComponent$prot !== void 0 && _nodeOrComponent$prot.render) && nodeOrComponent.$$typeof !== react_is__WEBPACK_IMPORTED_MODULE_2__["ForwardRef"]) {
return false;
}
return true;
}
function supportNodeRef(node) {
if (! /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_1__["isValidElement"])(node)) {
return false;
}
if (Object(react_is__WEBPACK_IMPORTED_MODULE_2__["isFragment"])(node)) {
return false;
}
return supportRef(node);
}
/* eslint-enable */
/***/ }),
/***/ "c0go":
/*!******************************************!*\
!*** ./node_modules/filter-obj/index.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
module.exports = function (obj, predicate) {
var ret = {};
var keys = Object.keys(obj);
var isArr = Array.isArray(predicate);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var val = obj[key];
if (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {
ret[key] = val;
}
}
return ret;
};
/***/ }),
/***/ "c162":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.fill.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $fill = __webpack_require__(/*! ../internals/array-fill */ "gdVl");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.fill` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.fill
// eslint-disable-next-line no-unused-vars
exportTypedArrayMethod('fill', function fill(value /* , start, end */) {
return $fill.apply(aTypedArray(this), arguments);
});
/***/ }),
/***/ "c9m3":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/modules/es.array.unscopables.flat-map.js ***!
\***********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// this method was added to unscopables after implementation
// in popular engines, so it's moved to a separate module
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
addToUnscopables('flatMap');
/***/ }),
/***/ "cCPh":
/*!************************************************************!*\
!*** ./node_modules/@ant-design/icons/EllipsisOutlined.js ***!
\************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _EllipsisOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/EllipsisOutlined */ "jiSn"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _EllipsisOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "cDf5":
/*!*******************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/typeof.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _typeof(o) {
"@babel/helpers - typeof";
return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
return typeof o;
} : function (o) {
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(o);
}
module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "cDke":
/*!**************************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.get-own-property-names.js ***!
\**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var nativeGetOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "BX/b").f;
var FAILS_ON_PRIMITIVES = fails(function () { return !Object.getOwnPropertyNames(1); });
// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
getOwnPropertyNames: nativeGetOwnPropertyNames
});
/***/ }),
/***/ "cHpt":
/*!******************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js ***!
\******************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _isNativeReflectConstruct; });
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
return true;
} catch (e) {
return false;
}
}
/***/ }),
/***/ "cIOH":
/*!***********************************************!*\
!*** ./node_modules/antd/es/style/index.less ***!
\***********************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "cOPa":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.clamp.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var min = Math.min;
var max = Math.max;
// `Math.clamp` method
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true }, {
clamp: function clamp(x, lower, upper) {
return min(upper, max(lower, x));
}
});
/***/ }),
/***/ "cOkC":
/*!*********************************************!*\
!*** ./node_modules/rc-util/lib/warning.js ***!
\*********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.call = call;
exports.default = void 0;
exports.note = note;
exports.noteOnce = noteOnce;
exports.preMessage = void 0;
exports.resetWarned = resetWarned;
exports.warning = warning;
exports.warningOnce = warningOnce;
/* eslint-disable no-console */
var warned = {};
var preWarningFns = [];
/**
* Pre warning enable you to parse content before console.error.
* Modify to null will prevent warning.
*/
var preMessage = exports.preMessage = function preMessage(fn) {
preWarningFns.push(fn);
};
/**
* Warning if condition not match.
* @param valid Condition
* @param message Warning message
* @example
* ```js
* warning(false, 'some error'); // print some error
* warning(true, 'some error'); // print nothing
* warning(1 === 2, 'some error'); // print some error
* ```
*/
function warning(valid, message) {
if (false) { var finalMessage; }
}
/** @see Similar to {@link warning} */
function note(valid, message) {
if (false) { var finalMessage; }
}
function resetWarned() {
warned = {};
}
function call(method, valid, message) {
if (!valid && !warned[message]) {
method(false, message);
warned[message] = true;
}
}
/** @see Same as {@link warning}, but only warn once for the same message */
function warningOnce(valid, message) {
call(warning, valid, message);
}
/** @see Same as {@link warning}, but only warn once for the same message */
function noteOnce(valid, message) {
call(note, valid, message);
}
warningOnce.preMessage = preMessage;
warningOnce.resetWarned = resetWarned;
warningOnce.noteOnce = noteOnce;
var _default = exports.default = warningOnce;
/***/ }),
/***/ "cVYH":
/*!***************************************************************!*\
!*** ./node_modules/core-js/internals/inherit-if-required.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr");
// makes subclassing work correct for wrapped built-ins
module.exports = function ($this, dummy, Wrapper) {
var NewTarget, NewTargetPrototype;
if (
// it can work only with native `setPrototypeOf`
setPrototypeOf &&
// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
typeof (NewTarget = dummy.constructor) == 'function' &&
NewTarget !== Wrapper &&
isObject(NewTargetPrototype = NewTarget.prototype) &&
NewTargetPrototype !== Wrapper.prototype
) setPrototypeOf($this, NewTargetPrototype);
return $this;
};
/***/ }),
/***/ "cckQ":
/*!**************************************************!*\
!*** ./node_modules/es-define-property/index.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var GetIntrinsic = __webpack_require__(/*! get-intrinsic */ "AM7I");
/** @type {import('.')} */
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;
if ($defineProperty) {
try {
$defineProperty({}, 'a', { value: 1 });
} catch (e) {
// IE 8 has a broken defineProperty
$defineProperty = false;
}
}
module.exports = $defineProperty;
/***/ }),
/***/ "cfiF":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.weak-map.delete-all.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var collectionDeleteAll = __webpack_require__(/*! ../internals/collection-delete-all */ "Cg3G");
// `WeakMap.prototype.deleteAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'WeakMap', proto: true, real: true, forced: IS_PURE }, {
deleteAll: function deleteAll(/* ...elements */) {
return collectionDeleteAll.apply(this, arguments);
}
});
/***/ }),
/***/ "cr+I":
/*!********************************************!*\
!*** ./node_modules/query-string/index.js ***!
\********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _slicedToArray = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/slicedToArray */ "5wUe");
var _createForOfIteratorHelper = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/createForOfIteratorHelper */ "bfL6");
var _toConsumableArray = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/toConsumableArray */ "R5yR");
var strictUriEncode = __webpack_require__(/*! strict-uri-encode */ "ZFOp");
var decodeComponent = __webpack_require__(/*! decode-uri-component */ "8jRI");
var splitOnFirst = __webpack_require__(/*! split-on-first */ "8yz6");
var filterObject = __webpack_require__(/*! filter-obj */ "c0go");
var isNullOrUndefined = function isNullOrUndefined(value) {
return value === null || value === undefined;
};
function encoderForArrayFormat(options) {
switch (options.arrayFormat) {
case 'index':
return function (key) {
return function (result, value) {
var index = result.length;
if (value === undefined || options.skipNull && value === null || options.skipEmptyString && value === '') {
return result;
}
if (value === null) {
return [].concat(_toConsumableArray(result), [[encode(key, options), '[', index, ']'].join('')]);
}
return [].concat(_toConsumableArray(result), [[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')]);
};
};
case 'bracket':
return function (key) {
return function (result, value) {
if (value === undefined || options.skipNull && value === null || options.skipEmptyString && value === '') {
return result;
}
if (value === null) {
return [].concat(_toConsumableArray(result), [[encode(key, options), '[]'].join('')]);
}
return [].concat(_toConsumableArray(result), [[encode(key, options), '[]=', encode(value, options)].join('')]);
};
};
case 'comma':
case 'separator':
return function (key) {
return function (result, value) {
if (value === null || value === undefined || value.length === 0) {
return result;
}
if (result.length === 0) {
return [[encode(key, options), '=', encode(value, options)].join('')];
}
return [[result, encode(value, options)].join(options.arrayFormatSeparator)];
};
};
default:
return function (key) {
return function (result, value) {
if (value === undefined || options.skipNull && value === null || options.skipEmptyString && value === '') {
return result;
}
if (value === null) {
return [].concat(_toConsumableArray(result), [encode(key, options)]);
}
return [].concat(_toConsumableArray(result), [[encode(key, options), '=', encode(value, options)].join('')]);
};
};
}
}
function parserForArrayFormat(options) {
var result;
switch (options.arrayFormat) {
case 'index':
return function (key, value, accumulator) {
result = /\[(\d*)\]$/.exec(key);
key = key.replace(/\[\d*\]$/, '');
if (!result) {
accumulator[key] = value;
return;
}
if (accumulator[key] === undefined) {
accumulator[key] = {};
}
accumulator[key][result[1]] = value;
};
case 'bracket':
return function (key, value, accumulator) {
result = /(\[\])$/.exec(key);
key = key.replace(/\[\]$/, '');
if (!result) {
accumulator[key] = value;
return;
}
if (accumulator[key] === undefined) {
accumulator[key] = [value];
return;
}
accumulator[key] = [].concat(accumulator[key], value);
};
case 'comma':
case 'separator':
return function (key, value, accumulator) {
var isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);
var isEncodedArray = typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator);
value = isEncodedArray ? decode(value, options) : value;
var newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(function (item) {
return decode(item, options);
}) : value === null ? value : decode(value, options);
accumulator[key] = newValue;
};
default:
return function (key, value, accumulator) {
if (accumulator[key] === undefined) {
accumulator[key] = value;
return;
}
accumulator[key] = [].concat(accumulator[key], value);
};
}
}
function validateArrayFormatSeparator(value) {
if (typeof value !== 'string' || value.length !== 1) {
throw new TypeError('arrayFormatSeparator must be single character string');
}
}
function encode(value, options) {
if (options.encode) {
return options.strict ? strictUriEncode(value) : encodeURIComponent(value);
}
return value;
}
function decode(value, options) {
if (options.decode) {
return decodeComponent(value);
}
return value;
}
function keysSorter(input) {
if (Array.isArray(input)) {
return input.sort();
}
if (typeof input === 'object') {
return keysSorter(Object.keys(input)).sort(function (a, b) {
return Number(a) - Number(b);
}).map(function (key) {
return input[key];
});
}
return input;
}
function removeHash(input) {
var hashStart = input.indexOf('#');
if (hashStart !== -1) {
input = input.slice(0, hashStart);
}
return input;
}
function getHash(url) {
var hash = '';
var hashStart = url.indexOf('#');
if (hashStart !== -1) {
hash = url.slice(hashStart);
}
return hash;
}
function extract(input) {
input = removeHash(input);
var queryStart = input.indexOf('?');
if (queryStart === -1) {
return '';
}
return input.slice(queryStart + 1);
}
function parseValue(value, options) {
if (options.parseNumbers && !Number.isNaN(Number(value)) && typeof value === 'string' && value.trim() !== '') {
value = Number(value);
} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {
value = value.toLowerCase() === 'true';
}
return value;
}
function parse(query, options) {
options = Object.assign({
decode: true,
sort: true,
arrayFormat: 'none',
arrayFormatSeparator: ',',
parseNumbers: false,
parseBooleans: false
}, options);
validateArrayFormatSeparator(options.arrayFormatSeparator);
var formatter = parserForArrayFormat(options);
// Create an object with no prototype
var ret = Object.create(null);
if (typeof query !== 'string') {
return ret;
}
query = query.trim().replace(/^[?#&]/, '');
if (!query) {
return ret;
}
var _iterator = _createForOfIteratorHelper(query.split('&')),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var param = _step.value;
if (param === '') {
continue;
}
var _splitOnFirst = splitOnFirst(options.decode ? param.replace(/\+/g, ' ') : param, '='),
_splitOnFirst2 = _slicedToArray(_splitOnFirst, 2),
_key = _splitOnFirst2[0],
_value = _splitOnFirst2[1]; // Missing `=` should be `null`:
// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters
_value = _value === undefined ? null : ['comma', 'separator'].includes(options.arrayFormat) ? _value : decode(_value, options);
formatter(decode(_key, options), _value, ret);
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
for (var _i = 0, _Object$keys = Object.keys(ret); _i < _Object$keys.length; _i++) {
var key = _Object$keys[_i];
var value = ret[key];
if (typeof value === 'object' && value !== null) {
for (var _i2 = 0, _Object$keys2 = Object.keys(value); _i2 < _Object$keys2.length; _i2++) {
var k = _Object$keys2[_i2];
value[k] = parseValue(value[k], options);
}
} else {
ret[key] = parseValue(value, options);
}
}
if (options.sort === false) {
return ret;
}
return (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce(function (result, key) {
var value = ret[key];
if (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {
// Sort object keys, not values
result[key] = keysSorter(value);
} else {
result[key] = value;
}
return result;
}, Object.create(null));
}
exports.extract = extract;
exports.parse = parse;
exports.stringify = function (object, options) {
if (!object) {
return '';
}
options = Object.assign({
encode: true,
strict: true,
arrayFormat: 'none',
arrayFormatSeparator: ','
}, options);
validateArrayFormatSeparator(options.arrayFormatSeparator);
var shouldFilter = function shouldFilter(key) {
return options.skipNull && isNullOrUndefined(object[key]) || options.skipEmptyString && object[key] === '';
};
var formatter = encoderForArrayFormat(options);
var objectCopy = {};
for (var _i3 = 0, _Object$keys3 = Object.keys(object); _i3 < _Object$keys3.length; _i3++) {
var key = _Object$keys3[_i3];
if (!shouldFilter(key)) {
objectCopy[key] = object[key];
}
}
var keys = Object.keys(objectCopy);
if (options.sort !== false) {
keys.sort(options.sort);
}
return keys.map(function (key) {
var value = object[key];
if (value === undefined) {
return '';
}
if (value === null) {
return encode(key, options);
}
if (Array.isArray(value)) {
return value.reduce(formatter(key), []).join('&');
}
return encode(key, options) + '=' + encode(value, options);
}).filter(function (x) {
return x.length > 0;
}).join('&');
};
exports.parseUrl = function (url, options) {
options = Object.assign({
decode: true
}, options);
var _splitOnFirst3 = splitOnFirst(url, '#'),
_splitOnFirst4 = _slicedToArray(_splitOnFirst3, 2),
url_ = _splitOnFirst4[0],
hash = _splitOnFirst4[1];
return Object.assign({
url: url_.split('?')[0] || '',
query: parse(extract(url), options)
}, options && options.parseFragmentIdentifier && hash ? {
fragmentIdentifier: decode(hash, options)
} : {});
};
exports.stringifyUrl = function (object, options) {
options = Object.assign({
encode: true,
strict: true
}, options);
var url = removeHash(object.url).split('?')[0] || '';
var queryFromUrl = exports.extract(object.url);
var parsedQueryFromUrl = exports.parse(queryFromUrl, {
sort: false
});
var query = Object.assign(parsedQueryFromUrl, object.query);
var queryString = exports.stringify(query, options);
if (queryString) {
queryString = "?".concat(queryString);
}
var hash = getHash(object.url);
if (object.fragmentIdentifier) {
hash = "#".concat(encode(object.fragmentIdentifier, options));
}
return "".concat(url).concat(queryString).concat(hash);
};
exports.pick = function (input, filter, options) {
options = Object.assign({
parseFragmentIdentifier: true
}, options);
var _exports$parseUrl = exports.parseUrl(input, options),
url = _exports$parseUrl.url,
query = _exports$parseUrl.query,
fragmentIdentifier = _exports$parseUrl.fragmentIdentifier;
return exports.stringifyUrl({
url: url,
query: filterObject(query, filter),
fragmentIdentifier: fragmentIdentifier
}, options);
};
exports.exclude = function (input, filter, options) {
var exclusionFilter = Array.isArray(filter) ? function (key) {
return !filter.includes(key);
} : function (key, value) {
return !filter(key, value);
};
return exports.pick(input, exclusionFilter, options);
};
/***/ }),
/***/ "ctDJ":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.map.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.map` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
map: function map(callbackfn /* , thisArg */) {
var set = anObject(this);
var iterator = getSetIterator(set);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
var newSet = new (speciesConstructor(set, getBuiltIn('Set')))();
var adder = aFunction(newSet.add);
iterate(iterator, function (value) {
adder.call(newSet, boundFunction(value, value, set));
}, undefined, false, true);
return newSet;
}
});
/***/ }),
/***/ "cvf0":
/*!******************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.to-string.js ***!
\******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var exportTypedArrayMethod = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC").exportTypedArrayMethod;
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var Uint8Array = global.Uint8Array;
var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {};
var arrayToString = [].toString;
var arrayJoin = [].join;
if (fails(function () { arrayToString.call({}); })) {
arrayToString = function toString() {
return arrayJoin.call(this);
};
}
var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString;
// `%TypedArray%.prototype.toString` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tostring
exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD);
/***/ }),
/***/ "d6cI":
/*!***************************************************!*\
!*** ./node_modules/core-js/internals/ieee754.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
// IEEE754 conversions based on https://github.com/feross/ieee754
// eslint-disable-next-line no-shadow-restricted-names
var Infinity = 1 / 0;
var abs = Math.abs;
var pow = Math.pow;
var floor = Math.floor;
var log = Math.log;
var LN2 = Math.LN2;
var pack = function (number, mantissaLength, bytes) {
var buffer = new Array(bytes);
var exponentLength = bytes * 8 - mantissaLength - 1;
var eMax = (1 << exponentLength) - 1;
var eBias = eMax >> 1;
var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0;
var index = 0;
var exponent, mantissa, c;
number = abs(number);
// eslint-disable-next-line no-self-compare
if (number != number || number === Infinity) {
// eslint-disable-next-line no-self-compare
mantissa = number != number ? 1 : 0;
exponent = eMax;
} else {
exponent = floor(log(number) / LN2);
if (number * (c = pow(2, -exponent)) < 1) {
exponent--;
c *= 2;
}
if (exponent + eBias >= 1) {
number += rt / c;
} else {
number += rt * pow(2, 1 - eBias);
}
if (number * c >= 2) {
exponent++;
c /= 2;
}
if (exponent + eBias >= eMax) {
mantissa = 0;
exponent = eMax;
} else if (exponent + eBias >= 1) {
mantissa = (number * c - 1) * pow(2, mantissaLength);
exponent = exponent + eBias;
} else {
mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
exponent = 0;
}
}
for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8);
exponent = exponent << mantissaLength | mantissa;
exponentLength += mantissaLength;
for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
buffer[--index] |= sign * 128;
return buffer;
};
var unpack = function (buffer, mantissaLength) {
var bytes = buffer.length;
var exponentLength = bytes * 8 - mantissaLength - 1;
var eMax = (1 << exponentLength) - 1;
var eBias = eMax >> 1;
var nBits = exponentLength - 7;
var index = bytes - 1;
var sign = buffer[index--];
var exponent = sign & 127;
var mantissa;
sign >>= 7;
for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
mantissa = exponent & (1 << -nBits) - 1;
exponent >>= -nBits;
nBits += mantissaLength;
for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
if (exponent === 0) {
exponent = 1 - eBias;
} else if (exponent === eMax) {
return mantissa ? NaN : sign ? -Infinity : Infinity;
} else {
mantissa = mantissa + pow(2, mantissaLength);
exponent = exponent - eBias;
} return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
};
module.exports = {
pack: pack,
unpack: unpack
};
/***/ }),
/***/ "dBg+":
/*!***************************************************************************!*\
!*** ./node_modules/core-js/internals/object-get-own-property-symbols.js ***!
\***************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
exports.f = Object.getOwnPropertySymbols;
/***/ }),
/***/ "dG/n":
/*!********************************************************************!*\
!*** ./node_modules/core-js/internals/define-well-known-symbol.js ***!
\********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var path = __webpack_require__(/*! ../internals/path */ "Qo9l");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "5Tg+");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
module.exports = function (NAME) {
var Symbol = path.Symbol || (path.Symbol = {});
if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, {
value: wrappedWellKnownSymbolModule.f(NAME)
});
};
/***/ }),
/***/ "dI71":
/*!******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js ***!
\******************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _inheritsLoose; });
/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./setPrototypeOf.js */ "s4An");
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
Object(_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(subClass, superClass);
}
/***/ }),
/***/ "dNT4":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.every.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.every` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
every: function every(callbackfn /* , thisArg */) {
var set = anObject(this);
var iterator = getSetIterator(set);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
return !iterate(iterator, function (value) {
if (!boundFunction(value, value, set)) return iterate.stop();
}, undefined, false, true).stopped;
}
});
/***/ }),
/***/ "dOgj":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/internals/typed-array-constructor.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(/*! ../internals/typed-array-constructors-require-wrappers */ "iqeF");
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var ArrayBufferModule = __webpack_require__(/*! ../internals/array-buffer */ "Yhre");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toIndex = __webpack_require__(/*! ../internals/to-index */ "CyXQ");
var toOffset = __webpack_require__(/*! ../internals/to-offset */ "GC2F");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var classof = __webpack_require__(/*! ../internals/classof */ "9d/t");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr");
var getOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "JBy8").f;
var typedArrayFrom = __webpack_require__(/*! ../internals/typed-array-from */ "oHi+");
var forEach = __webpack_require__(/*! ../internals/array-iteration */ "tycR").forEach;
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JiZb");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var inheritIfRequired = __webpack_require__(/*! ../internals/inherit-if-required */ "cVYH");
var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var nativeDefineProperty = definePropertyModule.f;
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
var round = Math.round;
var RangeError = global.RangeError;
var ArrayBuffer = ArrayBufferModule.ArrayBuffer;
var DataView = ArrayBufferModule.DataView;
var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS;
var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG;
var TypedArray = ArrayBufferViewCore.TypedArray;
var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype;
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var isTypedArray = ArrayBufferViewCore.isTypedArray;
var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT';
var WRONG_LENGTH = 'Wrong length';
var fromList = function (C, list) {
var index = 0;
var length = list.length;
var result = new (aTypedArrayConstructor(C))(length);
while (length > index) result[index] = list[index++];
return result;
};
var addGetter = function (it, key) {
nativeDefineProperty(it, key, { get: function () {
return getInternalState(this)[key];
} });
};
var isArrayBuffer = function (it) {
var klass;
return it instanceof ArrayBuffer || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer';
};
var isTypedArrayIndex = function (target, key) {
return isTypedArray(target)
&& typeof key != 'symbol'
&& key in target
&& String(+key) == String(key);
};
var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) {
return isTypedArrayIndex(target, key = toPrimitive(key, true))
? createPropertyDescriptor(2, target[key])
: nativeGetOwnPropertyDescriptor(target, key);
};
var wrappedDefineProperty = function defineProperty(target, key, descriptor) {
if (isTypedArrayIndex(target, key = toPrimitive(key, true))
&& isObject(descriptor)
&& has(descriptor, 'value')
&& !has(descriptor, 'get')
&& !has(descriptor, 'set')
// TODO: add validation descriptor w/o calling accessors
&& !descriptor.configurable
&& (!has(descriptor, 'writable') || descriptor.writable)
&& (!has(descriptor, 'enumerable') || descriptor.enumerable)
) {
target[key] = descriptor.value;
return target;
} return nativeDefineProperty(target, key, descriptor);
};
if (DESCRIPTORS) {
if (!NATIVE_ARRAY_BUFFER_VIEWS) {
getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor;
definePropertyModule.f = wrappedDefineProperty;
addGetter(TypedArrayPrototype, 'buffer');
addGetter(TypedArrayPrototype, 'byteOffset');
addGetter(TypedArrayPrototype, 'byteLength');
addGetter(TypedArrayPrototype, 'length');
}
$({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, {
getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor,
defineProperty: wrappedDefineProperty
});
module.exports = function (TYPE, wrapper, CLAMPED) {
var BYTES = TYPE.match(/\d+$/)[0] / 8;
var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array';
var GETTER = 'get' + TYPE;
var SETTER = 'set' + TYPE;
var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME];
var TypedArrayConstructor = NativeTypedArrayConstructor;
var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype;
var exported = {};
var getter = function (that, index) {
var data = getInternalState(that);
return data.view[GETTER](index * BYTES + data.byteOffset, true);
};
var setter = function (that, index, value) {
var data = getInternalState(that);
if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF;
data.view[SETTER](index * BYTES + data.byteOffset, value, true);
};
var addElement = function (that, index) {
nativeDefineProperty(that, index, {
get: function () {
return getter(this, index);
},
set: function (value) {
return setter(this, index, value);
},
enumerable: true
});
};
if (!NATIVE_ARRAY_BUFFER_VIEWS) {
TypedArrayConstructor = wrapper(function (that, data, offset, $length) {
anInstance(that, TypedArrayConstructor, CONSTRUCTOR_NAME);
var index = 0;
var byteOffset = 0;
var buffer, byteLength, length;
if (!isObject(data)) {
length = toIndex(data);
byteLength = length * BYTES;
buffer = new ArrayBuffer(byteLength);
} else if (isArrayBuffer(data)) {
buffer = data;
byteOffset = toOffset(offset, BYTES);
var $len = data.byteLength;
if ($length === undefined) {
if ($len % BYTES) throw RangeError(WRONG_LENGTH);
byteLength = $len - byteOffset;
if (byteLength < 0) throw RangeError(WRONG_LENGTH);
} else {
byteLength = toLength($length) * BYTES;
if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH);
}
length = byteLength / BYTES;
} else if (isTypedArray(data)) {
return fromList(TypedArrayConstructor, data);
} else {
return typedArrayFrom.call(TypedArrayConstructor, data);
}
setInternalState(that, {
buffer: buffer,
byteOffset: byteOffset,
byteLength: byteLength,
length: length,
view: new DataView(buffer)
});
while (index < length) addElement(that, index++);
});
if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype);
} else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) {
TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) {
anInstance(dummy, TypedArrayConstructor, CONSTRUCTOR_NAME);
return inheritIfRequired(function () {
if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data));
if (isArrayBuffer(data)) return $length !== undefined
? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length)
: typedArrayOffset !== undefined
? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES))
: new NativeTypedArrayConstructor(data);
if (isTypedArray(data)) return fromList(TypedArrayConstructor, data);
return typedArrayFrom.call(TypedArrayConstructor, data);
}(), dummy, TypedArrayConstructor);
});
if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray);
forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) {
if (!(key in TypedArrayConstructor)) {
createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]);
}
});
TypedArrayConstructor.prototype = TypedArrayConstructorPrototype;
}
if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) {
createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor);
}
if (TYPED_ARRAY_TAG) {
createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME);
}
exported[CONSTRUCTOR_NAME] = TypedArrayConstructor;
$({
global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS
}, exported);
if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) {
createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES);
}
if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) {
createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES);
}
setSpecies(CONSTRUCTOR_NAME);
};
} else module.exports = function () { /* empty */ };
/***/ }),
/***/ "dVn5":
/*!********************************************!*\
!*** ./node_modules/lodash/_asciiWords.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/** Used to match words composed of alphanumeric characters. */
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
/**
* Splits an ASCII `string` into an array of its words.
*
* @private
* @param {string} The string to inspect.
* @returns {Array} Returns the words of `string`.
*/
function asciiWords(string) {
return string.match(reAsciiWord) || [];
}
module.exports = asciiWords;
/***/ }),
/***/ "dt0z":
/*!*****************************************!*\
!*** ./node_modules/lodash/toString.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var baseToString = __webpack_require__(/*! ./_baseToString */ "zoYe");
/**
* Converts `value` to a string. An empty string is returned for `null`
* and `undefined` values. The sign of `-0` is preserved.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.toString(null);
* // => ''
*
* _.toString(-0);
* // => '-0'
*
* _.toString([1, 2, 3]);
* // => '1,2,3'
*/
function toString(value) {
return value == null ? '' : baseToString(value);
}
module.exports = toString;
/***/ }),
/***/ "eDl+":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/enum-bug-keys.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
// IE8- don't enum bug keys
module.exports = [
'constructor',
'hasOwnProperty',
'isPrototypeOf',
'propertyIsEnumerable',
'toLocaleString',
'toString',
'valueOf'
];
/***/ }),
/***/ "eDxR":
/*!************************************************************!*\
!*** ./node_modules/core-js/internals/reflect-metadata.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
var Map = __webpack_require__(/*! ../modules/es.map */ "Tskq");
var WeakMap = __webpack_require__(/*! ../modules/es.weak-map */ "ENF9");
var shared = __webpack_require__(/*! ../internals/shared */ "VpIT");
var metadata = shared('metadata');
var store = metadata.store || (metadata.store = new WeakMap());
var getOrCreateMetadataMap = function (target, targetKey, create) {
var targetMetadata = store.get(target);
if (!targetMetadata) {
if (!create) return;
store.set(target, targetMetadata = new Map());
}
var keyMetadata = targetMetadata.get(targetKey);
if (!keyMetadata) {
if (!create) return;
targetMetadata.set(targetKey, keyMetadata = new Map());
} return keyMetadata;
};
var ordinaryHasOwnMetadata = function (MetadataKey, O, P) {
var metadataMap = getOrCreateMetadataMap(O, P, false);
return metadataMap === undefined ? false : metadataMap.has(MetadataKey);
};
var ordinaryGetOwnMetadata = function (MetadataKey, O, P) {
var metadataMap = getOrCreateMetadataMap(O, P, false);
return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey);
};
var ordinaryDefineOwnMetadata = function (MetadataKey, MetadataValue, O, P) {
getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue);
};
var ordinaryOwnMetadataKeys = function (target, targetKey) {
var metadataMap = getOrCreateMetadataMap(target, targetKey, false);
var keys = [];
if (metadataMap) metadataMap.forEach(function (_, key) { keys.push(key); });
return keys;
};
var toMetadataKey = function (it) {
return it === undefined || typeof it == 'symbol' ? it : String(it);
};
module.exports = {
store: store,
getMap: getOrCreateMetadataMap,
has: ordinaryHasOwnMetadata,
get: ordinaryGetOwnMetadata,
set: ordinaryDefineOwnMetadata,
keys: ordinaryOwnMetadataKeys,
toKey: toMetadataKey
};
/***/ }),
/***/ "eJiR":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.tanh.js ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var expm1 = __webpack_require__(/*! ../internals/math-expm1 */ "jrUv");
var exp = Math.exp;
// `Math.tanh` method
// https://tc39.github.io/ecma262/#sec-math.tanh
$({ target: 'Math', stat: true }, {
tanh: function tanh(x) {
var a = expm1(x = +x);
var b = expm1(-x);
return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x));
}
});
/***/ }),
/***/ "eO0o":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.imulh.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Math.imulh` method
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
// TODO: Remove from `core-js@4`
$({ target: 'Math', stat: true }, {
imulh: function imulh(u, v) {
var UINT16 = 0xFFFF;
var $u = +u;
var $v = +v;
var u0 = $u & UINT16;
var v0 = $v & UINT16;
var u1 = $u >> 16;
var v1 = $v >> 16;
var t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16);
return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16);
}
});
/***/ }),
/***/ "eRe6":
/*!***************************************************!*\
!*** ./node_modules/axios/lib/core/AxiosError.js ***!
\***************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _utils_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../utils.js */ "xTJ+");
/**
* Create an Error with the specified message, config, error code, request and response.
*
* @param {string} message The error message.
* @param {string} [code] The error code (for example, 'ECONNABORTED').
* @param {Object} [config] The config.
* @param {Object} [request] The request.
* @param {Object} [response] The response.
*
* @returns {Error} The created error.
*/
function AxiosError(message, code, config, request, response) {
Error.call(this);
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
} else {
this.stack = (new Error()).stack;
}
this.message = message;
this.name = 'AxiosError';
code && (this.code = code);
config && (this.config = config);
request && (this.request = request);
response && (this.response = response);
}
_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].inherits(AxiosError, Error, {
toJSON: function toJSON() {
return {
// Standard
message: this.message,
name: this.name,
// Microsoft
description: this.description,
number: this.number,
// Mozilla
fileName: this.fileName,
lineNumber: this.lineNumber,
columnNumber: this.columnNumber,
stack: this.stack,
// Axios
config: _utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toJSONObject(this.config),
code: this.code,
status: this.response && this.response.status ? this.response.status : null
};
}
});
const prototype = AxiosError.prototype;
const descriptors = {};
[
'ERR_BAD_OPTION_VALUE',
'ERR_BAD_OPTION',
'ECONNABORTED',
'ETIMEDOUT',
'ERR_NETWORK',
'ERR_FR_TOO_MANY_REDIRECTS',
'ERR_DEPRECATED',
'ERR_BAD_RESPONSE',
'ERR_BAD_REQUEST',
'ERR_CANCELED',
'ERR_NOT_SUPPORT',
'ERR_INVALID_URL'
// eslint-disable-next-line func-names
].forEach(code => {
descriptors[code] = {value: code};
});
Object.defineProperties(AxiosError, descriptors);
Object.defineProperty(prototype, 'isAxiosError', {value: true});
// eslint-disable-next-line func-names
AxiosError.from = (error, code, config, request, response, customProps) => {
const axiosError = Object.create(prototype);
_utils_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"].toFlatObject(error, axiosError, function filter(obj) {
return obj !== Error.prototype;
}, prop => {
return prop !== 'isAxiosError';
});
AxiosError.call(axiosError, error.message, code, config, request, response);
axiosError.cause = error;
axiosError.name = error.name;
customProps && Object.assign(axiosError, customProps);
return axiosError;
};
/* harmony default export */ __webpack_exports__["a"] = (AxiosError);
/***/ }),
/***/ "eUgh":
/*!******************************************!*\
!*** ./node_modules/lodash/_arrayMap.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/**
* A specialized version of `_.map` for arrays without support for iteratee
* shorthands.
*
* @private
* @param {Array} [array] The array to iterate over.
* @param {Function} iteratee The function invoked per iteration.
* @returns {Array} Returns the new mapped array.
*/
function arrayMap(array, iteratee) {
var index = -1,
length = array == null ? 0 : array.length,
result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
module.exports = arrayMap;
/***/ }),
/***/ "eZIG":
/*!****************************************************!*\
!*** ./node_modules/define-data-property/index.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $defineProperty = __webpack_require__(/*! es-define-property */ "cckQ");
var $SyntaxError = __webpack_require__(/*! es-errors/syntax */ "Z+6F");
var $TypeError = __webpack_require__(/*! es-errors/type */ "DSU0");
var gopd = __webpack_require__(/*! gopd */ "Kqna");
/** @type {import('.')} */
module.exports = function defineDataProperty(
obj,
property,
value
) {
if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {
throw new $TypeError('`obj` must be an object or a function`');
}
if (typeof property !== 'string' && typeof property !== 'symbol') {
throw new $TypeError('`property` must be a string or a symbol`');
}
if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {
throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');
}
if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {
throw new $TypeError('`nonWritable`, if provided, must be a boolean or null');
}
if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {
throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');
}
if (arguments.length > 6 && typeof arguments[6] !== 'boolean') {
throw new $TypeError('`loose`, if provided, must be a boolean');
}
var nonEnumerable = arguments.length > 3 ? arguments[3] : null;
var nonWritable = arguments.length > 4 ? arguments[4] : null;
var nonConfigurable = arguments.length > 5 ? arguments[5] : null;
var loose = arguments.length > 6 ? arguments[6] : false;
/* @type {false | TypedPropertyDescriptor<unknown>} */
var desc = !!gopd && gopd(obj, property);
if ($defineProperty) {
$defineProperty(obj, property, {
configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,
enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,
value: value,
writable: nonWritable === null && desc ? desc.writable : !nonWritable
});
} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {
// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable
obj[property] = value; // eslint-disable-line no-param-reassign
} else {
throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');
}
};
/***/ }),
/***/ "eajv":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.asinh.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var nativeAsinh = Math.asinh;
var log = Math.log;
var sqrt = Math.sqrt;
function asinh(x) {
return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : log(x + sqrt(x * x + 1));
}
// `Math.asinh` method
// https://tc39.github.io/ecma262/#sec-math.asinh
// Tor Browser bug: Math.asinh(0) -> -0
$({ target: 'Math', stat: true, forced: !(nativeAsinh && 1 / nativeAsinh(0) > 0) }, {
asinh: asinh
});
/***/ }),
/***/ "en47":
/*!*********************************!*\
!*** ./src/models/paths/new.ts ***!
\*********************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_paths__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/paths */ "Mgx3");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var NewCourseModel = {
namespace: 'newCourse',
state: {},
effects: {
editCourse: function editCourse(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_1__[/* editCourse */ "a"], payload);
case 2:
return _context.abrupt("return", _context.sent);
case 3:
case "end":
return _context.stop();
}
}, _callee);
})();
},
submitCourse: function submitCourse(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_1__[/* submitCourse */ "j"], payload);
case 2:
return _context2.abrupt("return", _context2.sent);
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getEditCourseData: function getEditCourseData(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_1__[/* getEditCourseData */ "f"], payload);
case 2:
return _context3.abrupt("return", _context3.sent);
case 3:
case "end":
return _context3.stop();
}
}, _callee3);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref7) {
var dispatch = _ref7.dispatch,
history = _ref7.history;
return history.listen(function (_ref8) {
var pathname = _ref8.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (NewCourseModel);
/***/ }),
/***/ "ewvW":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/to-object.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
// `ToObject` abstract operation
// https://tc39.github.io/ecma262/#sec-toobject
module.exports = function (argument) {
return Object(requireObjectCoercible(argument));
};
/***/ }),
/***/ "f3jH":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.get-prototype-of.js ***!
\*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var objectGetPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var CORRECT_PROTOTYPE_GETTER = __webpack_require__(/*! ../internals/correct-prototype-getter */ "4Xet");
// `Reflect.getPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-reflect.getprototypeof
$({ target: 'Reflect', stat: true, sham: !CORRECT_PROTOTYPE_GETTER }, {
getPrototypeOf: function getPrototypeOf(target) {
return objectGetPrototypeOf(anObject(target));
}
});
/***/ }),
/***/ "f5p1":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/native-weak-map.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "iSVu");
var WeakMap = global.WeakMap;
module.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
/***/ }),
/***/ "fEPi":
/*!*********************************************************!*\
!*** ./node_modules/@ant-design/icons/RightOutlined.js ***!
\*********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _RightOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/RightOutlined */ "9Odx"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _RightOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "fHMY":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/object-create.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "N+g0");
var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "eDl+");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "0BK2");
var html = __webpack_require__(/*! ../internals/html */ "G+Rx");
var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "zBJ4");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "93I0");
var GT = '>';
var LT = '<';
var PROTOTYPE = 'prototype';
var SCRIPT = 'script';
var IE_PROTO = sharedKey('IE_PROTO');
var EmptyConstructor = function () { /* empty */ };
var scriptTag = function (content) {
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
};
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
var NullProtoObjectViaActiveX = function (activeXDocument) {
activeXDocument.write(scriptTag(''));
activeXDocument.close();
var temp = activeXDocument.parentWindow.Object;
activeXDocument = null; // avoid memory leak
return temp;
};
// Create object with fake `null` prototype: use iframe Object with cleared prototype
var NullProtoObjectViaIFrame = function () {
// Thrash, waste and sodomy: IE GC bug
var iframe = documentCreateElement('iframe');
var JS = 'java' + SCRIPT + ':';
var iframeDocument;
iframe.style.display = 'none';
html.appendChild(iframe);
// https://github.com/zloirock/core-js/issues/475
iframe.src = String(JS);
iframeDocument = iframe.contentWindow.document;
iframeDocument.open();
iframeDocument.write(scriptTag('document.F=Object'));
iframeDocument.close();
return iframeDocument.F;
};
// Check for document.domain and active x support
// No need to use active x approach when document.domain is not set
// see https://github.com/es-shims/es5-shim/issues/150
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
// avoid IE GC bug
var activeXDocument;
var NullProtoObject = function () {
try {
/* global ActiveXObject */
activeXDocument = document.domain && new ActiveXObject('htmlfile');
} catch (error) { /* ignore */ }
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
var length = enumBugKeys.length;
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
return NullProtoObject();
};
hiddenKeys[IE_PROTO] = true;
// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
module.exports = Object.create || function create(O, Properties) {
var result;
if (O !== null) {
EmptyConstructor[PROTOTYPE] = anObject(O);
result = new EmptyConstructor();
EmptyConstructor[PROTOTYPE] = null;
// add "__proto__" for Object.getPrototypeOf polyfill
result[IE_PROTO] = O;
} else result = NullProtoObject();
return Properties === undefined ? result : defineProperties(result, Properties);
};
/***/ }),
/***/ "fL0r":
/*!***************************************!*\
!*** ./node_modules/intl/lib/core.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj;
};
var jsx = function () {
var REACT_ELEMENT_TYPE = typeof Symbol === "function" && Symbol.for && Symbol.for("react.element") || 0xeac7;
return function createRawReactElement(type, props, key, children) {
var defaultProps = type && type.defaultProps;
var childrenLength = arguments.length - 3;
if (!props && childrenLength !== 0) {
props = {};
}
if (props && defaultProps) {
for (var propName in defaultProps) {
if (props[propName] === void 0) {
props[propName] = defaultProps[propName];
}
}
} else if (!props) {
props = defaultProps || {};
}
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 3];
}
props.children = childArray;
}
return {
$$typeof: REACT_ELEMENT_TYPE,
type: type,
key: key === undefined ? null : '' + key,
ref: null,
props: props,
_owner: null
};
};
}();
var asyncToGenerator = function (fn) {
return function () {
var gen = fn.apply(this, arguments);
return new Promise(function (resolve, reject) {
function step(key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
return Promise.resolve(value).then(function (value) {
return step("next", value);
}, function (err) {
return step("throw", err);
});
}
}
return step("next");
});
};
};
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
var createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var defineEnumerableProperties = function (obj, descs) {
for (var key in descs) {
var desc = descs[key];
desc.configurable = desc.enumerable = true;
if ("value" in desc) desc.writable = true;
Object.defineProperty(obj, key, desc);
}
return obj;
};
var defaults = function (obj, defaults) {
var keys = Object.getOwnPropertyNames(defaults);
for (var i = 0; i < keys.length; i++) {
var key = keys[i];
var value = Object.getOwnPropertyDescriptor(defaults, key);
if (value && value.configurable && obj[key] === undefined) {
Object.defineProperty(obj, key, value);
}
}
return obj;
};
var defineProperty$1 = function (obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
};
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var get = function get(object, property, receiver) {
if (object === null) object = Function.prototype;
var desc = Object.getOwnPropertyDescriptor(object, property);
if (desc === undefined) {
var parent = Object.getPrototypeOf(object);
if (parent === null) {
return undefined;
} else {
return get(parent, property, receiver);
}
} else if ("value" in desc) {
return desc.value;
} else {
var getter = desc.get;
if (getter === undefined) {
return undefined;
}
return getter.call(receiver);
}
};
var inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var _instanceof = function (left, right) {
if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
return right[Symbol.hasInstance](left);
} else {
return left instanceof right;
}
};
var interopRequireDefault = function (obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
};
var interopRequireWildcard = function (obj) {
if (obj && obj.__esModule) {
return obj;
} else {
var newObj = {};
if (obj != null) {
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
}
}
newObj.default = obj;
return newObj;
}
};
var newArrowCheck = function (innerThis, boundThis) {
if (innerThis !== boundThis) {
throw new TypeError("Cannot instantiate an arrow function");
}
};
var objectDestructuringEmpty = function (obj) {
if (obj == null) throw new TypeError("Cannot destructure undefined");
};
var objectWithoutProperties = function (obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
var possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
var selfGlobal = typeof global === "undefined" ? self : global;
var set = function set(object, property, value, receiver) {
var desc = Object.getOwnPropertyDescriptor(object, property);
if (desc === undefined) {
var parent = Object.getPrototypeOf(object);
if (parent !== null) {
set(parent, property, value, receiver);
}
} else if ("value" in desc && desc.writable) {
desc.value = value;
} else {
var setter = desc.set;
if (setter !== undefined) {
setter.call(receiver, value);
}
}
return value;
};
var slicedToArray = function () {
function sliceIterator(arr, i) {
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"]) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
return function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if (Symbol.iterator in Object(arr)) {
return sliceIterator(arr, i);
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
}();
var slicedToArrayLoose = function (arr, i) {
if (Array.isArray(arr)) {
return arr;
} else if (Symbol.iterator in Object(arr)) {
var _arr = [];
for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {
_arr.push(_step.value);
if (i && _arr.length === i) break;
}
return _arr;
} else {
throw new TypeError("Invalid attempt to destructure non-iterable instance");
}
};
var taggedTemplateLiteral = function (strings, raw) {
return Object.freeze(Object.defineProperties(strings, {
raw: {
value: Object.freeze(raw)
}
}));
};
var taggedTemplateLiteralLoose = function (strings, raw) {
strings.raw = raw;
return strings;
};
var temporalRef = function (val, name, undef) {
if (val === undef) {
throw new ReferenceError(name + " is not defined - temporal dead zone");
} else {
return val;
}
};
var temporalUndefined = {};
var toArray = function (arr) {
return Array.isArray(arr) ? arr : Array.from(arr);
};
var toConsumableArray = function (arr) {
if (Array.isArray(arr)) {
for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];
return arr2;
} else {
return Array.from(arr);
}
};
var babelHelpers$1 = Object.freeze({
jsx: jsx,
asyncToGenerator: asyncToGenerator,
classCallCheck: classCallCheck,
createClass: createClass,
defineEnumerableProperties: defineEnumerableProperties,
defaults: defaults,
defineProperty: defineProperty$1,
get: get,
inherits: inherits,
interopRequireDefault: interopRequireDefault,
interopRequireWildcard: interopRequireWildcard,
newArrowCheck: newArrowCheck,
objectDestructuringEmpty: objectDestructuringEmpty,
objectWithoutProperties: objectWithoutProperties,
possibleConstructorReturn: possibleConstructorReturn,
selfGlobal: selfGlobal,
set: set,
slicedToArray: slicedToArray,
slicedToArrayLoose: slicedToArrayLoose,
taggedTemplateLiteral: taggedTemplateLiteral,
taggedTemplateLiteralLoose: taggedTemplateLiteralLoose,
temporalRef: temporalRef,
temporalUndefined: temporalUndefined,
toArray: toArray,
toConsumableArray: toConsumableArray,
typeof: _typeof,
extends: _extends,
instanceof: _instanceof
});
var realDefineProp = function () {
var sentinel = function sentinel() {};
try {
Object.defineProperty(sentinel, 'a', {
get: function get() {
return 1;
}
});
Object.defineProperty(sentinel, 'prototype', { writable: false });
return sentinel.a === 1 && sentinel.prototype instanceof Object;
} catch (e) {
return false;
}
}();
// Need a workaround for getters in ES3
var es3 = !realDefineProp && !Object.prototype.__defineGetter__;
// We use this a lot (and need it for proto-less objects)
var hop = Object.prototype.hasOwnProperty;
// Naive defineProperty for compatibility
var defineProperty = realDefineProp ? Object.defineProperty : function (obj, name, desc) {
if ('get' in desc && obj.__defineGetter__) obj.__defineGetter__(name, desc.get);else if (!hop.call(obj, name) || 'value' in desc) obj[name] = desc.value;
};
// Array.prototype.indexOf, as good as we need it to be
var arrIndexOf = Array.prototype.indexOf || function (search) {
/*jshint validthis:true */
var t = this;
if (!t.length) return -1;
for (var i = arguments[1] || 0, max = t.length; i < max; i++) {
if (t[i] === search) return i;
}
return -1;
};
// Create an object with the specified prototype (2nd arg required for Record)
var objCreate = Object.create || function (proto, props) {
var obj = void 0;
function F() {}
F.prototype = proto;
obj = new F();
for (var k in props) {
if (hop.call(props, k)) defineProperty(obj, k, props[k]);
}
return obj;
};
// Snapshot some (hopefully still) native built-ins
var arrSlice = Array.prototype.slice;
var arrConcat = Array.prototype.concat;
var arrPush = Array.prototype.push;
var arrJoin = Array.prototype.join;
var arrShift = Array.prototype.shift;
// Naive Function.prototype.bind for compatibility
var fnBind = Function.prototype.bind || function (thisObj) {
var fn = this,
args = arrSlice.call(arguments, 1);
// All our (presently) bound functions have either 1 or 0 arguments. By returning
// different function signatures, we can pass some tests in ES3 environments
if (fn.length === 1) {
return function () {
return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));
};
}
return function () {
return fn.apply(thisObj, arrConcat.call(args, arrSlice.call(arguments)));
};
};
// Object housing internal properties for constructors
var internals = objCreate(null);
// Keep internal properties internal
var secret = Math.random();
// Helper functions
// ================
/**
* A function to deal with the inaccuracy of calculating log10 in pre-ES6
* JavaScript environments. Math.log(num) / Math.LN10 was responsible for
* causing issue #62.
*/
function log10Floor(n) {
// ES6 provides the more accurate Math.log10
if (typeof Math.log10 === 'function') return Math.floor(Math.log10(n));
var x = Math.round(Math.log(n) * Math.LOG10E);
return x - (Number('1e' + x) > n);
}
/**
* A map that doesn't contain Object in its prototype chain
*/
function Record(obj) {
// Copy only own properties over unless this object is already a Record instance
for (var k in obj) {
if (obj instanceof Record || hop.call(obj, k)) defineProperty(this, k, { value: obj[k], enumerable: true, writable: true, configurable: true });
}
}
Record.prototype = objCreate(null);
/**
* An ordered list
*/
function List() {
defineProperty(this, 'length', { writable: true, value: 0 });
if (arguments.length) arrPush.apply(this, arrSlice.call(arguments));
}
List.prototype = objCreate(null);
/**
* Constructs a regular expression to restore tainted RegExp properties
*/
function createRegExpRestore() {
if (internals.disableRegExpRestore) {
return function () {/* no-op */};
}
var regExpCache = {
lastMatch: RegExp.lastMatch || '',
leftContext: RegExp.leftContext,
multiline: RegExp.multiline,
input: RegExp.input
},
has = false;
// Create a snapshot of all the 'captured' properties
for (var i = 1; i <= 9; i++) {
has = (regExpCache['$' + i] = RegExp['$' + i]) || has;
}return function () {
// Now we've snapshotted some properties, escape the lastMatch string
var esc = /[.?*+^$[\]\\(){}|-]/g,
lm = regExpCache.lastMatch.replace(esc, '\\$&'),
reg = new List();
// If any of the captured strings were non-empty, iterate over them all
if (has) {
for (var _i = 1; _i <= 9; _i++) {
var m = regExpCache['$' + _i];
// If it's empty, add an empty capturing group
if (!m) lm = '()' + lm;
// Else find the string in lm and escape & wrap it to capture it
else {
m = m.replace(esc, '\\$&');
lm = lm.replace(m, '(' + m + ')');
}
// Push it to the reg and chop lm to make sure further groups come after
arrPush.call(reg, lm.slice(0, lm.indexOf('(') + 1));
lm = lm.slice(lm.indexOf('(') + 1);
}
}
var exprStr = arrJoin.call(reg, '') + lm;
// Shorten the regex by replacing each part of the expression with a match
// for a string of that exact length. This is safe for the type of
// expressions generated above, because the expression matches the whole
// match string, so we know each group and each segment between capturing
// groups can be matched by its length alone.
exprStr = exprStr.replace(/(\\\(|\\\)|[^()])+/g, function (match) {
return '[\\s\\S]{' + match.replace('\\', '').length + '}';
});
// Create the regular expression that will reconstruct the RegExp properties
var expr = new RegExp(exprStr, regExpCache.multiline ? 'gm' : 'g');
// Set the lastIndex of the generated expression to ensure that the match
// is found in the correct index.
expr.lastIndex = regExpCache.leftContext.length;
expr.exec(regExpCache.input);
};
}
/**
* Mimics ES5's abstract ToObject() function
*/
function toObject(arg) {
if (arg === null) throw new TypeError('Cannot convert null or undefined to object');
if ((typeof arg === 'undefined' ? 'undefined' : babelHelpers$1['typeof'](arg)) === 'object') return arg;
return Object(arg);
}
function toNumber(arg) {
if (typeof arg === 'number') return arg;
return Number(arg);
}
function toInteger(arg) {
var number = toNumber(arg);
if (isNaN(number)) return 0;
if (number === +0 || number === -0 || number === +Infinity || number === -Infinity) return number;
if (number < 0) return Math.floor(Math.abs(number)) * -1;
return Math.floor(Math.abs(number));
}
function toLength(arg) {
var len = toInteger(arg);
if (len <= 0) return 0;
if (len === Infinity) return Math.pow(2, 53) - 1;
return Math.min(len, Math.pow(2, 53) - 1);
}
/**
* Returns "internal" properties for an object
*/
function getInternalProperties(obj) {
if (hop.call(obj, '__getInternalProperties')) return obj.__getInternalProperties(secret);
return objCreate(null);
}
/**
* Defines regular expressions for various operations related to the BCP 47 syntax,
* as defined at http://tools.ietf.org/html/bcp47#section-2.1
*/
// extlang = 3ALPHA ; selected ISO 639 codes
// *2("-" 3ALPHA) ; permanently reserved
var extlang = '[a-z]{3}(?:-[a-z]{3}){0,2}';
// language = 2*3ALPHA ; shortest ISO 639 code
// ["-" extlang] ; sometimes followed by
// ; extended language subtags
// / 4ALPHA ; or reserved for future use
// / 5*8ALPHA ; or registered language subtag
var language = '(?:[a-z]{2,3}(?:-' + extlang + ')?|[a-z]{4}|[a-z]{5,8})';
// script = 4ALPHA ; ISO 15924 code
var script = '[a-z]{4}';
// region = 2ALPHA ; ISO 3166-1 code
// / 3DIGIT ; UN M.49 code
var region = '(?:[a-z]{2}|\\d{3})';
// variant = 5*8alphanum ; registered variants
// / (DIGIT 3alphanum)
var variant = '(?:[a-z0-9]{5,8}|\\d[a-z0-9]{3})';
// ; Single alphanumerics
// ; "x" reserved for private use
// singleton = DIGIT ; 0 - 9
// / %x41-57 ; A - W
// / %x59-5A ; Y - Z
// / %x61-77 ; a - w
// / %x79-7A ; y - z
var singleton = '[0-9a-wy-z]';
// extension = singleton 1*("-" (2*8alphanum))
var extension = singleton + '(?:-[a-z0-9]{2,8})+';
// privateuse = "x" 1*("-" (1*8alphanum))
var privateuse = 'x(?:-[a-z0-9]{1,8})+';
// irregular = "en-GB-oed" ; irregular tags do not match
// / "i-ami" ; the 'langtag' production and
// / "i-bnn" ; would not otherwise be
// / "i-default" ; considered 'well-formed'
// / "i-enochian" ; These tags are all valid,
// / "i-hak" ; but most are deprecated
// / "i-klingon" ; in favor of more modern
// / "i-lux" ; subtags or subtag
// / "i-mingo" ; combination
// / "i-navajo"
// / "i-pwn"
// / "i-tao"
// / "i-tay"
// / "i-tsu"
// / "sgn-BE-FR"
// / "sgn-BE-NL"
// / "sgn-CH-DE"
var irregular = '(?:en-GB-oed' + '|i-(?:ami|bnn|default|enochian|hak|klingon|lux|mingo|navajo|pwn|tao|tay|tsu)' + '|sgn-(?:BE-FR|BE-NL|CH-DE))';
// regular = "art-lojban" ; these tags match the 'langtag'
// / "cel-gaulish" ; production, but their subtags
// / "no-bok" ; are not extended language
// / "no-nyn" ; or variant subtags: their meaning
// / "zh-guoyu" ; is defined by their registration
// / "zh-hakka" ; and all of these are deprecated
// / "zh-min" ; in favor of a more modern
// / "zh-min-nan" ; subtag or sequence of subtags
// / "zh-xiang"
var regular = '(?:art-lojban|cel-gaulish|no-bok|no-nyn' + '|zh-(?:guoyu|hakka|min|min-nan|xiang))';
// grandfathered = irregular ; non-redundant tags registered
// / regular ; during the RFC 3066 era
var grandfathered = '(?:' + irregular + '|' + regular + ')';
// langtag = language
// ["-" script]
// ["-" region]
// *("-" variant)
// *("-" extension)
// ["-" privateuse]
var langtag = language + '(?:-' + script + ')?(?:-' + region + ')?(?:-' + variant + ')*(?:-' + extension + ')*(?:-' + privateuse + ')?';
// Language-Tag = langtag ; normal language tags
// / privateuse ; private use tag
// / grandfathered ; grandfathered tags
var expBCP47Syntax = RegExp('^(?:' + langtag + '|' + privateuse + '|' + grandfathered + ')$', 'i');
// Match duplicate variants in a language tag
var expVariantDupes = RegExp('^(?!x).*?-(' + variant + ')-(?:\\w{4,8}-(?!x-))*\\1\\b', 'i');
// Match duplicate singletons in a language tag (except in private use)
var expSingletonDupes = RegExp('^(?!x).*?-(' + singleton + ')-(?:\\w+-(?!x-))*\\1\\b', 'i');
// Match all extension sequences
var expExtSequences = RegExp('-' + extension, 'ig');
// Default locale is the first-added locale data for us
var defaultLocale = void 0;
function setDefaultLocale(locale) {
defaultLocale = locale;
}
// IANA Subtag Registry redundant tag and subtag maps
var redundantTags = {
tags: {
"art-lojban": "jbo",
"i-ami": "ami",
"i-bnn": "bnn",
"i-hak": "hak",
"i-klingon": "tlh",
"i-lux": "lb",
"i-navajo": "nv",
"i-pwn": "pwn",
"i-tao": "tao",
"i-tay": "tay",
"i-tsu": "tsu",
"no-bok": "nb",
"no-nyn": "nn",
"sgn-BE-FR": "sfb",
"sgn-BE-NL": "vgt",
"sgn-CH-DE": "sgg",
"zh-guoyu": "cmn",
"zh-hakka": "hak",
"zh-min-nan": "nan",
"zh-xiang": "hsn",
"sgn-BR": "bzs",
"sgn-CO": "csn",
"sgn-DE": "gsg",
"sgn-DK": "dsl",
"sgn-ES": "ssp",
"sgn-FR": "fsl",
"sgn-GB": "bfi",
"sgn-GR": "gss",
"sgn-IE": "isg",
"sgn-IT": "ise",
"sgn-JP": "jsl",
"sgn-MX": "mfs",
"sgn-NI": "ncs",
"sgn-NL": "dse",
"sgn-NO": "nsl",
"sgn-PT": "psr",
"sgn-SE": "swl",
"sgn-US": "ase",
"sgn-ZA": "sfs",
"zh-cmn": "cmn",
"zh-cmn-Hans": "cmn-Hans",
"zh-cmn-Hant": "cmn-Hant",
"zh-gan": "gan",
"zh-wuu": "wuu",
"zh-yue": "yue"
},
subtags: {
BU: "MM",
DD: "DE",
FX: "FR",
TP: "TL",
YD: "YE",
ZR: "CD",
heploc: "alalc97",
'in': "id",
iw: "he",
ji: "yi",
jw: "jv",
mo: "ro",
ayx: "nun",
bjd: "drl",
ccq: "rki",
cjr: "mom",
cka: "cmr",
cmk: "xch",
drh: "khk",
drw: "prs",
gav: "dev",
hrr: "jal",
ibi: "opa",
kgh: "kml",
lcq: "ppr",
mst: "mry",
myt: "mry",
sca: "hle",
tie: "ras",
tkk: "twm",
tlw: "weo",
tnf: "prs",
ybd: "rki",
yma: "lrr"
},
extLang: {
aao: ["aao", "ar"],
abh: ["abh", "ar"],
abv: ["abv", "ar"],
acm: ["acm", "ar"],
acq: ["acq", "ar"],
acw: ["acw", "ar"],
acx: ["acx", "ar"],
acy: ["acy", "ar"],
adf: ["adf", "ar"],
ads: ["ads", "sgn"],
aeb: ["aeb", "ar"],
aec: ["aec", "ar"],
aed: ["aed", "sgn"],
aen: ["aen", "sgn"],
afb: ["afb", "ar"],
afg: ["afg", "sgn"],
ajp: ["ajp", "ar"],
apc: ["apc", "ar"],
apd: ["apd", "ar"],
arb: ["arb", "ar"],
arq: ["arq", "ar"],
ars: ["ars", "ar"],
ary: ["ary", "ar"],
arz: ["arz", "ar"],
ase: ["ase", "sgn"],
asf: ["asf", "sgn"],
asp: ["asp", "sgn"],
asq: ["asq", "sgn"],
asw: ["asw", "sgn"],
auz: ["auz", "ar"],
avl: ["avl", "ar"],
ayh: ["ayh", "ar"],
ayl: ["ayl", "ar"],
ayn: ["ayn", "ar"],
ayp: ["ayp", "ar"],
bbz: ["bbz", "ar"],
bfi: ["bfi", "sgn"],
bfk: ["bfk", "sgn"],
bjn: ["bjn", "ms"],
bog: ["bog", "sgn"],
bqn: ["bqn", "sgn"],
bqy: ["bqy", "sgn"],
btj: ["btj", "ms"],
bve: ["bve", "ms"],
bvl: ["bvl", "sgn"],
bvu: ["bvu", "ms"],
bzs: ["bzs", "sgn"],
cdo: ["cdo", "zh"],
cds: ["cds", "sgn"],
cjy: ["cjy", "zh"],
cmn: ["cmn", "zh"],
coa: ["coa", "ms"],
cpx: ["cpx", "zh"],
csc: ["csc", "sgn"],
csd: ["csd", "sgn"],
cse: ["cse", "sgn"],
csf: ["csf", "sgn"],
csg: ["csg", "sgn"],
csl: ["csl", "sgn"],
csn: ["csn", "sgn"],
csq: ["csq", "sgn"],
csr: ["csr", "sgn"],
czh: ["czh", "zh"],
czo: ["czo", "zh"],
doq: ["doq", "sgn"],
dse: ["dse", "sgn"],
dsl: ["dsl", "sgn"],
dup: ["dup", "ms"],
ecs: ["ecs", "sgn"],
esl: ["esl", "sgn"],
esn: ["esn", "sgn"],
eso: ["eso", "sgn"],
eth: ["eth", "sgn"],
fcs: ["fcs", "sgn"],
fse: ["fse", "sgn"],
fsl: ["fsl", "sgn"],
fss: ["fss", "sgn"],
gan: ["gan", "zh"],
gds: ["gds", "sgn"],
gom: ["gom", "kok"],
gse: ["gse", "sgn"],
gsg: ["gsg", "sgn"],
gsm: ["gsm", "sgn"],
gss: ["gss", "sgn"],
gus: ["gus", "sgn"],
hab: ["hab", "sgn"],
haf: ["haf", "sgn"],
hak: ["hak", "zh"],
hds: ["hds", "sgn"],
hji: ["hji", "ms"],
hks: ["hks", "sgn"],
hos: ["hos", "sgn"],
hps: ["hps", "sgn"],
hsh: ["hsh", "sgn"],
hsl: ["hsl", "sgn"],
hsn: ["hsn", "zh"],
icl: ["icl", "sgn"],
ils: ["ils", "sgn"],
inl: ["inl", "sgn"],
ins: ["ins", "sgn"],
ise: ["ise", "sgn"],
isg: ["isg", "sgn"],
isr: ["isr", "sgn"],
jak: ["jak", "ms"],
jax: ["jax", "ms"],
jcs: ["jcs", "sgn"],
jhs: ["jhs", "sgn"],
jls: ["jls", "sgn"],
jos: ["jos", "sgn"],
jsl: ["jsl", "sgn"],
jus: ["jus", "sgn"],
kgi: ["kgi", "sgn"],
knn: ["knn", "kok"],
kvb: ["kvb", "ms"],
kvk: ["kvk", "sgn"],
kvr: ["kvr", "ms"],
kxd: ["kxd", "ms"],
lbs: ["lbs", "sgn"],
lce: ["lce", "ms"],
lcf: ["lcf", "ms"],
liw: ["liw", "ms"],
lls: ["lls", "sgn"],
lsg: ["lsg", "sgn"],
lsl: ["lsl", "sgn"],
lso: ["lso", "sgn"],
lsp: ["lsp", "sgn"],
lst: ["lst", "sgn"],
lsy: ["lsy", "sgn"],
ltg: ["ltg", "lv"],
lvs: ["lvs", "lv"],
lzh: ["lzh", "zh"],
max: ["max", "ms"],
mdl: ["mdl", "sgn"],
meo: ["meo", "ms"],
mfa: ["mfa", "ms"],
mfb: ["mfb", "ms"],
mfs: ["mfs", "sgn"],
min: ["min", "ms"],
mnp: ["mnp", "zh"],
mqg: ["mqg", "ms"],
mre: ["mre", "sgn"],
msd: ["msd", "sgn"],
msi: ["msi", "ms"],
msr: ["msr", "sgn"],
mui: ["mui", "ms"],
mzc: ["mzc", "sgn"],
mzg: ["mzg", "sgn"],
mzy: ["mzy", "sgn"],
nan: ["nan", "zh"],
nbs: ["nbs", "sgn"],
ncs: ["ncs", "sgn"],
nsi: ["nsi", "sgn"],
nsl: ["nsl", "sgn"],
nsp: ["nsp", "sgn"],
nsr: ["nsr", "sgn"],
nzs: ["nzs", "sgn"],
okl: ["okl", "sgn"],
orn: ["orn", "ms"],
ors: ["ors", "ms"],
pel: ["pel", "ms"],
pga: ["pga", "ar"],
pks: ["pks", "sgn"],
prl: ["prl", "sgn"],
prz: ["prz", "sgn"],
psc: ["psc", "sgn"],
psd: ["psd", "sgn"],
pse: ["pse", "ms"],
psg: ["psg", "sgn"],
psl: ["psl", "sgn"],
pso: ["pso", "sgn"],
psp: ["psp", "sgn"],
psr: ["psr", "sgn"],
pys: ["pys", "sgn"],
rms: ["rms", "sgn"],
rsi: ["rsi", "sgn"],
rsl: ["rsl", "sgn"],
sdl: ["sdl", "sgn"],
sfb: ["sfb", "sgn"],
sfs: ["sfs", "sgn"],
sgg: ["sgg", "sgn"],
sgx: ["sgx", "sgn"],
shu: ["shu", "ar"],
slf: ["slf", "sgn"],
sls: ["sls", "sgn"],
sqk: ["sqk", "sgn"],
sqs: ["sqs", "sgn"],
ssh: ["ssh", "ar"],
ssp: ["ssp", "sgn"],
ssr: ["ssr", "sgn"],
svk: ["svk", "sgn"],
swc: ["swc", "sw"],
swh: ["swh", "sw"],
swl: ["swl", "sgn"],
syy: ["syy", "sgn"],
tmw: ["tmw", "ms"],
tse: ["tse", "sgn"],
tsm: ["tsm", "sgn"],
tsq: ["tsq", "sgn"],
tss: ["tss", "sgn"],
tsy: ["tsy", "sgn"],
tza: ["tza", "sgn"],
ugn: ["ugn", "sgn"],
ugy: ["ugy", "sgn"],
ukl: ["ukl", "sgn"],
uks: ["uks", "sgn"],
urk: ["urk", "ms"],
uzn: ["uzn", "uz"],
uzs: ["uzs", "uz"],
vgt: ["vgt", "sgn"],
vkk: ["vkk", "ms"],
vkt: ["vkt", "ms"],
vsi: ["vsi", "sgn"],
vsl: ["vsl", "sgn"],
vsv: ["vsv", "sgn"],
wuu: ["wuu", "zh"],
xki: ["xki", "sgn"],
xml: ["xml", "sgn"],
xmm: ["xmm", "ms"],
xms: ["xms", "sgn"],
yds: ["yds", "sgn"],
ysl: ["ysl", "sgn"],
yue: ["yue", "zh"],
zib: ["zib", "sgn"],
zlm: ["zlm", "ms"],
zmi: ["zmi", "ms"],
zsl: ["zsl", "sgn"],
zsm: ["zsm", "ms"]
}
};
/**
* Convert only a-z to uppercase as per section 6.1 of the spec
*/
function toLatinUpperCase(str) {
var i = str.length;
while (i--) {
var ch = str.charAt(i);
if (ch >= "a" && ch <= "z") str = str.slice(0, i) + ch.toUpperCase() + str.slice(i + 1);
}
return str;
}
/**
* The IsStructurallyValidLanguageTag abstract operation verifies that the locale
* argument (which must be a String value)
*
* - represents a well-formed BCP 47 language tag as specified in RFC 5646 section
* 2.1, or successor,
* - does not include duplicate variant subtags, and
* - does not include duplicate singleton subtags.
*
* The abstract operation returns true if locale can be generated from the ABNF
* grammar in section 2.1 of the RFC, starting with Language-Tag, and does not
* contain duplicate variant or singleton subtags (other than as a private use
* subtag). It returns false otherwise. Terminal value characters in the grammar are
* interpreted as the Unicode equivalents of the ASCII octet values given.
*/
function /* 6.2.2 */IsStructurallyValidLanguageTag(locale) {
// represents a well-formed BCP 47 language tag as specified in RFC 5646
if (!expBCP47Syntax.test(locale)) return false;
// does not include duplicate variant subtags, and
if (expVariantDupes.test(locale)) return false;
// does not include duplicate singleton subtags.
if (expSingletonDupes.test(locale)) return false;
return true;
}
/**
* The CanonicalizeLanguageTag abstract operation returns the canonical and case-
* regularized form of the locale argument (which must be a String value that is
* a structurally valid BCP 47 language tag as verified by the
* IsStructurallyValidLanguageTag abstract operation). It takes the steps
* specified in RFC 5646 section 4.5, or successor, to bring the language tag
* into canonical form, and to regularize the case of the subtags, but does not
* take the steps to bring a language tag into “extlang form” and to reorder
* variant subtags.
* The specifications for extensions to BCP 47 language tags, such as RFC 6067,
* may include canonicalization rules for the extension subtag sequences they
* define that go beyond the canonicalization rules of RFC 5646 section 4.5.
* Implementations are allowed, but not required, to apply these additional rules.
*/
function /* 6.2.3 */CanonicalizeLanguageTag(locale) {
var match = void 0,
parts = void 0;
// A language tag is in 'canonical form' when the tag is well-formed
// according to the rules in Sections 2.1 and 2.2
// Section 2.1 says all subtags use lowercase...
locale = locale.toLowerCase();
// ...with 2 exceptions: 'two-letter and four-letter subtags that neither
// appear at the start of the tag nor occur after singletons. Such two-letter
// subtags are all uppercase (as in the tags "en-CA-x-ca" or "sgn-BE-FR") and
// four-letter subtags are titlecase (as in the tag "az-Latn-x-latn").
parts = locale.split('-');
for (var i = 1, max = parts.length; i < max; i++) {
// Two-letter subtags are all uppercase
if (parts[i].length === 2) parts[i] = parts[i].toUpperCase();
// Four-letter subtags are titlecase
else if (parts[i].length === 4) parts[i] = parts[i].charAt(0).toUpperCase() + parts[i].slice(1);
// Is it a singleton?
else if (parts[i].length === 1 && parts[i] !== 'x') break;
}
locale = arrJoin.call(parts, '-');
// The steps laid out in RFC 5646 section 4.5 are as follows:
// 1. Extension sequences are ordered into case-insensitive ASCII order
// by singleton subtag.
if ((match = locale.match(expExtSequences)) && match.length > 1) {
// The built-in sort() sorts by ASCII order, so use that
match.sort();
// Replace all extensions with the joined, sorted array
locale = locale.replace(RegExp('(?:' + expExtSequences.source + ')+', 'i'), arrJoin.call(match, ''));
}
// 2. Redundant or grandfathered tags are replaced by their 'Preferred-
// Value', if there is one.
if (hop.call(redundantTags.tags, locale)) locale = redundantTags.tags[locale];
// 3. Subtags are replaced by their 'Preferred-Value', if there is one.
// For extlangs, the original primary language subtag is also
// replaced if there is a primary language subtag in the 'Preferred-
// Value'.
parts = locale.split('-');
for (var _i = 1, _max = parts.length; _i < _max; _i++) {
if (hop.call(redundantTags.subtags, parts[_i])) parts[_i] = redundantTags.subtags[parts[_i]];else if (hop.call(redundantTags.extLang, parts[_i])) {
parts[_i] = redundantTags.extLang[parts[_i]][0];
// For extlang tags, the prefix needs to be removed if it is redundant
if (_i === 1 && redundantTags.extLang[parts[1]][1] === parts[0]) {
parts = arrSlice.call(parts, _i++);
_max -= 1;
}
}
}
return arrJoin.call(parts, '-');
}
/**
* The DefaultLocale abstract operation returns a String value representing the
* structurally valid (6.2.2) and canonicalized (6.2.3) BCP 47 language tag for the
* host environments current locale.
*/
function /* 6.2.4 */DefaultLocale() {
return defaultLocale;
}
// Sect 6.3 Currency Codes
// =======================
var expCurrencyCode = /^[A-Z]{3}$/;
/**
* The IsWellFormedCurrencyCode abstract operation verifies that the currency argument
* (after conversion to a String value) represents a well-formed 3-letter ISO currency
* code. The following steps are taken:
*/
function /* 6.3.1 */IsWellFormedCurrencyCode(currency) {
// 1. Let `c` be ToString(currency)
var c = String(currency);
// 2. Let `normalized` be the result of mapping c to upper case as described
// in 6.1.
var normalized = toLatinUpperCase(c);
// 3. If the string length of normalized is not 3, return false.
// 4. If normalized contains any character that is not in the range "A" to "Z"
// (U+0041 to U+005A), return false.
if (expCurrencyCode.test(normalized) === false) return false;
// 5. Return true
return true;
}
var expUnicodeExSeq = /-u(?:-[0-9a-z]{2,8})+/gi; // See `extension` below
function /* 9.2.1 */CanonicalizeLocaleList(locales) {
// The abstract operation CanonicalizeLocaleList takes the following steps:
// 1. If locales is undefined, then a. Return a new empty List
if (locales === undefined) return new List();
// 2. Let seen be a new empty List.
var seen = new List();
// 3. If locales is a String value, then
// a. Let locales be a new array created as if by the expression new
// Array(locales) where Array is the standard built-in constructor with
// that name and locales is the value of locales.
locales = typeof locales === 'string' ? [locales] : locales;
// 4. Let O be ToObject(locales).
var O = toObject(locales);
// 5. Let lenValue be the result of calling the [[Get]] internal method of
// O with the argument "length".
// 6. Let len be ToUint32(lenValue).
var len = toLength(O.length);
// 7. Let k be 0.
var k = 0;
// 8. Repeat, while k < len
while (k < len) {
// a. Let Pk be ToString(k).
var Pk = String(k);
// b. Let kPresent be the result of calling the [[HasProperty]] internal
// method of O with argument Pk.
var kPresent = Pk in O;
// c. If kPresent is true, then
if (kPresent) {
// i. Let kValue be the result of calling the [[Get]] internal
// method of O with argument Pk.
var kValue = O[Pk];
// ii. If the type of kValue is not String or Object, then throw a
// TypeError exception.
if (kValue === null || typeof kValue !== 'string' && (typeof kValue === "undefined" ? "undefined" : babelHelpers$1["typeof"](kValue)) !== 'object') throw new TypeError('String or Object type expected');
// iii. Let tag be ToString(kValue).
var tag = String(kValue);
// iv. If the result of calling the abstract operation
// IsStructurallyValidLanguageTag (defined in 6.2.2), passing tag as
// the argument, is false, then throw a RangeError exception.
if (!IsStructurallyValidLanguageTag(tag)) throw new RangeError("'" + tag + "' is not a structurally valid language tag");
// v. Let tag be the result of calling the abstract operation
// CanonicalizeLanguageTag (defined in 6.2.3), passing tag as the
// argument.
tag = CanonicalizeLanguageTag(tag);
// vi. If tag is not an element of seen, then append tag as the last
// element of seen.
if (arrIndexOf.call(seen, tag) === -1) arrPush.call(seen, tag);
}
// d. Increase k by 1.
k++;
}
// 9. Return seen.
return seen;
}
/**
* The BestAvailableLocale abstract operation compares the provided argument
* locale, which must be a String value with a structurally valid and
* canonicalized BCP 47 language tag, against the locales in availableLocales and
* returns either the longest non-empty prefix of locale that is an element of
* availableLocales, or undefined if there is no such element. It uses the
* fallback mechanism of RFC 4647, section 3.4. The following steps are taken:
*/
function /* 9.2.2 */BestAvailableLocale(availableLocales, locale) {
// 1. Let candidate be locale
var candidate = locale;
// 2. Repeat
while (candidate) {
// a. If availableLocales contains an element equal to candidate, then return
// candidate.
if (arrIndexOf.call(availableLocales, candidate) > -1) return candidate;
// b. Let pos be the character index of the last occurrence of "-"
// (U+002D) within candidate. If that character does not occur, return
// undefined.
var pos = candidate.lastIndexOf('-');
if (pos < 0) return;
// c. If pos ≥ 2 and the character "-" occurs at index pos-2 of candidate,
// then decrease pos by 2.
if (pos >= 2 && candidate.charAt(pos - 2) === '-') pos -= 2;
// d. Let candidate be the substring of candidate from position 0, inclusive,
// to position pos, exclusive.
candidate = candidate.substring(0, pos);
}
}
/**
* The LookupMatcher abstract operation compares requestedLocales, which must be
* a List as returned by CanonicalizeLocaleList, against the locales in
* availableLocales and determines the best available language to meet the
* request. The following steps are taken:
*/
function /* 9.2.3 */LookupMatcher(availableLocales, requestedLocales) {
// 1. Let i be 0.
var i = 0;
// 2. Let len be the number of elements in requestedLocales.
var len = requestedLocales.length;
// 3. Let availableLocale be undefined.
var availableLocale = void 0;
var locale = void 0,
noExtensionsLocale = void 0;
// 4. Repeat while i < len and availableLocale is undefined:
while (i < len && !availableLocale) {
// a. Let locale be the element of requestedLocales at 0-origined list
// position i.
locale = requestedLocales[i];
// b. Let noExtensionsLocale be the String value that is locale with all
// Unicode locale extension sequences removed.
noExtensionsLocale = String(locale).replace(expUnicodeExSeq, '');
// c. Let availableLocale be the result of calling the
// BestAvailableLocale abstract operation (defined in 9.2.2) with
// arguments availableLocales and noExtensionsLocale.
availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale);
// d. Increase i by 1.
i++;
}
// 5. Let result be a new Record.
var result = new Record();
// 6. If availableLocale is not undefined, then
if (availableLocale !== undefined) {
// a. Set result.[[locale]] to availableLocale.
result['[[locale]]'] = availableLocale;
// b. If locale and noExtensionsLocale are not the same String value, then
if (String(locale) !== String(noExtensionsLocale)) {
// i. Let extension be the String value consisting of the first
// substring of locale that is a Unicode locale extension sequence.
var extension = locale.match(expUnicodeExSeq)[0];
// ii. Let extensionIndex be the character position of the initial
// "-" of the first Unicode locale extension sequence within locale.
var extensionIndex = locale.indexOf('-u-');
// iii. Set result.[[extension]] to extension.
result['[[extension]]'] = extension;
// iv. Set result.[[extensionIndex]] to extensionIndex.
result['[[extensionIndex]]'] = extensionIndex;
}
}
// 7. Else
else
// a. Set result.[[locale]] to the value returned by the DefaultLocale abstract
// operation (defined in 6.2.4).
result['[[locale]]'] = DefaultLocale();
// 8. Return result
return result;
}
/**
* The BestFitMatcher abstract operation compares requestedLocales, which must be
* a List as returned by CanonicalizeLocaleList, against the locales in
* availableLocales and determines the best available language to meet the
* request. The algorithm is implementation dependent, but should produce results
* that a typical user of the requested locales would perceive as at least as
* good as those produced by the LookupMatcher abstract operation. Options
* specified through Unicode locale extension sequences must be ignored by the
* algorithm. Information about such subsequences is returned separately.
* The abstract operation returns a record with a [[locale]] field, whose value
* is the language tag of the selected locale, which must be an element of
* availableLocales. If the language tag of the request locale that led to the
* selected locale contained a Unicode locale extension sequence, then the
* returned record also contains an [[extension]] field whose value is the first
* Unicode locale extension sequence, and an [[extensionIndex]] field whose value
* is the index of the first Unicode locale extension sequence within the request
* locale language tag.
*/
function /* 9.2.4 */BestFitMatcher(availableLocales, requestedLocales) {
return LookupMatcher(availableLocales, requestedLocales);
}
/**
* The ResolveLocale abstract operation compares a BCP 47 language priority list
* requestedLocales against the locales in availableLocales and determines the
* best available language to meet the request. availableLocales and
* requestedLocales must be provided as List values, options as a Record.
*/
function /* 9.2.5 */ResolveLocale(availableLocales, requestedLocales, options, relevantExtensionKeys, localeData) {
if (availableLocales.length === 0) {
throw new ReferenceError('No locale data has been provided for this object yet.');
}
// The following steps are taken:
// 1. Let matcher be the value of options.[[localeMatcher]].
var matcher = options['[[localeMatcher]]'];
var r = void 0;
// 2. If matcher is "lookup", then
if (matcher === 'lookup')
// a. Let r be the result of calling the LookupMatcher abstract operation
// (defined in 9.2.3) with arguments availableLocales and
// requestedLocales.
r = LookupMatcher(availableLocales, requestedLocales);
// 3. Else
else
// a. Let r be the result of calling the BestFitMatcher abstract
// operation (defined in 9.2.4) with arguments availableLocales and
// requestedLocales.
r = BestFitMatcher(availableLocales, requestedLocales);
// 4. Let foundLocale be the value of r.[[locale]].
var foundLocale = r['[[locale]]'];
var extensionSubtags = void 0,
extensionSubtagsLength = void 0;
// 5. If r has an [[extension]] field, then
if (hop.call(r, '[[extension]]')) {
// a. Let extension be the value of r.[[extension]].
var extension = r['[[extension]]'];
// b. Let split be the standard built-in function object defined in ES5,
// 15.5.4.14.
var split = String.prototype.split;
// c. Let extensionSubtags be the result of calling the [[Call]] internal
// method of split with extension as the this value and an argument
// list containing the single item "-".
extensionSubtags = split.call(extension, '-');
// d. Let extensionSubtagsLength be the result of calling the [[Get]]
// internal method of extensionSubtags with argument "length".
extensionSubtagsLength = extensionSubtags.length;
}
// 6. Let result be a new Record.
var result = new Record();
// 7. Set result.[[dataLocale]] to foundLocale.
result['[[dataLocale]]'] = foundLocale;
// 8. Let supportedExtension be "-u".
var supportedExtension = '-u';
// 9. Let i be 0.
var i = 0;
// 10. Let len be the result of calling the [[Get]] internal method of
// relevantExtensionKeys with argument "length".
var len = relevantExtensionKeys.length;
// 11 Repeat while i < len:
while (i < len) {
// a. Let key be the result of calling the [[Get]] internal method of
// relevantExtensionKeys with argument ToString(i).
var key = relevantExtensionKeys[i];
// b. Let foundLocaleData be the result of calling the [[Get]] internal
// method of localeData with the argument foundLocale.
var foundLocaleData = localeData[foundLocale];
// c. Let keyLocaleData be the result of calling the [[Get]] internal
// method of foundLocaleData with the argument key.
var keyLocaleData = foundLocaleData[key];
// d. Let value be the result of calling the [[Get]] internal method of
// keyLocaleData with argument "0".
var value = keyLocaleData['0'];
// e. Let supportedExtensionAddition be "".
var supportedExtensionAddition = '';
// f. Let indexOf be the standard built-in function object defined in
// ES5, 15.4.4.14.
var indexOf = arrIndexOf;
// g. If extensionSubtags is not undefined, then
if (extensionSubtags !== undefined) {
// i. Let keyPos be the result of calling the [[Call]] internal
// method of indexOf with extensionSubtags as the this value and
// an argument list containing the single item key.
var keyPos = indexOf.call(extensionSubtags, key);
// ii. If keyPos ≠ -1, then
if (keyPos !== -1) {
// 1. If keyPos + 1 < extensionSubtagsLength and the length of the
// result of calling the [[Get]] internal method of
// extensionSubtags with argument ToString(keyPos +1) is greater
// than 2, then
if (keyPos + 1 < extensionSubtagsLength && extensionSubtags[keyPos + 1].length > 2) {
// a. Let requestedValue be the result of calling the [[Get]]
// internal method of extensionSubtags with argument
// ToString(keyPos + 1).
var requestedValue = extensionSubtags[keyPos + 1];
// b. Let valuePos be the result of calling the [[Call]]
// internal method of indexOf with keyLocaleData as the
// this value and an argument list containing the single
// item requestedValue.
var valuePos = indexOf.call(keyLocaleData, requestedValue);
// c. If valuePos ≠ -1, then
if (valuePos !== -1) {
// i. Let value be requestedValue.
value = requestedValue,
// ii. Let supportedExtensionAddition be the
// concatenation of "-", key, "-", and value.
supportedExtensionAddition = '-' + key + '-' + value;
}
}
// 2. Else
else {
// a. Let valuePos be the result of calling the [[Call]]
// internal method of indexOf with keyLocaleData as the this
// value and an argument list containing the single item
// "true".
var _valuePos = indexOf(keyLocaleData, 'true');
// b. If valuePos ≠ -1, then
if (_valuePos !== -1)
// i. Let value be "true".
value = 'true';
}
}
}
// h. If options has a field [[<key>]], then
if (hop.call(options, '[[' + key + ']]')) {
// i. Let optionsValue be the value of options.[[<key>]].
var optionsValue = options['[[' + key + ']]'];
// ii. If the result of calling the [[Call]] internal method of indexOf
// with keyLocaleData as the this value and an argument list
// containing the single item optionsValue is not -1, then
if (indexOf.call(keyLocaleData, optionsValue) !== -1) {
// 1. If optionsValue is not equal to value, then
if (optionsValue !== value) {
// a. Let value be optionsValue.
value = optionsValue;
// b. Let supportedExtensionAddition be "".
supportedExtensionAddition = '';
}
}
}
// i. Set result.[[<key>]] to value.
result['[[' + key + ']]'] = value;
// j. Append supportedExtensionAddition to supportedExtension.
supportedExtension += supportedExtensionAddition;
// k. Increase i by 1.
i++;
}
// 12. If the length of supportedExtension is greater than 2, then
if (supportedExtension.length > 2) {
// a.
var privateIndex = foundLocale.indexOf("-x-");
// b.
if (privateIndex === -1) {
// i.
foundLocale = foundLocale + supportedExtension;
}
// c.
else {
// i.
var preExtension = foundLocale.substring(0, privateIndex);
// ii.
var postExtension = foundLocale.substring(privateIndex);
// iii.
foundLocale = preExtension + supportedExtension + postExtension;
}
// d. asserting - skipping
// e.
foundLocale = CanonicalizeLanguageTag(foundLocale);
}
// 13. Set result.[[locale]] to foundLocale.
result['[[locale]]'] = foundLocale;
// 14. Return result.
return result;
}
/**
* The LookupSupportedLocales abstract operation returns the subset of the
* provided BCP 47 language priority list requestedLocales for which
* availableLocales has a matching locale when using the BCP 47 Lookup algorithm.
* Locales appear in the same order in the returned list as in requestedLocales.
* The following steps are taken:
*/
function /* 9.2.6 */LookupSupportedLocales(availableLocales, requestedLocales) {
// 1. Let len be the number of elements in requestedLocales.
var len = requestedLocales.length;
// 2. Let subset be a new empty List.
var subset = new List();
// 3. Let k be 0.
var k = 0;
// 4. Repeat while k < len
while (k < len) {
// a. Let locale be the element of requestedLocales at 0-origined list
// position k.
var locale = requestedLocales[k];
// b. Let noExtensionsLocale be the String value that is locale with all
// Unicode locale extension sequences removed.
var noExtensionsLocale = String(locale).replace(expUnicodeExSeq, '');
// c. Let availableLocale be the result of calling the
// BestAvailableLocale abstract operation (defined in 9.2.2) with
// arguments availableLocales and noExtensionsLocale.
var availableLocale = BestAvailableLocale(availableLocales, noExtensionsLocale);
// d. If availableLocale is not undefined, then append locale to the end of
// subset.
if (availableLocale !== undefined) arrPush.call(subset, locale);
// e. Increment k by 1.
k++;
}
// 5. Let subsetArray be a new Array object whose elements are the same
// values in the same order as the elements of subset.
var subsetArray = arrSlice.call(subset);
// 6. Return subsetArray.
return subsetArray;
}
/**
* The BestFitSupportedLocales abstract operation returns the subset of the
* provided BCP 47 language priority list requestedLocales for which
* availableLocales has a matching locale when using the Best Fit Matcher
* algorithm. Locales appear in the same order in the returned list as in
* requestedLocales. The steps taken are implementation dependent.
*/
function /*9.2.7 */BestFitSupportedLocales(availableLocales, requestedLocales) {
// ###TODO: implement this function as described by the specification###
return LookupSupportedLocales(availableLocales, requestedLocales);
}
/**
* The SupportedLocales abstract operation returns the subset of the provided BCP
* 47 language priority list requestedLocales for which availableLocales has a
* matching locale. Two algorithms are available to match the locales: the Lookup
* algorithm described in RFC 4647 section 3.4, and an implementation dependent
* best-fit algorithm. Locales appear in the same order in the returned list as
* in requestedLocales. The following steps are taken:
*/
function /*9.2.8 */SupportedLocales(availableLocales, requestedLocales, options) {
var matcher = void 0,
subset = void 0;
// 1. If options is not undefined, then
if (options !== undefined) {
// a. Let options be ToObject(options).
options = new Record(toObject(options));
// b. Let matcher be the result of calling the [[Get]] internal method of
// options with argument "localeMatcher".
matcher = options.localeMatcher;
// c. If matcher is not undefined, then
if (matcher !== undefined) {
// i. Let matcher be ToString(matcher).
matcher = String(matcher);
// ii. If matcher is not "lookup" or "best fit", then throw a RangeError
// exception.
if (matcher !== 'lookup' && matcher !== 'best fit') throw new RangeError('matcher should be "lookup" or "best fit"');
}
}
// 2. If matcher is undefined or "best fit", then
if (matcher === undefined || matcher === 'best fit')
// a. Let subset be the result of calling the BestFitSupportedLocales
// abstract operation (defined in 9.2.7) with arguments
// availableLocales and requestedLocales.
subset = BestFitSupportedLocales(availableLocales, requestedLocales);
// 3. Else
else
// a. Let subset be the result of calling the LookupSupportedLocales
// abstract operation (defined in 9.2.6) with arguments
// availableLocales and requestedLocales.
subset = LookupSupportedLocales(availableLocales, requestedLocales);
// 4. For each named own property name P of subset,
for (var P in subset) {
if (!hop.call(subset, P)) continue;
// a. Let desc be the result of calling the [[GetOwnProperty]] internal
// method of subset with P.
// b. Set desc.[[Writable]] to false.
// c. Set desc.[[Configurable]] to false.
// d. Call the [[DefineOwnProperty]] internal method of subset with P, desc,
// and true as arguments.
defineProperty(subset, P, {
writable: false, configurable: false, value: subset[P]
});
}
// "Freeze" the array so no new elements can be added
defineProperty(subset, 'length', { writable: false });
// 5. Return subset
return subset;
}
/**
* The GetOption abstract operation extracts the value of the property named
* property from the provided options object, converts it to the required type,
* checks whether it is one of a List of allowed values, and fills in a fallback
* value if necessary.
*/
function /*9.2.9 */GetOption(options, property, type, values, fallback) {
// 1. Let value be the result of calling the [[Get]] internal method of
// options with argument property.
var value = options[property];
// 2. If value is not undefined, then
if (value !== undefined) {
// a. Assert: type is "boolean" or "string".
// b. If type is "boolean", then let value be ToBoolean(value).
// c. If type is "string", then let value be ToString(value).
value = type === 'boolean' ? Boolean(value) : type === 'string' ? String(value) : value;
// d. If values is not undefined, then
if (values !== undefined) {
// i. If values does not contain an element equal to value, then throw a
// RangeError exception.
if (arrIndexOf.call(values, value) === -1) throw new RangeError("'" + value + "' is not an allowed value for `" + property + '`');
}
// e. Return value.
return value;
}
// Else return fallback.
return fallback;
}
/**
* The GetNumberOption abstract operation extracts a property value from the
* provided options object, converts it to a Number value, checks whether it is
* in the allowed range, and fills in a fallback value if necessary.
*/
function /* 9.2.10 */GetNumberOption(options, property, minimum, maximum, fallback) {
// 1. Let value be the result of calling the [[Get]] internal method of
// options with argument property.
var value = options[property];
// 2. If value is not undefined, then
if (value !== undefined) {
// a. Let value be ToNumber(value).
value = Number(value);
// b. If value is NaN or less than minimum or greater than maximum, throw a
// RangeError exception.
if (isNaN(value) || value < minimum || value > maximum) throw new RangeError('Value is not a number or outside accepted range');
// c. Return floor(value).
return Math.floor(value);
}
// 3. Else return fallback.
return fallback;
}
// 8 The Intl Object
var Intl = {};
// 8.2 Function Properties of the Intl Object
// 8.2.1
// @spec[tc39/ecma402/master/spec/intl.html]
// @clause[sec-intl.getcanonicallocales]
function getCanonicalLocales(locales) {
// 1. Let ll be ? CanonicalizeLocaleList(locales).
var ll = CanonicalizeLocaleList(locales);
// 2. Return CreateArrayFromList(ll).
{
var result = [];
var len = ll.length;
var k = 0;
while (k < len) {
result[k] = ll[k];
k++;
}
return result;
}
}
Object.defineProperty(Intl, 'getCanonicalLocales', {
enumerable: false,
configurable: true,
writable: true,
value: getCanonicalLocales
});
// Currency minor units output from get-4217 grunt task, formatted
var currencyMinorUnits = {
BHD: 3, BYR: 0, XOF: 0, BIF: 0, XAF: 0, CLF: 4, CLP: 0, KMF: 0, DJF: 0,
XPF: 0, GNF: 0, ISK: 0, IQD: 3, JPY: 0, JOD: 3, KRW: 0, KWD: 3, LYD: 3,
OMR: 3, PYG: 0, RWF: 0, TND: 3, UGX: 0, UYI: 0, VUV: 0, VND: 0
};
// Define the NumberFormat constructor internally so it cannot be tainted
function NumberFormatConstructor() {
var locales = arguments[0];
var options = arguments[1];
if (!this || this === Intl) {
return new Intl.NumberFormat(locales, options);
}
return InitializeNumberFormat(toObject(this), locales, options);
}
defineProperty(Intl, 'NumberFormat', {
configurable: true,
writable: true,
value: NumberFormatConstructor
});
// Must explicitly set prototypes as unwritable
defineProperty(Intl.NumberFormat, 'prototype', {
writable: false
});
/**
* The abstract operation InitializeNumberFormat accepts the arguments
* numberFormat (which must be an object), locales, and options. It initializes
* numberFormat as a NumberFormat object.
*/
function /*11.1.1.1 */InitializeNumberFormat(numberFormat, locales, options) {
// This will be a internal properties object if we're not already initialized
var internal = getInternalProperties(numberFormat);
// Create an object whose props can be used to restore the values of RegExp props
var regexpRestore = createRegExpRestore();
// 1. If numberFormat has an [[initializedIntlObject]] internal property with
// value true, throw a TypeError exception.
if (internal['[[initializedIntlObject]]'] === true) throw new TypeError('`this` object has already been initialized as an Intl object');
// Need this to access the `internal` object
defineProperty(numberFormat, '__getInternalProperties', {
value: function value() {
// NOTE: Non-standard, for internal use only
if (arguments[0] === secret) return internal;
}
});
// 2. Set the [[initializedIntlObject]] internal property of numberFormat to true.
internal['[[initializedIntlObject]]'] = true;
// 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
// abstract operation (defined in 9.2.1) with argument locales.
var requestedLocales = CanonicalizeLocaleList(locales);
// 4. If options is undefined, then
if (options === undefined)
// a. Let options be the result of creating a new object as if by the
// expression new Object() where Object is the standard built-in constructor
// with that name.
options = {};
// 5. Else
else
// a. Let options be ToObject(options).
options = toObject(options);
// 6. Let opt be a new Record.
var opt = new Record(),
// 7. Let matcher be the result of calling the GetOption abstract operation
// (defined in 9.2.9) with the arguments options, "localeMatcher", "string",
// a List containing the two String values "lookup" and "best fit", and
// "best fit".
matcher = GetOption(options, 'localeMatcher', 'string', new List('lookup', 'best fit'), 'best fit');
// 8. Set opt.[[localeMatcher]] to matcher.
opt['[[localeMatcher]]'] = matcher;
// 9. Let NumberFormat be the standard built-in object that is the initial value
// of Intl.NumberFormat.
// 10. Let localeData be the value of the [[localeData]] internal property of
// NumberFormat.
var localeData = internals.NumberFormat['[[localeData]]'];
// 11. Let r be the result of calling the ResolveLocale abstract operation
// (defined in 9.2.5) with the [[availableLocales]] internal property of
// NumberFormat, requestedLocales, opt, the [[relevantExtensionKeys]]
// internal property of NumberFormat, and localeData.
var r = ResolveLocale(internals.NumberFormat['[[availableLocales]]'], requestedLocales, opt, internals.NumberFormat['[[relevantExtensionKeys]]'], localeData);
// 12. Set the [[locale]] internal property of numberFormat to the value of
// r.[[locale]].
internal['[[locale]]'] = r['[[locale]]'];
// 13. Set the [[numberingSystem]] internal property of numberFormat to the value
// of r.[[nu]].
internal['[[numberingSystem]]'] = r['[[nu]]'];
// The specification doesn't tell us to do this, but it's helpful later on
internal['[[dataLocale]]'] = r['[[dataLocale]]'];
// 14. Let dataLocale be the value of r.[[dataLocale]].
var dataLocale = r['[[dataLocale]]'];
// 15. Let s be the result of calling the GetOption abstract operation with the
// arguments options, "style", "string", a List containing the three String
// values "decimal", "percent", and "currency", and "decimal".
var s = GetOption(options, 'style', 'string', new List('decimal', 'percent', 'currency'), 'decimal');
// 16. Set the [[style]] internal property of numberFormat to s.
internal['[[style]]'] = s;
// 17. Let c be the result of calling the GetOption abstract operation with the
// arguments options, "currency", "string", undefined, and undefined.
var c = GetOption(options, 'currency', 'string');
// 18. If c is not undefined and the result of calling the
// IsWellFormedCurrencyCode abstract operation (defined in 6.3.1) with
// argument c is false, then throw a RangeError exception.
if (c !== undefined && !IsWellFormedCurrencyCode(c)) throw new RangeError("'" + c + "' is not a valid currency code");
// 19. If s is "currency" and c is undefined, throw a TypeError exception.
if (s === 'currency' && c === undefined) throw new TypeError('Currency code is required when style is currency');
var cDigits = void 0;
// 20. If s is "currency", then
if (s === 'currency') {
// a. Let c be the result of converting c to upper case as specified in 6.1.
c = c.toUpperCase();
// b. Set the [[currency]] internal property of numberFormat to c.
internal['[[currency]]'] = c;
// c. Let cDigits be the result of calling the CurrencyDigits abstract
// operation (defined below) with argument c.
cDigits = CurrencyDigits(c);
}
// 21. Let cd be the result of calling the GetOption abstract operation with the
// arguments options, "currencyDisplay", "string", a List containing the
// three String values "code", "symbol", and "name", and "symbol".
var cd = GetOption(options, 'currencyDisplay', 'string', new List('code', 'symbol', 'name'), 'symbol');
// 22. If s is "currency", then set the [[currencyDisplay]] internal property of
// numberFormat to cd.
if (s === 'currency') internal['[[currencyDisplay]]'] = cd;
// 23. Let mnid be the result of calling the GetNumberOption abstract operation
// (defined in 9.2.10) with arguments options, "minimumIntegerDigits", 1, 21,
// and 1.
var mnid = GetNumberOption(options, 'minimumIntegerDigits', 1, 21, 1);
// 24. Set the [[minimumIntegerDigits]] internal property of numberFormat to mnid.
internal['[[minimumIntegerDigits]]'] = mnid;
// 25. If s is "currency", then let mnfdDefault be cDigits; else let mnfdDefault
// be 0.
var mnfdDefault = s === 'currency' ? cDigits : 0;
// 26. Let mnfd be the result of calling the GetNumberOption abstract operation
// with arguments options, "minimumFractionDigits", 0, 20, and mnfdDefault.
var mnfd = GetNumberOption(options, 'minimumFractionDigits', 0, 20, mnfdDefault);
// 27. Set the [[minimumFractionDigits]] internal property of numberFormat to mnfd.
internal['[[minimumFractionDigits]]'] = mnfd;
// 28. If s is "currency", then let mxfdDefault be max(mnfd, cDigits); else if s
// is "percent", then let mxfdDefault be max(mnfd, 0); else let mxfdDefault
// be max(mnfd, 3).
var mxfdDefault = s === 'currency' ? Math.max(mnfd, cDigits) : s === 'percent' ? Math.max(mnfd, 0) : Math.max(mnfd, 3);
// 29. Let mxfd be the result of calling the GetNumberOption abstract operation
// with arguments options, "maximumFractionDigits", mnfd, 20, and mxfdDefault.
var mxfd = GetNumberOption(options, 'maximumFractionDigits', mnfd, 20, mxfdDefault);
// 30. Set the [[maximumFractionDigits]] internal property of numberFormat to mxfd.
internal['[[maximumFractionDigits]]'] = mxfd;
// 31. Let mnsd be the result of calling the [[Get]] internal method of options
// with argument "minimumSignificantDigits".
var mnsd = options.minimumSignificantDigits;
// 32. Let mxsd be the result of calling the [[Get]] internal method of options
// with argument "maximumSignificantDigits".
var mxsd = options.maximumSignificantDigits;
// 33. If mnsd is not undefined or mxsd is not undefined, then:
if (mnsd !== undefined || mxsd !== undefined) {
// a. Let mnsd be the result of calling the GetNumberOption abstract
// operation with arguments options, "minimumSignificantDigits", 1, 21,
// and 1.
mnsd = GetNumberOption(options, 'minimumSignificantDigits', 1, 21, 1);
// b. Let mxsd be the result of calling the GetNumberOption abstract
// operation with arguments options, "maximumSignificantDigits", mnsd,
// 21, and 21.
mxsd = GetNumberOption(options, 'maximumSignificantDigits', mnsd, 21, 21);
// c. Set the [[minimumSignificantDigits]] internal property of numberFormat
// to mnsd, and the [[maximumSignificantDigits]] internal property of
// numberFormat to mxsd.
internal['[[minimumSignificantDigits]]'] = mnsd;
internal['[[maximumSignificantDigits]]'] = mxsd;
}
// 34. Let g be the result of calling the GetOption abstract operation with the
// arguments options, "useGrouping", "boolean", undefined, and true.
var g = GetOption(options, 'useGrouping', 'boolean', undefined, true);
// 35. Set the [[useGrouping]] internal property of numberFormat to g.
internal['[[useGrouping]]'] = g;
// 36. Let dataLocaleData be the result of calling the [[Get]] internal method of
// localeData with argument dataLocale.
var dataLocaleData = localeData[dataLocale];
// 37. Let patterns be the result of calling the [[Get]] internal method of
// dataLocaleData with argument "patterns".
var patterns = dataLocaleData.patterns;
// 38. Assert: patterns is an object (see 11.2.3)
// 39. Let stylePatterns be the result of calling the [[Get]] internal method of
// patterns with argument s.
var stylePatterns = patterns[s];
// 40. Set the [[positivePattern]] internal property of numberFormat to the
// result of calling the [[Get]] internal method of stylePatterns with the
// argument "positivePattern".
internal['[[positivePattern]]'] = stylePatterns.positivePattern;
// 41. Set the [[negativePattern]] internal property of numberFormat to the
// result of calling the [[Get]] internal method of stylePatterns with the
// argument "negativePattern".
internal['[[negativePattern]]'] = stylePatterns.negativePattern;
// 42. Set the [[boundFormat]] internal property of numberFormat to undefined.
internal['[[boundFormat]]'] = undefined;
// 43. Set the [[initializedNumberFormat]] internal property of numberFormat to
// true.
internal['[[initializedNumberFormat]]'] = true;
// In ES3, we need to pre-bind the format() function
if (es3) numberFormat.format = GetFormatNumber.call(numberFormat);
// Restore the RegExp properties
regexpRestore();
// Return the newly initialised object
return numberFormat;
}
function CurrencyDigits(currency) {
// When the CurrencyDigits abstract operation is called with an argument currency
// (which must be an upper case String value), the following steps are taken:
// 1. If the ISO 4217 currency and funds code list contains currency as an
// alphabetic code, then return the minor unit value corresponding to the
// currency from the list; else return 2.
return currencyMinorUnits[currency] !== undefined ? currencyMinorUnits[currency] : 2;
}
/* 11.2.3 */internals.NumberFormat = {
'[[availableLocales]]': [],
'[[relevantExtensionKeys]]': ['nu'],
'[[localeData]]': {}
};
/**
* When the supportedLocalesOf method of Intl.NumberFormat is called, the
* following steps are taken:
*/
/* 11.2.2 */
defineProperty(Intl.NumberFormat, 'supportedLocalesOf', {
configurable: true,
writable: true,
value: fnBind.call(function (locales) {
// Bound functions only have the `this` value altered if being used as a constructor,
// this lets us imitate a native function that has no constructor
if (!hop.call(this, '[[availableLocales]]')) throw new TypeError('supportedLocalesOf() is not a constructor');
// Create an object whose props can be used to restore the values of RegExp props
var regexpRestore = createRegExpRestore(),
// 1. If options is not provided, then let options be undefined.
options = arguments[1],
// 2. Let availableLocales be the value of the [[availableLocales]] internal
// property of the standard built-in object that is the initial value of
// Intl.NumberFormat.
availableLocales = this['[[availableLocales]]'],
// 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
// abstract operation (defined in 9.2.1) with argument locales.
requestedLocales = CanonicalizeLocaleList(locales);
// Restore the RegExp properties
regexpRestore();
// 4. Return the result of calling the SupportedLocales abstract operation
// (defined in 9.2.8) with arguments availableLocales, requestedLocales,
// and options.
return SupportedLocales(availableLocales, requestedLocales, options);
}, internals.NumberFormat)
});
/**
* This named accessor property returns a function that formats a number
* according to the effective locale and the formatting options of this
* NumberFormat object.
*/
/* 11.3.2 */defineProperty(Intl.NumberFormat.prototype, 'format', {
configurable: true,
get: GetFormatNumber
});
function GetFormatNumber() {
var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
// Satisfy test 11.3_b
if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for format() is not an initialized Intl.NumberFormat object.');
// The value of the [[Get]] attribute is a function that takes the following
// steps:
// 1. If the [[boundFormat]] internal property of this NumberFormat object
// is undefined, then:
if (internal['[[boundFormat]]'] === undefined) {
// a. Let F be a Function object, with internal properties set as
// specified for built-in functions in ES5, 15, or successor, and the
// length property set to 1, that takes the argument value and
// performs the following steps:
var F = function F(value) {
// i. If value is not provided, then let value be undefined.
// ii. Let x be ToNumber(value).
// iii. Return the result of calling the FormatNumber abstract
// operation (defined below) with arguments this and x.
return FormatNumber(this, /* x = */Number(value));
};
// b. Let bind be the standard built-in function object defined in ES5,
// 15.3.4.5.
// c. Let bf be the result of calling the [[Call]] internal method of
// bind with F as the this value and an argument list containing
// the single item this.
var bf = fnBind.call(F, this);
// d. Set the [[boundFormat]] internal property of this NumberFormat
// object to bf.
internal['[[boundFormat]]'] = bf;
}
// Return the value of the [[boundFormat]] internal property of this
// NumberFormat object.
return internal['[[boundFormat]]'];
}
function formatToParts() {
var value = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];
var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for formatToParts() is not an initialized Intl.NumberFormat object.');
var x = Number(value);
return FormatNumberToParts(this, x);
}
Object.defineProperty(Intl.NumberFormat.prototype, 'formatToParts', {
configurable: true,
enumerable: false,
writable: true,
value: formatToParts
});
/*
* @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]
* @clause[sec-formatnumbertoparts]
*/
function FormatNumberToParts(numberFormat, x) {
// 1. Let parts be ? PartitionNumberPattern(numberFormat, x).
var parts = PartitionNumberPattern(numberFormat, x);
// 2. Let result be ArrayCreate(0).
var result = [];
// 3. Let n be 0.
var n = 0;
// 4. For each part in parts, do:
for (var i = 0; parts.length > i; i++) {
var part = parts[i];
// a. Let O be ObjectCreate(%ObjectPrototype%).
var O = {};
// a. Perform ? CreateDataPropertyOrThrow(O, "type", part.[[type]]).
O.type = part['[[type]]'];
// a. Perform ? CreateDataPropertyOrThrow(O, "value", part.[[value]]).
O.value = part['[[value]]'];
// a. Perform ? CreateDataPropertyOrThrow(result, ? ToString(n), O).
result[n] = O;
// a. Increment n by 1.
n += 1;
}
// 5. Return result.
return result;
}
/*
* @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]
* @clause[sec-partitionnumberpattern]
*/
function PartitionNumberPattern(numberFormat, x) {
var internal = getInternalProperties(numberFormat),
locale = internal['[[dataLocale]]'],
nums = internal['[[numberingSystem]]'],
data = internals.NumberFormat['[[localeData]]'][locale],
ild = data.symbols[nums] || data.symbols.latn,
pattern = void 0;
// 1. If x is not NaN and x < 0, then:
if (!isNaN(x) && x < 0) {
// a. Let x be -x.
x = -x;
// a. Let pattern be the value of numberFormat.[[negativePattern]].
pattern = internal['[[negativePattern]]'];
}
// 2. Else,
else {
// a. Let pattern be the value of numberFormat.[[positivePattern]].
pattern = internal['[[positivePattern]]'];
}
// 3. Let result be a new empty List.
var result = new List();
// 4. Let beginIndex be Call(%StringProto_indexOf%, pattern, "{", 0).
var beginIndex = pattern.indexOf('{', 0);
// 5. Let endIndex be 0.
var endIndex = 0;
// 6. Let nextIndex be 0.
var nextIndex = 0;
// 7. Let length be the number of code units in pattern.
var length = pattern.length;
// 8. Repeat while beginIndex is an integer index into pattern:
while (beginIndex > -1 && beginIndex < length) {
// a. Set endIndex to Call(%StringProto_indexOf%, pattern, "}", beginIndex)
endIndex = pattern.indexOf('}', beginIndex);
// a. If endIndex = -1, throw new Error exception.
if (endIndex === -1) throw new Error();
// a. If beginIndex is greater than nextIndex, then:
if (beginIndex > nextIndex) {
// i. Let literal be a substring of pattern from position nextIndex, inclusive, to position beginIndex, exclusive.
var literal = pattern.substring(nextIndex, beginIndex);
// ii. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'literal', '[[value]]': literal });
}
// a. Let p be the substring of pattern from position beginIndex, exclusive, to position endIndex, exclusive.
var p = pattern.substring(beginIndex + 1, endIndex);
// a. If p is equal "number", then:
if (p === "number") {
// i. If x is NaN,
if (isNaN(x)) {
// 1. Let n be an ILD String value indicating the NaN value.
var n = ild.nan;
// 2. Add new part record { [[type]]: "nan", [[value]]: n } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'nan', '[[value]]': n });
}
// ii. Else if isFinite(x) is false,
else if (!isFinite(x)) {
// 1. Let n be an ILD String value indicating infinity.
var _n = ild.infinity;
// 2. Add new part record { [[type]]: "infinity", [[value]]: n } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'infinity', '[[value]]': _n });
}
// iii. Else,
else {
// 1. If the value of numberFormat.[[style]] is "percent" and isFinite(x), let x be 100 × x.
if (internal['[[style]]'] === 'percent' && isFinite(x)) x *= 100;
var _n2 = void 0;
// 2. If the numberFormat.[[minimumSignificantDigits]] and numberFormat.[[maximumSignificantDigits]] are present, then
if (hop.call(internal, '[[minimumSignificantDigits]]') && hop.call(internal, '[[maximumSignificantDigits]]')) {
// a. Let n be ToRawPrecision(x, numberFormat.[[minimumSignificantDigits]], numberFormat.[[maximumSignificantDigits]]).
_n2 = ToRawPrecision(x, internal['[[minimumSignificantDigits]]'], internal['[[maximumSignificantDigits]]']);
}
// 3. Else,
else {
// a. Let n be ToRawFixed(x, numberFormat.[[minimumIntegerDigits]], numberFormat.[[minimumFractionDigits]], numberFormat.[[maximumFractionDigits]]).
_n2 = ToRawFixed(x, internal['[[minimumIntegerDigits]]'], internal['[[minimumFractionDigits]]'], internal['[[maximumFractionDigits]]']);
}
// 4. If the value of the numberFormat.[[numberingSystem]] matches one of the values in the "Numbering System" column of Table 2 below, then
if (numSys[nums]) {
(function () {
// a. Let digits be an array whose 10 String valued elements are the UTF-16 string representations of the 10 digits specified in the "Digits" column of the matching row in Table 2.
var digits = numSys[nums];
// a. Replace each digit in n with the value of digits[digit].
_n2 = String(_n2).replace(/\d/g, function (digit) {
return digits[digit];
});
})();
}
// 5. Else use an implementation dependent algorithm to map n to the appropriate representation of n in the given numbering system.
else _n2 = String(_n2); // ###TODO###
var integer = void 0;
var fraction = void 0;
// 6. Let decimalSepIndex be Call(%StringProto_indexOf%, n, ".", 0).
var decimalSepIndex = _n2.indexOf('.', 0);
// 7. If decimalSepIndex > 0, then:
if (decimalSepIndex > 0) {
// a. Let integer be the substring of n from position 0, inclusive, to position decimalSepIndex, exclusive.
integer = _n2.substring(0, decimalSepIndex);
// a. Let fraction be the substring of n from position decimalSepIndex, exclusive, to the end of n.
fraction = _n2.substring(decimalSepIndex + 1, decimalSepIndex.length);
}
// 8. Else:
else {
// a. Let integer be n.
integer = _n2;
// a. Let fraction be undefined.
fraction = undefined;
}
// 9. If the value of the numberFormat.[[useGrouping]] is true,
if (internal['[[useGrouping]]'] === true) {
// a. Let groupSepSymbol be the ILND String representing the grouping separator.
var groupSepSymbol = ild.group;
// a. Let groups be a List whose elements are, in left to right order, the substrings defined by ILND set of locations within the integer.
var groups = [];
// ----> implementation:
// Primary group represents the group closest to the decimal
var pgSize = data.patterns.primaryGroupSize || 3;
// Secondary group is every other group
var sgSize = data.patterns.secondaryGroupSize || pgSize;
// Group only if necessary
if (integer.length > pgSize) {
// Index of the primary grouping separator
var end = integer.length - pgSize;
// Starting index for our loop
var idx = end % sgSize;
var start = integer.slice(0, idx);
if (start.length) arrPush.call(groups, start);
// Loop to separate into secondary grouping digits
while (idx < end) {
arrPush.call(groups, integer.slice(idx, idx + sgSize));
idx += sgSize;
}
// Add the primary grouping digits
arrPush.call(groups, integer.slice(end));
} else {
arrPush.call(groups, integer);
}
// a. Assert: The number of elements in groups List is greater than 0.
if (groups.length === 0) throw new Error();
// a. Repeat, while groups List is not empty:
while (groups.length) {
// i. Remove the first element from groups and let integerGroup be the value of that element.
var integerGroup = arrShift.call(groups);
// ii. Add new part record { [[type]]: "integer", [[value]]: integerGroup } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'integer', '[[value]]': integerGroup });
// iii. If groups List is not empty, then:
if (groups.length) {
// 1. Add new part record { [[type]]: "group", [[value]]: groupSepSymbol } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'group', '[[value]]': groupSepSymbol });
}
}
}
// 10. Else,
else {
// a. Add new part record { [[type]]: "integer", [[value]]: integer } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'integer', '[[value]]': integer });
}
// 11. If fraction is not undefined, then:
if (fraction !== undefined) {
// a. Let decimalSepSymbol be the ILND String representing the decimal separator.
var decimalSepSymbol = ild.decimal;
// a. Add new part record { [[type]]: "decimal", [[value]]: decimalSepSymbol } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'decimal', '[[value]]': decimalSepSymbol });
// a. Add new part record { [[type]]: "fraction", [[value]]: fraction } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'fraction', '[[value]]': fraction });
}
}
}
// a. Else if p is equal "plusSign", then:
else if (p === "plusSign") {
// i. Let plusSignSymbol be the ILND String representing the plus sign.
var plusSignSymbol = ild.plusSign;
// ii. Add new part record { [[type]]: "plusSign", [[value]]: plusSignSymbol } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'plusSign', '[[value]]': plusSignSymbol });
}
// a. Else if p is equal "minusSign", then:
else if (p === "minusSign") {
// i. Let minusSignSymbol be the ILND String representing the minus sign.
var minusSignSymbol = ild.minusSign;
// ii. Add new part record { [[type]]: "minusSign", [[value]]: minusSignSymbol } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'minusSign', '[[value]]': minusSignSymbol });
}
// a. Else if p is equal "percentSign" and numberFormat.[[style]] is "percent", then:
else if (p === "percentSign" && internal['[[style]]'] === "percent") {
// i. Let percentSignSymbol be the ILND String representing the percent sign.
var percentSignSymbol = ild.percentSign;
// ii. Add new part record { [[type]]: "percentSign", [[value]]: percentSignSymbol } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'literal', '[[value]]': percentSignSymbol });
}
// a. Else if p is equal "currency" and numberFormat.[[style]] is "currency", then:
else if (p === "currency" && internal['[[style]]'] === "currency") {
// i. Let currency be the value of numberFormat.[[currency]].
var currency = internal['[[currency]]'];
var cd = void 0;
// ii. If numberFormat.[[currencyDisplay]] is "code", then
if (internal['[[currencyDisplay]]'] === "code") {
// 1. Let cd be currency.
cd = currency;
}
// iii. Else if numberFormat.[[currencyDisplay]] is "symbol", then
else if (internal['[[currencyDisplay]]'] === "symbol") {
// 1. Let cd be an ILD string representing currency in short form. If the implementation does not have such a representation of currency, use currency itself.
cd = data.currencies[currency] || currency;
}
// iv. Else if numberFormat.[[currencyDisplay]] is "name", then
else if (internal['[[currencyDisplay]]'] === "name") {
// 1. Let cd be an ILD string representing currency in long form. If the implementation does not have such a representation of currency, then use currency itself.
cd = currency;
}
// v. Add new part record { [[type]]: "currency", [[value]]: cd } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'currency', '[[value]]': cd });
}
// a. Else,
else {
// i. Let literal be the substring of pattern from position beginIndex, inclusive, to position endIndex, inclusive.
var _literal = pattern.substring(beginIndex, endIndex);
// ii. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'literal', '[[value]]': _literal });
}
// a. Set nextIndex to endIndex + 1.
nextIndex = endIndex + 1;
// a. Set beginIndex to Call(%StringProto_indexOf%, pattern, "{", nextIndex)
beginIndex = pattern.indexOf('{', nextIndex);
}
// 9. If nextIndex is less than length, then:
if (nextIndex < length) {
// a. Let literal be the substring of pattern from position nextIndex, inclusive, to position length, exclusive.
var _literal2 = pattern.substring(nextIndex, length);
// a. Add new part record { [[type]]: "literal", [[value]]: literal } as a new element of the list result.
arrPush.call(result, { '[[type]]': 'literal', '[[value]]': _literal2 });
}
// 10. Return result.
return result;
}
/*
* @spec[stasm/ecma402/number-format-to-parts/spec/numberformat.html]
* @clause[sec-formatnumber]
*/
function FormatNumber(numberFormat, x) {
// 1. Let parts be ? PartitionNumberPattern(numberFormat, x).
var parts = PartitionNumberPattern(numberFormat, x);
// 2. Let result be an empty String.
var result = '';
// 3. For each part in parts, do:
for (var i = 0; parts.length > i; i++) {
var part = parts[i];
// a. Set result to a String value produced by concatenating result and part.[[value]].
result += part['[[value]]'];
}
// 4. Return result.
return result;
}
/**
* When the ToRawPrecision abstract operation is called with arguments x (which
* must be a finite non-negative number), minPrecision, and maxPrecision (both
* must be integers between 1 and 21) the following steps are taken:
*/
function ToRawPrecision(x, minPrecision, maxPrecision) {
// 1. Let p be maxPrecision.
var p = maxPrecision;
var m = void 0,
e = void 0;
// 2. If x = 0, then
if (x === 0) {
// a. Let m be the String consisting of p occurrences of the character "0".
m = arrJoin.call(Array(p + 1), '0');
// b. Let e be 0.
e = 0;
}
// 3. Else
else {
// a. Let e and n be integers such that 10ᵖ⁻¹ ≤ n < 10ᵖ and for which the
// exact mathematical value of n × 10ᵉ⁻ᵖ⁺¹ x is as close to zero as
// possible. If there are two such sets of e and n, pick the e and n for
// which n × 10ᵉ⁻ᵖ⁺¹ is larger.
e = log10Floor(Math.abs(x));
// Easier to get to m from here
var f = Math.round(Math.exp(Math.abs(e - p + 1) * Math.LN10));
// b. Let m be the String consisting of the digits of the decimal
// representation of n (in order, with no leading zeroes)
m = String(Math.round(e - p + 1 < 0 ? x * f : x / f));
}
// 4. If e ≥ p, then
if (e >= p)
// a. Return the concatenation of m and e-p+1 occurrences of the character "0".
return m + arrJoin.call(Array(e - p + 1 + 1), '0');
// 5. If e = p-1, then
else if (e === p - 1)
// a. Return m.
return m;
// 6. If e ≥ 0, then
else if (e >= 0)
// a. Let m be the concatenation of the first e+1 characters of m, the character
// ".", and the remaining p(e+1) characters of m.
m = m.slice(0, e + 1) + '.' + m.slice(e + 1);
// 7. If e < 0, then
else if (e < 0)
// a. Let m be the concatenation of the String "0.", (e+1) occurrences of the
// character "0", and the string m.
m = '0.' + arrJoin.call(Array(-(e + 1) + 1), '0') + m;
// 8. If m contains the character ".", and maxPrecision > minPrecision, then
if (m.indexOf(".") >= 0 && maxPrecision > minPrecision) {
// a. Let cut be maxPrecision minPrecision.
var cut = maxPrecision - minPrecision;
// b. Repeat while cut > 0 and the last character of m is "0":
while (cut > 0 && m.charAt(m.length - 1) === '0') {
// i. Remove the last character from m.
m = m.slice(0, -1);
// ii. Decrease cut by 1.
cut--;
}
// c. If the last character of m is ".", then
if (m.charAt(m.length - 1) === '.')
// i. Remove the last character from m.
m = m.slice(0, -1);
}
// 9. Return m.
return m;
}
/**
* @spec[tc39/ecma402/master/spec/numberformat.html]
* @clause[sec-torawfixed]
* When the ToRawFixed abstract operation is called with arguments x (which must
* be a finite non-negative number), minInteger (which must be an integer between
* 1 and 21), minFraction, and maxFraction (which must be integers between 0 and
* 20) the following steps are taken:
*/
function ToRawFixed(x, minInteger, minFraction, maxFraction) {
// 1. Let f be maxFraction.
var f = maxFraction;
// 2. Let n be an integer for which the exact mathematical value of n ÷ 10f x is as close to zero as possible. If there are two such n, pick the larger n.
var n = Math.pow(10, f) * x; // diverging...
// 3. If n = 0, let m be the String "0". Otherwise, let m be the String consisting of the digits of the decimal representation of n (in order, with no leading zeroes).
var m = n === 0 ? "0" : n.toFixed(0); // divering...
{
// this diversion is needed to take into consideration big numbers, e.g.:
// 1.2344501e+37 -> 12344501000000000000000000000000000000
var idx = void 0;
var exp = (idx = m.indexOf('e')) > -1 ? m.slice(idx + 1) : 0;
if (exp) {
m = m.slice(0, idx).replace('.', '');
m += arrJoin.call(Array(exp - (m.length - 1) + 1), '0');
}
}
var int = void 0;
// 4. If f ≠ 0, then
if (f !== 0) {
// a. Let k be the number of characters in m.
var k = m.length;
// a. If k ≤ f, then
if (k <= f) {
// i. Let z be the String consisting of f+1k occurrences of the character "0".
var z = arrJoin.call(Array(f + 1 - k + 1), '0');
// ii. Let m be the concatenation of Strings z and m.
m = z + m;
// iii. Let k be f+1.
k = f + 1;
}
// a. Let a be the first kf characters of m, and let b be the remaining f characters of m.
var a = m.substring(0, k - f),
b = m.substring(k - f, m.length);
// a. Let m be the concatenation of the three Strings a, ".", and b.
m = a + "." + b;
// a. Let int be the number of characters in a.
int = a.length;
}
// 5. Else, let int be the number of characters in m.
else int = m.length;
// 6. Let cut be maxFraction minFraction.
var cut = maxFraction - minFraction;
// 7. Repeat while cut > 0 and the last character of m is "0":
while (cut > 0 && m.slice(-1) === "0") {
// a. Remove the last character from m.
m = m.slice(0, -1);
// a. Decrease cut by 1.
cut--;
}
// 8. If the last character of m is ".", then
if (m.slice(-1) === ".") {
// a. Remove the last character from m.
m = m.slice(0, -1);
}
// 9. If int < minInteger, then
if (int < minInteger) {
// a. Let z be the String consisting of minIntegerint occurrences of the character "0".
var _z = arrJoin.call(Array(minInteger - int + 1), '0');
// a. Let m be the concatenation of Strings z and m.
m = _z + m;
}
// 10. Return m.
return m;
}
// Sect 11.3.2 Table 2, Numbering systems
// ======================================
var numSys = {
arab: ["٠", "١", "٢", "٣", "٤", "٥", "٦", "٧", "٨", "٩"],
arabext: ["۰", "۱", "۲", "۳", "۴", "۵", "۶", "۷", "۸", "۹"],
bali: ["᭐", "᭑", "᭒", "᭓", "᭔", "᭕", "᭖", "᭗", "᭘", "᭙"],
beng: ["", "১", "২", "৩", "", "৫", "৬", "", "৮", "৯"],
deva: ["", "१", "२", "३", "४", "५", "६", "७", "८", "९"],
fullwide: ["", "", "", "", "", "", "", "", "", ""],
gujr: ["", "૧", "૨", "૩", "૪", "૫", "૬", "૭", "૮", "૯"],
guru: ["", "", "੨", "੩", "", "੫", "੬", "੭", "੮", "੯"],
hanidec: ["", "一", "二", "三", "四", "五", "六", "七", "八", "九"],
khmr: ["០", "១", "២", "៣", "៤", "៥", "៦", "៧", "៨", "៩"],
knda: ["", "೧", "೨", "೩", "೪", "೫", "೬", "೭", "೮", "೯"],
laoo: ["", "໑", "໒", "໓", "໔", "໕", "໖", "໗", "໘", "໙"],
latn: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"],
limb: ["᥆", "᥇", "᥈", "᥉", "᥊", "᥋", "᥌", "᥍", "᥎", "᥏"],
mlym: ["", "൧", "൨", "൩", "൪", "൫", "൬", "", "൮", "൯"],
mong: ["᠐", "᠑", "᠒", "᠓", "᠔", "᠕", "᠖", "᠗", "᠘", "᠙"],
mymr: ["", "၁", "၂", "၃", "၄", "၅", "၆", "၇", "၈", "၉"],
orya: ["", "୧", "", "୩", "୪", "୫", "୬", "୭", "୮", "୯"],
tamldec: ["", "௧", "௨", "௩", "௪", "௫", "௬", "௭", "௮", "௯"],
telu: ["", "౧", "౨", "౩", "౪", "౫", "౬", "౭", "౮", "౯"],
thai: ["", "๑", "๒", "๓", "๔", "๕", "๖", "๗", "๘", "๙"],
tibt: ["༠", "༡", "༢", "༣", "༤", "༥", "༦", "༧", "༨", "༩"]
};
/**
* This function provides access to the locale and formatting options computed
* during initialization of the object.
*
* The function returns a new object whose properties and attributes are set as
* if constructed by an object literal assigning to each of the following
* properties the value of the corresponding internal property of this
* NumberFormat object (see 11.4): locale, numberingSystem, style, currency,
* currencyDisplay, minimumIntegerDigits, minimumFractionDigits,
* maximumFractionDigits, minimumSignificantDigits, maximumSignificantDigits, and
* useGrouping. Properties whose corresponding internal properties are not present
* are not assigned.
*/
/* 11.3.3 */defineProperty(Intl.NumberFormat.prototype, 'resolvedOptions', {
configurable: true,
writable: true,
value: function value() {
var prop = void 0,
descs = new Record(),
props = ['locale', 'numberingSystem', 'style', 'currency', 'currencyDisplay', 'minimumIntegerDigits', 'minimumFractionDigits', 'maximumFractionDigits', 'minimumSignificantDigits', 'maximumSignificantDigits', 'useGrouping'],
internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
// Satisfy test 11.3_b
if (!internal || !internal['[[initializedNumberFormat]]']) throw new TypeError('`this` value for resolvedOptions() is not an initialized Intl.NumberFormat object.');
for (var i = 0, max = props.length; i < max; i++) {
if (hop.call(internal, prop = '[[' + props[i] + ']]')) descs[props[i]] = { value: internal[prop], writable: true, configurable: true, enumerable: true };
}
return objCreate({}, descs);
}
});
/* jslint esnext: true */
// Match these datetime components in a CLDR pattern, except those in single quotes
var expDTComponents = /(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;
// trim patterns after transformations
var expPatternTrimmer = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;
// Skip over patterns with these datetime components because we don't have data
// to back them up:
// timezone, weekday, amoung others
var unwantedDTCs = /[rqQASjJgwWIQq]/; // xXVO were removed from this list in favor of computing matches with timeZoneName values but printing as empty string
var dtKeys = ["era", "year", "month", "day", "weekday", "quarter"];
var tmKeys = ["hour", "minute", "second", "hour12", "timeZoneName"];
function isDateFormatOnly(obj) {
for (var i = 0; i < tmKeys.length; i += 1) {
if (obj.hasOwnProperty(tmKeys[i])) {
return false;
}
}
return true;
}
function isTimeFormatOnly(obj) {
for (var i = 0; i < dtKeys.length; i += 1) {
if (obj.hasOwnProperty(dtKeys[i])) {
return false;
}
}
return true;
}
function joinDateAndTimeFormats(dateFormatObj, timeFormatObj) {
var o = { _: {} };
for (var i = 0; i < dtKeys.length; i += 1) {
if (dateFormatObj[dtKeys[i]]) {
o[dtKeys[i]] = dateFormatObj[dtKeys[i]];
}
if (dateFormatObj._[dtKeys[i]]) {
o._[dtKeys[i]] = dateFormatObj._[dtKeys[i]];
}
}
for (var j = 0; j < tmKeys.length; j += 1) {
if (timeFormatObj[tmKeys[j]]) {
o[tmKeys[j]] = timeFormatObj[tmKeys[j]];
}
if (timeFormatObj._[tmKeys[j]]) {
o._[tmKeys[j]] = timeFormatObj._[tmKeys[j]];
}
}
return o;
}
function computeFinalPatterns(formatObj) {
// From http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Format_Patterns:
// 'In patterns, two single quotes represents a literal single quote, either
// inside or outside single quotes. Text within single quotes is not
// interpreted in any way (except for two adjacent single quotes).'
formatObj.pattern12 = formatObj.extendedPattern.replace(/'([^']*)'/g, function ($0, literal) {
return literal ? literal : "'";
});
// pattern 12 is always the default. we can produce the 24 by removing {ampm}
formatObj.pattern = formatObj.pattern12.replace('{ampm}', '').replace(expPatternTrimmer, '');
return formatObj;
}
function expDTComponentsMeta($0, formatObj) {
switch ($0.charAt(0)) {
// --- Era
case 'G':
formatObj.era = ['short', 'short', 'short', 'long', 'narrow'][$0.length - 1];
return '{era}';
// --- Year
case 'y':
case 'Y':
case 'u':
case 'U':
case 'r':
formatObj.year = $0.length === 2 ? '2-digit' : 'numeric';
return '{year}';
// --- Quarter (not supported in this polyfill)
case 'Q':
case 'q':
formatObj.quarter = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1];
return '{quarter}';
// --- Month
case 'M':
case 'L':
formatObj.month = ['numeric', '2-digit', 'short', 'long', 'narrow'][$0.length - 1];
return '{month}';
// --- Week (not supported in this polyfill)
case 'w':
// week of the year
formatObj.week = $0.length === 2 ? '2-digit' : 'numeric';
return '{weekday}';
case 'W':
// week of the month
formatObj.week = 'numeric';
return '{weekday}';
// --- Day
case 'd':
// day of the month
formatObj.day = $0.length === 2 ? '2-digit' : 'numeric';
return '{day}';
case 'D': // day of the year
case 'F': // day of the week
case 'g':
// 1..n: Modified Julian day
formatObj.day = 'numeric';
return '{day}';
// --- Week Day
case 'E':
// day of the week
formatObj.weekday = ['short', 'short', 'short', 'long', 'narrow', 'short'][$0.length - 1];
return '{weekday}';
case 'e':
// local day of the week
formatObj.weekday = ['numeric', '2-digit', 'short', 'long', 'narrow', 'short'][$0.length - 1];
return '{weekday}';
case 'c':
// stand alone local day of the week
formatObj.weekday = ['numeric', undefined, 'short', 'long', 'narrow', 'short'][$0.length - 1];
return '{weekday}';
// --- Period
case 'a': // AM, PM
case 'b': // am, pm, noon, midnight
case 'B':
// flexible day periods
formatObj.hour12 = true;
return '{ampm}';
// --- Hour
case 'h':
case 'H':
formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric';
return '{hour}';
case 'k':
case 'K':
formatObj.hour12 = true; // 12-hour-cycle time formats (using h or K)
formatObj.hour = $0.length === 2 ? '2-digit' : 'numeric';
return '{hour}';
// --- Minute
case 'm':
formatObj.minute = $0.length === 2 ? '2-digit' : 'numeric';
return '{minute}';
// --- Second
case 's':
formatObj.second = $0.length === 2 ? '2-digit' : 'numeric';
return '{second}';
case 'S':
case 'A':
formatObj.second = 'numeric';
return '{second}';
// --- Timezone
case 'z': // 1..3, 4: specific non-location format
case 'Z': // 1..3, 4, 5: The ISO8601 varios formats
case 'O': // 1, 4: miliseconds in day short, long
case 'v': // 1, 4: generic non-location format
case 'V': // 1, 2, 3, 4: time zone ID or city
case 'X': // 1, 2, 3, 4: The ISO8601 varios formats
case 'x':
// 1, 2, 3, 4: The ISO8601 varios formats
// this polyfill only supports much, for now, we are just doing something dummy
formatObj.timeZoneName = $0.length < 4 ? 'short' : 'long';
return '{timeZoneName}';
}
}
/**
* Converts the CLDR availableFormats into the objects and patterns required by
* the ECMAScript Internationalization API specification.
*/
function createDateTimeFormat(skeleton, pattern) {
// we ignore certain patterns that are unsupported to avoid this expensive op.
if (unwantedDTCs.test(pattern)) return undefined;
var formatObj = {
originalPattern: pattern,
_: {}
};
// Replace the pattern string with the one required by the specification, whilst
// at the same time evaluating it for the subsets and formats
formatObj.extendedPattern = pattern.replace(expDTComponents, function ($0) {
// See which symbol we're dealing with
return expDTComponentsMeta($0, formatObj._);
});
// Match the skeleton string with the one required by the specification
// this implementation is based on the Date Field Symbol Table:
// http://unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
// Note: we are adding extra data to the formatObject even though this polyfill
// might not support it.
skeleton.replace(expDTComponents, function ($0) {
// See which symbol we're dealing with
return expDTComponentsMeta($0, formatObj);
});
return computeFinalPatterns(formatObj);
}
/**
* Processes DateTime formats from CLDR to an easier-to-parse format.
* the result of this operation should be cached the first time a particular
* calendar is analyzed.
*
* The specification requires we support at least the following subsets of
* date/time components:
*
* - 'weekday', 'year', 'month', 'day', 'hour', 'minute', 'second'
* - 'weekday', 'year', 'month', 'day'
* - 'year', 'month', 'day'
* - 'year', 'month'
* - 'month', 'day'
* - 'hour', 'minute', 'second'
* - 'hour', 'minute'
*
* We need to cherry pick at least these subsets from the CLDR data and convert
* them into the pattern objects used in the ECMA-402 API.
*/
function createDateTimeFormats(formats) {
var availableFormats = formats.availableFormats;
var timeFormats = formats.timeFormats;
var dateFormats = formats.dateFormats;
var result = [];
var skeleton = void 0,
pattern = void 0,
computed = void 0,
i = void 0,
j = void 0;
var timeRelatedFormats = [];
var dateRelatedFormats = [];
// Map available (custom) formats into a pattern for createDateTimeFormats
for (skeleton in availableFormats) {
if (availableFormats.hasOwnProperty(skeleton)) {
pattern = availableFormats[skeleton];
computed = createDateTimeFormat(skeleton, pattern);
if (computed) {
result.push(computed);
// in some cases, the format is only displaying date specific props
// or time specific props, in which case we need to also produce the
// combined formats.
if (isDateFormatOnly(computed)) {
dateRelatedFormats.push(computed);
} else if (isTimeFormatOnly(computed)) {
timeRelatedFormats.push(computed);
}
}
}
}
// Map time formats into a pattern for createDateTimeFormats
for (skeleton in timeFormats) {
if (timeFormats.hasOwnProperty(skeleton)) {
pattern = timeFormats[skeleton];
computed = createDateTimeFormat(skeleton, pattern);
if (computed) {
result.push(computed);
timeRelatedFormats.push(computed);
}
}
}
// Map date formats into a pattern for createDateTimeFormats
for (skeleton in dateFormats) {
if (dateFormats.hasOwnProperty(skeleton)) {
pattern = dateFormats[skeleton];
computed = createDateTimeFormat(skeleton, pattern);
if (computed) {
result.push(computed);
dateRelatedFormats.push(computed);
}
}
}
// combine custom time and custom date formats when they are orthogonals to complete the
// formats supported by CLDR.
// This Algo is based on section "Missing Skeleton Fields" from:
// http://unicode.org/reports/tr35/tr35-dates.html#availableFormats_appendItems
for (i = 0; i < timeRelatedFormats.length; i += 1) {
for (j = 0; j < dateRelatedFormats.length; j += 1) {
if (dateRelatedFormats[j].month === 'long') {
pattern = dateRelatedFormats[j].weekday ? formats.full : formats.long;
} else if (dateRelatedFormats[j].month === 'short') {
pattern = formats.medium;
} else {
pattern = formats.short;
}
computed = joinDateAndTimeFormats(dateRelatedFormats[j], timeRelatedFormats[i]);
computed.originalPattern = pattern;
computed.extendedPattern = pattern.replace('{0}', timeRelatedFormats[i].extendedPattern).replace('{1}', dateRelatedFormats[j].extendedPattern).replace(/^[,\s]+|[,\s]+$/gi, '');
result.push(computeFinalPatterns(computed));
}
}
return result;
}
// this represents the exceptions of the rule that are not covered by CLDR availableFormats
// for single property configurations, they play no role when using multiple properties, and
// those that are not in this table, are not exceptions or are not covered by the data we
// provide.
var validSyntheticProps = {
second: {
numeric: 's',
'2-digit': 'ss'
},
minute: {
numeric: 'm',
'2-digit': 'mm'
},
year: {
numeric: 'y',
'2-digit': 'yy'
},
day: {
numeric: 'd',
'2-digit': 'dd'
},
month: {
numeric: 'L',
'2-digit': 'LL',
narrow: 'LLLLL',
short: 'LLL',
long: 'LLLL'
},
weekday: {
narrow: 'ccccc',
short: 'ccc',
long: 'cccc'
}
};
function generateSyntheticFormat(propName, propValue) {
if (validSyntheticProps[propName] && validSyntheticProps[propName][propValue]) {
var _ref2;
return _ref2 = {
originalPattern: validSyntheticProps[propName][propValue],
_: defineProperty$1({}, propName, propValue),
extendedPattern: "{" + propName + "}"
}, defineProperty$1(_ref2, propName, propValue), defineProperty$1(_ref2, "pattern12", "{" + propName + "}"), defineProperty$1(_ref2, "pattern", "{" + propName + "}"), _ref2;
}
}
// An object map of date component keys, saves using a regex later
var dateWidths = objCreate(null, { narrow: {}, short: {}, long: {} });
/**
* Returns a string for a date component, resolved using multiple inheritance as specified
* as specified in the Unicode Technical Standard 35.
*/
function resolveDateString(data, ca, component, width, key) {
// From http://www.unicode.org/reports/tr35/tr35.html#Multiple_Inheritance:
// 'In clearly specified instances, resources may inherit from within the same locale.
// For example, ... the Buddhist calendar inherits from the Gregorian calendar.'
var obj = data[ca] && data[ca][component] ? data[ca][component] : data.gregory[component],
// "sideways" inheritance resolves strings when a key doesn't exist
alts = {
narrow: ['short', 'long'],
short: ['long', 'narrow'],
long: ['short', 'narrow']
},
//
resolved = hop.call(obj, width) ? obj[width] : hop.call(obj, alts[width][0]) ? obj[alts[width][0]] : obj[alts[width][1]];
// `key` wouldn't be specified for components 'dayPeriods'
return key !== null ? resolved[key] : resolved;
}
// Define the DateTimeFormat constructor internally so it cannot be tainted
function DateTimeFormatConstructor() {
var locales = arguments[0];
var options = arguments[1];
if (!this || this === Intl) {
return new Intl.DateTimeFormat(locales, options);
}
return InitializeDateTimeFormat(toObject(this), locales, options);
}
defineProperty(Intl, 'DateTimeFormat', {
configurable: true,
writable: true,
value: DateTimeFormatConstructor
});
// Must explicitly set prototypes as unwritable
defineProperty(DateTimeFormatConstructor, 'prototype', {
writable: false
});
/**
* The abstract operation InitializeDateTimeFormat accepts the arguments dateTimeFormat
* (which must be an object), locales, and options. It initializes dateTimeFormat as a
* DateTimeFormat object.
*/
function /* 12.1.1.1 */InitializeDateTimeFormat(dateTimeFormat, locales, options) {
// This will be a internal properties object if we're not already initialized
var internal = getInternalProperties(dateTimeFormat);
// Create an object whose props can be used to restore the values of RegExp props
var regexpRestore = createRegExpRestore();
// 1. If dateTimeFormat has an [[initializedIntlObject]] internal property with
// value true, throw a TypeError exception.
if (internal['[[initializedIntlObject]]'] === true) throw new TypeError('`this` object has already been initialized as an Intl object');
// Need this to access the `internal` object
defineProperty(dateTimeFormat, '__getInternalProperties', {
value: function value() {
// NOTE: Non-standard, for internal use only
if (arguments[0] === secret) return internal;
}
});
// 2. Set the [[initializedIntlObject]] internal property of numberFormat to true.
internal['[[initializedIntlObject]]'] = true;
// 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
// abstract operation (defined in 9.2.1) with argument locales.
var requestedLocales = CanonicalizeLocaleList(locales);
// 4. Let options be the result of calling the ToDateTimeOptions abstract
// operation (defined below) with arguments options, "any", and "date".
options = ToDateTimeOptions(options, 'any', 'date');
// 5. Let opt be a new Record.
var opt = new Record();
// 6. Let matcher be the result of calling the GetOption abstract operation
// (defined in 9.2.9) with arguments options, "localeMatcher", "string", a List
// containing the two String values "lookup" and "best fit", and "best fit".
var matcher = GetOption(options, 'localeMatcher', 'string', new List('lookup', 'best fit'), 'best fit');
// 7. Set opt.[[localeMatcher]] to matcher.
opt['[[localeMatcher]]'] = matcher;
// 8. Let DateTimeFormat be the standard built-in object that is the initial
// value of Intl.DateTimeFormat.
var DateTimeFormat = internals.DateTimeFormat; // This is what we *really* need
// 9. Let localeData be the value of the [[localeData]] internal property of
// DateTimeFormat.
var localeData = DateTimeFormat['[[localeData]]'];
// 10. Let r be the result of calling the ResolveLocale abstract operation
// (defined in 9.2.5) with the [[availableLocales]] internal property of
// DateTimeFormat, requestedLocales, opt, the [[relevantExtensionKeys]]
// internal property of DateTimeFormat, and localeData.
var r = ResolveLocale(DateTimeFormat['[[availableLocales]]'], requestedLocales, opt, DateTimeFormat['[[relevantExtensionKeys]]'], localeData);
// 11. Set the [[locale]] internal property of dateTimeFormat to the value of
// r.[[locale]].
internal['[[locale]]'] = r['[[locale]]'];
// 12. Set the [[calendar]] internal property of dateTimeFormat to the value of
// r.[[ca]].
internal['[[calendar]]'] = r['[[ca]]'];
// 13. Set the [[numberingSystem]] internal property of dateTimeFormat to the value of
// r.[[nu]].
internal['[[numberingSystem]]'] = r['[[nu]]'];
// The specification doesn't tell us to do this, but it's helpful later on
internal['[[dataLocale]]'] = r['[[dataLocale]]'];
// 14. Let dataLocale be the value of r.[[dataLocale]].
var dataLocale = r['[[dataLocale]]'];
// 15. Let tz be the result of calling the [[Get]] internal method of options with
// argument "timeZone".
var tz = options.timeZone;
// 16. If tz is not undefined, then
if (tz !== undefined) {
// a. Let tz be ToString(tz).
// b. Convert tz to upper case as described in 6.1.
// NOTE: If an implementation accepts additional time zone values, as permitted
// under certain conditions by the Conformance clause, different casing
// rules apply.
tz = toLatinUpperCase(tz);
// c. If tz is not "UTC", then throw a RangeError exception.
// ###TODO: accept more time zones###
if (tz !== 'UTC') throw new RangeError('timeZone is not supported.');
}
// 17. Set the [[timeZone]] internal property of dateTimeFormat to tz.
internal['[[timeZone]]'] = tz;
// 18. Let opt be a new Record.
opt = new Record();
// 19. For each row of Table 3, except the header row, do:
for (var prop in dateTimeComponents) {
if (!hop.call(dateTimeComponents, prop)) continue;
// 20. Let prop be the name given in the Property column of the row.
// 21. Let value be the result of calling the GetOption abstract operation,
// passing as argument options, the name given in the Property column of the
// row, "string", a List containing the strings given in the Values column of
// the row, and undefined.
var value = GetOption(options, prop, 'string', dateTimeComponents[prop]);
// 22. Set opt.[[<prop>]] to value.
opt['[[' + prop + ']]'] = value;
}
// Assigned a value below
var bestFormat = void 0;
// 23. Let dataLocaleData be the result of calling the [[Get]] internal method of
// localeData with argument dataLocale.
var dataLocaleData = localeData[dataLocale];
// 24. Let formats be the result of calling the [[Get]] internal method of
// dataLocaleData with argument "formats".
// Note: we process the CLDR formats into the spec'd structure
var formats = ToDateTimeFormats(dataLocaleData.formats);
// 25. Let matcher be the result of calling the GetOption abstract operation with
// arguments options, "formatMatcher", "string", a List containing the two String
// values "basic" and "best fit", and "best fit".
matcher = GetOption(options, 'formatMatcher', 'string', new List('basic', 'best fit'), 'best fit');
// Optimization: caching the processed formats as a one time operation by
// replacing the initial structure from localeData
dataLocaleData.formats = formats;
// 26. If matcher is "basic", then
if (matcher === 'basic') {
// 27. Let bestFormat be the result of calling the BasicFormatMatcher abstract
// operation (defined below) with opt and formats.
bestFormat = BasicFormatMatcher(opt, formats);
// 28. Else
} else {
{
// diverging
var _hr = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/);
opt.hour12 = _hr === undefined ? dataLocaleData.hour12 : _hr;
}
// 29. Let bestFormat be the result of calling the BestFitFormatMatcher
// abstract operation (defined below) with opt and formats.
bestFormat = BestFitFormatMatcher(opt, formats);
}
// 30. For each row in Table 3, except the header row, do
for (var _prop in dateTimeComponents) {
if (!hop.call(dateTimeComponents, _prop)) continue;
// a. Let prop be the name given in the Property column of the row.
// b. Let pDesc be the result of calling the [[GetOwnProperty]] internal method of
// bestFormat with argument prop.
// c. If pDesc is not undefined, then
if (hop.call(bestFormat, _prop)) {
// i. Let p be the result of calling the [[Get]] internal method of bestFormat
// with argument prop.
var p = bestFormat[_prop];
{
// diverging
p = bestFormat._ && hop.call(bestFormat._, _prop) ? bestFormat._[_prop] : p;
}
// ii. Set the [[<prop>]] internal property of dateTimeFormat to p.
internal['[[' + _prop + ']]'] = p;
}
}
var pattern = void 0; // Assigned a value below
// 31. Let hr12 be the result of calling the GetOption abstract operation with
// arguments options, "hour12", "boolean", undefined, and undefined.
var hr12 = GetOption(options, 'hour12', 'boolean' /*, undefined, undefined*/);
// 32. If dateTimeFormat has an internal property [[hour]], then
if (internal['[[hour]]']) {
// a. If hr12 is undefined, then let hr12 be the result of calling the [[Get]]
// internal method of dataLocaleData with argument "hour12".
hr12 = hr12 === undefined ? dataLocaleData.hour12 : hr12;
// b. Set the [[hour12]] internal property of dateTimeFormat to hr12.
internal['[[hour12]]'] = hr12;
// c. If hr12 is true, then
if (hr12 === true) {
// i. Let hourNo0 be the result of calling the [[Get]] internal method of
// dataLocaleData with argument "hourNo0".
var hourNo0 = dataLocaleData.hourNo0;
// ii. Set the [[hourNo0]] internal property of dateTimeFormat to hourNo0.
internal['[[hourNo0]]'] = hourNo0;
// iii. Let pattern be the result of calling the [[Get]] internal method of
// bestFormat with argument "pattern12".
pattern = bestFormat.pattern12;
}
// d. Else
else
// i. Let pattern be the result of calling the [[Get]] internal method of
// bestFormat with argument "pattern".
pattern = bestFormat.pattern;
}
// 33. Else
else
// a. Let pattern be the result of calling the [[Get]] internal method of
// bestFormat with argument "pattern".
pattern = bestFormat.pattern;
// 34. Set the [[pattern]] internal property of dateTimeFormat to pattern.
internal['[[pattern]]'] = pattern;
// 35. Set the [[boundFormat]] internal property of dateTimeFormat to undefined.
internal['[[boundFormat]]'] = undefined;
// 36. Set the [[initializedDateTimeFormat]] internal property of dateTimeFormat to
// true.
internal['[[initializedDateTimeFormat]]'] = true;
// In ES3, we need to pre-bind the format() function
if (es3) dateTimeFormat.format = GetFormatDateTime.call(dateTimeFormat);
// Restore the RegExp properties
regexpRestore();
// Return the newly initialised object
return dateTimeFormat;
}
/**
* Several DateTimeFormat algorithms use values from the following table, which provides
* property names and allowable values for the components of date and time formats:
*/
var dateTimeComponents = {
weekday: ["narrow", "short", "long"],
era: ["narrow", "short", "long"],
year: ["2-digit", "numeric"],
month: ["2-digit", "numeric", "narrow", "short", "long"],
day: ["2-digit", "numeric"],
hour: ["2-digit", "numeric"],
minute: ["2-digit", "numeric"],
second: ["2-digit", "numeric"],
timeZoneName: ["short", "long"]
};
/**
* When the ToDateTimeOptions abstract operation is called with arguments options,
* required, and defaults, the following steps are taken:
*/
function ToDateTimeFormats(formats) {
if (Object.prototype.toString.call(formats) === '[object Array]') {
return formats;
}
return createDateTimeFormats(formats);
}
/**
* When the ToDateTimeOptions abstract operation is called with arguments options,
* required, and defaults, the following steps are taken:
*/
function ToDateTimeOptions(options, required, defaults) {
// 1. If options is undefined, then let options be null, else let options be
// ToObject(options).
if (options === undefined) options = null;else {
// (#12) options needs to be a Record, but it also needs to inherit properties
var opt2 = toObject(options);
options = new Record();
for (var k in opt2) {
options[k] = opt2[k];
}
}
// 2. Let create be the standard built-in function object defined in ES5, 15.2.3.5.
var create = objCreate;
// 3. Let options be the result of calling the [[Call]] internal method of create with
// undefined as the this value and an argument list containing the single item
// options.
options = create(options);
// 4. Let needDefaults be true.
var needDefaults = true;
// 5. If required is "date" or "any", then
if (required === 'date' || required === 'any') {
// a. For each of the property names "weekday", "year", "month", "day":
// i. If the result of calling the [[Get]] internal method of options with the
// property name is not undefined, then let needDefaults be false.
if (options.weekday !== undefined || options.year !== undefined || options.month !== undefined || options.day !== undefined) needDefaults = false;
}
// 6. If required is "time" or "any", then
if (required === 'time' || required === 'any') {
// a. For each of the property names "hour", "minute", "second":
// i. If the result of calling the [[Get]] internal method of options with the
// property name is not undefined, then let needDefaults be false.
if (options.hour !== undefined || options.minute !== undefined || options.second !== undefined) needDefaults = false;
}
// 7. If needDefaults is true and defaults is either "date" or "all", then
if (needDefaults && (defaults === 'date' || defaults === 'all'))
// a. For each of the property names "year", "month", "day":
// i. Call the [[DefineOwnProperty]] internal method of options with the
// property name, Property Descriptor {[[Value]]: "numeric", [[Writable]]:
// true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
options.year = options.month = options.day = 'numeric';
// 8. If needDefaults is true and defaults is either "time" or "all", then
if (needDefaults && (defaults === 'time' || defaults === 'all'))
// a. For each of the property names "hour", "minute", "second":
// i. Call the [[DefineOwnProperty]] internal method of options with the
// property name, Property Descriptor {[[Value]]: "numeric", [[Writable]]:
// true, [[Enumerable]]: true, [[Configurable]]: true}, and false.
options.hour = options.minute = options.second = 'numeric';
// 9. Return options.
return options;
}
/**
* When the BasicFormatMatcher abstract operation is called with two arguments options and
* formats, the following steps are taken:
*/
function BasicFormatMatcher(options, formats) {
// 1. Let removalPenalty be 120.
var removalPenalty = 120;
// 2. Let additionPenalty be 20.
var additionPenalty = 20;
// 3. Let longLessPenalty be 8.
var longLessPenalty = 8;
// 4. Let longMorePenalty be 6.
var longMorePenalty = 6;
// 5. Let shortLessPenalty be 6.
var shortLessPenalty = 6;
// 6. Let shortMorePenalty be 3.
var shortMorePenalty = 3;
// 7. Let bestScore be -Infinity.
var bestScore = -Infinity;
// 8. Let bestFormat be undefined.
var bestFormat = void 0;
// 9. Let i be 0.
var i = 0;
// 10. Assert: formats is an Array object.
// 11. Let len be the result of calling the [[Get]] internal method of formats with argument "length".
var len = formats.length;
// 12. Repeat while i < len:
while (i < len) {
// a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i).
var format = formats[i];
// b. Let score be 0.
var score = 0;
// c. For each property shown in Table 3:
for (var property in dateTimeComponents) {
if (!hop.call(dateTimeComponents, property)) continue;
// i. Let optionsProp be options.[[<property>]].
var optionsProp = options['[[' + property + ']]'];
// ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format
// with argument property.
// iii. If formatPropDesc is not undefined, then
// 1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property.
var formatProp = hop.call(format, property) ? format[property] : undefined;
// iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by
// additionPenalty.
if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty;
// v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by
// removalPenalty.
else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty;
// vi. Else
else {
// 1. Let values be the array ["2-digit", "numeric", "narrow", "short",
// "long"].
var values = ['2-digit', 'numeric', 'narrow', 'short', 'long'];
// 2. Let optionsPropIndex be the index of optionsProp within values.
var optionsPropIndex = arrIndexOf.call(values, optionsProp);
// 3. Let formatPropIndex be the index of formatProp within values.
var formatPropIndex = arrIndexOf.call(values, formatProp);
// 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2).
var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2);
// 5. If delta = 2, decrease score by longMorePenalty.
if (delta === 2) score -= longMorePenalty;
// 6. Else if delta = 1, decrease score by shortMorePenalty.
else if (delta === 1) score -= shortMorePenalty;
// 7. Else if delta = -1, decrease score by shortLessPenalty.
else if (delta === -1) score -= shortLessPenalty;
// 8. Else if delta = -2, decrease score by longLessPenalty.
else if (delta === -2) score -= longLessPenalty;
}
}
// d. If score > bestScore, then
if (score > bestScore) {
// i. Let bestScore be score.
bestScore = score;
// ii. Let bestFormat be format.
bestFormat = format;
}
// e. Increase i by 1.
i++;
}
// 13. Return bestFormat.
return bestFormat;
}
/**
* When the BestFitFormatMatcher abstract operation is called with two arguments options
* and formats, it performs implementation dependent steps, which should return a set of
* component representations that a typical user of the selected locale would perceive as
* at least as good as the one returned by BasicFormatMatcher.
*
* This polyfill defines the algorithm to be the same as BasicFormatMatcher,
* with the addition of bonus points awarded where the requested format is of
* the same data type as the potentially matching format.
*
* This algo relies on the concept of closest distance matching described here:
* http://unicode.org/reports/tr35/tr35-dates.html#Matching_Skeletons
* Typically a “best match” is found using a closest distance match, such as:
*
* Symbols requesting a best choice for the locale are replaced.
* j → one of {H, k, h, K}; C → one of {a, b, B}
* -> Covered by cldr.js matching process
*
* For fields with symbols representing the same type (year, month, day, etc):
* Most symbols have a small distance from each other.
* M ≅ L; E ≅ c; a ≅ b ≅ B; H ≅ k ≅ h ≅ K; ...
* -> Covered by cldr.js matching process
*
* Width differences among fields, other than those marking text vs numeric, are given small distance from each other.
* MMM ≅ MMMM
* MM ≅ M
* Numeric and text fields are given a larger distance from each other.
* MMM ≈ MM
* Symbols representing substantial differences (week of year vs week of month) are given much larger a distances from each other.
* d ≋ D; ...
* Missing or extra fields cause a match to fail. (But see Missing Skeleton Fields).
*
*
* For example,
*
* { month: 'numeric', day: 'numeric' }
*
* should match
*
* { month: '2-digit', day: '2-digit' }
*
* rather than
*
* { month: 'short', day: 'numeric' }
*
* This makes sense because a user requesting a formatted date with numeric parts would
* not expect to see the returned format containing narrow, short or long part names
*/
function BestFitFormatMatcher(options, formats) {
/** Diverging: this block implements the hack for single property configuration, eg.:
*
* `new Intl.DateTimeFormat('en', {day: 'numeric'})`
*
* should produce a single digit with the day of the month. This is needed because
* CLDR `availableFormats` data structure doesn't cover these cases.
*/
{
var optionsPropNames = [];
for (var property in dateTimeComponents) {
if (!hop.call(dateTimeComponents, property)) continue;
if (options['[[' + property + ']]'] !== undefined) {
optionsPropNames.push(property);
}
}
if (optionsPropNames.length === 1) {
var _bestFormat = generateSyntheticFormat(optionsPropNames[0], options['[[' + optionsPropNames[0] + ']]']);
if (_bestFormat) {
return _bestFormat;
}
}
}
// 1. Let removalPenalty be 120.
var removalPenalty = 120;
// 2. Let additionPenalty be 20.
var additionPenalty = 20;
// 3. Let longLessPenalty be 8.
var longLessPenalty = 8;
// 4. Let longMorePenalty be 6.
var longMorePenalty = 6;
// 5. Let shortLessPenalty be 6.
var shortLessPenalty = 6;
// 6. Let shortMorePenalty be 3.
var shortMorePenalty = 3;
var patternPenalty = 2;
var hour12Penalty = 1;
// 7. Let bestScore be -Infinity.
var bestScore = -Infinity;
// 8. Let bestFormat be undefined.
var bestFormat = void 0;
// 9. Let i be 0.
var i = 0;
// 10. Assert: formats is an Array object.
// 11. Let len be the result of calling the [[Get]] internal method of formats with argument "length".
var len = formats.length;
// 12. Repeat while i < len:
while (i < len) {
// a. Let format be the result of calling the [[Get]] internal method of formats with argument ToString(i).
var format = formats[i];
// b. Let score be 0.
var score = 0;
// c. For each property shown in Table 3:
for (var _property in dateTimeComponents) {
if (!hop.call(dateTimeComponents, _property)) continue;
// i. Let optionsProp be options.[[<property>]].
var optionsProp = options['[[' + _property + ']]'];
// ii. Let formatPropDesc be the result of calling the [[GetOwnProperty]] internal method of format
// with argument property.
// iii. If formatPropDesc is not undefined, then
// 1. Let formatProp be the result of calling the [[Get]] internal method of format with argument property.
var formatProp = hop.call(format, _property) ? format[_property] : undefined;
// Diverging: using the default properties produced by the pattern/skeleton
// to match it with user options, and apply a penalty
var patternProp = hop.call(format._, _property) ? format._[_property] : undefined;
if (optionsProp !== patternProp) {
score -= patternPenalty;
}
// iv. If optionsProp is undefined and formatProp is not undefined, then decrease score by
// additionPenalty.
if (optionsProp === undefined && formatProp !== undefined) score -= additionPenalty;
// v. Else if optionsProp is not undefined and formatProp is undefined, then decrease score by
// removalPenalty.
else if (optionsProp !== undefined && formatProp === undefined) score -= removalPenalty;
// vi. Else
else {
// 1. Let values be the array ["2-digit", "numeric", "narrow", "short",
// "long"].
var values = ['2-digit', 'numeric', 'narrow', 'short', 'long'];
// 2. Let optionsPropIndex be the index of optionsProp within values.
var optionsPropIndex = arrIndexOf.call(values, optionsProp);
// 3. Let formatPropIndex be the index of formatProp within values.
var formatPropIndex = arrIndexOf.call(values, formatProp);
// 4. Let delta be max(min(formatPropIndex - optionsPropIndex, 2), -2).
var delta = Math.max(Math.min(formatPropIndex - optionsPropIndex, 2), -2);
{
// diverging from spec
// When the bestFit argument is true, subtract additional penalty where data types are not the same
if (formatPropIndex <= 1 && optionsPropIndex >= 2 || formatPropIndex >= 2 && optionsPropIndex <= 1) {
// 5. If delta = 2, decrease score by longMorePenalty.
if (delta > 0) score -= longMorePenalty;else if (delta < 0) score -= longLessPenalty;
} else {
// 5. If delta = 2, decrease score by longMorePenalty.
if (delta > 1) score -= shortMorePenalty;else if (delta < -1) score -= shortLessPenalty;
}
}
}
}
{
// diverging to also take into consideration differences between 12 or 24 hours
// which is special for the best fit only.
if (format._.hour12 !== options.hour12) {
score -= hour12Penalty;
}
}
// d. If score > bestScore, then
if (score > bestScore) {
// i. Let bestScore be score.
bestScore = score;
// ii. Let bestFormat be format.
bestFormat = format;
}
// e. Increase i by 1.
i++;
}
// 13. Return bestFormat.
return bestFormat;
}
/* 12.2.3 */internals.DateTimeFormat = {
'[[availableLocales]]': [],
'[[relevantExtensionKeys]]': ['ca', 'nu'],
'[[localeData]]': {}
};
/**
* When the supportedLocalesOf method of Intl.DateTimeFormat is called, the
* following steps are taken:
*/
/* 12.2.2 */
defineProperty(Intl.DateTimeFormat, 'supportedLocalesOf', {
configurable: true,
writable: true,
value: fnBind.call(function (locales) {
// Bound functions only have the `this` value altered if being used as a constructor,
// this lets us imitate a native function that has no constructor
if (!hop.call(this, '[[availableLocales]]')) throw new TypeError('supportedLocalesOf() is not a constructor');
// Create an object whose props can be used to restore the values of RegExp props
var regexpRestore = createRegExpRestore(),
// 1. If options is not provided, then let options be undefined.
options = arguments[1],
// 2. Let availableLocales be the value of the [[availableLocales]] internal
// property of the standard built-in object that is the initial value of
// Intl.NumberFormat.
availableLocales = this['[[availableLocales]]'],
// 3. Let requestedLocales be the result of calling the CanonicalizeLocaleList
// abstract operation (defined in 9.2.1) with argument locales.
requestedLocales = CanonicalizeLocaleList(locales);
// Restore the RegExp properties
regexpRestore();
// 4. Return the result of calling the SupportedLocales abstract operation
// (defined in 9.2.8) with arguments availableLocales, requestedLocales,
// and options.
return SupportedLocales(availableLocales, requestedLocales, options);
}, internals.NumberFormat)
});
/**
* This named accessor property returns a function that formats a number
* according to the effective locale and the formatting options of this
* DateTimeFormat object.
*/
/* 12.3.2 */defineProperty(Intl.DateTimeFormat.prototype, 'format', {
configurable: true,
get: GetFormatDateTime
});
function GetFormatDateTime() {
var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
// Satisfy test 12.3_b
if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for format() is not an initialized Intl.DateTimeFormat object.');
// The value of the [[Get]] attribute is a function that takes the following
// steps:
// 1. If the [[boundFormat]] internal property of this DateTimeFormat object
// is undefined, then:
if (internal['[[boundFormat]]'] === undefined) {
// a. Let F be a Function object, with internal properties set as
// specified for built-in functions in ES5, 15, or successor, and the
// length property set to 0, that takes the argument date and
// performs the following steps:
var F = function F() {
var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];
// i. If date is not provided or is undefined, then let x be the
// result as if by the expression Date.now() where Date.now is
// the standard built-in function defined in ES5, 15.9.4.4.
// ii. Else let x be ToNumber(date).
// iii. Return the result of calling the FormatDateTime abstract
// operation (defined below) with arguments this and x.
var x = date === undefined ? Date.now() : toNumber(date);
return FormatDateTime(this, x);
};
// b. Let bind be the standard built-in function object defined in ES5,
// 15.3.4.5.
// c. Let bf be the result of calling the [[Call]] internal method of
// bind with F as the this value and an argument list containing
// the single item this.
var bf = fnBind.call(F, this);
// d. Set the [[boundFormat]] internal property of this NumberFormat
// object to bf.
internal['[[boundFormat]]'] = bf;
}
// Return the value of the [[boundFormat]] internal property of this
// NumberFormat object.
return internal['[[boundFormat]]'];
}
function formatToParts$1() {
var date = arguments.length <= 0 || arguments[0] === undefined ? undefined : arguments[0];
var internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for formatToParts() is not an initialized Intl.DateTimeFormat object.');
var x = date === undefined ? Date.now() : toNumber(date);
return FormatToPartsDateTime(this, x);
}
Object.defineProperty(Intl.DateTimeFormat.prototype, 'formatToParts', {
enumerable: false,
writable: true,
configurable: true,
value: formatToParts$1
});
function CreateDateTimeParts(dateTimeFormat, x) {
// 1. If x is not a finite Number, then throw a RangeError exception.
if (!isFinite(x)) throw new RangeError('Invalid valid date passed to format');
var internal = dateTimeFormat.__getInternalProperties(secret);
// Creating restore point for properties on the RegExp object... please wait
/* let regexpRestore = */createRegExpRestore(); // ###TODO: review this
// 2. Let locale be the value of the [[locale]] internal property of dateTimeFormat.
var locale = internal['[[locale]]'];
// 3. Let nf be the result of creating a new NumberFormat object as if by the
// expression new Intl.NumberFormat([locale], {useGrouping: false}) where
// Intl.NumberFormat is the standard built-in constructor defined in 11.1.3.
var nf = new Intl.NumberFormat([locale], { useGrouping: false });
// 4. Let nf2 be the result of creating a new NumberFormat object as if by the
// expression new Intl.NumberFormat([locale], {minimumIntegerDigits: 2, useGrouping:
// false}) where Intl.NumberFormat is the standard built-in constructor defined in
// 11.1.3.
var nf2 = new Intl.NumberFormat([locale], { minimumIntegerDigits: 2, useGrouping: false });
// 5. Let tm be the result of calling the ToLocalTime abstract operation (defined
// below) with x, the value of the [[calendar]] internal property of dateTimeFormat,
// and the value of the [[timeZone]] internal property of dateTimeFormat.
var tm = ToLocalTime(x, internal['[[calendar]]'], internal['[[timeZone]]']);
// 6. Let result be the value of the [[pattern]] internal property of dateTimeFormat.
var pattern = internal['[[pattern]]'];
// 7.
var result = new List();
// 8.
var index = 0;
// 9.
var beginIndex = pattern.indexOf('{');
// 10.
var endIndex = 0;
// Need the locale minus any extensions
var dataLocale = internal['[[dataLocale]]'];
// Need the calendar data from CLDR
var localeData = internals.DateTimeFormat['[[localeData]]'][dataLocale].calendars;
var ca = internal['[[calendar]]'];
// 11.
while (beginIndex !== -1) {
var fv = void 0;
// a.
endIndex = pattern.indexOf('}', beginIndex);
// b.
if (endIndex === -1) {
throw new Error('Unclosed pattern');
}
// c.
if (beginIndex > index) {
arrPush.call(result, {
type: 'literal',
value: pattern.substring(index, beginIndex)
});
}
// d.
var p = pattern.substring(beginIndex + 1, endIndex);
// e.
if (dateTimeComponents.hasOwnProperty(p)) {
// i. Let f be the value of the [[<p>]] internal property of dateTimeFormat.
var f = internal['[[' + p + ']]'];
// ii. Let v be the value of tm.[[<p>]].
var v = tm['[[' + p + ']]'];
// iii. If p is "year" and v ≤ 0, then let v be 1 - v.
if (p === 'year' && v <= 0) {
v = 1 - v;
}
// iv. If p is "month", then increase v by 1.
else if (p === 'month') {
v++;
}
// v. If p is "hour" and the value of the [[hour12]] internal property of
// dateTimeFormat is true, then
else if (p === 'hour' && internal['[[hour12]]'] === true) {
// 1. Let v be v modulo 12.
v = v % 12;
// 2. If v is 0 and the value of the [[hourNo0]] internal property of
// dateTimeFormat is true, then let v be 12.
if (v === 0 && internal['[[hourNo0]]'] === true) {
v = 12;
}
}
// vi. If f is "numeric", then
if (f === 'numeric') {
// 1. Let fv be the result of calling the FormatNumber abstract operation
// (defined in 11.3.2) with arguments nf and v.
fv = FormatNumber(nf, v);
}
// vii. Else if f is "2-digit", then
else if (f === '2-digit') {
// 1. Let fv be the result of calling the FormatNumber abstract operation
// with arguments nf2 and v.
fv = FormatNumber(nf2, v);
// 2. If the length of fv is greater than 2, let fv be the substring of fv
// containing the last two characters.
if (fv.length > 2) {
fv = fv.slice(-2);
}
}
// viii. Else if f is "narrow", "short", or "long", then let fv be a String
// value representing f in the desired form; the String value depends upon
// the implementation and the effective locale and calendar of
// dateTimeFormat. If p is "month", then the String value may also depend
// on whether dateTimeFormat has a [[day]] internal property. If p is
// "timeZoneName", then the String value may also depend on the value of
// the [[inDST]] field of tm.
else if (f in dateWidths) {
switch (p) {
case 'month':
fv = resolveDateString(localeData, ca, 'months', f, tm['[[' + p + ']]']);
break;
case 'weekday':
try {
fv = resolveDateString(localeData, ca, 'days', f, tm['[[' + p + ']]']);
// fv = resolveDateString(ca.days, f)[tm['[['+ p +']]']];
} catch (e) {
throw new Error('Could not find weekday data for locale ' + locale);
}
break;
case 'timeZoneName':
fv = ''; // ###TODO
break;
case 'era':
try {
fv = resolveDateString(localeData, ca, 'eras', f, tm['[[' + p + ']]']);
} catch (e) {
throw new Error('Could not find era data for locale ' + locale);
}
break;
default:
fv = tm['[[' + p + ']]'];
}
}
// ix
arrPush.call(result, {
type: p,
value: fv
});
// f.
} else if (p === 'ampm') {
// i.
var _v = tm['[[hour]]'];
// ii./iii.
fv = resolveDateString(localeData, ca, 'dayPeriods', _v > 11 ? 'pm' : 'am', null);
// iv.
arrPush.call(result, {
type: 'dayPeriod',
value: fv
});
// g.
} else {
arrPush.call(result, {
type: 'literal',
value: pattern.substring(beginIndex, endIndex + 1)
});
}
// h.
index = endIndex + 1;
// i.
beginIndex = pattern.indexOf('{', index);
}
// 12.
if (endIndex < pattern.length - 1) {
arrPush.call(result, {
type: 'literal',
value: pattern.substr(endIndex + 1)
});
}
// 13.
return result;
}
/**
* When the FormatDateTime abstract operation is called with arguments dateTimeFormat
* (which must be an object initialized as a DateTimeFormat) and x (which must be a Number
* value), it returns a String value representing x (interpreted as a time value as
* specified in ES5, 15.9.1.1) according to the effective locale and the formatting
* options of dateTimeFormat.
*/
function FormatDateTime(dateTimeFormat, x) {
var parts = CreateDateTimeParts(dateTimeFormat, x);
var result = '';
for (var i = 0; parts.length > i; i++) {
var part = parts[i];
result += part.value;
}
return result;
}
function FormatToPartsDateTime(dateTimeFormat, x) {
var parts = CreateDateTimeParts(dateTimeFormat, x);
var result = [];
for (var i = 0; parts.length > i; i++) {
var part = parts[i];
result.push({
type: part.type,
value: part.value
});
}
return result;
}
/**
* When the ToLocalTime abstract operation is called with arguments date, calendar, and
* timeZone, the following steps are taken:
*/
function ToLocalTime(date, calendar, timeZone) {
// 1. Apply calendrical calculations on date for the given calendar and time zone to
// produce weekday, era, year, month, day, hour, minute, second, and inDST values.
// The calculations should use best available information about the specified
// calendar and time zone. If the calendar is "gregory", then the calculations must
// match the algorithms specified in ES5, 15.9.1, except that calculations are not
// bound by the restrictions on the use of best available information on time zones
// for local time zone adjustment and daylight saving time adjustment imposed by
// ES5, 15.9.1.7 and 15.9.1.8.
// ###TODO###
var d = new Date(date),
m = 'get' + (timeZone || '');
// 2. Return a Record with fields [[weekday]], [[era]], [[year]], [[month]], [[day]],
// [[hour]], [[minute]], [[second]], and [[inDST]], each with the corresponding
// calculated value.
return new Record({
'[[weekday]]': d[m + 'Day'](),
'[[era]]': +(d[m + 'FullYear']() >= 0),
'[[year]]': d[m + 'FullYear'](),
'[[month]]': d[m + 'Month'](),
'[[day]]': d[m + 'Date'](),
'[[hour]]': d[m + 'Hours'](),
'[[minute]]': d[m + 'Minutes'](),
'[[second]]': d[m + 'Seconds'](),
'[[inDST]]': false // ###TODO###
});
}
/**
* The function returns a new object whose properties and attributes are set as if
* constructed by an object literal assigning to each of the following properties the
* value of the corresponding internal property of this DateTimeFormat object (see 12.4):
* locale, calendar, numberingSystem, timeZone, hour12, weekday, era, year, month, day,
* hour, minute, second, and timeZoneName. Properties whose corresponding internal
* properties are not present are not assigned.
*/
/* 12.3.3 */defineProperty(Intl.DateTimeFormat.prototype, 'resolvedOptions', {
writable: true,
configurable: true,
value: function value() {
var prop = void 0,
descs = new Record(),
props = ['locale', 'calendar', 'numberingSystem', 'timeZone', 'hour12', 'weekday', 'era', 'year', 'month', 'day', 'hour', 'minute', 'second', 'timeZoneName'],
internal = this !== null && babelHelpers$1["typeof"](this) === 'object' && getInternalProperties(this);
// Satisfy test 12.3_b
if (!internal || !internal['[[initializedDateTimeFormat]]']) throw new TypeError('`this` value for resolvedOptions() is not an initialized Intl.DateTimeFormat object.');
for (var i = 0, max = props.length; i < max; i++) {
if (hop.call(internal, prop = '[[' + props[i] + ']]')) descs[props[i]] = { value: internal[prop], writable: true, configurable: true, enumerable: true };
}
return objCreate({}, descs);
}
});
var ls = Intl.__localeSensitiveProtos = {
Number: {},
Date: {}
};
/**
* When the toLocaleString method is called with optional arguments locales and options,
* the following steps are taken:
*/
/* 13.2.1 */ls.Number.toLocaleString = function () {
// Satisfy test 13.2.1_1
if (Object.prototype.toString.call(this) !== '[object Number]') throw new TypeError('`this` value must be a number for Number.prototype.toLocaleString()');
// 1. Let x be this Number value (as defined in ES5, 15.7.4).
// 2. If locales is not provided, then let locales be undefined.
// 3. If options is not provided, then let options be undefined.
// 4. Let numberFormat be the result of creating a new object as if by the
// expression new Intl.NumberFormat(locales, options) where
// Intl.NumberFormat is the standard built-in constructor defined in 11.1.3.
// 5. Return the result of calling the FormatNumber abstract operation
// (defined in 11.3.2) with arguments numberFormat and x.
return FormatNumber(new NumberFormatConstructor(arguments[0], arguments[1]), this);
};
/**
* When the toLocaleString method is called with optional arguments locales and options,
* the following steps are taken:
*/
/* 13.3.1 */ls.Date.toLocaleString = function () {
// Satisfy test 13.3.0_1
if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleString()');
// 1. Let x be this time value (as defined in ES5, 15.9.5).
var x = +this;
// 2. If x is NaN, then return "Invalid Date".
if (isNaN(x)) return 'Invalid Date';
// 3. If locales is not provided, then let locales be undefined.
var locales = arguments[0];
// 4. If options is not provided, then let options be undefined.
var options = arguments[1];
// 5. Let options be the result of calling the ToDateTimeOptions abstract
// operation (defined in 12.1.1) with arguments options, "any", and "all".
options = ToDateTimeOptions(options, 'any', 'all');
// 6. Let dateTimeFormat be the result of creating a new object as if by the
// expression new Intl.DateTimeFormat(locales, options) where
// Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3.
var dateTimeFormat = new DateTimeFormatConstructor(locales, options);
// 7. Return the result of calling the FormatDateTime abstract operation (defined
// in 12.3.2) with arguments dateTimeFormat and x.
return FormatDateTime(dateTimeFormat, x);
};
/**
* When the toLocaleDateString method is called with optional arguments locales and
* options, the following steps are taken:
*/
/* 13.3.2 */ls.Date.toLocaleDateString = function () {
// Satisfy test 13.3.0_1
if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleDateString()');
// 1. Let x be this time value (as defined in ES5, 15.9.5).
var x = +this;
// 2. If x is NaN, then return "Invalid Date".
if (isNaN(x)) return 'Invalid Date';
// 3. If locales is not provided, then let locales be undefined.
var locales = arguments[0],
// 4. If options is not provided, then let options be undefined.
options = arguments[1];
// 5. Let options be the result of calling the ToDateTimeOptions abstract
// operation (defined in 12.1.1) with arguments options, "date", and "date".
options = ToDateTimeOptions(options, 'date', 'date');
// 6. Let dateTimeFormat be the result of creating a new object as if by the
// expression new Intl.DateTimeFormat(locales, options) where
// Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3.
var dateTimeFormat = new DateTimeFormatConstructor(locales, options);
// 7. Return the result of calling the FormatDateTime abstract operation (defined
// in 12.3.2) with arguments dateTimeFormat and x.
return FormatDateTime(dateTimeFormat, x);
};
/**
* When the toLocaleTimeString method is called with optional arguments locales and
* options, the following steps are taken:
*/
/* 13.3.3 */ls.Date.toLocaleTimeString = function () {
// Satisfy test 13.3.0_1
if (Object.prototype.toString.call(this) !== '[object Date]') throw new TypeError('`this` value must be a Date instance for Date.prototype.toLocaleTimeString()');
// 1. Let x be this time value (as defined in ES5, 15.9.5).
var x = +this;
// 2. If x is NaN, then return "Invalid Date".
if (isNaN(x)) return 'Invalid Date';
// 3. If locales is not provided, then let locales be undefined.
var locales = arguments[0];
// 4. If options is not provided, then let options be undefined.
var options = arguments[1];
// 5. Let options be the result of calling the ToDateTimeOptions abstract
// operation (defined in 12.1.1) with arguments options, "time", and "time".
options = ToDateTimeOptions(options, 'time', 'time');
// 6. Let dateTimeFormat be the result of creating a new object as if by the
// expression new Intl.DateTimeFormat(locales, options) where
// Intl.DateTimeFormat is the standard built-in constructor defined in 12.1.3.
var dateTimeFormat = new DateTimeFormatConstructor(locales, options);
// 7. Return the result of calling the FormatDateTime abstract operation (defined
// in 12.3.2) with arguments dateTimeFormat and x.
return FormatDateTime(dateTimeFormat, x);
};
defineProperty(Intl, '__applyLocaleSensitivePrototypes', {
writable: true,
configurable: true,
value: function value() {
defineProperty(Number.prototype, 'toLocaleString', { writable: true, configurable: true, value: ls.Number.toLocaleString });
// Need this here for IE 8, to avoid the _DontEnum_ bug
defineProperty(Date.prototype, 'toLocaleString', { writable: true, configurable: true, value: ls.Date.toLocaleString });
for (var k in ls.Date) {
if (hop.call(ls.Date, k)) defineProperty(Date.prototype, k, { writable: true, configurable: true, value: ls.Date[k] });
}
}
});
/**
* Can't really ship a single script with data for hundreds of locales, so we provide
* this __addLocaleData method as a means for the developer to add the data on an
* as-needed basis
*/
defineProperty(Intl, '__addLocaleData', {
value: function value(data) {
if (!IsStructurallyValidLanguageTag(data.locale)) throw new Error("Object passed doesn't identify itself with a valid language tag");
addLocaleData(data, data.locale);
}
});
function addLocaleData(data, tag) {
// Both NumberFormat and DateTimeFormat require number data, so throw if it isn't present
if (!data.number) throw new Error("Object passed doesn't contain locale data for Intl.NumberFormat");
var locale = void 0,
locales = [tag],
parts = tag.split('-');
// Create fallbacks for locale data with scripts, e.g. Latn, Hans, Vaii, etc
if (parts.length > 2 && parts[1].length === 4) arrPush.call(locales, parts[0] + '-' + parts[2]);
while (locale = arrShift.call(locales)) {
// Add to NumberFormat internal properties as per 11.2.3
arrPush.call(internals.NumberFormat['[[availableLocales]]'], locale);
internals.NumberFormat['[[localeData]]'][locale] = data.number;
// ...and DateTimeFormat internal properties as per 12.2.3
if (data.date) {
data.date.nu = data.number.nu;
arrPush.call(internals.DateTimeFormat['[[availableLocales]]'], locale);
internals.DateTimeFormat['[[localeData]]'][locale] = data.date;
}
}
// If this is the first set of locale data added, make it the default
if (defaultLocale === undefined) setDefaultLocale(tag);
}
defineProperty(Intl, '__disableRegExpRestore', {
value: function value() {
internals.disableRegExpRestore = true;
}
});
module.exports = Intl;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "fN96":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.string.at.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "ZUd8").charAt;
// `String.prototype.at` method
// https://github.com/mathiasbynens/String.prototype.at
$({ target: 'String', proto: true }, {
at: function at(pos) {
return charAt(this, pos);
}
});
/***/ }),
/***/ "fWQN":
/*!********************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js ***!
\********************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _classCallCheck; });
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
/***/ }),
/***/ "fXLg":
/*!**************************************************************!*\
!*** ./node_modules/core-js/internals/collection-add-all.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
// https://github.com/tc39/collection-methods
module.exports = function (/* ...elements */) {
var set = anObject(this);
var adder = aFunction(set.add);
for (var k = 0, len = arguments.length; k < len; k++) {
adder.call(set, arguments[k]);
}
return set;
};
/***/ }),
/***/ "fZJM":
/*!******************************************!*\
!*** ./node_modules/hash.js/lib/hash.js ***!
\******************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var hash = exports;
hash.utils = __webpack_require__(/*! ./hash/utils */ "w8CP");
hash.common = __webpack_require__(/*! ./hash/common */ "7ckf");
hash.sha = __webpack_require__(/*! ./hash/sha */ "WRkp");
hash.ripemd = __webpack_require__(/*! ./hash/ripemd */ "u0Sq");
hash.hmac = __webpack_require__(/*! ./hash/hmac */ "ITfd");
// Proxy hash functions to the main object
hash.sha1 = hash.sha.sha1;
hash.sha256 = hash.sha.sha256;
hash.sha224 = hash.sha.sha224;
hash.sha384 = hash.sha.sha384;
hash.sha512 = hash.sha.sha512;
hash.ripemd160 = hash.ripemd.ripemd160;
/***/ }),
/***/ "fbCW":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.array.find.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $find = __webpack_require__(/*! ../internals/array-iteration */ "tycR").find;
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var FIND = 'find';
var SKIPS_HOLES = true;
var USES_TO_LENGTH = arrayMethodUsesToLength(FIND);
// Shouldn't skip holes
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
// `Array.prototype.find` method
// https://tc39.github.io/ecma262/#sec-array.prototype.find
$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {
find: function find(callbackfn /* , that = undefined */) {
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables(FIND);
/***/ }),
/***/ "fdAy":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/define-iterator.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "ntOU");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "P4y1");
var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "rpNk");
var IteratorPrototype = IteratorsCore.IteratorPrototype;
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
var ITERATOR = wellKnownSymbol('iterator');
var KEYS = 'keys';
var VALUES = 'values';
var ENTRIES = 'entries';
var returnThis = function () { return this; };
module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
createIteratorConstructor(IteratorConstructor, NAME, next);
var getIterationMethod = function (KIND) {
if (KIND === DEFAULT && defaultIterator) return defaultIterator;
if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
switch (KIND) {
case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
} return function () { return new IteratorConstructor(this); };
};
var TO_STRING_TAG = NAME + ' Iterator';
var INCORRECT_VALUES_NAME = false;
var IterablePrototype = Iterable.prototype;
var nativeIterator = IterablePrototype[ITERATOR]
|| IterablePrototype['@@iterator']
|| DEFAULT && IterablePrototype[DEFAULT];
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
var CurrentIteratorPrototype, methods, KEY;
// fix native
if (anyNativeIterator) {
CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
if (setPrototypeOf) {
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
} else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {
createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);
}
}
// Set @@toStringTag to native iterators
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);
if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;
}
}
// fix Array#{values, @@iterator}.name in V8 / FF
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
INCORRECT_VALUES_NAME = true;
defaultIterator = function values() { return nativeIterator.call(this); };
}
// define iterator
if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {
createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);
}
Iterators[NAME] = defaultIterator;
// export additional methods
if (DEFAULT) {
methods = {
values: getIterationMethod(VALUES),
keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
entries: getIterationMethod(ENTRIES)
};
if (FORCED) for (KEY in methods) {
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
redefine(IterablePrototype, KEY, methods[KEY]);
}
} else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
}
return methods;
};
/***/ }),
/***/ "fhKU":
/*!**************************************************************!*\
!*** ./node_modules/core-js/internals/number-parse-float.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var trim = __webpack_require__(/*! ../internals/string-trim */ "WKiH").trim;
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "WJkJ");
var $parseFloat = global.parseFloat;
var FORCED = 1 / $parseFloat(whitespaces + '-0') !== -Infinity;
// `parseFloat` method
// https://tc39.github.io/ecma262/#sec-parsefloat-string
module.exports = FORCED ? function parseFloat(string) {
var trimmedString = trim(String(string));
var result = $parseFloat(trimmedString);
return result === 0 && trimmedString.charAt(0) == '-' ? -0 : result;
} : $parseFloat;
/***/ }),
/***/ "fo6e":
/*!************************************************!*\
!*** ./node_modules/lodash/_hasUnicodeWord.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/** Used to detect strings that need a more robust regexp to match words. */
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
/**
* Checks if `string` contains a word composed of Unicode symbols.
*
* @private
* @param {string} string The string to inspect.
* @returns {boolean} Returns `true` if a word is found, else `false`.
*/
function hasUnicodeWord(string) {
return reHasUnicodeWord.test(string);
}
module.exports = hasUnicodeWord;
/***/ }),
/***/ "foSv":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
\*******************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
/***/ }),
/***/ "fsL8":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/regeneratorRuntime.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var _typeof = __webpack_require__(/*! ./typeof.js */ "cDf5")["default"];
function _regeneratorRuntime() {
"use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
return e;
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
var t,
e = {},
r = Object.prototype,
n = r.hasOwnProperty,
o = Object.defineProperty || function (t, e, r) {
t[e] = r.value;
},
i = "function" == typeof Symbol ? Symbol : {},
a = i.iterator || "@@iterator",
c = i.asyncIterator || "@@asyncIterator",
u = i.toStringTag || "@@toStringTag";
function define(t, e, r) {
return Object.defineProperty(t, e, {
value: r,
enumerable: !0,
configurable: !0,
writable: !0
}), t[e];
}
try {
define({}, "");
} catch (t) {
define = function define(t, e, r) {
return t[e] = r;
};
}
function wrap(t, e, r, n) {
var i = e && e.prototype instanceof Generator ? e : Generator,
a = Object.create(i.prototype),
c = new Context(n || []);
return o(a, "_invoke", {
value: makeInvokeMethod(t, r, c)
}), a;
}
function tryCatch(t, e, r) {
try {
return {
type: "normal",
arg: t.call(e, r)
};
} catch (t) {
return {
type: "throw",
arg: t
};
}
}
e.wrap = wrap;
var h = "suspendedStart",
l = "suspendedYield",
f = "executing",
s = "completed",
y = {};
function Generator() {}
function GeneratorFunction() {}
function GeneratorFunctionPrototype() {}
var p = {};
define(p, a, function () {
return this;
});
var d = Object.getPrototypeOf,
v = d && d(d(values([])));
v && v !== r && n.call(v, a) && (p = v);
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
function defineIteratorMethods(t) {
["next", "throw", "return"].forEach(function (e) {
define(t, e, function (t) {
return this._invoke(e, t);
});
});
}
function AsyncIterator(t, e) {
function invoke(r, o, i, a) {
var c = tryCatch(t[r], t, o);
if ("throw" !== c.type) {
var u = c.arg,
h = u.value;
return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
invoke("next", t, i, a);
}, function (t) {
invoke("throw", t, i, a);
}) : e.resolve(h).then(function (t) {
u.value = t, i(u);
}, function (t) {
return invoke("throw", t, i, a);
});
}
a(c.arg);
}
var r;
o(this, "_invoke", {
value: function value(t, n) {
function callInvokeWithMethodAndArg() {
return new e(function (e, r) {
invoke(t, n, e, r);
});
}
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
}
});
}
function makeInvokeMethod(e, r, n) {
var o = h;
return function (i, a) {
if (o === f) throw Error("Generator is already running");
if (o === s) {
if ("throw" === i) throw a;
return {
value: t,
done: !0
};
}
for (n.method = i, n.arg = a;;) {
var c = n.delegate;
if (c) {
var u = maybeInvokeDelegate(c, n);
if (u) {
if (u === y) continue;
return u;
}
}
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
if (o === h) throw o = s, n.arg;
n.dispatchException(n.arg);
} else "return" === n.method && n.abrupt("return", n.arg);
o = f;
var p = tryCatch(e, r, n);
if ("normal" === p.type) {
if (o = n.done ? s : l, p.arg === y) continue;
return {
value: p.arg,
done: n.done
};
}
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
}
};
}
function maybeInvokeDelegate(e, r) {
var n = r.method,
o = e.iterator[n];
if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
var i = tryCatch(o, e.iterator, r.arg);
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
var a = i.arg;
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
}
function pushTryEntry(t) {
var e = {
tryLoc: t[0]
};
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
}
function resetTryEntry(t) {
var e = t.completion || {};
e.type = "normal", delete e.arg, t.completion = e;
}
function Context(t) {
this.tryEntries = [{
tryLoc: "root"
}], t.forEach(pushTryEntry, this), this.reset(!0);
}
function values(e) {
if (e || "" === e) {
var r = e[a];
if (r) return r.call(e);
if ("function" == typeof e.next) return e;
if (!isNaN(e.length)) {
var o = -1,
i = function next() {
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
return next.value = t, next.done = !0, next;
};
return i.next = i;
}
}
throw new TypeError(_typeof(e) + " is not iterable");
}
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
value: GeneratorFunctionPrototype,
configurable: !0
}), o(GeneratorFunctionPrototype, "constructor", {
value: GeneratorFunction,
configurable: !0
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
var e = "function" == typeof t && t.constructor;
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
}, e.mark = function (t) {
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
}, e.awrap = function (t) {
return {
__await: t
};
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
return this;
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
void 0 === i && (i = Promise);
var a = new AsyncIterator(wrap(t, r, n, o), i);
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
return t.done ? t.value : a.next();
});
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
return this;
}), define(g, "toString", function () {
return "[object Generator]";
}), e.keys = function (t) {
var e = Object(t),
r = [];
for (var n in e) r.push(n);
return r.reverse(), function next() {
for (; r.length;) {
var t = r.pop();
if (t in e) return next.value = t, next.done = !1, next;
}
return next.done = !0, next;
};
}, e.values = values, Context.prototype = {
constructor: Context,
reset: function reset(e) {
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
},
stop: function stop() {
this.done = !0;
var t = this.tryEntries[0].completion;
if ("throw" === t.type) throw t.arg;
return this.rval;
},
dispatchException: function dispatchException(e) {
if (this.done) throw e;
var r = this;
function handle(n, o) {
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
}
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
var i = this.tryEntries[o],
a = i.completion;
if ("root" === i.tryLoc) return handle("end");
if (i.tryLoc <= this.prev) {
var c = n.call(i, "catchLoc"),
u = n.call(i, "finallyLoc");
if (c && u) {
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
} else if (c) {
if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
} else {
if (!u) throw Error("try statement without catch or finally");
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
}
}
}
},
abrupt: function abrupt(t, e) {
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
var o = this.tryEntries[r];
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
var i = o;
break;
}
}
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
var a = i ? i.completion : {};
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
},
complete: function complete(t, e) {
if ("throw" === t.type) throw t.arg;
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
},
finish: function finish(t) {
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var r = this.tryEntries[e];
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
}
},
"catch": function _catch(t) {
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
var r = this.tryEntries[e];
if (r.tryLoc === t) {
var n = r.completion;
if ("throw" === n.type) {
var o = n.arg;
resetTryEntry(r);
}
return o;
}
}
throw Error("illegal catch attempt");
},
delegateYield: function delegateYield(e, r, n) {
return this.delegate = {
iterator: values(e),
resultName: r,
nextLoc: n
}, "next" === this.method && (this.arg = t), y;
}
}, e;
}
module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "ftMj":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.set.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
// `Reflect.set` method
// https://tc39.github.io/ecma262/#sec-reflect.set
function set(target, propertyKey, V /* , receiver */) {
var receiver = arguments.length < 4 ? target : arguments[3];
var ownDescriptor = getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
var existingDescriptor, prototype;
if (!ownDescriptor) {
if (isObject(prototype = getPrototypeOf(target))) {
return set(prototype, propertyKey, V, receiver);
}
ownDescriptor = createPropertyDescriptor(0);
}
if (has(ownDescriptor, 'value')) {
if (ownDescriptor.writable === false || !isObject(receiver)) return false;
if (existingDescriptor = getOwnPropertyDescriptorModule.f(receiver, propertyKey)) {
if (existingDescriptor.get || existingDescriptor.set || existingDescriptor.writable === false) return false;
existingDescriptor.value = V;
definePropertyModule.f(receiver, propertyKey, existingDescriptor);
} else definePropertyModule.f(receiver, propertyKey, createPropertyDescriptor(0, V));
return true;
}
return ownDescriptor.set === undefined ? false : (ownDescriptor.set.call(receiver, V), true);
}
// MS Edge 17-18 Reflect.set allows setting the property to object
// with non-writable property on the prototype
var MS_EDGE_BUG = fails(function () {
var object = definePropertyModule.f({}, 'a', { configurable: true });
// eslint-disable-next-line no-undef
return Reflect.set(getPrototypeOf(object), 'a', 1, object) !== false;
});
$({ target: 'Reflect', stat: true, forced: MS_EDGE_BUG }, {
set: set
});
/***/ }),
/***/ "g4LC":
/*!***************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/CloseCircleOutlined.js ***!
\***************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var CloseCircleOutlined = { "icon": { "tag": "svg", "attrs": { "fill-rule": "evenodd", "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm0 76c-205.4 0-372 166.6-372 372s166.6 372 372 372 372-166.6 372-372-166.6-372-372-372zm128.01 198.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z" } }] }, "name": "close-circle", "theme": "outlined" };
exports.default = CloseCircleOutlined;
/***/ }),
/***/ "g6v/":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/descriptors.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
// Thank's IE8 for his funny defineProperty
module.exports = !fails(function () {
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
});
/***/ }),
/***/ "gEhQ":
/*!*************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/CheckCircleFilled.js ***!
\*************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var CheckCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" } }] }, "name": "check-circle", "theme": "filled" };
exports.default = CheckCircleFilled;
/***/ }),
/***/ "gOCb":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.replace.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.replace` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.replace
defineWellKnownSymbol('replace');
/***/ }),
/***/ "gQMU":
/*!*******************************************!*\
!*** ./node_modules/lodash/upperFirst.js ***!
\*******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createCaseFirst = __webpack_require__(/*! ./_createCaseFirst */ "0ZTe");
/**
* Converts the first character of `string` to upper case.
*
* @static
* @memberOf _
* @since 4.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the converted string.
* @example
*
* _.upperFirst('fred');
* // => 'Fred'
*
* _.upperFirst('FRED');
* // => 'FRED'
*/
var upperFirst = createCaseFirst('toUpperCase');
module.exports = upperFirst;
/***/ }),
/***/ "gXIK":
/*!****************************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.to-primitive.js ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.toPrimitive` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.toprimitive
defineWellKnownSymbol('toPrimitive');
/***/ }),
/***/ "gYJb":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.composite-key.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getCompositeKeyNode = __webpack_require__(/*! ../internals/composite-key */ "p5mE");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var initializer = function () {
var freeze = getBuiltIn('Object', 'freeze');
return freeze ? freeze(create(null)) : create(null);
};
// https://github.com/tc39/proposal-richer-keys/tree/master/compositeKey
$({ global: true }, {
compositeKey: function compositeKey() {
return getCompositeKeyNode.apply(Object, arguments).get('object', initializer);
}
});
/***/ }),
/***/ "gZBC":
/*!***********************************************************!*\
!*** ./node_modules/@ant-design/icons/LoadingOutlined.js ***!
\***********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _LoadingOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/LoadingOutlined */ "bbMD"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _LoadingOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "gbiT":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.unscopables.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.unscopables` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.unscopables
defineWellKnownSymbol('unscopables');
/***/ }),
/***/ "gdVl":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/array-fill.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
// `Array.prototype.fill` method implementation
// https://tc39.github.io/ecma262/#sec-array.prototype.fill
module.exports = function fill(value /* , start = 0, end = @length */) {
var O = toObject(this);
var length = toLength(O.length);
var argumentsLength = arguments.length;
var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length);
var end = argumentsLength > 2 ? arguments[2] : undefined;
var endPos = end === undefined ? length : toAbsoluteIndex(end, length);
while (endPos > index) O[index++] = value;
return O;
};
/***/ }),
/***/ "gg6r":
/*!****************************************************************!*\
!*** ./node_modules/core-js/modules/es.promise.all-settled.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "8GlL");
var perform = __webpack_require__(/*! ../internals/perform */ "5mdu");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Promise.allSettled` method
// https://github.com/tc39/proposal-promise-allSettled
$({ target: 'Promise', stat: true }, {
allSettled: function allSettled(iterable) {
var C = this;
var capability = newPromiseCapabilityModule.f(C);
var resolve = capability.resolve;
var reject = capability.reject;
var result = perform(function () {
var promiseResolve = aFunction(C.resolve);
var values = [];
var counter = 0;
var remaining = 1;
iterate(iterable, function (promise) {
var index = counter++;
var alreadyCalled = false;
values.push(undefined);
remaining++;
promiseResolve.call(C, promise).then(function (value) {
if (alreadyCalled) return;
alreadyCalled = true;
values[index] = { status: 'fulfilled', value: value };
--remaining || resolve(values);
}, function (e) {
if (alreadyCalled) return;
alreadyCalled = true;
values[index] = { status: 'rejected', reason: e };
--remaining || resolve(values);
});
});
--remaining || resolve(values);
});
if (result.error) reject(result.value);
return capability.promise;
}
});
/***/ }),
/***/ "ggIM":
/*!****************************************!*\
!*** ./src/models/classrooms/video.ts ***!
\****************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_video__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/video */ "qdXH");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var VideoModel = {
namespace: 'video',
state: {
name: '资源',
loading: true,
// 题库
actionTabs: {},
videoStatisticsList: {},
videoDurationStatics: {},
StudentvideoStatistics: {},
videoPeopleStatics: {},
videoStatistics: {},
oneVideoStatisticsList: {}
},
effects: {
// 视频统计列表
getVideoStatisticsList: function getVideoStatisticsList(_ref, _ref2) {
var payload = _ref.payload,
callback = _ref.callback;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_video__WEBPACK_IMPORTED_MODULE_1__[/* getVideoStatisticsList */ "h"], payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
videoStatisticsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getVideoPeopleStatics: function getVideoPeopleStatics(_ref3, _ref4) {
var payload = _ref3.payload,
callback = _ref3.callback;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_video__WEBPACK_IMPORTED_MODULE_1__[/* getVideoPeopleStatics */ "f"], payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
videoPeopleStatics: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context2.abrupt("return", response);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getVideoDurationStatics: function getVideoDurationStatics(_ref5, _ref6) {
var payload = _ref5.payload,
callback = _ref5.callback;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_video__WEBPACK_IMPORTED_MODULE_1__[/* getVideoDurationStatics */ "e"], payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
videoDurationStatics: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
// 视频统计数据
getVideoStatistics: function getVideoStatistics(_ref7, _ref8) {
var payload = _ref7.payload,
callback = _ref7.callback;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var response;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_video__WEBPACK_IMPORTED_MODULE_1__[/* getVideoStatistics */ "g"], payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
videoStatistics: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
// 单一视频记录统计
getOneVideoStatisticsList: function getOneVideoStatisticsList(_ref9, _ref10) {
var payload = _ref9.payload,
callback = _ref9.callback;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var response;
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_video__WEBPACK_IMPORTED_MODULE_1__[/* getOneVideoStatisticsList */ "a"], payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return put({
type: 'save',
payload: {
oneVideoStatisticsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context5.abrupt("return", response);
case 6:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
//学生视频数据
getStudentVideoStatisticsList: function getStudentVideoStatisticsList(_ref13, _ref14) {
var payload = _ref13.payload,
callback = _ref13.callback;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var response;
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(_service_video__WEBPACK_IMPORTED_MODULE_1__[/* getStudentVideoStatisticsList */ "c"], payload);
case 2:
response = _context7.sent;
_context7.next = 5;
return put({
type: 'save',
payload: {
StudentvideoStatistics: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context7.abrupt("return", response);
case 6:
case "end":
return _context7.stop();
}
}, _callee7);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref15) {
var dispatch = _ref15.dispatch,
history = _ref15.history;
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (VideoModel);
/***/ }),
/***/ "glrk":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/an-object.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
module.exports = function (it) {
if (!isObject(it)) {
throw TypeError(String(it) + ' is not an object');
} return it;
};
/***/ }),
/***/ "gvgV":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.includes.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $includes = __webpack_require__(/*! ../internals/array-includes */ "TWQb").includes;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.includes
exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) {
return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/***/ "h+Ho":
/*!*******************************!*\
!*** ./src/service/forums.ts ***!
\*******************************/
/*! exports provided: getForumsData, getForumsShixunData, stickyOrCancel, deleteForums, getForumsNewData, getForumsEditData, newForums, updateForums, getForumsDetailData, watch, cancelWatch, rewardCode, like, reply, getMoreReply */
/*! exports used: getForumsData, getForumsDetailData, getForumsShixunData */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getForumsData; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getForumsShixunData; });
/* unused harmony export stickyOrCancel */
/* unused harmony export deleteForums */
/* unused harmony export getForumsNewData */
/* unused harmony export getForumsEditData */
/* unused harmony export newForums */
/* unused harmony export updateForums */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getForumsDetailData; });
/* unused harmony export watch */
/* unused harmony export cancelWatch */
/* unused harmony export rewardCode */
/* unused harmony export like */
/* unused harmony export reply */
/* unused harmony export getMoreReply */
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function getForumsData(_x) {
return _getForumsData.apply(this, arguments);
}
function _getForumsData() {
_getForumsData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getForumsData.apply(this, arguments);
}
function getForumsShixunData(_x2) {
return _getForumsShixunData.apply(this, arguments);
}
function _getForumsShixunData() {
_getForumsShixunData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/discusses/forum_discusses.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getForumsShixunData.apply(this, arguments);
}
function stickyOrCancel(_x3) {
return _stickyOrCancel.apply(this, arguments);
}
function _stickyOrCancel() {
_stickyOrCancel = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos/".concat(params.id, "/sticky_or_cancel.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _stickyOrCancel.apply(this, arguments);
}
function deleteForums(_x4) {
return _deleteForums.apply(this, arguments);
}
function _deleteForums() {
_deleteForums = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos/".concat(params.id, ".json"), {
method: 'delete',
body: params
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _deleteForums.apply(this, arguments);
}
function getForumsNewData(_x5) {
return _getForumsNewData.apply(this, arguments);
}
function _getForumsNewData() {
_getForumsNewData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos/new.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getForumsNewData.apply(this, arguments);
}
function getForumsEditData(_x6) {
return _getForumsEditData.apply(this, arguments);
}
function _getForumsEditData() {
_getForumsEditData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos/".concat(params.id, "/edit.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _getForumsEditData.apply(this, arguments);
}
function newForums(_x7) {
return _newForums.apply(this, arguments);
}
function _newForums() {
_newForums = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos.json", {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _newForums.apply(this, arguments);
}
function updateForums(_x8) {
return _updateForums.apply(this, arguments);
}
function _updateForums() {
_updateForums = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos/".concat(params.id, ".json"), {
method: 'put',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _updateForums.apply(this, arguments);
}
function getForumsDetailData(_x9) {
return _getForumsDetailData.apply(this, arguments);
}
function _getForumsDetailData() {
_getForumsDetailData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos/".concat(params.id, ".json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _getForumsDetailData.apply(this, arguments);
}
function watch(_x10) {
return _watch.apply(this, arguments);
}
function _watch() {
_watch = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.user_id, "/watch.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _watch.apply(this, arguments);
}
function cancelWatch(_x11) {
return _cancelWatch.apply(this, arguments);
}
function _cancelWatch() {
_cancelWatch = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.user_id, "/watch.json"), {
method: 'delete',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _cancelWatch.apply(this, arguments);
}
function rewardCode(_x12) {
return _rewardCode.apply(this, arguments);
}
function _rewardCode() {
_rewardCode = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/discusses/".concat(params.id, "/reward_code.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _rewardCode.apply(this, arguments);
}
function like(_x13) {
return _like.apply(this, arguments);
}
function _like() {
_like = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/discusses/".concat(params.id, "/plus.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _like.apply(this, arguments);
}
function reply(_x14) {
return _reply.apply(this, arguments);
}
function _reply() {
_reply = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos/reply.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _reply.apply(this, arguments);
}
function getMoreReply(_x15) {
return _getMoreReply.apply(this, arguments);
}
function _getMoreReply() {
_getMoreReply = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/memos/".concat(params.id, "/more_reply.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _getMoreReply.apply(this, arguments);
}
/***/ }),
/***/ "h0XC":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableRest;
/***/ }),
/***/ "hBjN":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/create-property.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
module.exports = function (object, key, value) {
var propertyKey = toPrimitive(key);
if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));
else object[propertyKey] = value;
};
/***/ }),
/***/ "hByQ":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.search.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fixRegExpWellKnownSymbolLogic = __webpack_require__(/*! ../internals/fix-regexp-well-known-symbol-logic */ "14Sl");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var sameValue = __webpack_require__(/*! ../internals/same-value */ "Ep9I");
var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "FMNM");
// @@search logic
fixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {
return [
// `String.prototype.search` method
// https://tc39.github.io/ecma262/#sec-string.prototype.search
function search(regexp) {
var O = requireObjectCoercible(this);
var searcher = regexp == undefined ? undefined : regexp[SEARCH];
return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));
},
// `RegExp.prototype[@@search]` method
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
function (regexp) {
var res = maybeCallNative(nativeSearch, regexp, this);
if (res.done) return res.value;
var rx = anObject(regexp);
var S = String(this);
var previousLastIndex = rx.lastIndex;
if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
var result = regExpExec(rx, S);
if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
return result === null ? -1 : result.index;
}
];
});
/***/ }),
/***/ "hDyC":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.pad-end.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $padEnd = __webpack_require__(/*! ../internals/string-pad */ "DMt2").end;
var WEBKIT_BUG = __webpack_require__(/*! ../internals/string-pad-webkit-bug */ "mgyK");
// `String.prototype.padEnd` method
// https://tc39.github.io/ecma262/#sec-string.prototype.padend
$({ target: 'String', proto: true, forced: WEBKIT_BUG }, {
padEnd: function padEnd(maxLength /* , fillString = ' ' */) {
return $padEnd(this, maxLength, arguments.length > 1 ? arguments[1] : undefined);
}
});
/***/ }),
/***/ "hJwl":
/*!*************************************!*\
!*** ./src/service/competitions.ts ***!
\*************************************/
/*! exports provided: getWorkSubmitUpdateRes, getCompetitionsList, addApplytojoincourse, competitionTeams, getStaff, getHeader, getItem, updateMdContent, getTeamList, getTeamDetail, UpTeam, ExitTeam, DeleteTeam, AddTeam, JoinTeam, SignCLA, getHSCompetitionInfo, GetKylinId, getTeacher, getStudents, SubmitTeam, Reward, ChartRules, Charts, Results, TabResults, Prize, Accounts, getVerification, PhoneBind, EmailBind, Professional, Authentication, setleader, getShixun, getCourse, deletAttachments, getCertificateInfo */
/*! exports used: Accounts, AddTeam, Authentication, ChartRules, Charts, DeleteTeam, EmailBind, ExitTeam, GetKylinId, JoinTeam, PhoneBind, Prize, Professional, Results, Reward, SignCLA, SubmitTeam, TabResults, UpTeam, addApplytojoincourse, competitionTeams, deletAttachments, getCertificateInfo, getCompetitionsList, getCourse, getHSCompetitionInfo, getHeader, getItem, getShixun, getStaff, getStudents, getTeacher, getTeamDetail, getTeamList, getVerification, getWorkSubmitUpdateRes, setleader, updateMdContent */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return getWorkSubmitUpdateRes; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getCompetitionsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return addApplytojoincourse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return competitionTeams; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return getStaff; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return getHeader; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return getItem; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return updateMdContent; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return getTeamList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return getTeamDetail; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return UpTeam; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return ExitTeam; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return DeleteTeam; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return AddTeam; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return JoinTeam; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return SignCLA; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return getHSCompetitionInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return GetKylinId; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return getTeacher; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return getStudents; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return SubmitTeam; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return Reward; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ChartRules; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return Charts; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return Results; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return TabResults; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return Prize; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Accounts; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return getVerification; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return PhoneBind; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return EmailBind; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return Professional; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return Authentication; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return setleader; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return getShixun; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return getCourse; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return deletAttachments; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getCertificateInfo; });
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/env */ "m3rI");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
// 作品提交-作品编辑 /api/competitions/test22/update_result.json
function getWorkSubmitUpdateRes(_x) {
return _getWorkSubmitUpdateRes.apply(this, arguments);
}
//获取在线竞赛列表
function _getWorkSubmitUpdateRes() {
_getWorkSubmitUpdateRes = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/update_result.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getWorkSubmitUpdateRes.apply(this, arguments);
}
function getCompetitionsList(_x2) {
return _getCompetitionsList.apply(this, arguments);
}
//学生身份调用加入课堂进入课堂首页
function _getCompetitionsList() {
_getCompetitionsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/competitions.json', {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getCompetitionsList.apply(this, arguments);
}
function addApplytojoincourse(_x3) {
return _addApplytojoincourse.apply(this, arguments);
}
//报名接口
function _addApplytojoincourse() {
_addApplytojoincourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/apply_to_join_course.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _addApplytojoincourse.apply(this, arguments);
}
function competitionTeams(_x4) {
return _competitionTeams.apply(this, arguments);
}
//获取竞赛详情信息接口
function _competitionTeams() {
_competitionTeams = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams.json"), {
method: 'post'
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _competitionTeams.apply(this, arguments);
}
function getStaff(_x5) {
return _getStaff.apply(this, arguments);
}
//获取头部信息接口
function _getStaff() {
_getStaff = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_staff.json"), {
method: 'get'
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getStaff.apply(this, arguments);
}
function getHeader(_x6) {
return _getHeader.apply(this, arguments);
}
//获取竞赛底部item
function _getHeader() {
_getHeader = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/common_header.json"), {
method: 'get'
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _getHeader.apply(this, arguments);
}
function getItem(_x7) {
return _getItem.apply(this, arguments);
}
//修改底部item
function _getItem() {
_getItem = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/".concat(params.url), {
method: 'get'
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getItem.apply(this, arguments);
}
function updateMdContent(_x8) {
return _updateMdContent.apply(this, arguments);
}
//获取战队信息 competition_teams
function _updateMdContent() {
_updateMdContent = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/update_md_content.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _updateMdContent.apply(this, arguments);
}
function getTeamList(_x9) {
return _getTeamList.apply(this, arguments);
}
//获取战队详情信息
function _getTeamList() {
_getTeamList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _getTeamList.apply(this, arguments);
}
function getTeamDetail(_x10) {
return _getTeamDetail.apply(this, arguments);
}
//修改战队信息
function _getTeamDetail() {
_getTeamDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams/").concat(params.Teannameid, "/edit.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _getTeamDetail.apply(this, arguments);
}
function UpTeam(_x11) {
return _UpTeam.apply(this, arguments);
}
//退出战队
function _UpTeam() {
_UpTeam = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams/").concat(params.Teannameid, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _UpTeam.apply(this, arguments);
}
function ExitTeam(_x12) {
return _ExitTeam.apply(this, arguments);
}
//删除战队
function _ExitTeam() {
_ExitTeam = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams/").concat(params.id, "/leave.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _ExitTeam.apply(this, arguments);
}
function DeleteTeam(_x13) {
return _DeleteTeam.apply(this, arguments);
}
//创建战队
function _DeleteTeam() {
_DeleteTeam = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams/").concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _DeleteTeam.apply(this, arguments);
}
function AddTeam(_x14) {
return _AddTeam.apply(this, arguments);
}
//加入战队
function _AddTeam() {
_AddTeam = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _AddTeam.apply(this, arguments);
}
function JoinTeam(_x15) {
return _JoinTeam.apply(this, arguments);
}
// 签署CLA协议
function _JoinTeam() {
_JoinTeam = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams/join.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _JoinTeam.apply(this, arguments);
}
function SignCLA(_x16) {
return _SignCLA.apply(this, arguments);
}
// 获取红山特定竞赛的报名人数
function _SignCLA() {
_SignCLA = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].FORGE_SERVER, "/api/v1/").concat(params === null || params === void 0 ? void 0 : params.owner, "/openkylin_sign"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _SignCLA.apply(this, arguments);
}
function getHSCompetitionInfo(_x17) {
return _getHSCompetitionInfo.apply(this, arguments);
}
// 获取CLA竞赛
function _getHSCompetitionInfo() {
_getHSCompetitionInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].HS_SERVER, "/api/competition_infos/list.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _getHSCompetitionInfo.apply(this, arguments);
}
function GetKylinId(_x18) {
return _GetKylinId.apply(this, arguments);
}
//查找老师
function _GetKylinId() {
_GetKylinId = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].FORGE_SERVER, "/api/v1/").concat(params === null || params === void 0 ? void 0 : params.owner, "/openkylin_sign/competitions"), {
method: 'get'
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _GetKylinId.apply(this, arguments);
}
function getTeacher(_x19) {
return _getTeacher.apply(this, arguments);
}
//查找学生
function _getTeacher() {
_getTeacher = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/teachers.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _getTeacher.apply(this, arguments);
}
function getStudents(_x20) {
return _getStudents.apply(this, arguments);
}
//提交数据
function _getStudents() {
_getStudents = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/students.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _getStudents.apply(this, arguments);
}
function SubmitTeam(_x21) {
return _SubmitTeam.apply(this, arguments);
}
//领取代金劵
function _SubmitTeam() {
_SubmitTeam = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams/").concat(params.teamid, "/crud_team_members.json?"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _SubmitTeam.apply(this, arguments);
}
function Reward(_x22) {
return _Reward.apply(this, arguments);
}
//获取排行榜tab chart_rules
function _Reward() {
_Reward = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/competition_reward.json?", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _Reward.apply(this, arguments);
}
function ChartRules(_x23) {
return _ChartRules.apply(this, arguments);
}
//获取排行榜 排名数据
function _ChartRules() {
_ChartRules = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/chart_rules.json?"), {
method: 'get'
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _ChartRules.apply(this, arguments);
}
function Charts(_x24) {
return _Charts.apply(this, arguments);
}
//获取提交结果拍行榜数据
function _Charts() {
_Charts = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/charts.json?"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _Charts.apply(this, arguments);
}
function Results(_x25) {
return _Results.apply(this, arguments);
}
//获取提交结果拍行榜数据
function _Results() {
_Results = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/results.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _Results.apply(this, arguments);
}
function TabResults(_x26) {
return _TabResults.apply(this, arguments);
}
//获取获奖证书 prize
function _TabResults() {
_TabResults = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/md_tab_rules.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _TabResults.apply(this, arguments);
}
function Prize(_x27) {
return _Prize.apply(this, arguments);
}
//获取个人详情信息
function _Prize() {
_Prize = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/prize.json?"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _Prize.apply(this, arguments);
}
function Accounts(_x28) {
return _Accounts.apply(this, arguments);
}
//获取邮箱 get_verification_code
function _Accounts() {
_Accounts = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
return _context28.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/accounts/".concat(params.id, ".json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context28.stop();
}
}, _callee28);
}));
return _Accounts.apply(this, arguments);
}
function getVerification(_x29) {
return _getVerification.apply(this, arguments);
}
//绑定手机号 /api/users/accounts/130978/phone_bind.json
function _getVerification() {
_getVerification = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
return _context29.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/accounts/get_verification_code.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context29.stop();
}
}, _callee29);
}));
return _getVerification.apply(this, arguments);
}
function PhoneBind(_x30) {
return _PhoneBind.apply(this, arguments);
}
//绑定邮箱
function _PhoneBind() {
_PhoneBind = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
return _context30.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/accounts/".concat(params.userid, "/phone_bind.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context30.stop();
}
}, _callee30);
}));
return _PhoneBind.apply(this, arguments);
}
function EmailBind(_x31) {
return _EmailBind.apply(this, arguments);
}
//职业信息撤销认证/users/accounts/${userid}/professional_auth_apply.json
function _EmailBind() {
_EmailBind = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(params) {
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
return _context31.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/accounts/".concat(params.userid, "/email_bind.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context31.stop();
}
}, _callee31);
}));
return _EmailBind.apply(this, arguments);
}
function Professional(_x32) {
return _Professional.apply(this, arguments);
}
//实名信息撤销认证 /users/accounts/${userid}/authentication_apply.json
function _Professional() {
_Professional = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) {
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
return _context32.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/accounts/".concat(params.userid, "/professional_auth_apply.json"), {
method: 'delete'
}));
case 1:
case "end":
return _context32.stop();
}
}, _callee32);
}));
return _Professional.apply(this, arguments);
}
function Authentication(_x33) {
return _Authentication.apply(this, arguments);
}
//提交银行卡信息
function _Authentication() {
_Authentication = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
return _context33.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/accounts/".concat(params.userid, "/authentication_apply.json"), {
method: 'delete'
}));
case 1:
case "end":
return _context33.stop();
}
}, _callee33);
}));
return _Authentication.apply(this, arguments);
}
function setleader(_x34) {
return _setleader.apply(this, arguments);
}
//获取战队实训信息
function _setleader() {
_setleader = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(params) {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
return _context34.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/prize_leader_account.json"), {
method: 'patch',
body: params
}));
case 1:
case "end":
return _context34.stop();
}
}, _callee34);
}));
return _setleader.apply(this, arguments);
}
function getShixun(_x35) {
return _getShixun.apply(this, arguments);
}
//获取战队课堂信息
function _getShixun() {
_getShixun = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(params) {
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
return _context35.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams/").concat(params.teamid, "/shixun_detail.json"), {
method: 'get'
}));
case 1:
case "end":
return _context35.stop();
}
}, _callee35);
}));
return _getShixun.apply(this, arguments);
}
function getCourse(_x36) {
return _getCourse.apply(this, arguments);
}
//删除视频
function _getCourse() {
_getCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(params) {
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
return _context36.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.identifier, "/competition_teams/").concat(params.teamid, "/course_detail.json"), {
method: 'get'
}));
case 1:
case "end":
return _context36.stop();
}
}, _callee36);
}));
return _getCourse.apply(this, arguments);
}
function deletAttachments(_x37) {
return _deletAttachments.apply(this, arguments);
}
// 导出证书
function _deletAttachments() {
_deletAttachments = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(params) {
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
while (1) switch (_context37.prev = _context37.next) {
case 0:
return _context37.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/attachments/".concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context37.stop();
}
}, _callee37);
}));
return _deletAttachments.apply(this, arguments);
}
function getCertificateInfo(_x38) {
return _getCertificateInfo.apply(this, arguments);
}
function _getCertificateInfo() {
_getCertificateInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(params) {
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
while (1) switch (_context38.prev = _context38.next) {
case 0:
return _context38.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/".concat(params.id, "/get_certificate_info.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context38.stop();
}
}, _callee38);
}));
return _getCertificateInfo.apply(this, arguments);
}
/***/ }),
/***/ "hKI/":
/*!***********************************************!*\
!*** ./node_modules/lodash.throttle/index.js ***!
\***********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {/**
* lodash (Custom Build) <https://lodash.com/>
* Build: `lodash modularize exports="npm" -o ./`
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*/
/** Used as the `TypeError` message for "Functions" methods. */
var FUNC_ERROR_TEXT = 'Expected a function';
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** `Object#toString` result references. */
var symbolTag = '[object Symbol]';
/** Used to match leading and trailing whitespace. */
var reTrim = /^\s+|\s+$/g;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
/** Detect free variable `self`. */
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
/** Used as a reference to the global object. */
var root = freeGlobal || freeSelf || Function('return this')();
/** Used for built-in method references. */
var objectProto = Object.prototype;
/**
* Used to resolve the
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
* of values.
*/
var objectToString = objectProto.toString;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* Gets the timestamp of the number of milliseconds that have elapsed since
* the Unix epoch (1 January 1970 00:00:00 UTC).
*
* @static
* @memberOf _
* @since 2.4.0
* @category Date
* @returns {number} Returns the timestamp.
* @example
*
* _.defer(function(stamp) {
* console.log(_.now() - stamp);
* }, _.now());
* // => Logs the number of milliseconds it took for the deferred invocation.
*/
var now = function() {
return root.Date.now();
};
/**
* Creates a debounced function that delays invoking `func` until after `wait`
* milliseconds have elapsed since the last time the debounced function was
* invoked. The debounced function comes with a `cancel` method to cancel
* delayed `func` invocations and a `flush` method to immediately invoke them.
* Provide `options` to indicate whether `func` should be invoked on the
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
* with the last arguments provided to the debounced function. Subsequent
* calls to the debounced function return the result of the last `func`
* invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the debounced function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.debounce` and `_.throttle`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to debounce.
* @param {number} [wait=0] The number of milliseconds to delay.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=false]
* Specify invoking on the leading edge of the timeout.
* @param {number} [options.maxWait]
* The maximum time `func` is allowed to be delayed before it's invoked.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new debounced function.
* @example
*
* // Avoid costly calculations while the window size is in flux.
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
*
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
* jQuery(element).on('click', _.debounce(sendMail, 300, {
* 'leading': true,
* 'trailing': false
* }));
*
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
* var source = new EventSource('/stream');
* jQuery(source).on('message', debounced);
*
* // Cancel the trailing debounced invocation.
* jQuery(window).on('popstate', debounced.cancel);
*/
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime,
lastInvokeTime = 0,
leading = false,
maxing = false,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = 'maxWait' in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs,
thisArg = lastThis;
lastArgs = lastThis = undefined;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
// Reset any `maxWait` timer.
lastInvokeTime = time;
// Start the timer for the trailing edge.
timerId = setTimeout(timerExpired, wait);
// Invoke the leading edge.
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
result = wait - timeSinceLastCall;
return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime;
// Either this is the first call, activity has stopped and we're at the
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
function timerExpired() {
var time = now();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
// Restart the timer.
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined;
// Only invoke if we have `lastArgs` which means `func` has been
// debounced at least once.
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = undefined;
return result;
}
function cancel() {
if (timerId !== undefined) {
clearTimeout(timerId);
}
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
return timerId === undefined ? result : trailingEdge(now());
}
function debounced() {
var time = now(),
isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined) {
return leadingEdge(lastCallTime);
}
if (maxing) {
// Handle invocations in a tight loop.
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
/**
* Creates a throttled function that only invokes `func` at most once per
* every `wait` milliseconds. The throttled function comes with a `cancel`
* method to cancel delayed `func` invocations and a `flush` method to
* immediately invoke them. Provide `options` to indicate whether `func`
* should be invoked on the leading and/or trailing edge of the `wait`
* timeout. The `func` is invoked with the last arguments provided to the
* throttled function. Subsequent calls to the throttled function return the
* result of the last `func` invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the throttled function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.throttle` and `_.debounce`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to throttle.
* @param {number} [wait=0] The number of milliseconds to throttle invocations to.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=true]
* Specify invoking on the leading edge of the timeout.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new throttled function.
* @example
*
* // Avoid excessively updating the position while scrolling.
* jQuery(window).on('scroll', _.throttle(updatePosition, 100));
*
* // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.
* var throttled = _.throttle(renewToken, 300000, { 'trailing': false });
* jQuery(element).on('click', throttled);
*
* // Cancel the trailing throttled invocation.
* jQuery(window).on('popstate', throttled.cancel);
*/
function throttle(func, wait, options) {
var leading = true,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
if (isObject(options)) {
leading = 'leading' in options ? !!options.leading : leading;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
return debounce(func, wait, {
'leading': leading,
'maxWait': wait,
'trailing': trailing
});
}
/**
* Checks if `value` is the
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
* @example
*
* _.isObject({});
* // => true
*
* _.isObject([1, 2, 3]);
* // => true
*
* _.isObject(_.noop);
* // => true
*
* _.isObject(null);
* // => false
*/
function isObject(value) {
var type = typeof value;
return !!value && (type == 'object' || type == 'function');
}
/**
* Checks if `value` is object-like. A value is object-like if it's not `null`
* and has a `typeof` result of "object".
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is object-like, else `false`.
* @example
*
* _.isObjectLike({});
* // => true
*
* _.isObjectLike([1, 2, 3]);
* // => true
*
* _.isObjectLike(_.noop);
* // => false
*
* _.isObjectLike(null);
* // => false
*/
function isObjectLike(value) {
return !!value && typeof value == 'object';
}
/**
* Checks if `value` is classified as a `Symbol` primitive or object.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is a symbol, else `false`.
* @example
*
* _.isSymbol(Symbol.iterator);
* // => true
*
* _.isSymbol('abc');
* // => false
*/
function isSymbol(value) {
return typeof value == 'symbol' ||
(isObjectLike(value) && objectToString.call(value) == symbolTag);
}
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = value.replace(reTrim, '');
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
: (reIsBadHex.test(value) ? NAN : +value);
}
module.exports = throttle;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "hMMk":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.uint16-array.js ***!
\*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj");
// `Uint16Array` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Uint16', function (init) {
return function Uint16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "hXpO":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/create-html.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var quot = /"/g;
// B.2.3.2.1 CreateHTML(string, tag, attribute, value)
// https://tc39.github.io/ecma262/#sec-createhtml
module.exports = function (string, tag, attribute, value) {
var S = String(requireObjectCoercible(string));
var p1 = '<' + tag;
if (attribute !== '') p1 += ' ' + attribute + '="' + String(value).replace(quot, '&quot;') + '"';
return p1 + '>' + S + '</' + tag + '>';
};
/***/ }),
/***/ "hcok":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.difference.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.difference` method
// https://github.com/tc39/proposal-set-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
difference: function difference(iterable) {
var set = anObject(this);
var newSet = new (speciesConstructor(set, getBuiltIn('Set')))(set);
var remover = aFunction(newSet['delete']);
iterate(iterable, function (value) {
remover.call(newSet, value);
});
return newSet;
}
});
/***/ }),
/***/ "hh1v":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/is-object.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = function (it) {
return typeof it === 'object' ? it !== null : typeof it === 'function';
};
/***/ }),
/***/ "hh8c":
/*!*************************!*\
!*** ./src/global.less ***!
\*************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "i4U9":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/same-value-zero.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
// `SameValueZero` abstract operation
// https://tc39.github.io/ecma262/#sec-samevaluezero
module.exports = function (x, y) {
// eslint-disable-next-line no-self-compare
return x === y || x != x && y != y;
};
/***/ }),
/***/ "i5UE":
/*!**************************************************!*\
!*** ./node_modules/hash.js/lib/hash/sha/384.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ "w8CP");
var SHA512 = __webpack_require__(/*! ./512 */ "tSWc");
function SHA384() {
if (!(this instanceof SHA384))
return new SHA384();
SHA512.call(this);
this.h = [
0xcbbb9d5d, 0xc1059ed8,
0x629a292a, 0x367cd507,
0x9159015a, 0x3070dd17,
0x152fecd8, 0xf70e5939,
0x67332667, 0xffc00b31,
0x8eb44a87, 0x68581511,
0xdb0c2e0d, 0x64f98fa7,
0x47b5481d, 0xbefa4fa4 ];
}
utils.inherits(SHA384, SHA512);
module.exports = SHA384;
SHA384.blockSize = 1024;
SHA384.outSize = 384;
SHA384.hmacStrength = 192;
SHA384.padLength = 128;
SHA384.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h.slice(0, 12), 'big');
else
return utils.split32(this.h.slice(0, 12), 'big');
};
/***/ }),
/***/ "i5pp":
/*!*********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.set-prototype-of.js ***!
\*********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aPossiblePrototype = __webpack_require__(/*! ../internals/a-possible-prototype */ "O741");
var objectSetPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "0rvr");
// `Reflect.setPrototypeOf` method
// https://tc39.github.io/ecma262/#sec-reflect.setprototypeof
if (objectSetPrototypeOf) $({ target: 'Reflect', stat: true }, {
setPrototypeOf: function setPrototypeOf(target, proto) {
anObject(target);
aPossiblePrototype(proto);
try {
objectSetPrototypeOf(target, proto);
return true;
} catch (error) {
return false;
}
}
});
/***/ }),
/***/ "i6QF":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/es.number.is-integer.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var isInteger = __webpack_require__(/*! ../internals/is-integer */ "Xol8");
// `Number.isInteger` method
// https://tc39.github.io/ecma262/#sec-number.isinteger
$({ target: 'Number', stat: true }, {
isInteger: isInteger
});
/***/ }),
/***/ "i8i4":
/*!*****************************************!*\
!*** ./node_modules/react-dom/index.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function checkDCE() {
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'
) {
return;
}
if (false) {}
try {
// Verify that the code above has been dead code eliminated (DCE'd).
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);
} catch (err) {
// DevTools shouldn't crash React, no matter what.
// We should still report in case we break this code.
console.error(err);
}
}
if (true) {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = __webpack_require__(/*! ./cjs/react-dom.production.min.js */ "yl30");
} else {}
/***/ }),
/***/ "iIM6":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.array.last-index.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
// `Array.prototype.lastIndex` getter
// https://github.com/keithamus/proposal-array-last
if (DESCRIPTORS && !('lastIndex' in [])) {
defineProperty(Array.prototype, 'lastIndex', {
configurable: true,
get: function lastIndex() {
var O = toObject(this);
var len = toLength(O.length);
return len == 0 ? 0 : len - 1;
}
});
addToUnscopables('lastIndex');
}
/***/ }),
/***/ "iSVu":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/inspect-source.js ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var store = __webpack_require__(/*! ../internals/shared-store */ "xs3f");
var functionToString = Function.toString;
// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
if (typeof store.inspectSource != 'function') {
store.inspectSource = function (it) {
return functionToString.call(it);
};
}
module.exports = store.inspectSource;
/***/ }),
/***/ "iUp/":
/*!************************************************!*\
!*** ./src/models/video/detail.ts + 1 modules ***!
\************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/paths.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/video.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("oBTY");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./src/service/video.ts
var service_video = __webpack_require__("qdXH");
// EXTERNAL MODULE: ./src/service/paths.ts
var paths = __webpack_require__("Mgx3");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/onlineLearning.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function getOnlineLearning(_x) {
return _getOnlineLearning.apply(this, arguments);
}
function _getOnlineLearning() {
_getOnlineLearning = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/online_learning.json"), {
method: 'get'
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getOnlineLearning.apply(this, arguments);
}
function updateStage(_x2) {
return _updateStage.apply(this, arguments);
}
function _updateStage() {
_updateStage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.id, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _updateStage.apply(this, arguments);
}
function addStage(_x3) {
return _addStage.apply(this, arguments);
}
function _addStage() {
_addStage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/course_stages.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _addStage.apply(this, arguments);
}
function satgeAddShixunToStage(_x4) {
return _satgeAddShixunToStage.apply(this, arguments);
}
function _satgeAddShixunToStage() {
_satgeAddShixunToStage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.id, "/add_shixun_to_stage.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _satgeAddShixunToStage.apply(this, arguments);
}
function selectShixunToStage(_x5) {
return _selectShixunToStage.apply(this, arguments);
}
function _selectShixunToStage() {
_selectShixunToStage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.id, "/select_shixun_to_stage.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _selectShixunToStage.apply(this, arguments);
}
function addVideoToStage(_x6) {
return _addVideoToStage.apply(this, arguments);
}
function _addVideoToStage() {
_addVideoToStage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.id, "/add_video_to_stage.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _addVideoToStage.apply(this, arguments);
}
function addCoursewareToStage(_x7) {
return _addCoursewareToStage.apply(this, arguments);
}
function _addCoursewareToStage() {
_addCoursewareToStage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.id, "/add_attachment_to_stage.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _addCoursewareToStage.apply(this, arguments);
}
function addShixunToStage(_x8) {
return _addShixunToStage.apply(this, arguments);
}
function _addShixunToStage() {
_addShixunToStage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/paths/add_shixun_to_stage.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _addShixunToStage.apply(this, arguments);
}
function upPosition(_x9) {
return _upPosition.apply(this, arguments);
}
function _upPosition() {
_upPosition = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.id, "/up_position.json"), {
method: 'post'
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _upPosition.apply(this, arguments);
}
function downPosition(_x10) {
return _downPosition.apply(this, arguments);
}
function _downPosition() {
_downPosition = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.id, "/down_position.json"), {
method: 'post'
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _downPosition.apply(this, arguments);
}
function deleteStage(_x11) {
return _deleteStage.apply(this, arguments);
}
function _deleteStage() {
_deleteStage = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _deleteStage.apply(this, arguments);
}
function stagesMovePosition(_x12) {
return _stagesMovePosition.apply(this, arguments);
}
//DELETE /api/course_stages/:course_stage_id/items/:id 删除
function _stagesMovePosition() {
_stagesMovePosition = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.stage_id, "/items/move_position.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _stagesMovePosition.apply(this, arguments);
}
function deleteStages(_x13) {
return _deleteStages.apply(this, arguments);
}
function _deleteStages() {
_deleteStages = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(fetch["a" /* default */])("/api/course_stages/".concat(params.stage_id, "/items/").concat(params.id), {
method: 'delete'
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _deleteStages.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/video/detail.ts
function detail_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ detail_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
//合适本页面逻辑的处理方法
var getQueryVariable = function getQueryVariable() {
var _query, _query2, _query2$split$, _query3, _query3$split$;
var query = window.location.href.split('/');
if (!query.includes('video')) return;
var videoId = (_query = query[query.length - 1]) === null || _query === void 0 ? void 0 : _query.split('?')[0];
var id = (_query2 = query[query.length - 1]) === null || _query2 === void 0 ? void 0 : (_query2$split$ = _query2.split('?')[1]) === null || _query2$split$ === void 0 ? void 0 : _query2$split$.split('=')[1];
if (((_query3 = query[query.length - 1]) === null || _query3 === void 0 ? void 0 : (_query3$split$ = _query3.split('?')[1]) === null || _query3$split$ === void 0 ? void 0 : _query3$split$.split('=')[0]) === 'subject_id') {
return {
videoId: videoId,
subject_id: id
};
}
return {
videoId: videoId,
course_id: id
};
};
var VideoDetailModel = {
namespace: 'videoDetail',
state: {
detail: {},
actionTabs: {
key: '',
params: {}
},
stages: [],
cust_seq: 0,
queryParams: getQueryVariable(),
videoList: [],
attachmentList: [],
selectParams: {
checkBoxValue: false,
radioValue: 1
},
active: {}
},
effects: {
getVideoDetail: function getVideoDetail(_ref, _ref2) {
var payload = _ref.payload,
callback = _ref.callback;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/detail_regeneratorRuntime().mark(function _callee() {
var response;
return detail_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(service_video["d" /* getVideoDetail */], payload);
case 2:
response = _context.sent;
if (!callback) {
_context.next = 7;
break;
}
callback(response);
_context.next = 9;
break;
case 7:
_context.next = 9;
return put({
type: 'save',
payload: {
detail: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 9:
case "end":
return _context.stop();
}
}, _callee);
})();
},
setActionTabs: function setActionTabs(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/detail_regeneratorRuntime().mark(function _callee2() {
return detail_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
setSelectValue: function setSelectValue(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/detail_regeneratorRuntime().mark(function _callee3() {
return detail_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return put({
type: 'save',
payload: {
selectParams: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
handleList: function handleList(_ref7, _ref8) {
var payload = _ref7.payload;
var put = _ref8.put,
select = _ref8.select;
return /*#__PURE__*/detail_regeneratorRuntime().mark(function _callee4() {
var _yield$select, videoList, attachmentList, id, active;
return detail_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return select(function (_) {
return _.videoDetail;
});
case 2:
_yield$select = _context4.sent;
videoList = _yield$select.videoList;
attachmentList = _yield$select.attachmentList;
id = payload.videoId || payload.attachmentId;
active = [].concat(Object(toConsumableArray["a" /* default */])(videoList), Object(toConsumableArray["a" /* default */])(attachmentList)).find(function (item) {
return String(item.id) === String(id);
});
_context4.next = 9;
return put({
type: 'save',
payload: {
active: active,
queryParams: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, getQueryVariable()), payload)
}
});
case 9:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
getStageData: function getStageData(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put,
select = _ref10.select;
return /*#__PURE__*/detail_regeneratorRuntime().mark(function _callee5() {
var response, responseSeq, _yield$select2, queryParams, _response$stages, stages, video, Attachment, active;
return detail_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(service_video["b" /* getStageData */], payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return call(paths["g" /* getPathsDetail */], {
id: payload.subject_id
});
case 5:
responseSeq = _context5.sent;
_context5.next = 8;
return select(function (_) {
return _.videoDetail;
});
case 8:
_yield$select2 = _context5.sent;
queryParams = _yield$select2.queryParams;
_response$stages = response.stages, stages = _response$stages === void 0 ? [] : _response$stages;
video = []; // word/excel/ppt/pdf
Attachment = [];
active = {};
stages === null || stages === void 0 ? void 0 : stages.forEach(function (element) {
element.items.forEach(function (e) {
if (String(e.id) === String(queryParams.videoId)) {
active = e;
}
if (e.item_type === 'VideoItem') {
video.push(e);
} else if (e.item_type === 'Attachment') {
Attachment.push(e);
}
if (e.children && !!e.children.length) {
e.children.forEach(function (el) {
if (String(e.id) === String(queryParams.videoId)) {
active = e;
}
if (el.item_type === 'VideoItem') {
video.push(el);
} else if (el.item_type === 'Attachment') {
Attachment.push(el);
}
});
}
});
});
window.filterVideoSign = [].concat(video); //全局标记使用,勿删
_context5.next = 18;
return put({
type: 'save',
payload: {
stages: stages,
active: active,
cust_seq: responseSeq.cust_seq,
videoList: video,
attachmentList: Attachment
}
});
case 18:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
getCourseStageData: function getCourseStageData(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put,
select = _ref12.select;
return /*#__PURE__*/detail_regeneratorRuntime().mark(function _callee6() {
var response, _yield$select3, queryParams, stages, video, Attachment, active;
return detail_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(getOnlineLearning, payload);
case 2:
response = _context6.sent;
_context6.next = 5;
return select(function (_) {
return _.videoDetail;
});
case 5:
_yield$select3 = _context6.sent;
queryParams = _yield$select3.queryParams;
stages = response.stages;
video = []; // word/excel/ppt/pdf
Attachment = [];
active = {};
stages === null || stages === void 0 ? void 0 : stages.forEach(function (element) {
element.items.forEach(function (e) {
if (String(e.id) === String(queryParams.videoId)) {
active = e;
}
if (e.item_type === 'VideoItem') {
video.push(e);
} else if (e.item_type === 'Attachment') {
Attachment.push(e);
}
if (e.children && !!e.children.length) {
e.children.forEach(function (el) {
if (String(e.id) === String(queryParams.videoId)) {
active = e;
}
if (el.item_type === 'VideoItem') {
video.push(el);
} else if (el.item_type === 'Attachment') {
Attachment.push(el);
}
});
}
});
});
window.filterVideoSign = [].concat(video); //全局标记使用,勿删
_context6.next = 15;
return put({
type: 'save',
payload: {
active: active,
stages: stages,
cust_seq: true,
videoList: video,
attachmentList: Attachment
}
});
case 15:
case "end":
return _context6.stop();
}
}, _callee6);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref13) {
var dispatch = _ref13.dispatch,
history = _ref13.history;
return history.listen(function (_ref14) {
var pathname = _ref14.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ var detail = __webpack_exports__["a"] = (VideoDetailModel);
/***/ }),
/***/ "ihrJ":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.group-by.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
// `Map.groupBy` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', stat: true }, {
groupBy: function groupBy(iterable, keyDerivative) {
var newMap = new this();
aFunction(keyDerivative);
var has = aFunction(newMap.has);
var get = aFunction(newMap.get);
var set = aFunction(newMap.set);
iterate(iterable, function (element) {
var derivedKey = keyDerivative(element);
if (!has.call(newMap, derivedKey)) set.call(newMap, derivedKey, [element]);
else get.call(newMap, derivedKey).push(element);
});
return newMap;
}
});
/***/ }),
/***/ "ilnZ":
/*!****************************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.uint8-clamped-array.js ***!
\****************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj");
// `Uint8ClampedArray` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Uint8', function (init) {
return function Uint8ClampedArray(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
}, true);
/***/ }),
/***/ "inlA":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.ends-with.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "WjRb");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "qxPZ");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var nativeEndsWith = ''.endsWith;
var min = Math.min;
var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('endsWith');
// https://github.com/zloirock/core-js/pull/702
var MDN_POLYFILL_BUG = !IS_PURE && !CORRECT_IS_REGEXP_LOGIC && !!function () {
var descriptor = getOwnPropertyDescriptor(String.prototype, 'endsWith');
return descriptor && !descriptor.writable;
}();
// `String.prototype.endsWith` method
// https://tc39.github.io/ecma262/#sec-string.prototype.endswith
$({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
endsWith: function endsWith(searchString /* , endPosition = @length */) {
var that = String(requireObjectCoercible(this));
notARegExp(searchString);
var endPosition = arguments.length > 1 ? arguments[1] : undefined;
var len = toLength(that.length);
var end = endPosition === undefined ? len : min(toLength(endPosition), len);
var search = String(searchString);
return nativeEndsWith
? nativeEndsWith.call(that, search, end)
: that.slice(end - search.length, end) === search;
}
});
/***/ }),
/***/ "iqWW":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/advance-string-index.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var charAt = __webpack_require__(/*! ../internals/string-multibyte */ "ZUd8").charAt;
// `AdvanceStringIndex` abstract operation
// https://tc39.github.io/ecma262/#sec-advancestringindex
module.exports = function (S, index, unicode) {
return index + (unicode ? charAt(S, index).length : 1);
};
/***/ }),
/***/ "iqeF":
/*!*************************************************************************************!*\
!*** ./node_modules/core-js/internals/typed-array-constructors-require-wrappers.js ***!
\*************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* eslint-disable no-new */
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "HH4o");
var NATIVE_ARRAY_BUFFER_VIEWS = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC").NATIVE_ARRAY_BUFFER_VIEWS;
var ArrayBuffer = global.ArrayBuffer;
var Int8Array = global.Int8Array;
module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () {
Int8Array(1);
}) || !fails(function () {
new Int8Array(-1);
}) || !checkCorrectnessOfIteration(function (iterable) {
new Int8Array();
new Int8Array(null);
new Int8Array(1.5);
new Int8Array(iterable);
}, true) || fails(function () {
// Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1;
});
/***/ }),
/***/ "iwkZ":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.int16-array.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj");
// `Int16Array` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Int16', function (init) {
return function Int16Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "j+VE":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.global-this.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// TODO: Remove from `core-js@4`
__webpack_require__(/*! ./es.global-this */ "bFeb");
/***/ }),
/***/ "jCWc":
/*!*************************************************!*\
!*** ./node_modules/antd/es/col/style/index.js ***!
\*************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _grid_style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../grid/style */ "1GLa");
// style dependencies
// deps-lint-skip: grid
/***/ }),
/***/ "jXQH":
/*!******************************************!*\
!*** ./node_modules/lodash/_baseTrim.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var trimmedEndIndex = __webpack_require__(/*! ./_trimmedEndIndex */ "TO8r");
/** Used to match leading whitespace. */
var reTrimStart = /^\s+/;
/**
* The base implementation of `_.trim`.
*
* @private
* @param {string} string The string to trim.
* @returns {string} Returns the trimmed string.
*/
function baseTrim(string) {
return string
? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')
: string;
}
module.exports = baseTrim;
/***/ }),
/***/ "jb+D":
/*!*****************************!*\
!*** ./src/service/user.ts ***!
\*****************************/
/*! exports provided: getZoneList, ForgeLogin, ForgeLoginOut, ForgeCheckName, ForgeCheckEmail, ForgeSaveUserInfo, LoginIn, LoginOut, getUserInfo, getEducoderUserInfo, getCount, getNavigationInfo, getSystemUpdate, getHomepageInfo, signed, getCourses, getShixuns, getPaths, getProjects, getVideos, getReviewVideos, deleteVideo, logWatchHistory, getQuestionBanks, topicsSetPublic, topicsDelete, topicGetCourseList, topicSendToClass, getHomeworkBanksDetail, deleteQuestionBanks, batchPublish, cancelShixun, getEngineerUrl, postUserChoiceLearnPath, getUserPersona, getUserLearnPath, validateName, getValidateCode, register, wechatRegister, changPassword, resetPassword, LoginForPhone */
/*! exports used: ForgeCheckEmail, ForgeCheckName, ForgeLogin, ForgeLoginOut, ForgeSaveUserInfo, LoginForPhone, LoginIn, LoginOut, changPassword, deleteVideo, getCount, getCourses, getEducoderUserInfo, getEngineerUrl, getHomepageInfo, getHomeworkBanksDetail, getNavigationInfo, getPaths, getProjects, getQuestionBanks, getReviewVideos, getShixuns, getSystemUpdate, getUserInfo, getValidateCode, getVideos, getZoneList, logWatchHistory, register, resetPassword, signed, topicGetCourseList, topicSendToClass, topicsDelete, topicsSetPublic, validateName */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return getZoneList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return ForgeLogin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return ForgeLoginOut; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return ForgeCheckName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ForgeCheckEmail; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return ForgeSaveUserInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return LoginIn; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return LoginOut; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getUserInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return getEducoderUserInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return getCount; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return getNavigationInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getSystemUpdate; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getHomepageInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return signed; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return getCourses; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getShixuns; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return getPaths; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return getProjects; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return getVideos; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getReviewVideos; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return deleteVideo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return logWatchHistory; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getQuestionBanks; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return topicsSetPublic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return topicsDelete; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return topicGetCourseList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return topicSendToClass; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getHomeworkBanksDetail; });
/* unused harmony export deleteQuestionBanks */
/* unused harmony export batchPublish */
/* unused harmony export cancelShixun */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return getEngineerUrl; });
/* unused harmony export postUserChoiceLearnPath */
/* unused harmony export getUserPersona */
/* unused harmony export getUserLearnPath */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return validateName; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return getValidateCode; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return register; });
/* unused harmony export wechatRegister */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return changPassword; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return resetPassword; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return LoginForPhone; });
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
/* harmony import */ var _utils_env__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/env */ "m3rI");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
function getZoneList() {
return _getZoneList.apply(this, arguments);
}
function _getZoneList() {
_getZoneList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].ZONE_SERVER, "/api/zone/open/list"), {
method: 'get'
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getZoneList.apply(this, arguments);
}
function ForgeLogin(_x) {
return _ForgeLogin.apply(this, arguments);
}
function _ForgeLogin() {
_ForgeLogin = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].FORGE_SERVER, "/api/accounts/login.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _ForgeLogin.apply(this, arguments);
}
function ForgeLoginOut(_x2) {
return _ForgeLoginOut.apply(this, arguments);
}
function _ForgeLoginOut() {
_ForgeLoginOut = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].FORGE_SERVER, "/api/accounts/logout.json"), {
method: 'get'
// body: { ...params },
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _ForgeLoginOut.apply(this, arguments);
}
function ForgeCheckName(_x3) {
return _ForgeCheckName.apply(this, arguments);
}
function _ForgeCheckName() {
_ForgeCheckName = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].FORGE_SERVER, "/api/accounts/login_check.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _ForgeCheckName.apply(this, arguments);
}
function ForgeCheckEmail(_x4) {
return _ForgeCheckEmail.apply(this, arguments);
}
function _ForgeCheckEmail() {
_ForgeCheckEmail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].FORGE_SERVER, "/api/users/email_search.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _ForgeCheckEmail.apply(this, arguments);
}
function ForgeSaveUserInfo(_x5) {
return _ForgeSaveUserInfo.apply(this, arguments);
}
function _ForgeSaveUserInfo() {
_ForgeSaveUserInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].FORGE_SERVER, "/api/accounts/simple_update.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _ForgeSaveUserInfo.apply(this, arguments);
}
function LoginIn(_x6) {
return _LoginIn.apply(this, arguments);
}
function _LoginIn() {
_LoginIn = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/accounts/login.json', {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _LoginIn.apply(this, arguments);
}
function LoginOut(_x7) {
return _LoginOut.apply(this, arguments);
}
function _LoginOut() {
_LoginOut = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/accounts/logout.json', {
method: 'get'
// body: { ...params },
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _LoginOut.apply(this, arguments);
}
function getUserInfo(_x8) {
return _getUserInfo.apply(this, arguments);
}
function _getUserInfo() {
_getUserInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("".concat(_utils_env__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"].FORGE_SERVER, "/api/users/get_user_info.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _getUserInfo.apply(this, arguments);
}
function getEducoderUserInfo(_x9) {
return _getEducoderUserInfo.apply(this, arguments);
}
/**
* 从头歌获取浏览数、报名人数、奖金总额
* @returns
*/
function _getEducoderUserInfo() {
_getEducoderUserInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/get_user_info.json", {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _getEducoderUserInfo.apply(this, arguments);
}
function getCount() {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/competitions/ccf_count.json", {
method: 'get'
});
}
function getNavigationInfo(_x10) {
return _getNavigationInfo.apply(this, arguments);
}
function _getNavigationInfo() {
_getNavigationInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/users/get_navigation_info.json', {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _getNavigationInfo.apply(this, arguments);
}
function getSystemUpdate() {
return _getSystemUpdate.apply(this, arguments);
}
function _getSystemUpdate() {
_getSystemUpdate = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/users/system_update.json', {
method: 'get'
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _getSystemUpdate.apply(this, arguments);
}
function getHomepageInfo(_x11) {
return _getHomepageInfo.apply(this, arguments);
}
function _getHomepageInfo() {
_getHomepageInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.username, "/homepage_info.json"), {
method: 'get'
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _getHomepageInfo.apply(this, arguments);
}
function signed(_x12) {
return _signed.apply(this, arguments);
}
function _signed() {
_signed = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/attendance.json", {
method: 'post'
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _signed.apply(this, arguments);
}
function getCourses(_x13) {
return _getCourses.apply(this, arguments);
}
function _getCourses() {
_getCourses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.username, "/courses.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _getCourses.apply(this, arguments);
}
function getShixuns(_x14) {
return _getShixuns.apply(this, arguments);
}
function _getShixuns() {
_getShixuns = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.username, "/shixuns.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _getShixuns.apply(this, arguments);
}
function getPaths(_x15) {
return _getPaths.apply(this, arguments);
}
function _getPaths() {
_getPaths = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.username, "/subjects.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _getPaths.apply(this, arguments);
}
function getProjects(_x16) {
return _getProjects.apply(this, arguments);
}
function _getProjects() {
_getProjects = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.username, "/projects.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _getProjects.apply(this, arguments);
}
function getVideos(_x17) {
return _getVideos.apply(this, arguments);
}
function _getVideos() {
_getVideos = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.username, "/videos.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _getVideos.apply(this, arguments);
}
function getReviewVideos(_x18) {
return _getReviewVideos.apply(this, arguments);
}
function _getReviewVideos() {
_getReviewVideos = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.username, "/videos/review.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _getReviewVideos.apply(this, arguments);
}
function deleteVideo(_x19) {
return _deleteVideo.apply(this, arguments);
}
function _deleteVideo() {
_deleteVideo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.username, "/videos/").concat(params.id, ".json"), {
method: 'delete'
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _deleteVideo.apply(this, arguments);
}
function logWatchHistory(_x20) {
return _logWatchHistory.apply(this, arguments);
}
function _logWatchHistory() {
_logWatchHistory = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/watch_video_histories.json', {
method: 'post',
body: params
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _logWatchHistory.apply(this, arguments);
}
function getQuestionBanks(_x21) {
return _getQuestionBanks.apply(this, arguments);
}
function _getQuestionBanks() {
_getQuestionBanks = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/question_banks.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _getQuestionBanks.apply(this, arguments);
}
function topicsSetPublic(_x22) {
return _topicsSetPublic.apply(this, arguments);
}
function _topicsSetPublic() {
_topicsSetPublic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/question_banks/multi_public.json', {
method: 'post',
body: params
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _topicsSetPublic.apply(this, arguments);
}
function topicsDelete(_x23) {
return _topicsDelete.apply(this, arguments);
}
function _topicsDelete() {
_topicsDelete = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/question_banks/multi_delete.json', {
method: 'delete',
body: params
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _topicsDelete.apply(this, arguments);
}
function topicGetCourseList(_x24) {
return _topicGetCourseList.apply(this, arguments);
}
function _topicGetCourseList() {
_topicGetCourseList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/question_banks/my_courses.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _topicGetCourseList.apply(this, arguments);
}
function topicSendToClass(_x25) {
return _topicSendToClass.apply(this, arguments);
}
function _topicSendToClass() {
_topicSendToClass = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/question_banks/send_to_course.json', {
method: 'post',
body: params
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _topicSendToClass.apply(this, arguments);
}
function getHomeworkBanksDetail(_x26) {
return _getHomeworkBanksDetail.apply(this, arguments);
}
function _getHomeworkBanksDetail() {
_getHomeworkBanksDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
return _context28.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/homework_banks/".concat(params.topicId, ".json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context28.stop();
}
}, _callee28);
}));
return _getHomeworkBanksDetail.apply(this, arguments);
}
function deleteQuestionBanks(_x27) {
return _deleteQuestionBanks.apply(this, arguments);
}
function _deleteQuestionBanks() {
_deleteQuestionBanks = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
return _context29.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/question_banks/multi_delete.json", {
method: 'delete',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context29.stop();
}
}, _callee29);
}));
return _deleteQuestionBanks.apply(this, arguments);
}
function batchPublish(_x28) {
return _batchPublish.apply(this, arguments);
}
function _batchPublish() {
_batchPublish = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
return _context30.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/".concat(params.username, "/videos/batch_publish.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context30.stop();
}
}, _callee30);
}));
return _batchPublish.apply(this, arguments);
}
function cancelShixun(_x29) {
return _cancelShixun.apply(this, arguments);
}
function _cancelShixun() {
_cancelShixun = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(params) {
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
return _context31.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/myshixuns/".concat(params.identifier, "/cancel.json"), {
method: 'delete',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context31.stop();
}
}, _callee31);
}));
return _cancelShixun.apply(this, arguments);
}
function getEngineerUrl() {
return _getEngineerUrl.apply(this, arguments);
}
function _getEngineerUrl() {
_getEngineerUrl = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
return _context32.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/get_engineer_url.json", {
method: 'get'
}));
case 1:
case "end":
return _context32.stop();
}
}, _callee32);
}));
return _getEngineerUrl.apply(this, arguments);
}
function postUserChoiceLearnPath(_x30) {
return _postUserChoiceLearnPath.apply(this, arguments);
}
function _postUserChoiceLearnPath() {
_postUserChoiceLearnPath = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
return _context33.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/intelligent_recommendations/user_choice_learn_path.json", {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context33.stop();
}
}, _callee33);
}));
return _postUserChoiceLearnPath.apply(this, arguments);
}
function getUserPersona() {
return _getUserPersona.apply(this, arguments);
}
function _getUserPersona() {
_getUserPersona = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
return _context34.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/intelligent_recommendations/persona.json", {
method: 'get'
}));
case 1:
case "end":
return _context34.stop();
}
}, _callee34);
}));
return _getUserPersona.apply(this, arguments);
}
function getUserLearnPath() {
return _getUserLearnPath.apply(this, arguments);
}
//type 1 表示用户注册 2 忘记密码 3 绑定手机/邮箱
function _getUserLearnPath() {
_getUserLearnPath = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() {
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
return _context35.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/intelligent_recommendations/user_learn_path.json", {
method: 'get'
}));
case 1:
case "end":
return _context35.stop();
}
}, _callee35);
}));
return _getUserLearnPath.apply(this, arguments);
}
function validateName(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/accounts/valid_email_and_phone.json', {
method: "get",
params: params
});
}
//type 1用户注册注册 2忘记密码 3绑定手机 4: 绑定邮箱5: 验收手机号有效
function getValidateCode(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/accounts/get_verification_code.json', {
method: "get",
params: params
});
}
function register(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/accounts/register.json', {
method: "post",
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function wechatRegister(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/weapps/register.json', {
method: "post",
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function changPassword(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/accounts/".concat(params.login, "/password.json"), {
method: "put",
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function resetPassword(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/accounts/reset_password.json', {
method: "post",
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function LoginForPhone(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/accounts/login_for_phone.json', {
method: "get",
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
/***/ }),
/***/ "jiSn":
/*!**********************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/EllipsisOutlined.js ***!
\**********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _EllipsisOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/EllipsisOutlined */ "KBXm"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var EllipsisOutlined = function EllipsisOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _EllipsisOutlined.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(EllipsisOutlined);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "jrUv":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/math-expm1.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
var nativeExpm1 = Math.expm1;
var exp = Math.exp;
// `Math.expm1` method implementation
// https://tc39.github.io/ecma262/#sec-math.expm1
module.exports = (!nativeExpm1
// Old FF bug
|| nativeExpm1(10) > 22025.465794806719 || nativeExpm1(10) < 22025.4657948067165168
// Tor Browser bug
|| nativeExpm1(-2e-17) != -2e-17
) ? function expm1(x) {
return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : exp(x) - 1;
} : nativeExpm1;
/***/ }),
/***/ "jrin":
/*!********************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
\********************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
/***/ }),
/***/ "jsC+":
/*!************************************************!*\
!*** ./node_modules/antd/es/dropdown/index.js ***!
\************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _dropdown__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./dropdown */ "XBQK");
/* harmony default export */ __webpack_exports__["a"] = (_dropdown__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
/***/ }),
/***/ "k/Y0":
/*!***************************************************************!*\
!*** ./node_modules/antd/es/config-provider/style/index.less ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "k1fw":
/*!*******************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js ***!
\*******************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectSpread2; });
/* harmony import */ var _defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./defineProperty */ "jrin");
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
Object(_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
/***/ }),
/***/ "kCkZ":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.promise.try.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "8GlL");
var perform = __webpack_require__(/*! ../internals/perform */ "5mdu");
// `Promise.try` method
// https://github.com/tc39/proposal-promise-try
$({ target: 'Promise', stat: true }, {
'try': function (callbackfn) {
var promiseCapability = newPromiseCapabilityModule.f(this);
var result = perform(callbackfn);
(result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value);
return promiseCapability.promise;
}
});
/***/ }),
/***/ "kLXV":
/*!**********************************************************!*\
!*** ./node_modules/antd/es/modal/index.js + 14 modules ***!
\**********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CheckCircleOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CloseCircleOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CloseOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/ExclamationCircleOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/InfoCircleOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/button.js because of ./src/pages/Competitions/Detail/SubmitResult.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/button/index.js because of ./src/pages/Competitions/Detail/SubmitResult.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale/default.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/locale.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-animate/es/Animate.js because of ./node_modules/antd/es/upload/UploadList.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/addEventListener.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/canUseDom.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/KeyCode.js because of ./node_modules/antd/node_modules/rc-menu/es/SubPopupMenu.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Portal.js because of ./node_modules/rc-tooltip/node_modules/rc-trigger/es/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/getScrollBarSize.js because of ./node_modules/rc-table/es/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/raf.js because of ./node_modules/rc-virtual-list/es/hooks/useFrameWheel.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/react-dom/index.js
var react_dom = __webpack_require__("i8i4");
// EXTERNAL MODULE: ./node_modules/rc-util/es/KeyCode.js
var KeyCode = __webpack_require__("4IlW");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/contains.js
var contains = __webpack_require__("l4aY");
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-animate/es/Animate.js + 4 modules
var Animate = __webpack_require__("UmKh");
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dialog/es/LazyRenderBox.js
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]];
}return t;
};
var LazyRenderBox_LazyRenderBox = function (_React$Component) {
_inherits(LazyRenderBox, _React$Component);
function LazyRenderBox() {
_classCallCheck(this, LazyRenderBox);
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
LazyRenderBox.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
if (nextProps.forceRender) {
return true;
}
return !!nextProps.hiddenClassName || !!nextProps.visible;
};
LazyRenderBox.prototype.render = function render() {
var _a = this.props,
className = _a.className,
hiddenClassName = _a.hiddenClassName,
visible = _a.visible,
forceRender = _a.forceRender,
restProps = __rest(_a, ["className", "hiddenClassName", "visible", "forceRender"]);
var useClassName = className;
if (!!hiddenClassName && !visible) {
useClassName += " " + hiddenClassName;
}
return react["createElement"]("div", _extends({}, restProps, { className: useClassName }));
};
return LazyRenderBox;
}(react["Component"]);
/* harmony default export */ var es_LazyRenderBox = (LazyRenderBox_LazyRenderBox);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dialog/es/Dialog.js
var Dialog_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
function Dialog_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
function Dialog_possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
function Dialog_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
var uuid = 0;
/* eslint react/no-is-mounted:0 */
function getScroll(w, top) {
var ret = w['page' + (top ? 'Y' : 'X') + 'Offset'];
var method = 'scroll' + (top ? 'Top' : 'Left');
if (typeof ret !== 'number') {
var d = w.document;
ret = d.documentElement[method];
if (typeof ret !== 'number') {
ret = d.body[method];
}
}
return ret;
}
function setTransformOrigin(node, value) {
var style = node.style;
['Webkit', 'Moz', 'Ms', 'ms'].forEach(function (prefix) {
style[prefix + 'TransformOrigin'] = value;
});
style['transformOrigin'] = value;
}
function offset(el) {
var rect = el.getBoundingClientRect();
var pos = {
left: rect.left,
top: rect.top
};
var doc = el.ownerDocument;
var w = doc.defaultView || doc.parentWindow;
pos.left += getScroll(w);
pos.top += getScroll(w, true);
return pos;
}
var Dialog_Dialog = function (_React$Component) {
Dialog_inherits(Dialog, _React$Component);
function Dialog(props) {
Dialog_classCallCheck(this, Dialog);
var _this = Dialog_possibleConstructorReturn(this, _React$Component.call(this, props));
_this.inTransition = false;
_this.onAnimateLeave = function () {
var _this$props = _this.props,
afterClose = _this$props.afterClose,
getOpenCount = _this$props.getOpenCount;
// need demo?
// https://github.com/react-component/dialog/pull/28
if (_this.wrap) {
_this.wrap.style.display = 'none';
}
_this.inTransition = false;
// 如果没有打开的状态,则清除 effect 和 overflow: hidden;
// https://github.com/ant-design/ant-design/issues/21539
if (!getOpenCount()) {
_this.switchScrollingEffect();
}
if (afterClose) {
afterClose();
}
};
_this.onDialogMouseDown = function () {
_this.dialogMouseDown = true;
};
_this.onMaskMouseUp = function () {
if (_this.dialogMouseDown) {
_this.timeoutId = setTimeout(function () {
_this.dialogMouseDown = false;
}, 0);
}
};
_this.onMaskClick = function (e) {
// android trigger click on open (fastclick??)
if (Date.now() - _this.openTime < 300) {
return;
}
if (e.target === e.currentTarget && !_this.dialogMouseDown) {
_this.close(e);
}
};
_this.onKeyDown = function (e) {
var props = _this.props;
if (props.keyboard && e.keyCode === KeyCode["a" /* default */].ESC) {
e.stopPropagation();
_this.close(e);
return;
}
// keep focus inside dialog
if (props.visible) {
if (e.keyCode === KeyCode["a" /* default */].TAB) {
var activeElement = document.activeElement;
var sentinelStart = _this.sentinelStart;
if (e.shiftKey) {
if (activeElement === sentinelStart) {
_this.sentinelEnd.focus();
}
} else if (activeElement === _this.sentinelEnd) {
sentinelStart.focus();
}
}
}
};
_this.getDialogElement = function () {
var props = _this.props;
var closable = props.closable;
var prefixCls = props.prefixCls;
var dest = {};
if (props.width !== undefined) {
dest.width = props.width;
}
if (props.height !== undefined) {
dest.height = props.height;
}
var footer = void 0;
if (props.footer) {
footer = react["createElement"]("div", { className: prefixCls + '-footer', ref: _this.saveRef('footer') }, props.footer);
}
var header = void 0;
if (props.title) {
header = react["createElement"]("div", { className: prefixCls + '-header', ref: _this.saveRef('header') }, react["createElement"]("div", { className: prefixCls + '-title', id: _this.titleId }, props.title));
}
var closer = void 0;
if (closable) {
closer = react["createElement"]("button", { type: "button", onClick: _this.close, "aria-label": "Close", className: prefixCls + '-close' }, props.closeIcon || react["createElement"]("span", { className: prefixCls + '-close-x' }));
}
var style = Dialog_extends({}, props.style, dest);
var sentinelStyle = { width: 0, height: 0, overflow: 'hidden', outline: 'none' };
var transitionName = _this.getTransitionName();
var dialogElement = react["createElement"](es_LazyRenderBox, { key: "dialog-element", role: "document", ref: _this.saveRef('dialog'), style: style, className: prefixCls + ' ' + (props.className || ''), visible: props.visible, forceRender: props.forceRender, onMouseDown: _this.onDialogMouseDown }, react["createElement"]("div", { tabIndex: 0, ref: _this.saveRef('sentinelStart'), style: sentinelStyle, "aria-hidden": "true" }), react["createElement"]("div", { className: prefixCls + '-content' }, closer, header, react["createElement"]("div", Dialog_extends({ className: prefixCls + '-body', style: props.bodyStyle, ref: _this.saveRef('body') }, props.bodyProps), props.children), footer), react["createElement"]("div", { tabIndex: 0, ref: _this.saveRef('sentinelEnd'), style: sentinelStyle, "aria-hidden": "true" }));
return react["createElement"](Animate["a" /* default */], { key: "dialog", showProp: "visible", onLeave: _this.onAnimateLeave, transitionName: transitionName, component: "", transitionAppear: true }, props.visible || !props.destroyOnClose ? dialogElement : null);
};
_this.getZIndexStyle = function () {
var style = {};
var props = _this.props;
if (props.zIndex !== undefined) {
style.zIndex = props.zIndex;
}
return style;
};
_this.getWrapStyle = function () {
return Dialog_extends({}, _this.getZIndexStyle(), _this.props.wrapStyle);
};
_this.getMaskStyle = function () {
return Dialog_extends({}, _this.getZIndexStyle(), _this.props.maskStyle);
};
_this.getMaskElement = function () {
var props = _this.props;
var maskElement = void 0;
if (props.mask) {
var maskTransition = _this.getMaskTransitionName();
maskElement = react["createElement"](es_LazyRenderBox, Dialog_extends({ style: _this.getMaskStyle(), key: "mask", className: props.prefixCls + '-mask', hiddenClassName: props.prefixCls + '-mask-hidden', visible: props.visible }, props.maskProps));
if (maskTransition) {
maskElement = react["createElement"](Animate["a" /* default */], { key: "mask", showProp: "visible", transitionAppear: true, component: "", transitionName: maskTransition }, maskElement);
}
}
return maskElement;
};
_this.getMaskTransitionName = function () {
var props = _this.props;
var transitionName = props.maskTransitionName;
var animation = props.maskAnimation;
if (!transitionName && animation) {
transitionName = props.prefixCls + '-' + animation;
}
return transitionName;
};
_this.getTransitionName = function () {
var props = _this.props;
var transitionName = props.transitionName;
var animation = props.animation;
if (!transitionName && animation) {
transitionName = props.prefixCls + '-' + animation;
}
return transitionName;
};
_this.close = function (e) {
var onClose = _this.props.onClose;
if (onClose) {
onClose(e);
}
};
_this.saveRef = function (name) {
return function (node) {
_this[name] = node;
};
};
_this.titleId = 'rcDialogTitle' + uuid++;
_this.switchScrollingEffect = props.switchScrollingEffect || function () {};
return _this;
}
Dialog.prototype.componentDidMount = function componentDidMount() {
this.componentDidUpdate({});
// if forceRender is true, set element style display to be none;
if (this.props.forceRender && this.props.visible) {
return;
}
if ((this.props.forceRender || this.props.getContainer === false && !this.props.visible) && this.wrap) {
this.wrap.style.display = 'none';
}
};
Dialog.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {
var _props = this.props,
visible = _props.visible,
mask = _props.mask,
focusTriggerAfterClose = _props.focusTriggerAfterClose;
var mousePosition = this.props.mousePosition;
if (visible) {
// first show
if (!prevProps.visible) {
this.openTime = Date.now();
this.switchScrollingEffect();
this.tryFocus();
var dialogNode = react_dom["findDOMNode"](this.dialog);
if (mousePosition) {
var elOffset = offset(dialogNode);
setTransformOrigin(dialogNode, mousePosition.x - elOffset.left + 'px ' + (mousePosition.y - elOffset.top) + 'px');
} else {
setTransformOrigin(dialogNode, '');
}
}
} else if (prevProps.visible) {
this.inTransition = true;
if (mask && this.lastOutSideFocusNode && focusTriggerAfterClose) {
try {
this.lastOutSideFocusNode.focus({ preventScroll: true });
} catch (e) {
this.lastOutSideFocusNode = null;
}
this.lastOutSideFocusNode = null;
}
}
};
Dialog.prototype.componentWillUnmount = function componentWillUnmount() {
var _props2 = this.props,
visible = _props2.visible,
getOpenCount = _props2.getOpenCount;
if ((visible || this.inTransition) && !getOpenCount()) {
this.switchScrollingEffect();
}
clearTimeout(this.timeoutId);
};
Dialog.prototype.tryFocus = function tryFocus() {
if (!Object(contains["a" /* default */])(this.wrap, document.activeElement)) {
this.lastOutSideFocusNode = document.activeElement;
this.sentinelStart.focus();
}
};
Dialog.prototype.render = function render() {
var props = this.props;
var prefixCls = props.prefixCls,
maskClosable = props.maskClosable;
var style = this.getWrapStyle();
// clear hide display
// and only set display after async anim, not here for hide
if (props.visible) {
style.display = null;
}
return react["createElement"]("div", { className: prefixCls + '-root' }, this.getMaskElement(), react["createElement"]("div", Dialog_extends({ tabIndex: -1, onKeyDown: this.onKeyDown, className: prefixCls + '-wrap ' + (props.wrapClassName || ''), ref: this.saveRef('wrap'), onClick: maskClosable ? this.onMaskClick : null, onMouseUp: maskClosable ? this.onMaskMouseUp : null, role: "dialog", "aria-labelledby": props.title ? this.titleId : null, style: style }, props.wrapProps), this.getDialogElement()));
};
return Dialog;
}(react["Component"]);
/* harmony default export */ var es_Dialog = (Dialog_Dialog);
Dialog_Dialog.defaultProps = {
className: '',
mask: true,
visible: false,
keyboard: true,
closable: true,
maskClosable: true,
destroyOnClose: false,
prefixCls: 'rc-dialog',
focusTriggerAfterClose: true
};
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("1OyB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("vuIU");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("JX7q");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/inherits.js
var inherits = __webpack_require__("Ji7U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createSuper.js + 1 modules
var createSuper = __webpack_require__("LK+K");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var esm_defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("U8pU");
// EXTERNAL MODULE: ./node_modules/rc-util/es/raf.js
var raf = __webpack_require__("wgJM");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Portal.js
var Portal = __webpack_require__("QC+M");
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/canUseDom.js
var canUseDom = __webpack_require__("MNnm");
// EXTERNAL MODULE: ./node_modules/rc-util/es/getScrollBarSize.js
var getScrollBarSize = __webpack_require__("qx4F");
// CONCATENATED MODULE: ./node_modules/rc-util/es/setStyle.js
/**
* Easy to set element style, return previous style
* IE browser compatible(IE browser doesn't merge overflow style, need to set it separately)
* https://github.com/ant-design/ant-design/issues/19393
*
*/
function setStyle(style) {
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!style) {
return {};
}
var _options$element = options.element,
element = _options$element === void 0 ? document.body : _options$element;
var oldStyle = {};
var styleKeys = Object.keys(style);
// IE browser compatible
styleKeys.forEach(function (key) {
oldStyle[key] = element.style[key];
});
styleKeys.forEach(function (key) {
element.style[key] = style[key];
});
return oldStyle;
}
/* harmony default export */ var es_setStyle = (setStyle);
// CONCATENATED MODULE: ./node_modules/rc-util/es/switchScrollingEffect.js
function isBodyOverflowing() {
return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight) && window.innerWidth > document.body.offsetWidth;
}
var cacheStyle = {};
/* harmony default export */ var switchScrollingEffect = (function (close) {
if (!isBodyOverflowing() && !close) {
return;
}
// https://github.com/ant-design/ant-design/issues/19729
var scrollingEffectClassName = 'ant-scrolling-effect';
var scrollingEffectClassNameReg = new RegExp("".concat(scrollingEffectClassName), 'g');
var bodyClassName = document.body.className;
if (close) {
if (!scrollingEffectClassNameReg.test(bodyClassName)) return;
es_setStyle(cacheStyle);
cacheStyle = {};
document.body.className = bodyClassName.replace(scrollingEffectClassNameReg, '').trim();
return;
}
var scrollBarSize = Object(getScrollBarSize["a" /* default */])();
if (scrollBarSize) {
cacheStyle = es_setStyle({
position: 'relative',
width: "calc(100% - ".concat(scrollBarSize, "px)")
});
if (!scrollingEffectClassNameReg.test(bodyClassName)) {
var addClassName = "".concat(bodyClassName, " ").concat(scrollingEffectClassName);
document.body.className = addClassName.trim();
}
}
});
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__("KQm4");
// CONCATENATED MODULE: ./node_modules/rc-util/es/Dom/scrollLocker.js
var scrollLocker_uuid = 0;
var locks = [];
var scrollLocker_scrollingEffectClassName = 'ant-scrolling-effect';
var scrollLocker_scrollingEffectClassNameReg = new RegExp("".concat(scrollLocker_scrollingEffectClassName), 'g');
// https://github.com/ant-design/ant-design/issues/19340
// https://github.com/ant-design/ant-design/issues/19332
var scrollLocker_cacheStyle = new Map();
var scrollLocker_ScrollLocker = /*#__PURE__*/Object(createClass["a" /* default */])(function ScrollLocker(_options) {
var _this = this;
Object(classCallCheck["a" /* default */])(this, ScrollLocker);
Object(esm_defineProperty["a" /* default */])(this, "lockTarget", void 0);
Object(esm_defineProperty["a" /* default */])(this, "options", void 0);
Object(esm_defineProperty["a" /* default */])(this, "getContainer", function () {
var _this$options;
return (_this$options = _this.options) === null || _this$options === void 0 ? void 0 : _this$options.container;
});
// if options change...
Object(esm_defineProperty["a" /* default */])(this, "reLock", function (options) {
var findLock = locks.find(function (_ref) {
var target = _ref.target;
return target === _this.lockTarget;
});
if (findLock) {
_this.unLock();
}
_this.options = options;
if (findLock) {
findLock.options = options;
_this.lock();
}
});
Object(esm_defineProperty["a" /* default */])(this, "lock", function () {
var _this$options3;
// If lockTarget exist return
if (locks.some(function (_ref2) {
var target = _ref2.target;
return target === _this.lockTarget;
})) {
return;
}
// If same container effect, return
if (locks.some(function (_ref3) {
var _this$options2;
var options = _ref3.options;
return (options === null || options === void 0 ? void 0 : options.container) === ((_this$options2 = _this.options) === null || _this$options2 === void 0 ? void 0 : _this$options2.container);
})) {
locks = [].concat(Object(toConsumableArray["a" /* default */])(locks), [{
target: _this.lockTarget,
options: _this.options
}]);
return;
}
var scrollBarSize = 0;
var container = ((_this$options3 = _this.options) === null || _this$options3 === void 0 ? void 0 : _this$options3.container) || document.body;
if (container === document.body && window.innerWidth - document.documentElement.clientWidth > 0 || container.scrollHeight > container.clientHeight) {
if (getComputedStyle(container).overflow !== 'hidden') {
scrollBarSize = Object(getScrollBarSize["a" /* default */])();
}
}
var containerClassName = container.className;
if (locks.filter(function (_ref4) {
var _this$options4;
var options = _ref4.options;
return (options === null || options === void 0 ? void 0 : options.container) === ((_this$options4 = _this.options) === null || _this$options4 === void 0 ? void 0 : _this$options4.container);
}).length === 0) {
scrollLocker_cacheStyle.set(container, es_setStyle({
width: scrollBarSize !== 0 ? "calc(100% - ".concat(scrollBarSize, "px)") : undefined,
overflow: 'hidden',
overflowX: 'hidden',
overflowY: 'hidden'
}, {
element: container
}));
}
// https://github.com/ant-design/ant-design/issues/19729
if (!scrollLocker_scrollingEffectClassNameReg.test(containerClassName)) {
var addClassName = "".concat(containerClassName, " ").concat(scrollLocker_scrollingEffectClassName);
container.className = addClassName.trim();
}
locks = [].concat(Object(toConsumableArray["a" /* default */])(locks), [{
target: _this.lockTarget,
options: _this.options
}]);
});
Object(esm_defineProperty["a" /* default */])(this, "unLock", function () {
var _this$options5;
var findLock = locks.find(function (_ref5) {
var target = _ref5.target;
return target === _this.lockTarget;
});
locks = locks.filter(function (_ref6) {
var target = _ref6.target;
return target !== _this.lockTarget;
});
if (!findLock || locks.some(function (_ref7) {
var _findLock$options;
var options = _ref7.options;
return (options === null || options === void 0 ? void 0 : options.container) === ((_findLock$options = findLock.options) === null || _findLock$options === void 0 ? void 0 : _findLock$options.container);
})) {
return;
}
// Remove Effect
var container = ((_this$options5 = _this.options) === null || _this$options5 === void 0 ? void 0 : _this$options5.container) || document.body;
var containerClassName = container.className;
if (!scrollLocker_scrollingEffectClassNameReg.test(containerClassName)) return;
es_setStyle(scrollLocker_cacheStyle.get(container), {
element: container
});
scrollLocker_cacheStyle.delete(container);
container.className = container.className.replace(scrollLocker_scrollingEffectClassNameReg, '').trim();
});
// eslint-disable-next-line no-plusplus
this.lockTarget = scrollLocker_uuid++;
this.options = _options;
});
// CONCATENATED MODULE: ./node_modules/rc-util/es/PortalWrapper.js
/* eslint-disable no-underscore-dangle,react/require-default-props */
var openCount = 0;
var supportDom = Object(canUseDom["a" /* default */])();
/** @private Test usage only */
function getOpenCount() {
return false ? undefined : 0;
}
// https://github.com/ant-design/ant-design/issues/19340
// https://github.com/ant-design/ant-design/issues/19332
var cacheOverflow = {};
var PortalWrapper_getParent = function getParent(getContainer) {
if (!supportDom) {
return null;
}
if (getContainer) {
if (typeof getContainer === 'string') {
return document.querySelectorAll(getContainer)[0];
}
if (typeof getContainer === 'function') {
return getContainer();
}
if (Object(esm_typeof["a" /* default */])(getContainer) === 'object' && getContainer instanceof window.HTMLElement) {
return getContainer;
}
}
return document.body;
};
var PortalWrapper_PortalWrapper = /*#__PURE__*/function (_React$Component) {
Object(inherits["a" /* default */])(PortalWrapper, _React$Component);
var _super = Object(createSuper["a" /* default */])(PortalWrapper);
function PortalWrapper(props) {
var _this;
Object(classCallCheck["a" /* default */])(this, PortalWrapper);
_this = _super.call(this, props);
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "container", void 0);
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "componentRef", /*#__PURE__*/react["createRef"]());
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "rafId", void 0);
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "scrollLocker", void 0);
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "renderComponent", void 0);
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "updateScrollLocker", function (prevProps) {
var _ref = prevProps || {},
prevVisible = _ref.visible;
var _this$props = _this.props,
getContainer = _this$props.getContainer,
visible = _this$props.visible;
if (visible && visible !== prevVisible && supportDom && PortalWrapper_getParent(getContainer) !== _this.scrollLocker.getContainer()) {
_this.scrollLocker.reLock({
container: PortalWrapper_getParent(getContainer)
});
}
});
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "updateOpenCount", function (prevProps) {
var _ref2 = prevProps || {},
prevVisible = _ref2.visible,
prevGetContainer = _ref2.getContainer;
var _this$props2 = _this.props,
visible = _this$props2.visible,
getContainer = _this$props2.getContainer;
// Update count
if (visible !== prevVisible && supportDom && PortalWrapper_getParent(getContainer) === document.body) {
if (visible && !prevVisible) {
openCount += 1;
} else if (prevProps) {
openCount -= 1;
}
}
// Clean up container if needed
var getContainerIsFunc = typeof getContainer === 'function' && typeof prevGetContainer === 'function';
if (getContainerIsFunc ? getContainer.toString() !== prevGetContainer.toString() : getContainer !== prevGetContainer) {
_this.removeCurrentContainer();
}
});
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "attachToParent", function () {
var force = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
if (force || _this.container && !_this.container.parentNode) {
var parent = PortalWrapper_getParent(_this.props.getContainer);
if (parent) {
parent.appendChild(_this.container);
return true;
}
return false;
}
return true;
});
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "getContainer", function () {
if (!supportDom) {
return null;
}
if (!_this.container) {
_this.container = document.createElement('div');
_this.attachToParent(true);
}
_this.setWrapperClassName();
return _this.container;
});
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "setWrapperClassName", function () {
var wrapperClassName = _this.props.wrapperClassName;
if (_this.container && wrapperClassName && wrapperClassName !== _this.container.className) {
_this.container.className = wrapperClassName;
}
});
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "removeCurrentContainer", function () {
var _this$container;
// Portal will remove from `parentNode`.
// Let's handle this again to avoid refactor issue.
(_this$container = _this.container) === null || _this$container === void 0 || (_this$container = _this$container.parentNode) === null || _this$container === void 0 || _this$container.removeChild(_this.container);
});
/**
* Enhance ./switchScrollingEffect
* 1. Simulate document body scroll bar with
* 2. Record body has overflow style and recover when all of PortalWrapper invisible
* 3. Disable body scroll when PortalWrapper has open
*
* @memberof PortalWrapper
*/
Object(esm_defineProperty["a" /* default */])(Object(assertThisInitialized["a" /* default */])(_this), "switchScrollingEffect", function () {
if (openCount === 1 && !Object.keys(cacheOverflow).length) {
switchScrollingEffect();
// Must be set after switchScrollingEffect
cacheOverflow = es_setStyle({
overflow: 'hidden',
overflowX: 'hidden',
overflowY: 'hidden'
});
} else if (!openCount) {
es_setStyle(cacheOverflow);
cacheOverflow = {};
switchScrollingEffect(true);
}
});
_this.scrollLocker = new scrollLocker_ScrollLocker({
container: PortalWrapper_getParent(props.getContainer)
});
return _this;
}
Object(createClass["a" /* default */])(PortalWrapper, [{
key: "componentDidMount",
value: function componentDidMount() {
var _this2 = this;
this.updateOpenCount();
if (!this.attachToParent()) {
this.rafId = Object(raf["a" /* default */])(function () {
_this2.forceUpdate();
});
}
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
this.updateOpenCount(prevProps);
this.updateScrollLocker(prevProps);
this.setWrapperClassName();
this.attachToParent();
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
var _this$props3 = this.props,
visible = _this$props3.visible,
getContainer = _this$props3.getContainer;
if (supportDom && PortalWrapper_getParent(getContainer) === document.body) {
// 离开时不会 render 导到离开时数值不变,改用 func 。。
openCount = visible && openCount ? openCount - 1 : openCount;
}
this.removeCurrentContainer();
raf["a" /* default */].cancel(this.rafId);
}
}, {
key: "render",
value: function render() {
var _this$props4 = this.props,
children = _this$props4.children,
forceRender = _this$props4.forceRender,
visible = _this$props4.visible;
var portal = null;
var childProps = {
getOpenCount: function getOpenCount() {
return openCount;
},
getContainer: this.getContainer,
switchScrollingEffect: this.switchScrollingEffect,
scrollLocker: this.scrollLocker
};
if (forceRender || visible || this.componentRef.current) {
portal = /*#__PURE__*/react["createElement"](Portal["a" /* default */], {
getContainer: this.getContainer,
ref: this.componentRef
}, children(childProps));
}
return portal;
}
}]);
return PortalWrapper;
}(react["Component"]);
/* harmony default export */ var es_PortalWrapper = (PortalWrapper_PortalWrapper);
// CONCATENATED MODULE: ./node_modules/antd/node_modules/rc-dialog/es/DialogWrap.js
var DialogWrap_extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
// fix issue #10656
/*
* getContainer remarks
* Custom container should not be return, because in the Portal component, it will remove the
* return container element here, if the custom container is the only child of it's component,
* like issue #10656, It will has a conflict with removeChild method in react-dom.
* So here should add a child (div element) to custom container.
* */
/* harmony default export */ var DialogWrap = (function (props) {
var visible = props.visible,
getContainer = props.getContainer,
forceRender = props.forceRender;
// 渲染在当前 dom 里;
if (getContainer === false) {
return react["createElement"](es_Dialog, DialogWrap_extends({}, props, { getOpenCount: function getOpenCount() {
return 2;
} }));
}
return react["createElement"](es_PortalWrapper, { visible: visible, forceRender: forceRender, getContainer: getContainer }, function (childProps) {
return react["createElement"](es_Dialog, DialogWrap_extends({}, props, childProps));
});
});
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/rc-util/es/Dom/addEventListener.js
var addEventListener = __webpack_require__("zT1h");
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CloseOutlined.js
var CloseOutlined = __webpack_require__("V/uB");
var CloseOutlined_default = /*#__PURE__*/__webpack_require__.n(CloseOutlined);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("J4zp");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
var helpers_toConsumableArray = __webpack_require__("RIqP");
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(helpers_toConsumableArray);
// CONCATENATED MODULE: ./node_modules/antd/es/_util/hooks/usePatchElement.js
function usePatchElement() {
var _React$useState = react["useState"]([]),
_React$useState2 = slicedToArray_default()(_React$useState, 2),
elements = _React$useState2[0],
setElements = _React$useState2[1];
function patchElement(element) {
// append a new element to elements (and create a new ref)
setElements(function (originElements) {
return [].concat(toConsumableArray_default()(originElements), [element]);
}); // return a function that removes the new element out of elements (and create a new ref)
// it works a little like useEffect
return function () {
setElements(function (originElements) {
return originElements.filter(function (ele) {
return ele !== element;
});
});
};
}
return [elements, patchElement];
}
// EXTERNAL MODULE: ./node_modules/antd/es/button/index.js
var es_button = __webpack_require__("2/Rp");
// EXTERNAL MODULE: ./node_modules/antd/es/button/button.js + 5 modules
var button_button = __webpack_require__("zvFY");
// CONCATENATED MODULE: ./node_modules/antd/es/modal/ActionButton.js
var ActionButton_ActionButton = function ActionButton(props) {
var clickedRef = react["useRef"](false);
var ref = react["useRef"]();
var _React$useState = react["useState"](false),
_React$useState2 = slicedToArray_default()(_React$useState, 2),
loading = _React$useState2[0],
setLoading = _React$useState2[1];
react["useEffect"](function () {
var timeoutId;
if (props.autoFocus) {
var $this = ref.current;
timeoutId = setTimeout(function () {
return $this.focus();
});
}
return function () {
if (timeoutId) {
clearTimeout(timeoutId);
}
};
}, []);
var handlePromiseOnOk = function handlePromiseOnOk(returnValueOfOnOk) {
var closeModal = props.closeModal;
if (!returnValueOfOnOk || !returnValueOfOnOk.then) {
return;
}
setLoading(true);
returnValueOfOnOk.then(function () {
// It's unnecessary to set loading=false, for the Modal will be unmounted after close.
// setState({ loading: false });
closeModal.apply(void 0, arguments);
}, function (e) {
// Emit error when catch promise reject
// eslint-disable-next-line no-console
console.error(e); // See: https://github.com/ant-design/ant-design/issues/6183
setLoading(false);
clickedRef.current = false;
});
};
var onClick = function onClick() {
var actionFn = props.actionFn,
closeModal = props.closeModal;
if (clickedRef.current) {
return;
}
clickedRef.current = true;
if (!actionFn) {
closeModal();
return;
}
var returnValueOfOnOk;
if (actionFn.length) {
returnValueOfOnOk = actionFn(closeModal); // https://github.com/ant-design/ant-design/issues/23358
clickedRef.current = false;
} else {
returnValueOfOnOk = actionFn();
if (!returnValueOfOnOk) {
closeModal();
return;
}
}
handlePromiseOnOk(returnValueOfOnOk);
};
var type = props.type,
children = props.children,
prefixCls = props.prefixCls,
buttonProps = props.buttonProps;
return /*#__PURE__*/react["createElement"](es_button["a" /* default */], extends_default()({}, Object(button_button["a" /* convertLegacyProps */])(type), {
onClick: onClick,
loading: loading,
prefixCls: prefixCls
}, buttonProps, {
ref: ref
}), children);
};
/* harmony default export */ var modal_ActionButton = (ActionButton_ActionButton);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/devWarning.js
var devWarning = __webpack_require__("uaoM");
// CONCATENATED MODULE: ./node_modules/antd/es/modal/ConfirmDialog.js
var ConfirmDialog_ConfirmDialog = function ConfirmDialog(props) {
var icon = props.icon,
onCancel = props.onCancel,
onOk = props.onOk,
close = props.close,
zIndex = props.zIndex,
afterClose = props.afterClose,
visible = props.visible,
keyboard = props.keyboard,
centered = props.centered,
getContainer = props.getContainer,
maskStyle = props.maskStyle,
okText = props.okText,
okButtonProps = props.okButtonProps,
cancelText = props.cancelText,
cancelButtonProps = props.cancelButtonProps,
direction = props.direction,
prefixCls = props.prefixCls,
rootPrefixCls = props.rootPrefixCls;
Object(devWarning["a" /* default */])(!(typeof icon === 'string' && icon.length > 2), 'Modal', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon")); // 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon
var okType = props.okType || 'primary';
var contentPrefixCls = "".concat(prefixCls, "-confirm"); // 默认为 true保持向下兼容
var okCancel = 'okCancel' in props ? props.okCancel : true;
var width = props.width || 416;
var style = props.style || {};
var mask = props.mask === undefined ? true : props.mask; // 默认为 false保持旧版默认行为
var maskClosable = props.maskClosable === undefined ? false : props.maskClosable;
var autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';
var transitionName = props.transitionName || 'zoom';
var maskTransitionName = props.maskTransitionName || 'fade';
var classString = classnames_default()(contentPrefixCls, "".concat(contentPrefixCls, "-").concat(props.type), defineProperty_default()({}, "".concat(contentPrefixCls, "-rtl"), direction === 'rtl'), props.className);
var cancelButton = okCancel && /*#__PURE__*/react["createElement"](modal_ActionButton, {
actionFn: onCancel,
closeModal: close,
autoFocus: autoFocusButton === 'cancel',
buttonProps: cancelButtonProps,
prefixCls: "".concat(rootPrefixCls, "-btn")
}, cancelText);
return /*#__PURE__*/react["createElement"](modal_Modal, {
prefixCls: prefixCls,
className: classString,
wrapClassName: classnames_default()(defineProperty_default()({}, "".concat(contentPrefixCls, "-centered"), !!props.centered)),
onCancel: function onCancel() {
return close({
triggerCancel: true
});
},
visible: visible,
title: "",
transitionName: transitionName,
footer: "",
maskTransitionName: maskTransitionName,
mask: mask,
maskClosable: maskClosable,
maskStyle: maskStyle,
style: style,
width: width,
zIndex: zIndex,
afterClose: afterClose,
keyboard: keyboard,
centered: centered,
getContainer: getContainer
}, /*#__PURE__*/react["createElement"]("div", {
className: "".concat(contentPrefixCls, "-body-wrapper")
}, /*#__PURE__*/react["createElement"]("div", {
className: "".concat(contentPrefixCls, "-body")
}, icon, props.title === undefined ? null : /*#__PURE__*/react["createElement"]("span", {
className: "".concat(contentPrefixCls, "-title")
}, props.title), /*#__PURE__*/react["createElement"]("div", {
className: "".concat(contentPrefixCls, "-content")
}, props.content)), /*#__PURE__*/react["createElement"]("div", {
className: "".concat(contentPrefixCls, "-btns")
}, cancelButton, /*#__PURE__*/react["createElement"](modal_ActionButton, {
type: okType,
actionFn: onOk,
closeModal: close,
autoFocus: autoFocusButton === 'ok',
buttonProps: okButtonProps,
prefixCls: "".concat(rootPrefixCls, "-btn")
}, okText))));
};
/* harmony default export */ var modal_ConfirmDialog = (ConfirmDialog_ConfirmDialog);
// EXTERNAL MODULE: ./node_modules/antd/es/locale/default.js + 4 modules
var locale_default = __webpack_require__("ZvpZ");
// EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules
var LocaleReceiver = __webpack_require__("YMnH");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var context = __webpack_require__("H84U");
// CONCATENATED MODULE: ./node_modules/antd/es/modal/useModal/HookModal.js
var HookModal_HookModal = function HookModal(_ref, ref) {
var afterClose = _ref.afterClose,
config = _ref.config;
var _React$useState = react["useState"](true),
_React$useState2 = slicedToArray_default()(_React$useState, 2),
visible = _React$useState2[0],
setVisible = _React$useState2[1];
var _React$useState3 = react["useState"](config),
_React$useState4 = slicedToArray_default()(_React$useState3, 2),
innerConfig = _React$useState4[0],
setInnerConfig = _React$useState4[1];
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
direction = _React$useContext.direction,
getPrefixCls = _React$useContext.getPrefixCls;
var prefixCls = getPrefixCls('modal');
var rootPrefixCls = getPrefixCls();
function close() {
setVisible(false);
}
react["useImperativeHandle"](ref, function () {
return {
destroy: close,
update: function update(newConfig) {
setInnerConfig(function (originConfig) {
return extends_default()(extends_default()({}, originConfig), newConfig);
});
}
};
});
return /*#__PURE__*/react["createElement"](LocaleReceiver["a" /* default */], {
componentName: "Modal",
defaultLocale: locale_default["a" /* default */].Modal
}, function (modalLocale) {
return /*#__PURE__*/react["createElement"](modal_ConfirmDialog, extends_default()({
prefixCls: prefixCls,
rootPrefixCls: rootPrefixCls
}, innerConfig, {
close: close,
visible: visible,
afterClose: afterClose,
okText: innerConfig.okText || (innerConfig.okCancel ? modalLocale.okText : modalLocale.justOkText),
direction: direction,
cancelText: innerConfig.cancelText || modalLocale.cancelText
}));
});
};
/* harmony default export */ var useModal_HookModal = (/*#__PURE__*/react["forwardRef"](HookModal_HookModal));
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/InfoCircleOutlined.js
var InfoCircleOutlined = __webpack_require__("ESPI");
var InfoCircleOutlined_default = /*#__PURE__*/__webpack_require__.n(InfoCircleOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CheckCircleOutlined.js
var CheckCircleOutlined = __webpack_require__("0G8d");
var CheckCircleOutlined_default = /*#__PURE__*/__webpack_require__.n(CheckCircleOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CloseCircleOutlined.js
var CloseCircleOutlined = __webpack_require__("Z/ur");
var CloseCircleOutlined_default = /*#__PURE__*/__webpack_require__.n(CloseCircleOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/ExclamationCircleOutlined.js
var ExclamationCircleOutlined = __webpack_require__("xddM");
var ExclamationCircleOutlined_default = /*#__PURE__*/__webpack_require__.n(ExclamationCircleOutlined);
// EXTERNAL MODULE: ./node_modules/antd/es/modal/locale.js
var modal_locale = __webpack_require__("ul5b");
// CONCATENATED MODULE: ./node_modules/antd/es/modal/confirm.js
var confirm_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var defaultRootPrefixCls = 'ant';
function getRootPrefixCls() {
return defaultRootPrefixCls;
}
function confirm_confirm(config) {
var div = document.createElement('div');
document.body.appendChild(div); // eslint-disable-next-line no-use-before-define
var currentConfig = extends_default()(extends_default()({}, config), {
close: close,
visible: true
});
function destroy() {
var unmountResult = react_dom["unmountComponentAtNode"](div);
if (unmountResult && div.parentNode) {
div.parentNode.removeChild(div);
}
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var triggerCancel = args.some(function (param) {
return param && param.triggerCancel;
});
if (config.onCancel && triggerCancel) {
config.onCancel.apply(config, args);
}
for (var i = 0; i < destroyFns.length; i++) {
var fn = destroyFns[i]; // eslint-disable-next-line no-use-before-define
if (fn === close) {
destroyFns.splice(i, 1);
break;
}
}
}
function render(_a) {
var okText = _a.okText,
cancelText = _a.cancelText,
prefixCls = _a.prefixCls,
props = confirm_rest(_a, ["okText", "cancelText", "prefixCls"]);
/**
* https://github.com/ant-design/ant-design/issues/23623
* Sync render blocks React event. Let's make this async.
*/
setTimeout(function () {
var runtimeLocale = Object(modal_locale["b" /* getConfirmLocale */])();
react_dom["render"]( /*#__PURE__*/react["createElement"](modal_ConfirmDialog, extends_default()({}, props, {
prefixCls: prefixCls || "".concat(getRootPrefixCls(), "-modal"),
rootPrefixCls: getRootPrefixCls(),
okText: okText || (props.okCancel ? runtimeLocale.okText : runtimeLocale.justOkText),
cancelText: cancelText || runtimeLocale.cancelText
})), div);
});
}
function close() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
currentConfig = extends_default()(extends_default()({}, currentConfig), {
visible: false,
afterClose: destroy.bind.apply(destroy, [this].concat(args))
});
render(currentConfig);
}
function update(newConfig) {
currentConfig = extends_default()(extends_default()({}, currentConfig), newConfig);
render(currentConfig);
}
render(currentConfig);
destroyFns.push(close);
return {
destroy: close,
update: update
};
}
function withWarn(props) {
return extends_default()({
type: 'warning',
icon: /*#__PURE__*/react["createElement"](ExclamationCircleOutlined_default.a, null),
okCancel: false
}, props);
}
function withInfo(props) {
return extends_default()({
type: 'info',
icon: /*#__PURE__*/react["createElement"](InfoCircleOutlined_default.a, null),
okCancel: false
}, props);
}
function withSuccess(props) {
return extends_default()({
type: 'success',
icon: /*#__PURE__*/react["createElement"](CheckCircleOutlined_default.a, null),
okCancel: false
}, props);
}
function withError(props) {
return extends_default()({
type: 'error',
icon: /*#__PURE__*/react["createElement"](CloseCircleOutlined_default.a, null),
okCancel: false
}, props);
}
function withConfirm(props) {
return extends_default()({
type: 'confirm',
icon: /*#__PURE__*/react["createElement"](ExclamationCircleOutlined_default.a, null),
okCancel: true
}, props);
}
function globalConfig(_ref) {
var rootPrefixCls = _ref.rootPrefixCls;
if (rootPrefixCls) {
defaultRootPrefixCls = rootPrefixCls;
}
}
// CONCATENATED MODULE: ./node_modules/antd/es/modal/useModal/index.js
var useModal_uuid = 0;
function useModal() {
var _usePatchElement = usePatchElement(),
_usePatchElement2 = slicedToArray_default()(_usePatchElement, 2),
elements = _usePatchElement2[0],
patchElement = _usePatchElement2[1];
function getConfirmFunc(withFunc) {
return function hookConfirm(config) {
useModal_uuid += 1;
var modalRef = /*#__PURE__*/react["createRef"]();
var closeFunc;
var modal = /*#__PURE__*/react["createElement"](useModal_HookModal, {
key: "modal-".concat(useModal_uuid),
config: withFunc(config),
ref: modalRef,
afterClose: function afterClose() {
closeFunc();
}
});
closeFunc = patchElement(modal);
return {
destroy: function destroy() {
if (modalRef.current) {
modalRef.current.destroy();
}
},
update: function update(newConfig) {
if (modalRef.current) {
modalRef.current.update(newConfig);
}
}
};
};
}
return [{
info: getConfirmFunc(withInfo),
success: getConfirmFunc(withSuccess),
error: getConfirmFunc(withError),
warning: getConfirmFunc(withWarn),
confirm: getConfirmFunc(withConfirm)
}, /*#__PURE__*/react["createElement"](react["Fragment"], null, elements)];
}
// CONCATENATED MODULE: ./node_modules/antd/es/modal/Modal.js
var Modal_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var Modal_mousePosition;
var destroyFns = []; // ref: https://github.com/ant-design/ant-design/issues/15795
var getClickPosition = function getClickPosition(e) {
Modal_mousePosition = {
x: e.pageX,
y: e.pageY
}; // 100ms 内发生过点击事件,则从点击位置动画展示
// 否则直接 zoom 展示
// 这样可以兼容非点击方式展开
setTimeout(function () {
Modal_mousePosition = null;
}, 100);
}; // 只有点击事件支持从鼠标位置动画展开
if (typeof window !== 'undefined' && window.document && window.document.documentElement) {
Object(addEventListener["a" /* default */])(document.documentElement, 'click', getClickPosition);
}
var Modal_Modal = function Modal(props) {
var _classNames;
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getContextPopupContainer = _React$useContext.getPopupContainer,
getPrefixCls = _React$useContext.getPrefixCls,
direction = _React$useContext.direction;
var handleCancel = function handleCancel(e) {
var onCancel = props.onCancel;
if (onCancel) {
onCancel(e);
}
};
var handleOk = function handleOk(e) {
var onOk = props.onOk;
if (onOk) {
onOk(e);
}
};
var renderFooter = function renderFooter(locale) {
var okText = props.okText,
okType = props.okType,
cancelText = props.cancelText,
confirmLoading = props.confirmLoading;
return /*#__PURE__*/react["createElement"](react["Fragment"], null, /*#__PURE__*/react["createElement"](es_button["a" /* default */], extends_default()({
onClick: handleCancel
}, props.cancelButtonProps), cancelText || locale.cancelText), /*#__PURE__*/react["createElement"](es_button["a" /* default */], extends_default()({}, Object(button_button["a" /* convertLegacyProps */])(okType), {
loading: confirmLoading,
onClick: handleOk
}, props.okButtonProps), okText || locale.okText));
};
var customizePrefixCls = props.prefixCls,
footer = props.footer,
visible = props.visible,
wrapClassName = props.wrapClassName,
centered = props.centered,
getContainer = props.getContainer,
closeIcon = props.closeIcon,
restProps = Modal_rest(props, ["prefixCls", "footer", "visible", "wrapClassName", "centered", "getContainer", "closeIcon"]);
var prefixCls = getPrefixCls('modal', customizePrefixCls);
var defaultFooter = /*#__PURE__*/react["createElement"](LocaleReceiver["a" /* default */], {
componentName: "Modal",
defaultLocale: Object(modal_locale["b" /* getConfirmLocale */])()
}, renderFooter);
var closeIconToRender = /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-close-x")
}, closeIcon || /*#__PURE__*/react["createElement"](CloseOutlined_default.a, {
className: "".concat(prefixCls, "-close-icon")
}));
var wrapClassNameExtended = classnames_default()(wrapClassName, (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-centered"), !!centered), defineProperty_default()(_classNames, "".concat(prefixCls, "-wrap-rtl"), direction === 'rtl'), _classNames));
return /*#__PURE__*/react["createElement"](DialogWrap, extends_default()({}, restProps, {
getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,
prefixCls: prefixCls,
wrapClassName: wrapClassNameExtended,
footer: footer === undefined ? defaultFooter : footer,
visible: visible,
mousePosition: Modal_mousePosition,
onClose: handleCancel,
closeIcon: closeIconToRender
}));
};
Modal_Modal.useModal = useModal;
Modal_Modal.defaultProps = {
width: 520,
transitionName: 'zoom',
maskTransitionName: 'fade',
confirmLoading: false,
visible: false,
okType: 'primary'
};
/* harmony default export */ var modal_Modal = (Modal_Modal);
// CONCATENATED MODULE: ./node_modules/antd/es/modal/index.js
function modalWarn(props) {
return confirm_confirm(withWarn(props));
}
var es_modal_Modal = modal_Modal;
es_modal_Modal.info = function infoFn(props) {
return confirm_confirm(withInfo(props));
};
es_modal_Modal.success = function successFn(props) {
return confirm_confirm(withSuccess(props));
};
es_modal_Modal.error = function errorFn(props) {
return confirm_confirm(withError(props));
};
es_modal_Modal.warning = modalWarn;
es_modal_Modal.warn = modalWarn;
es_modal_Modal.confirm = function confirmFn(props) {
return confirm_confirm(withConfirm(props));
};
es_modal_Modal.destroyAll = function destroyAllFn() {
while (destroyFns.length) {
var close = destroyFns.pop();
if (close) {
close();
}
}
};
es_modal_Modal.config = globalConfig;
/* harmony default export */ var es_modal = __webpack_exports__["a"] = (es_modal_Modal);
/***/ }),
/***/ "kNcU":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.log2.js ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var log = Math.log;
var LN2 = Math.LN2;
// `Math.log2` method
// https://tc39.github.io/ecma262/#sec-math.log2
$({ target: 'Math', stat: true }, {
log2: function log2(x) {
return log(x) / LN2;
}
});
/***/ }),
/***/ "kOOl":
/*!***********************************************!*\
!*** ./node_modules/core-js/internals/uid.js ***!
\***********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
var id = 0;
var postfix = Math.random();
module.exports = function (key) {
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
};
/***/ }),
/***/ "kPKH":
/*!*******************************************!*\
!*** ./node_modules/antd/es/col/index.js ***!
\*******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../grid */ "/kpp");
/* harmony default export */ __webpack_exports__["a"] = (_grid__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"]);
/***/ }),
/***/ "kRJp":
/*!**************************************************************************!*\
!*** ./node_modules/core-js/internals/create-non-enumerable-property.js ***!
\**************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
module.exports = DESCRIPTORS ? function (object, key, value) {
return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));
} : function (object, key, value) {
object[key] = value;
return object;
};
/***/ }),
/***/ "kSko":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.number.is-nan.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Number.isNaN` method
// https://tc39.github.io/ecma262/#sec-number.isnan
$({ target: 'Number', stat: true }, {
isNaN: function isNaN(number) {
// eslint-disable-next-line no-self-compare
return number != number;
}
});
/***/ }),
/***/ "kVK+":
/*!***************************************!*\
!*** ./node_modules/ieee754/index.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
exports.read = function (buffer, offset, isLE, mLen, nBytes) {
var e, m
var eLen = (nBytes * 8) - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var nBits = -7
var i = isLE ? (nBytes - 1) : 0
var d = isLE ? -1 : 1
var s = buffer[offset + i]
i += d
e = s & ((1 << (-nBits)) - 1)
s >>= (-nBits)
nBits += eLen
for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
m = e & ((1 << (-nBits)) - 1)
e >>= (-nBits)
nBits += mLen
for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
if (e === 0) {
e = 1 - eBias
} else if (e === eMax) {
return m ? NaN : ((s ? -1 : 1) * Infinity)
} else {
m = m + Math.pow(2, mLen)
e = e - eBias
}
return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
}
exports.write = function (buffer, value, offset, isLE, mLen, nBytes) {
var e, m, c
var eLen = (nBytes * 8) - mLen - 1
var eMax = (1 << eLen) - 1
var eBias = eMax >> 1
var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
var i = isLE ? 0 : (nBytes - 1)
var d = isLE ? 1 : -1
var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0
value = Math.abs(value)
if (isNaN(value) || value === Infinity) {
m = isNaN(value) ? 1 : 0
e = eMax
} else {
e = Math.floor(Math.log(value) / Math.LN2)
if (value * (c = Math.pow(2, -e)) < 1) {
e--
c *= 2
}
if (e + eBias >= 1) {
value += rt / c
} else {
value += rt * Math.pow(2, 1 - eBias)
}
if (value * c >= 2) {
e++
c /= 2
}
if (e + eBias >= eMax) {
m = 0
e = eMax
} else if (e + eBias >= 1) {
m = ((value * c) - 1) * Math.pow(2, mLen)
e = e + eBias
} else {
m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
e = 0
}
}
for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
e = (e << mLen) | m
eLen += mLen
for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
buffer[offset + i - d] |= s * 128
}
/***/ }),
/***/ "kaz8":
/*!************************************************************!*\
!*** ./node_modules/antd/es/checkbox/index.js + 2 modules ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/assertThisInitialized.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/classCallCheck.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createClass.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createSuper.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/toConsumableArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js because of ./node_modules/antd/es/input/Password.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-checkbox/es/index.js because of ./node_modules/antd/es/radio/radio.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
var classCallCheck = __webpack_require__("lwsE");
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
var createClass = __webpack_require__("W8MJ");
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("PJYZ");
var assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
var inherits = __webpack_require__("7W2i");
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createSuper.js
var createSuper = __webpack_require__("LQ03");
var createSuper_default = /*#__PURE__*/__webpack_require__.n(createSuper);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/rc-checkbox/es/index.js
var es = __webpack_require__("x1Ya");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__("RIqP");
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// EXTERNAL MODULE: ./node_modules/omit.js/es/index.js
var omit_js_es = __webpack_require__("BGR+");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var config_provider_context = __webpack_require__("H84U");
// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/Group.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var GroupContext = /*#__PURE__*/react["createContext"](null);
var Group_CheckboxGroup = /*#__PURE__*/function (_React$PureComponent) {
inherits_default()(CheckboxGroup, _React$PureComponent);
var _super = createSuper_default()(CheckboxGroup);
function CheckboxGroup(props) {
var _this;
classCallCheck_default()(this, CheckboxGroup);
_this = _super.call(this, props);
_this.cancelValue = function (value) {
_this.setState(function (_ref) {
var registeredValues = _ref.registeredValues;
return {
registeredValues: registeredValues.filter(function (val) {
return val !== value;
})
};
});
};
_this.registerValue = function (value) {
_this.setState(function (_ref2) {
var registeredValues = _ref2.registeredValues;
return {
registeredValues: [].concat(toConsumableArray_default()(registeredValues), [value])
};
});
};
_this.toggleOption = function (option) {
var registeredValues = _this.state.registeredValues;
var optionIndex = _this.state.value.indexOf(option.value);
var value = toConsumableArray_default()(_this.state.value);
if (optionIndex === -1) {
value.push(option.value);
} else {
value.splice(optionIndex, 1);
}
if (!('value' in _this.props)) {
_this.setState({
value: value
});
}
var onChange = _this.props.onChange;
if (onChange) {
var options = _this.getOptions();
onChange(value.filter(function (val) {
return registeredValues.indexOf(val) !== -1;
}).sort(function (a, b) {
var indexA = options.findIndex(function (opt) {
return opt.value === a;
});
var indexB = options.findIndex(function (opt) {
return opt.value === b;
});
return indexA - indexB;
}));
}
};
_this.renderGroup = function (_ref3) {
var getPrefixCls = _ref3.getPrefixCls,
direction = _ref3.direction;
var _assertThisInitialize = assertThisInitialized_default()(_this),
props = _assertThisInitialize.props,
state = _assertThisInitialize.state;
var customizePrefixCls = props.prefixCls,
className = props.className,
style = props.style,
options = props.options,
restProps = __rest(props, ["prefixCls", "className", "style", "options"]);
var prefixCls = getPrefixCls('checkbox', customizePrefixCls);
var groupPrefixCls = "".concat(prefixCls, "-group");
var domProps = Object(omit_js_es["a" /* default */])(restProps, ['children', 'defaultValue', 'value', 'onChange', 'disabled']);
var children = props.children;
if (options && options.length > 0) {
children = _this.getOptions().map(function (option) {
return /*#__PURE__*/react["createElement"](checkbox_Checkbox, {
prefixCls: prefixCls,
key: option.value.toString(),
disabled: 'disabled' in option ? option.disabled : props.disabled,
value: option.value,
checked: state.value.indexOf(option.value) !== -1,
onChange: option.onChange,
className: "".concat(groupPrefixCls, "-item"),
style: option.style
}, option.label);
});
}
var context = {
toggleOption: _this.toggleOption,
value: _this.state.value,
disabled: _this.props.disabled,
name: _this.props.name,
// https://github.com/ant-design/ant-design/issues/16376
registerValue: _this.registerValue,
cancelValue: _this.cancelValue
};
var classString = classnames_default()(groupPrefixCls, className, defineProperty_default()({}, "".concat(groupPrefixCls, "-rtl"), direction === 'rtl'));
return /*#__PURE__*/react["createElement"]("div", extends_default()({
className: classString,
style: style
}, domProps), /*#__PURE__*/react["createElement"](GroupContext.Provider, {
value: context
}, children));
};
_this.state = {
value: props.value || props.defaultValue || [],
registeredValues: []
};
return _this;
}
createClass_default()(CheckboxGroup, [{
key: "getOptions",
value: function getOptions() {
var options = this.props.options; // https://github.com/Microsoft/TypeScript/issues/7960
return options.map(function (option) {
if (typeof option === 'string') {
return {
label: option,
value: option
};
}
return option;
});
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/react["createElement"](config_provider_context["a" /* ConfigConsumer */], null, this.renderGroup);
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(nextProps) {
if ('value' in nextProps) {
return {
value: nextProps.value || []
};
}
return null;
}
}]);
return CheckboxGroup;
}(react["PureComponent"]);
Group_CheckboxGroup.defaultProps = {
options: []
};
/* harmony default export */ var Group = (Group_CheckboxGroup);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/devWarning.js
var devWarning = __webpack_require__("uaoM");
// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/Checkbox.js
var Checkbox_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var Checkbox_Checkbox = /*#__PURE__*/function (_React$PureComponent) {
inherits_default()(Checkbox, _React$PureComponent);
var _super = createSuper_default()(Checkbox);
function Checkbox() {
var _this;
classCallCheck_default()(this, Checkbox);
_this = _super.apply(this, arguments);
_this.saveCheckbox = function (node) {
_this.rcCheckbox = node;
};
_this.renderCheckbox = function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls,
direction = _ref.direction;
var _assertThisInitialize = assertThisInitialized_default()(_this),
props = _assertThisInitialize.props,
context = _assertThisInitialize.context;
var customizePrefixCls = props.prefixCls,
className = props.className,
children = props.children,
indeterminate = props.indeterminate,
style = props.style,
onMouseEnter = props.onMouseEnter,
onMouseLeave = props.onMouseLeave,
restProps = Checkbox_rest(props, ["prefixCls", "className", "children", "indeterminate", "style", "onMouseEnter", "onMouseLeave"]);
var checkboxGroup = context;
var prefixCls = getPrefixCls('checkbox', customizePrefixCls);
var checkboxProps = extends_default()({}, restProps);
if (checkboxGroup) {
checkboxProps.onChange = function () {
if (restProps.onChange) {
restProps.onChange.apply(restProps, arguments);
}
checkboxGroup.toggleOption({
label: children,
value: props.value
});
};
checkboxProps.name = checkboxGroup.name;
checkboxProps.checked = checkboxGroup.value.indexOf(props.value) !== -1;
checkboxProps.disabled = props.disabled || checkboxGroup.disabled;
}
var classString = classnames_default()(className, (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-wrapper"), true), defineProperty_default()(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), defineProperty_default()(_classNames, "".concat(prefixCls, "-wrapper-checked"), checkboxProps.checked), defineProperty_default()(_classNames, "".concat(prefixCls, "-wrapper-disabled"), checkboxProps.disabled), _classNames));
var checkboxClass = classnames_default()(defineProperty_default()({}, "".concat(prefixCls, "-indeterminate"), indeterminate));
return (
/*#__PURE__*/
// eslint-disable-next-line jsx-a11y/label-has-associated-control
react["createElement"]("label", {
className: classString,
style: style,
onMouseEnter: onMouseEnter,
onMouseLeave: onMouseLeave
}, /*#__PURE__*/react["createElement"](es["a" /* default */], extends_default()({}, checkboxProps, {
prefixCls: prefixCls,
className: checkboxClass,
ref: _this.saveCheckbox
})), children !== undefined && /*#__PURE__*/react["createElement"]("span", null, children))
);
};
return _this;
}
createClass_default()(Checkbox, [{
key: "componentDidMount",
value: function componentDidMount() {
var _a;
var value = this.props.value;
(_a = this.context) === null || _a === void 0 ? void 0 : _a.registerValue(value);
Object(devWarning["a" /* default */])('checked' in this.props || this.context || !('value' in this.props), 'Checkbox', '`value` is not a valid prop, do you mean `checked`?');
}
}, {
key: "componentDidUpdate",
value: function componentDidUpdate(_ref2) {
var prevValue = _ref2.value;
var _a, _b;
var value = this.props.value;
if (value !== prevValue) {
(_a = this.context) === null || _a === void 0 ? void 0 : _a.cancelValue(prevValue);
(_b = this.context) === null || _b === void 0 ? void 0 : _b.registerValue(value);
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
var _a;
var value = this.props.value;
(_a = this.context) === null || _a === void 0 ? void 0 : _a.cancelValue(value);
}
}, {
key: "focus",
value: function focus() {
this.rcCheckbox.focus();
}
}, {
key: "blur",
value: function blur() {
this.rcCheckbox.blur();
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/react["createElement"](config_provider_context["a" /* ConfigConsumer */], null, this.renderCheckbox);
}
}]);
return Checkbox;
}(react["PureComponent"]);
Checkbox_Checkbox.__ANT_CHECKBOX = true;
Checkbox_Checkbox.defaultProps = {
indeterminate: false
};
Checkbox_Checkbox.contextType = GroupContext;
/* harmony default export */ var checkbox_Checkbox = (Checkbox_Checkbox);
// CONCATENATED MODULE: ./node_modules/antd/es/checkbox/index.js
checkbox_Checkbox.Group = Group;
/* harmony default export */ var es_checkbox = __webpack_exports__["a"] = (checkbox_Checkbox);
/***/ }),
/***/ "kbBi":
/*!*************************************************************!*\
!*** ./node_modules/@ant-design/icons/CloseCircleFilled.js ***!
\*************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _CloseCircleFilled = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/CloseCircleFilled */ "/MOW"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _CloseCircleFilled;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "kmMV":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/regexp-exec.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var regexpFlags = __webpack_require__(/*! ./regexp-flags */ "rW0t");
var stickyHelpers = __webpack_require__(/*! ./regexp-sticky-helpers */ "n3/R");
var nativeExec = RegExp.prototype.exec;
// This always refers to the native implementation, because the
// String#replace polyfill uses ./fix-regexp-well-known-symbol-logic.js,
// which loads this file before patching the method.
var nativeReplace = String.prototype.replace;
var patchedExec = nativeExec;
var UPDATES_LAST_INDEX_WRONG = (function () {
var re1 = /a/;
var re2 = /b*/g;
nativeExec.call(re1, 'a');
nativeExec.call(re2, 'a');
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
})();
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;
// nonparticipating capturing group, copied from es5-shim's String#split patch.
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;
if (PATCH) {
patchedExec = function exec(str) {
var re = this;
var lastIndex, reCopy, match, i;
var sticky = UNSUPPORTED_Y && re.sticky;
var flags = regexpFlags.call(re);
var source = re.source;
var charsAdded = 0;
var strCopy = str;
if (sticky) {
flags = flags.replace('y', '');
if (flags.indexOf('g') === -1) {
flags += 'g';
}
strCopy = String(str).slice(re.lastIndex);
// Support anchored sticky behavior.
if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\n')) {
source = '(?: ' + source + ')';
strCopy = ' ' + strCopy;
charsAdded++;
}
// ^(? + rx + ) is needed, in combination with some str slicing, to
// simulate the 'y' flag.
reCopy = new RegExp('^(?:' + source + ')', flags);
}
if (NPCG_INCLUDED) {
reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
}
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
match = nativeExec.call(sticky ? reCopy : re, strCopy);
if (sticky) {
if (match) {
match.input = match.input.slice(charsAdded);
match[0] = match[0].slice(charsAdded);
match.index = re.lastIndex;
re.lastIndex += match[0].length;
} else re.lastIndex = 0;
} else if (UPDATES_LAST_INDEX_WRONG && match) {
re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
}
if (NPCG_INCLUDED && match && match.length > 1) {
// Fix browsers whose `exec` methods don't consistently return `undefined`
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
nativeReplace.call(match[0], reCopy, function () {
for (i = 1; i < arguments.length - 2; i++) {
if (arguments[i] === undefined) match[i] = undefined;
}
});
}
return match;
};
}
module.exports = patchedExec;
/***/ }),
/***/ "kyWZ":
/*!***********************************************************!*\
!*** ./node_modules/intl-locales-supported/dist/index.js ***!
\***********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*
* Copyright 2015, Yahoo Inc.
* Copyrights licensed under the New BSD License.
* See the accompanying LICENSE file for terms.
*/
Object.defineProperty(exports, "__esModule", { value: true });
function areIntlLocalesSupported(locales, constructorsToCheck) {
if (typeof Intl === 'undefined') {
return false;
}
if (!locales) {
throw new Error('locales must be supplied.');
}
if (!Array.isArray(locales)) {
locales = [locales];
}
var intlConstructors = constructorsToCheck || [
Intl.DateTimeFormat,
Intl.NumberFormat,
Intl.PluralRules,
];
intlConstructors = intlConstructors.filter(Boolean);
if (intlConstructors.length === 0 ||
(constructorsToCheck &&
intlConstructors.length !== constructorsToCheck.length)) {
return false;
}
return intlConstructors.every(function (intlConstructor) {
return intlConstructor.supportedLocalesOf(locales).length === locales.length;
});
}
exports.default = areIntlLocalesSupported;
//# sourceMappingURL=index.js.map
/***/ }),
/***/ "l/vG":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.filter.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.filter` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
filter: function filter(callbackfn /* , thisArg */) {
var map = anObject(this);
var iterator = getMapIterator(map);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();
var setter = aFunction(newMap.set);
iterate(iterator, function (key, value) {
if (boundFunction(value, key, map)) setter.call(newMap, key, value);
}, undefined, true, true);
return newMap;
}
});
/***/ }),
/***/ "l2dK":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.fontcolor.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.fontcolor` method
// https://tc39.github.io/ecma262/#sec-string.prototype.fontcolor
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fontcolor') }, {
fontcolor: function fontcolor(color) {
return createHTML(this, 'font', 'color', color);
}
});
/***/ }),
/***/ "l4aY":
/*!*************************************************!*\
!*** ./node_modules/rc-util/es/Dom/contains.js ***!
\*************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return contains; });
function contains(root, n) {
if (!root) {
return false;
}
// Use native if support
if (root.contains) {
return root.contains(n);
}
// `document.contains` not support with IE11
var node = n;
while (node) {
if (node === root) {
return true;
}
node = node.parentNode;
}
return false;
}
/***/ }),
/***/ "lEou":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.to-string-tag.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.toStringTag` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.tostringtag
defineWellKnownSymbol('toStringTag');
/***/ }),
/***/ "lMq5":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/is-forced.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var replacement = /#|\.prototype\./;
var isForced = function (feature, detection) {
var value = data[normalize(feature)];
return value == POLYFILL ? true
: value == NATIVE ? false
: typeof detection == 'function' ? fails(detection)
: !!detection;
};
var normalize = isForced.normalize = function (string) {
return String(string).replace(replacement, '.').toLowerCase();
};
var data = isForced.data = {};
var NATIVE = isForced.NATIVE = 'N';
var POLYFILL = isForced.POLYFILL = 'P';
module.exports = isForced;
/***/ }),
/***/ "lSNA":
/*!***************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toPropertyKey = __webpack_require__(/*! ./toPropertyKey.js */ "o5UB");
function _defineProperty(obj, key, value) {
key = toPropertyKey(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "leS6":
/*!**********************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js ***!
\**********************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _arrayLikeToArray; });
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) {
arr2[i] = arr[i];
}
return arr2;
}
/***/ }),
/***/ "lehK":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.iaddh.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Math.iaddh` method
// https://gist.github.com/BrendanEich/4294d5c212a6d2254703
// TODO: Remove from `core-js@4`
$({ target: 'Math', stat: true }, {
iaddh: function iaddh(x0, x1, y0, y1) {
var $x0 = x0 >>> 0;
var $x1 = x1 >>> 0;
var $y0 = y0 >>> 0;
return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0;
}
});
/***/ }),
/***/ "lmH4":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.is-subset-of.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var getIterator = __webpack_require__(/*! ../internals/get-iterator */ "mh/w");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.isSubsetOf` method
// https://tc39.github.io/proposal-set-methods/#Set.prototype.isSubsetOf
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
isSubsetOf: function isSubsetOf(iterable) {
var iterator = getIterator(this);
var otherSet = anObject(iterable);
var hasCheck = otherSet.has;
if (typeof hasCheck != 'function') {
otherSet = new (getBuiltIn('Set'))(iterable);
hasCheck = aFunction(otherSet.has);
}
return !iterate(iterator, function (value) {
if (hasCheck.call(otherSet, value) === false) return iterate.stop();
}, undefined, false, true).stopped;
}
});
/***/ }),
/***/ "lnE3":
/*!**************************************!*\
!*** ./node_modules/hasown/index.js ***!
\**************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var call = Function.prototype.call;
var $hasOwn = Object.prototype.hasOwnProperty;
var bind = __webpack_require__(/*! function-bind */ "D3zA");
/** @type {import('.')} */
module.exports = bind.call(call, $hasOwn);
/***/ }),
/***/ "lwsE":
/*!***************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "m+aA":
/*!****************************************************!*\
!*** ./node_modules/rc-util/es/Dom/findDOMNode.js ***!
\****************************************************/
/*! exports provided: isDOM, default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export isDOM */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return findDOMNode; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-dom */ "i8i4");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_1__);
function isDOM(node) {
// https://developer.mozilla.org/en-US/docs/Web/API/Element
// Since XULElement is also subclass of Element, we only need HTMLElement and SVGElement
return node instanceof HTMLElement || node instanceof SVGElement;
}
/**
* Return if a node is a DOM node. Else will return by `findDOMNode`
*/
function findDOMNode(node) {
if (isDOM(node)) {
return node;
}
if (node instanceof react__WEBPACK_IMPORTED_MODULE_0___default.a.Component) {
return react_dom__WEBPACK_IMPORTED_MODULE_1___default.a.findDOMNode(node);
}
return null;
}
/***/ }),
/***/ "m/L8":
/*!******************************************************************!*\
!*** ./node_modules/core-js/internals/object-define-property.js ***!
\******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "DPsx");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var nativeDefineProperty = Object.defineProperty;
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
exports.f = DESCRIPTORS ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
anObject(O);
P = toPrimitive(P, true);
anObject(Attributes);
if (IE8_DOM_DEFINE) try {
return nativeDefineProperty(O, P, Attributes);
} catch (error) { /* empty */ }
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
if ('value' in Attributes) O[P] = Attributes.value;
return O;
};
/***/ }),
/***/ "m0LI":
/*!*********************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/iterableToArrayLimit.js ***!
\*********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _iterableToArrayLimit(r, l) {
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
if (null != t) {
var e,
n,
i,
u,
a = [],
f = !0,
o = !1;
try {
if (i = (t = t.call(r)).next, 0 === l) {
if (Object(t) !== t) return;
f = !1;
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
} catch (r) {
o = !0, n = r;
} finally {
try {
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
} finally {
if (o) throw n;
}
}
return a;
}
}
module.exports = _iterableToArrayLimit, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "m3rI":
/*!**************************************!*\
!*** ./src/utils/env.ts + 1 modules ***!
\**************************************/
/*! exports provided: GlobalConfig, default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// UNUSED EXPORTS: GlobalConfig
// CONCATENATED MODULE: ./src/utils/env/dev.ts
var DEV = {
PROXY_SERVER: "https://data.educoder.net",
API_SERVER: "https://data.educoder.net",
HS_SERVER: "https://www.osredm.com",
REPORT_SERVER: "http://192.168.1.57:3001",
IMG_SERVER: 'https://data.educoder.net',
FORGE: "https://code.educoder.net/",
SSH_SERVER: "wss://webssh.educoder.net",
QQLoginCB: encodeURIComponent("https://test-newweb.educoder.net"),
FORGE_SERVER: "https://testforgeplus.trustie.net",
ZONE_SERVER: "https://gateway.gitlink.org.cn"
};
/* harmony default export */ var dev = (DEV);
// CONCATENATED MODULE: ./src/utils/env.ts
/*
* @Author: your name
* @Date: 2020-11-09 17:48:52
* @LastEditTime: 2020-11-13 16:31:48
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: /ppte5yg23/src/utils/env.ts
*/
var GlobalConfig = {
dev: DEV,
build: {
API_SERVER: 'https://data.educoder.net',
HS_SERVER: "https://www.osredm.com",
IMG_SERVER: 'https://ali-cdn.educoder.net',
REPORT_SERVER: "http://192.168.1.57:3001",
FORGE: "https://forge.educoder.net/",
SSH_SERVER: "wss://webssh.educoder.net",
QQLoginCB: encodeURIComponent("https://www.educoder.net"),
FORGE_SERVER: "https://www.gitlink.org.cn",
ZONE_SERVER: "https://gateway.gitlink.org.cn"
}
};
/* harmony default export */ var env = __webpack_exports__["a"] = (GlobalConfig[window.ENV || "dev"]);
/***/ }),
/***/ "m92n":
/*!****************************************************************************!*\
!*** ./node_modules/core-js/internals/call-with-safe-iteration-closing.js ***!
\****************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
// call something on iterator step with safe closing on error
module.exports = function (iterator, fn, value, ENTRIES) {
try {
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
// 7.4.6 IteratorClose(iterator, completion)
} catch (error) {
var returnMethod = iterator['return'];
if (returnMethod !== undefined) anObject(returnMethod.call(iterator));
throw error;
}
};
/***/ }),
/***/ "mGGf":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/web.url-search-params.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
__webpack_require__(/*! ../modules/es.array.iterator */ "4mDm");
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var USE_NATIVE_URL = __webpack_require__(/*! ../internals/native-url */ "DTth");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "4syw");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "ntOU");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU");
var hasOwn = __webpack_require__(/*! ../internals/has */ "UTVS");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var classof = __webpack_require__(/*! ../internals/classof */ "9d/t");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
var getIterator = __webpack_require__(/*! ../internals/get-iterator */ "mh/w");
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "NaFW");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var $fetch = getBuiltIn('fetch');
var Headers = getBuiltIn('Headers');
var ITERATOR = wellKnownSymbol('iterator');
var URL_SEARCH_PARAMS = 'URLSearchParams';
var URL_SEARCH_PARAMS_ITERATOR = URL_SEARCH_PARAMS + 'Iterator';
var setInternalState = InternalStateModule.set;
var getInternalParamsState = InternalStateModule.getterFor(URL_SEARCH_PARAMS);
var getInternalIteratorState = InternalStateModule.getterFor(URL_SEARCH_PARAMS_ITERATOR);
var plus = /\+/g;
var sequences = Array(4);
var percentSequence = function (bytes) {
return sequences[bytes - 1] || (sequences[bytes - 1] = RegExp('((?:%[\\da-f]{2}){' + bytes + '})', 'gi'));
};
var percentDecode = function (sequence) {
try {
return decodeURIComponent(sequence);
} catch (error) {
return sequence;
}
};
var deserialize = function (it) {
var result = it.replace(plus, ' ');
var bytes = 4;
try {
return decodeURIComponent(result);
} catch (error) {
while (bytes) {
result = result.replace(percentSequence(bytes--), percentDecode);
}
return result;
}
};
var find = /[!'()~]|%20/g;
var replace = {
'!': '%21',
"'": '%27',
'(': '%28',
')': '%29',
'~': '%7E',
'%20': '+'
};
var replacer = function (match) {
return replace[match];
};
var serialize = function (it) {
return encodeURIComponent(it).replace(find, replacer);
};
var parseSearchParams = function (result, query) {
if (query) {
var attributes = query.split('&');
var index = 0;
var attribute, entry;
while (index < attributes.length) {
attribute = attributes[index++];
if (attribute.length) {
entry = attribute.split('=');
result.push({
key: deserialize(entry.shift()),
value: deserialize(entry.join('='))
});
}
}
}
};
var updateSearchParams = function (query) {
this.entries.length = 0;
parseSearchParams(this.entries, query);
};
var validateArgumentsLength = function (passed, required) {
if (passed < required) throw TypeError('Not enough arguments');
};
var URLSearchParamsIterator = createIteratorConstructor(function Iterator(params, kind) {
setInternalState(this, {
type: URL_SEARCH_PARAMS_ITERATOR,
iterator: getIterator(getInternalParamsState(params).entries),
kind: kind
});
}, 'Iterator', function next() {
var state = getInternalIteratorState(this);
var kind = state.kind;
var step = state.iterator.next();
var entry = step.value;
if (!step.done) {
step.value = kind === 'keys' ? entry.key : kind === 'values' ? entry.value : [entry.key, entry.value];
} return step;
});
// `URLSearchParams` constructor
// https://url.spec.whatwg.org/#interface-urlsearchparams
var URLSearchParamsConstructor = function URLSearchParams(/* init */) {
anInstance(this, URLSearchParamsConstructor, URL_SEARCH_PARAMS);
var init = arguments.length > 0 ? arguments[0] : undefined;
var that = this;
var entries = [];
var iteratorMethod, iterator, next, step, entryIterator, entryNext, first, second, key;
setInternalState(that, {
type: URL_SEARCH_PARAMS,
entries: entries,
updateURL: function () { /* empty */ },
updateSearchParams: updateSearchParams
});
if (init !== undefined) {
if (isObject(init)) {
iteratorMethod = getIteratorMethod(init);
if (typeof iteratorMethod === 'function') {
iterator = iteratorMethod.call(init);
next = iterator.next;
while (!(step = next.call(iterator)).done) {
entryIterator = getIterator(anObject(step.value));
entryNext = entryIterator.next;
if (
(first = entryNext.call(entryIterator)).done ||
(second = entryNext.call(entryIterator)).done ||
!entryNext.call(entryIterator).done
) throw TypeError('Expected sequence with length 2');
entries.push({ key: first.value + '', value: second.value + '' });
}
} else for (key in init) if (hasOwn(init, key)) entries.push({ key: key, value: init[key] + '' });
} else {
parseSearchParams(entries, typeof init === 'string' ? init.charAt(0) === '?' ? init.slice(1) : init : init + '');
}
}
};
var URLSearchParamsPrototype = URLSearchParamsConstructor.prototype;
redefineAll(URLSearchParamsPrototype, {
// `URLSearchParams.prototype.appent` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
append: function append(name, value) {
validateArgumentsLength(arguments.length, 2);
var state = getInternalParamsState(this);
state.entries.push({ key: name + '', value: value + '' });
state.updateURL();
},
// `URLSearchParams.prototype.delete` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
'delete': function (name) {
validateArgumentsLength(arguments.length, 1);
var state = getInternalParamsState(this);
var entries = state.entries;
var key = name + '';
var index = 0;
while (index < entries.length) {
if (entries[index].key === key) entries.splice(index, 1);
else index++;
}
state.updateURL();
},
// `URLSearchParams.prototype.get` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-get
get: function get(name) {
validateArgumentsLength(arguments.length, 1);
var entries = getInternalParamsState(this).entries;
var key = name + '';
var index = 0;
for (; index < entries.length; index++) {
if (entries[index].key === key) return entries[index].value;
}
return null;
},
// `URLSearchParams.prototype.getAll` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-getall
getAll: function getAll(name) {
validateArgumentsLength(arguments.length, 1);
var entries = getInternalParamsState(this).entries;
var key = name + '';
var result = [];
var index = 0;
for (; index < entries.length; index++) {
if (entries[index].key === key) result.push(entries[index].value);
}
return result;
},
// `URLSearchParams.prototype.has` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-has
has: function has(name) {
validateArgumentsLength(arguments.length, 1);
var entries = getInternalParamsState(this).entries;
var key = name + '';
var index = 0;
while (index < entries.length) {
if (entries[index++].key === key) return true;
}
return false;
},
// `URLSearchParams.prototype.set` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-set
set: function set(name, value) {
validateArgumentsLength(arguments.length, 1);
var state = getInternalParamsState(this);
var entries = state.entries;
var found = false;
var key = name + '';
var val = value + '';
var index = 0;
var entry;
for (; index < entries.length; index++) {
entry = entries[index];
if (entry.key === key) {
if (found) entries.splice(index--, 1);
else {
found = true;
entry.value = val;
}
}
}
if (!found) entries.push({ key: key, value: val });
state.updateURL();
},
// `URLSearchParams.prototype.sort` method
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
sort: function sort() {
var state = getInternalParamsState(this);
var entries = state.entries;
// Array#sort is not stable in some engines
var slice = entries.slice();
var entry, entriesIndex, sliceIndex;
entries.length = 0;
for (sliceIndex = 0; sliceIndex < slice.length; sliceIndex++) {
entry = slice[sliceIndex];
for (entriesIndex = 0; entriesIndex < sliceIndex; entriesIndex++) {
if (entries[entriesIndex].key > entry.key) {
entries.splice(entriesIndex, 0, entry);
break;
}
}
if (entriesIndex === sliceIndex) entries.push(entry);
}
state.updateURL();
},
// `URLSearchParams.prototype.forEach` method
forEach: function forEach(callback /* , thisArg */) {
var entries = getInternalParamsState(this).entries;
var boundFunction = bind(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
var index = 0;
var entry;
while (index < entries.length) {
entry = entries[index++];
boundFunction(entry.value, entry.key, this);
}
},
// `URLSearchParams.prototype.keys` method
keys: function keys() {
return new URLSearchParamsIterator(this, 'keys');
},
// `URLSearchParams.prototype.values` method
values: function values() {
return new URLSearchParamsIterator(this, 'values');
},
// `URLSearchParams.prototype.entries` method
entries: function entries() {
return new URLSearchParamsIterator(this, 'entries');
}
}, { enumerable: true });
// `URLSearchParams.prototype[@@iterator]` method
redefine(URLSearchParamsPrototype, ITERATOR, URLSearchParamsPrototype.entries);
// `URLSearchParams.prototype.toString` method
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
redefine(URLSearchParamsPrototype, 'toString', function toString() {
var entries = getInternalParamsState(this).entries;
var result = [];
var index = 0;
var entry;
while (index < entries.length) {
entry = entries[index++];
result.push(serialize(entry.key) + '=' + serialize(entry.value));
} return result.join('&');
}, { enumerable: true });
setToStringTag(URLSearchParamsConstructor, URL_SEARCH_PARAMS);
$({ global: true, forced: !USE_NATIVE_URL }, {
URLSearchParams: URLSearchParamsConstructor
});
// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
// https://github.com/zloirock/core-js/issues/674
if (!USE_NATIVE_URL && typeof $fetch == 'function' && typeof Headers == 'function') {
$({ global: true, enumerable: true, forced: true }, {
fetch: function fetch(input /* , init */) {
var args = [input];
var init, body, headers;
if (arguments.length > 1) {
init = arguments[1];
if (isObject(init)) {
body = init.body;
if (classof(body) === URL_SEARCH_PARAMS) {
headers = init.headers ? new Headers(init.headers) : new Headers();
if (!headers.has('content-type')) {
headers.set('content-type', 'application/x-www-form-urlencoded;charset=UTF-8');
}
init = create(init, {
body: createPropertyDescriptor(0, String(body)),
headers: createPropertyDescriptor(0, headers)
});
}
}
args.push(init);
} return $fetch.apply(this, args);
}
});
}
module.exports = {
URLSearchParams: URLSearchParamsConstructor,
getState: getInternalParamsState
};
/***/ }),
/***/ "mGKP":
/*!****************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayLikeToArray = __webpack_require__(/*! ./arrayLikeToArray */ "EdiO");
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(o);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);
}
module.exports = _unsupportedIterableToArray;
/***/ }),
/***/ "mRH6":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.link.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.link` method
// https://tc39.github.io/ecma262/#sec-string.prototype.link
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, {
link: function link(url) {
return createHTML(this, 'a', 'href', url);
}
});
/***/ }),
/***/ "mW11":
/*!***********************************************************************************************!*\
!*** ./node_modules/umi/node_modules/use-subscription/cjs/use-subscription.production.min.js ***!
\***********************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v1.4.1
* use-subscription.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var e=__webpack_require__(/*! object-assign */ "MgzW"),g=__webpack_require__(/*! react */ "q1tI");
exports.useSubscription=function(a){var c=a.getCurrentValue,d=a.subscribe,b=g.useState(function(){return{getCurrentValue:c,subscribe:d,value:c()}});a=b[0];var f=b[1];b=a.value;if(a.getCurrentValue!==c||a.subscribe!==d)b=c(),f({getCurrentValue:c,subscribe:d,value:b});g.useDebugValue(b);g.useEffect(function(){function b(){if(!a){var b=c();f(function(a){return a.getCurrentValue!==c||a.subscribe!==d||a.value===b?a:e({},a,{value:b})})}}var a=!1,h=d(b);b();return function(){a=!0;h()}},[c,d]);return b};
/***/ }),
/***/ "ma9I":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.array.concat.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var isArray = __webpack_require__(/*! ../internals/is-array */ "6LWA");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "hBjN");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "ZfDv");
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "Hd5f");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "LQDL");
var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable');
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded';
// We can't use this feature detection in V8 since it causes
// deoptimization and serious performance degradation
// https://github.com/zloirock/core-js/issues/679
var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () {
var array = [];
array[IS_CONCAT_SPREADABLE] = false;
return array.concat()[0] !== array;
});
var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat');
var isConcatSpreadable = function (O) {
if (!isObject(O)) return false;
var spreadable = O[IS_CONCAT_SPREADABLE];
return spreadable !== undefined ? !!spreadable : isArray(O);
};
var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT;
// `Array.prototype.concat` method
// https://tc39.github.io/ecma262/#sec-array.prototype.concat
// with adding support of @@isConcatSpreadable and @@species
$({ target: 'Array', proto: true, forced: FORCED }, {
concat: function concat(arg) { // eslint-disable-line no-unused-vars
var O = toObject(this);
var A = arraySpeciesCreate(O, 0);
var n = 0;
var i, k, length, len, E;
for (i = -1, length = arguments.length; i < length; i++) {
E = i === -1 ? O : arguments[i];
if (isConcatSpreadable(E)) {
len = toLength(E.length);
if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
} else {
if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED);
createProperty(A, n++, E);
}
}
A.length = n;
return A;
}
});
/***/ }),
/***/ "md7G":
/*!******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js ***!
\******************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _possibleConstructorReturn; });
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./typeof.js */ "U8pU");
/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./assertThisInitialized.js */ "JX7q");
function _possibleConstructorReturn(self, call) {
if (call && (Object(_typeof_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(call) === "object" || typeof call === "function")) {
return call;
} else if (call !== void 0) {
throw new TypeError("Derived constructors may only return object or undefined");
}
return Object(_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(self);
}
/***/ }),
/***/ "mgyK":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/internals/string-pad-webkit-bug.js ***!
\*****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// https://github.com/zloirock/core-js/issues/280
var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "NC/Y");
// eslint-disable-next-line unicorn/no-unsafe-regex
module.exports = /Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(userAgent);
/***/ }),
/***/ "mh/w":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/get-iterator.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "NaFW");
module.exports = function (it) {
var iteratorMethod = getIteratorMethod(it);
if (typeof iteratorMethod != 'function') {
throw TypeError(String(it) + ' is not iterable');
} return anObject(iteratorMethod.call(it));
};
/***/ }),
/***/ "miYZ":
/*!*****************************************************!*\
!*** ./node_modules/antd/es/message/style/index.js ***!
\*****************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "bXwC");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/***/ }),
/***/ "mmNF":
/*!*****************************************!*\
!*** ./node_modules/charenc/charenc.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
var charenc = {
// UTF-8 encoding
utf8: {
// Convert a string to a byte array
stringToBytes: function(str) {
return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
},
// Convert a byte array to a string
bytesToString: function(bytes) {
return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
}
},
// Binary encoding
bin: {
// Convert a string to a byte array
stringToBytes: function(str) {
for (var bytes = [], i = 0; i < str.length; i++)
bytes.push(str.charCodeAt(i) & 0xFF);
return bytes;
},
// Convert a byte array to a string
bytesToString: function(bytes) {
for (var str = [], i = 0; i < bytes.length; i++)
str.push(String.fromCharCode(bytes[i]));
return str.join('');
}
}
};
module.exports = charenc;
/***/ }),
/***/ "moxL":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.copy-within.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $copyWithin = __webpack_require__(/*! ../internals/array-copy-within */ "FF6l");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.copyWithin` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.copywithin
exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) {
return $copyWithin.call(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined);
});
/***/ }),
/***/ "mtLc":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js ***!
\*****************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
/***/ }),
/***/ "myn2":
/*!***************************************************************!*\
!*** ./node_modules/dva-core/node_modules/warning/browser.js ***!
\***************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/**
* Copyright 2014-2015, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
/**
* Similar to invariant but only logs a warning if the condition is not met.
* This can be used to log issues in development environments in critical
* paths. Removing the logging code for production environments will keep the
* same logic and follow the same code paths.
*/
var warning = function() {};
if (false) {}
module.exports = warning;
/***/ }),
/***/ "n/mU":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.atanh.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var nativeAtanh = Math.atanh;
var log = Math.log;
// `Math.atanh` method
// https://tc39.github.io/ecma262/#sec-math.atanh
// Tor Browser bug: Math.atanh(-0) -> 0
$({ target: 'Math', stat: true, forced: !(nativeAtanh && 1 / nativeAtanh(-0) < 0) }, {
atanh: function atanh(x) {
return (x = +x) == 0 ? x : log((1 + x) / (1 - x)) / 2;
}
});
/***/ }),
/***/ "n3/R":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/internals/regexp-sticky-helpers.js ***!
\*****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(/*! ./fails */ "0Dky");
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
// so we use an intermediate function.
function RE(s, f) {
return RegExp(s, f);
}
exports.UNSUPPORTED_Y = fails(function () {
// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
var re = RE('a', 'y');
re.lastIndex = 2;
return re.exec('abcd') != null;
});
exports.BROKEN_CARET = fails(function () {
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
var re = RE('^r', 'gy');
re.lastIndex = 2;
return re.exec('str') != null;
});
/***/ }),
/***/ "n5b4":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/web.queue-microtask.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var microtask = __webpack_require__(/*! ../internals/microtask */ "tXUg");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
var process = global.process;
var isNode = classof(process) == 'process';
// `queueMicrotask` method
// https://html.spec.whatwg.org/multipage/timers-and-user-prompts.html#dom-queuemicrotask
$({ global: true, enumerable: true, noTargetGet: true }, {
queueMicrotask: function queueMicrotask(fn) {
var domain = isNode && process.domain;
microtask(domain ? domain.bind(fn) : fn);
}
});
/***/ }),
/***/ "n5pg":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.find-key.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.findKey` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
findKey: function findKey(callbackfn /* , thisArg */) {
var map = anObject(this);
var iterator = getMapIterator(map);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
return iterate(iterator, function (key, value) {
if (boundFunction(value, key, map)) return iterate.stop(key);
}, undefined, true, true).result;
}
});
/***/ }),
/***/ "nDJS":
/*!******************************************************************************************************************!*\
!*** ./node_modules/@umijs/preset-built-in/node_modules/use-subscription/cjs/use-subscription.production.min.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v1.4.1
* use-subscription.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var e=__webpack_require__(/*! object-assign */ "MgzW"),g=__webpack_require__(/*! react */ "q1tI");
exports.useSubscription=function(a){var c=a.getCurrentValue,d=a.subscribe,b=g.useState(function(){return{getCurrentValue:c,subscribe:d,value:c()}});a=b[0];var f=b[1];b=a.value;if(a.getCurrentValue!==c||a.subscribe!==d)b=c(),f({getCurrentValue:c,subscribe:d,value:b});g.useDebugValue(b);g.useEffect(function(){function b(){if(!a){var b=c();f(function(a){return a.getCurrentValue!==c||a.subscribe!==d||a.value===b?a:e({},a,{value:b})})}}var a=!1,h=d(b);b();return function(){a=!0;h()}},[c,d]);return b};
/***/ }),
/***/ "nFTT":
/*!************************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/InfoCircleFilled.js ***!
\************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var InfoCircleFilled = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" };
exports.default = InfoCircleFilled;
/***/ }),
/***/ "nIe3":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.map-keys.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "Sssf");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.mapKeys` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
mapKeys: function mapKeys(callbackfn /* , thisArg */) {
var map = anObject(this);
var iterator = getMapIterator(map);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
var newMap = new (speciesConstructor(map, getBuiltIn('Map')))();
var setter = aFunction(newMap.set);
iterate(iterator, function (key, value) {
setter.call(newMap, boundFunction(value, key, map), value);
}, undefined, true, true);
return newMap;
}
});
/***/ }),
/***/ "nkod":
/*!********************************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.get-own-property-descriptor.js ***!
\********************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
// `Reflect.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-reflect.getownpropertydescriptor
$({ target: 'Reflect', stat: true, sham: !DESCRIPTORS }, {
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey) {
return getOwnPropertyDescriptorModule.f(anObject(target), propertyKey);
}
});
/***/ }),
/***/ "nmnc":
/*!****************************************!*\
!*** ./node_modules/lodash/_Symbol.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var root = __webpack_require__(/*! ./_root */ "Kz5y");
/** Built-in value references. */
var Symbol = root.Symbol;
module.exports = Symbol;
/***/ }),
/***/ "nmq7":
/*!**************************************!*\
!*** ./node_modules/qs/lib/parse.js ***!
\**************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ./utils */ "0jNN");
var has = Object.prototype.hasOwnProperty;
var isArray = Array.isArray;
var defaults = {
allowDots: false,
allowEmptyArrays: false,
allowPrototypes: false,
allowSparse: false,
arrayLimit: 20,
charset: 'utf-8',
charsetSentinel: false,
comma: false,
decodeDotInKeys: false,
decoder: utils.decode,
delimiter: '&',
depth: 5,
duplicates: 'combine',
ignoreQueryPrefix: false,
interpretNumericEntities: false,
parameterLimit: 1000,
parseArrays: true,
plainObjects: false,
strictNullHandling: false
};
var interpretNumericEntities = function (str) {
return str.replace(/&#(\d+);/g, function ($0, numberStr) {
return String.fromCharCode(parseInt(numberStr, 10));
});
};
var parseArrayValue = function (val, options) {
if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
return val.split(',');
}
return val;
};
// This is what browsers will submit when the ✓ character occurs in an
// application/x-www-form-urlencoded body and the encoding of the page containing
// the form is iso-8859-1, or when the submitted form has an accept-charset
// attribute of iso-8859-1. Presumably also with other charsets that do not contain
// the ✓ character, such as us-ascii.
var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
// These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
var parseValues = function parseQueryStringValues(str, options) {
var obj = { __proto__: null };
var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
var parts = cleanStr.split(options.delimiter, limit);
var skipIndex = -1; // Keep track of where the utf8 sentinel was found
var i;
var charset = options.charset;
if (options.charsetSentinel) {
for (i = 0; i < parts.length; ++i) {
if (parts[i].indexOf('utf8=') === 0) {
if (parts[i] === charsetSentinel) {
charset = 'utf-8';
} else if (parts[i] === isoSentinel) {
charset = 'iso-8859-1';
}
skipIndex = i;
i = parts.length; // The eslint settings do not allow break;
}
}
}
for (i = 0; i < parts.length; ++i) {
if (i === skipIndex) {
continue;
}
var part = parts[i];
var bracketEqualsPos = part.indexOf(']=');
var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
var key, val;
if (pos === -1) {
key = options.decoder(part, defaults.decoder, charset, 'key');
val = options.strictNullHandling ? null : '';
} else {
key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
val = utils.maybeMap(
parseArrayValue(part.slice(pos + 1), options),
function (encodedVal) {
return options.decoder(encodedVal, defaults.decoder, charset, 'value');
}
);
}
if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
val = interpretNumericEntities(val);
}
if (part.indexOf('[]=') > -1) {
val = isArray(val) ? [val] : val;
}
var existing = has.call(obj, key);
if (existing && options.duplicates === 'combine') {
obj[key] = utils.combine(obj[key], val);
} else if (!existing || options.duplicates === 'last') {
obj[key] = val;
}
}
return obj;
};
var parseObject = function (chain, val, options, valuesParsed) {
var leaf = valuesParsed ? val : parseArrayValue(val, options);
for (var i = chain.length - 1; i >= 0; --i) {
var obj;
var root = chain[i];
if (root === '[]' && options.parseArrays) {
obj = options.allowEmptyArrays && leaf === '' ? [] : [].concat(leaf);
} else {
obj = options.plainObjects ? Object.create(null) : {};
var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
var decodedRoot = options.decodeDotInKeys ? cleanRoot.replace(/%2E/g, '.') : cleanRoot;
var index = parseInt(decodedRoot, 10);
if (!options.parseArrays && decodedRoot === '') {
obj = { 0: leaf };
} else if (
!isNaN(index)
&& root !== decodedRoot
&& String(index) === decodedRoot
&& index >= 0
&& (options.parseArrays && index <= options.arrayLimit)
) {
obj = [];
obj[index] = leaf;
} else if (decodedRoot !== '__proto__') {
obj[decodedRoot] = leaf;
}
}
leaf = obj;
}
return leaf;
};
var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
if (!givenKey) {
return;
}
// Transform dot notation to bracket notation
var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
// The regex chunks
var brackets = /(\[[^[\]]*])/;
var child = /(\[[^[\]]*])/g;
// Get the parent
var segment = options.depth > 0 && brackets.exec(key);
var parent = segment ? key.slice(0, segment.index) : key;
// Stash the parent if it exists
var keys = [];
if (parent) {
// If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
if (!options.plainObjects && has.call(Object.prototype, parent)) {
if (!options.allowPrototypes) {
return;
}
}
keys.push(parent);
}
// Loop through children appending to the array until we hit depth
var i = 0;
while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
i += 1;
if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
if (!options.allowPrototypes) {
return;
}
}
keys.push(segment[1]);
}
// If there's a remainder, just add whatever is left
if (segment) {
keys.push('[' + key.slice(segment.index) + ']');
}
return parseObject(keys, val, options, valuesParsed);
};
var normalizeParseOptions = function normalizeParseOptions(opts) {
if (!opts) {
return defaults;
}
if (typeof opts.allowEmptyArrays !== 'undefined' && typeof opts.allowEmptyArrays !== 'boolean') {
throw new TypeError('`allowEmptyArrays` option can only be `true` or `false`, when provided');
}
if (typeof opts.decodeDotInKeys !== 'undefined' && typeof opts.decodeDotInKeys !== 'boolean') {
throw new TypeError('`decodeDotInKeys` option can only be `true` or `false`, when provided');
}
if (opts.decoder !== null && typeof opts.decoder !== 'undefined' && typeof opts.decoder !== 'function') {
throw new TypeError('Decoder has to be a function.');
}
if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
}
var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
var duplicates = typeof opts.duplicates === 'undefined' ? defaults.duplicates : opts.duplicates;
if (duplicates !== 'combine' && duplicates !== 'first' && duplicates !== 'last') {
throw new TypeError('The duplicates option must be either combine, first, or last');
}
var allowDots = typeof opts.allowDots === 'undefined' ? opts.decodeDotInKeys === true ? true : defaults.allowDots : !!opts.allowDots;
return {
allowDots: allowDots,
allowEmptyArrays: typeof opts.allowEmptyArrays === 'boolean' ? !!opts.allowEmptyArrays : defaults.allowEmptyArrays,
allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
charset: charset,
charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
decodeDotInKeys: typeof opts.decodeDotInKeys === 'boolean' ? opts.decodeDotInKeys : defaults.decodeDotInKeys,
decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
// eslint-disable-next-line no-implicit-coercion, no-extra-parens
depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
duplicates: duplicates,
ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
parseArrays: opts.parseArrays !== false,
plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
};
};
module.exports = function (str, opts) {
var options = normalizeParseOptions(opts);
if (str === '' || str === null || typeof str === 'undefined') {
return options.plainObjects ? Object.create(null) : {};
}
var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
var obj = options.plainObjects ? Object.create(null) : {};
// Iterate over the keys and setup the new object
var keys = Object.keys(tempObj);
for (var i = 0; i < keys.length; ++i) {
var key = keys[i];
var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
obj = utils.merge(obj, newObj, options);
}
if (options.allowSparse === true) {
return obj;
}
return utils.compact(obj);
};
/***/ }),
/***/ "noRp":
/*!************************************!*\
!*** ./src/models/paths/detail.ts ***!
\************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */ "oBTY");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_paths__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/service/paths */ "Mgx3");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var PathsDetailModel = {
namespace: 'pathsDetail',
state: {
detail: {},
rightData: {},
Courses: {},
stageData: [],
discusses: {},
actionTabs: {
key: '',
params: {}
}
},
effects: {
getDiscusses: function getDiscusses(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_2__[/* getDiscusses */ "e"], payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
discusses: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getPathsDetail: function getPathsDetail(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_2__[/* getPathsDetail */ "g"], payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
detail: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context2.abrupt("return", response);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getRightData: function getRightData(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_2__[/* getRightData */ "h"], payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
rightData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
getCoureses: function getCoureses(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var response;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_2__[/* getCoureses */ "b"], payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
Courses: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
getStageData: function getStageData(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var response;
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_paths__WEBPACK_IMPORTED_MODULE_2__[/* getStageData */ "i"], payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return put({
type: 'save',
payload: {
stageData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])((response === null || response === void 0 ? void 0 : response.stages) || [])
}
});
case 5:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
setActionTabs: function setActionTabs(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context6.stop();
}
}, _callee6);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref13) {
var dispatch = _ref13.dispatch,
history = _ref13.history;
return history.listen(function (_ref14) {
var pathname = _ref14.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (PathsDetailModel);
/***/ }),
/***/ "ntOU":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/internals/create-iterator-constructor.js ***!
\***********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var IteratorPrototype = __webpack_require__(/*! ../internals/iterators-core */ "rpNk").IteratorPrototype;
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
var Iterators = __webpack_require__(/*! ../internals/iterators */ "P4y1");
var returnThis = function () { return this; };
module.exports = function (IteratorConstructor, NAME, next) {
var TO_STRING_TAG = NAME + ' Iterator';
IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });
setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);
Iterators[TO_STRING_TAG] = returnThis;
return IteratorConstructor;
};
/***/ }),
/***/ "ny8l":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.signbit.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Math.signbit` method
// https://github.com/tc39/proposal-Math.signbit
$({ target: 'Math', stat: true }, {
signbit: function signbit(x) {
return (x = +x) == x && x == 0 ? 1 / x == -Infinity : x < 0;
}
});
/***/ }),
/***/ "o/2+":
/*!*************************************************!*\
!*** ./node_modules/antd/es/grid/RowContext.js ***!
\*************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
var RowContext = /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])({});
/* harmony default export */ __webpack_exports__["a"] = (RowContext);
/***/ }),
/***/ "o0o1":
/*!**********************************************************!*\
!*** ./node_modules/@babel/runtime/regenerator/index.js ***!
\**********************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// TODO(Babel 8): Remove this file.
var runtime = __webpack_require__(/*! ../helpers/regeneratorRuntime */ "fsL8")();
module.exports = runtime;
// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
try {
regeneratorRuntime = runtime;
} catch (accidentalStrictMode) {
if (typeof globalThis === "object") {
globalThis.regeneratorRuntime = runtime;
} else {
Function("r", "regeneratorRuntime = r")(runtime);
}
}
/***/ }),
/***/ "o46R":
/*!******************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js + 1 modules ***!
\******************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/rc-tooltip/es/Tooltip.js */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ toPropertyKey; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/typeof.js
var esm_typeof = __webpack_require__("U8pU");
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPrimitive.js
function toPrimitive(t, r) {
if ("object" != Object(esm_typeof["a" /* default */])(t) || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != Object(esm_typeof["a" /* default */])(i)) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
function toPropertyKey(t) {
var i = toPrimitive(t, "string");
return "symbol" == Object(esm_typeof["a" /* default */])(i) ? i : i + "";
}
/***/ }),
/***/ "o5UB":
/*!**************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/toPropertyKey.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var _typeof = __webpack_require__(/*! ./typeof.js */ "cDf5")["default"];
var toPrimitive = __webpack_require__(/*! ./toPrimitive.js */ "5Q0V");
function toPropertyKey(t) {
var i = toPrimitive(t, "string");
return "symbol" == _typeof(i) ? i : i + "";
}
module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "oBTY":
/*!***********************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules ***!
\***********************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; });
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
var arrayLikeToArray = __webpack_require__("leS6");
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js
function _arrayWithoutHoles(arr) {
if (Array.isArray(arr)) return Object(arrayLikeToArray["a" /* default */])(arr);
}
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArray.js
var iterableToArray = __webpack_require__("Y9hK");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("Qw5x");
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js
function _nonIterableSpread() {
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js
function _toConsumableArray(arr) {
return _arrayWithoutHoles(arr) || Object(iterableToArray["a" /* default */])(arr) || Object(unsupportedIterableToArray["a" /* default */])(arr) || _nonIterableSpread();
}
/***/ }),
/***/ "oHi+":
/*!************************************************************!*\
!*** ./node_modules/core-js/internals/typed-array-from.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "NaFW");
var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "6VoE");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var aTypedArrayConstructor = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC").aTypedArrayConstructor;
module.exports = function from(source /* , mapfn, thisArg */) {
var O = toObject(source);
var argumentsLength = arguments.length;
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
var mapping = mapfn !== undefined;
var iteratorMethod = getIteratorMethod(O);
var i, length, result, step, iterator, next;
if (iteratorMethod != undefined && !isArrayIteratorMethod(iteratorMethod)) {
iterator = iteratorMethod.call(O);
next = iterator.next;
O = [];
while (!(step = next.call(iterator)).done) {
O.push(step.value);
}
}
if (mapping && argumentsLength > 2) {
mapfn = bind(mapfn, arguments[2], 2);
}
length = toLength(O.length);
result = new (aTypedArrayConstructor(this))(length);
for (i = 0; length > i; i++) {
result[i] = mapping ? mapfn(O[i], i) : O[i];
}
return result;
};
/***/ }),
/***/ "oUNq":
/*!***********************************!*\
!*** ./src/service/classrooms.ts ***!
\***********************************/
/*! exports provided: getClassroomList, getShixunAiRecommendLists, getCourseMenus, getClassroomTopBanner, getClassroomLeftMenus, getClassroomShixunsList, getClassroomTeacherShixunsList, getClassroomGraduationTopicsList, getClassroomGraduationTaskList, getClassroomExercisesList, getClassroomPollsList, getClassroomCommonHomeworksList, getCourseGroups, getClassroomAttendancesList, getClassroomAttendancesStatistic, getAttendanceDetail, getAnnouncementList, getAttachmentList, getVideoList, getLiveVideoList, getCoursesMine, getBoardList, getCourseGroupsList, getCourseStudentsList, getCourseStatistics, getCourseWorkscore, getCourseActscore, getShixunLists, getExperimentLists, createShixunHomework, createExperiment, getCoursesLists, createCoursesHomework, getSchoolList, getSearchCourseList, submitCourses, appplySchool, searchSchoolTeacherList, searchCoursesList, addTeacher, addStudentBySearch, setPublicOrPrivate, setInviteCodeHalt, duplicateCourse, deleteCourse, getCourseEditData, updateCourseData, exportCourseInfo, exportCourseActScore, exportCourseTotalScore, exportCourseAndOther, exportMoocrecords, exportCourseMemberScores, exportCourseWorkListScores, exportCourseWorkListAppendix, deleteSecondCategory, deleteBoardCategory, stickyModule, hiddenModule, getNewStartClassData, getAttendancesData, getCourseMemberAttendanceData, updateAttendanceStatus, exportPollsScores, exportExerciseStudentScores, getPollStartAnswer, updatePollVotes, submitPollAnswer, getAllTasks, updateTaskPosition, calculateAllShixunScores, getAllCourseGroup, getCourseGroupStudents, renameCourseGroup, deleteCourseGroup, joinCourseGroup, transferToCourseGroup, deleteStudent, joincoursegroup, exitCourse, courseMemberAttendances, getMoocEditData, createMoocData, updateMoocData, moveCategory, moveboard, getCourseware */
/*! exports used: appplySchool, createCoursesHomework, createExperiment, createShixunHomework, exportCourseActScore, exportCourseAndOther, exportCourseInfo, exportCourseMemberScores, exportCourseTotalScore, exportCourseWorkListAppendix, exportCourseWorkListScores, exportExerciseStudentScores, exportMoocrecords, exportPollsScores, getAllCourseGroup, getAllTasks, getAnnouncementList, getAttachmentList, getAttendanceDetail, getBoardList, getClassroomAttendancesList, getClassroomAttendancesStatistic, getClassroomCommonHomeworksList, getClassroomExercisesList, getClassroomGraduationTaskList, getClassroomGraduationTopicsList, getClassroomLeftMenus, getClassroomList, getClassroomPollsList, getClassroomShixunsList, getClassroomTeacherShixunsList, getClassroomTopBanner, getCourseActscore, getCourseGroups, getCourseGroupsList, getCourseStatistics, getCourseStudentsList, getCourseWorkscore, getCoursesLists, getCoursesMine, getCourseware, getExperimentLists, getLiveVideoList, getSchoolList, getSearchCourseList, getShixunAiRecommendLists, getShixunLists, getVideoList, joincoursegroup, searchSchoolTeacherList, submitCourses, updateTaskPosition */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "B", function() { return getClassroomList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "T", function() { return getShixunAiRecommendLists; });
/* unused harmony export getCourseMenus */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "F", function() { return getClassroomTopBanner; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "A", function() { return getClassroomLeftMenus; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "D", function() { return getClassroomShixunsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "E", function() { return getClassroomTeacherShixunsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "z", function() { return getClassroomGraduationTopicsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return getClassroomGraduationTaskList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return getClassroomExercisesList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "C", function() { return getClassroomPollsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "w", function() { return getClassroomCommonHomeworksList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "H", function() { return getCourseGroups; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "u", function() { return getClassroomAttendancesList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "v", function() { return getClassroomAttendancesStatistic; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "s", function() { return getAttendanceDetail; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "q", function() { return getAnnouncementList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "r", function() { return getAttachmentList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "V", function() { return getVideoList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Q", function() { return getLiveVideoList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "N", function() { return getCoursesMine; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "t", function() { return getBoardList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "I", function() { return getCourseGroupsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "K", function() { return getCourseStudentsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "J", function() { return getCourseStatistics; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "L", function() { return getCourseWorkscore; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "G", function() { return getCourseActscore; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "U", function() { return getShixunLists; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "P", function() { return getExperimentLists; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return createShixunHomework; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return createExperiment; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "M", function() { return getCoursesLists; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createCoursesHomework; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "R", function() { return getSchoolList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "S", function() { return getSearchCourseList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Y", function() { return submitCourses; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return appplySchool; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "X", function() { return searchSchoolTeacherList; });
/* unused harmony export searchCoursesList */
/* unused harmony export addTeacher */
/* unused harmony export addStudentBySearch */
/* unused harmony export setPublicOrPrivate */
/* unused harmony export setInviteCodeHalt */
/* unused harmony export duplicateCourse */
/* unused harmony export deleteCourse */
/* unused harmony export getCourseEditData */
/* unused harmony export updateCourseData */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return exportCourseInfo; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return exportCourseActScore; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return exportCourseTotalScore; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return exportCourseAndOther; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "m", function() { return exportMoocrecords; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return exportCourseMemberScores; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "k", function() { return exportCourseWorkListScores; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "j", function() { return exportCourseWorkListAppendix; });
/* unused harmony export deleteSecondCategory */
/* unused harmony export deleteBoardCategory */
/* unused harmony export stickyModule */
/* unused harmony export hiddenModule */
/* unused harmony export getNewStartClassData */
/* unused harmony export getAttendancesData */
/* unused harmony export getCourseMemberAttendanceData */
/* unused harmony export updateAttendanceStatus */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "n", function() { return exportPollsScores; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "l", function() { return exportExerciseStudentScores; });
/* unused harmony export getPollStartAnswer */
/* unused harmony export updatePollVotes */
/* unused harmony export submitPollAnswer */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "p", function() { return getAllTasks; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Z", function() { return updateTaskPosition; });
/* unused harmony export calculateAllShixunScores */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "o", function() { return getAllCourseGroup; });
/* unused harmony export getCourseGroupStudents */
/* unused harmony export renameCourseGroup */
/* unused harmony export deleteCourseGroup */
/* unused harmony export joinCourseGroup */
/* unused harmony export transferToCourseGroup */
/* unused harmony export deleteStudent */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "W", function() { return joincoursegroup; });
/* unused harmony export exitCourse */
/* unused harmony export courseMemberAttendances */
/* unused harmony export getMoocEditData */
/* unused harmony export createMoocData */
/* unused harmony export updateMoocData */
/* unused harmony export moveCategory */
/* unused harmony export moveboard */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "O", function() { return getCourseware; });
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
//实训首页列表
function getClassroomList(_x) {
return _getClassroomList.apply(this, arguments);
}
// 实训智能推荐列表
function _getClassroomList() {
_getClassroomList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/courses.json', {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getClassroomList.apply(this, arguments);
}
function getShixunAiRecommendLists(_x2) {
return _getShixunAiRecommendLists.apply(this, arguments);
}
// 获取课堂首页菜单
function _getShixunAiRecommendLists() {
_getShixunAiRecommendLists = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/intelligent_recommendations/according_course_recommend_shixuns.json', {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getShixunAiRecommendLists.apply(this, arguments);
}
function getCourseMenus(_x3) {
return _getCourseMenus.apply(this, arguments);
}
// 获取教学课堂头部信息
function _getCourseMenus() {
_getCourseMenus = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/disciplines.json', {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getCourseMenus.apply(this, arguments);
}
function getClassroomTopBanner(_x4) {
return _getClassroomTopBanner.apply(this, arguments);
}
// 获取教学课堂左侧menus
function _getClassroomTopBanner() {
_getClassroomTopBanner = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/top_banner.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getClassroomTopBanner.apply(this, arguments);
}
function getClassroomLeftMenus(_x5) {
return _getClassroomLeftMenus.apply(this, arguments);
}
// 教学课堂详情-实训列表
function _getClassroomLeftMenus() {
_getClassroomLeftMenus = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id || params.coursesId, "/left_banner.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getClassroomLeftMenus.apply(this, arguments);
}
function getClassroomShixunsList(_x6) {
return _getClassroomShixunsList.apply(this, arguments);
}
// 教学课堂详情-老师实训列表
function _getClassroomShixunsList() {
_getClassroomShixunsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/homework_commons.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _getClassroomShixunsList.apply(this, arguments);
}
function getClassroomTeacherShixunsList(_x7) {
return _getClassroomTeacherShixunsList.apply(this, arguments);
}
// 教学课堂详情-毕业设计-毕设选题
function _getClassroomTeacherShixunsList() {
_getClassroomTeacherShixunsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/homework_commons/list.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getClassroomTeacherShixunsList.apply(this, arguments);
}
function getClassroomGraduationTopicsList(_x8) {
return _getClassroomGraduationTopicsList.apply(this, arguments);
}
// 教学课堂详情-毕业设计-毕设任务
function _getClassroomGraduationTopicsList() {
_getClassroomGraduationTopicsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/graduation_topics.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _getClassroomGraduationTopicsList.apply(this, arguments);
}
function getClassroomGraduationTaskList(_x9) {
return _getClassroomGraduationTaskList.apply(this, arguments);
}
// 教学课堂详情-试卷
function _getClassroomGraduationTaskList() {
_getClassroomGraduationTaskList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/graduation_tasks.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _getClassroomGraduationTaskList.apply(this, arguments);
}
function getClassroomExercisesList(_x10) {
return _getClassroomExercisesList.apply(this, arguments);
}
// 教学课堂详情-问卷
function _getClassroomExercisesList() {
_getClassroomExercisesList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/exercises.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _getClassroomExercisesList.apply(this, arguments);
}
function getClassroomPollsList(_x11) {
return _getClassroomPollsList.apply(this, arguments);
}
//教学课堂详情 普通作业
function _getClassroomPollsList() {
_getClassroomPollsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/polls.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _getClassroomPollsList.apply(this, arguments);
}
function getClassroomCommonHomeworksList(_x12) {
return _getClassroomCommonHomeworksList.apply(this, arguments);
}
// 教学课堂 获取所有班级
function _getClassroomCommonHomeworksList() {
_getClassroomCommonHomeworksList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/homework_commons.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _getClassroomCommonHomeworksList.apply(this, arguments);
}
function getCourseGroups(_x13) {
return _getCourseGroups.apply(this, arguments);
}
// 教学课堂 签到
function _getCourseGroups() {
_getCourseGroups = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/course_groups.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _getCourseGroups.apply(this, arguments);
}
function getClassroomAttendancesList(_x14) {
return _getClassroomAttendancesList.apply(this, arguments);
}
// 教学课堂 签到统计
function _getClassroomAttendancesList() {
_getClassroomAttendancesList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/attendances.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _getClassroomAttendancesList.apply(this, arguments);
}
function getClassroomAttendancesStatistic(_x15) {
return _getClassroomAttendancesStatistic.apply(this, arguments);
}
// 教学课堂 签到详情
function _getClassroomAttendancesStatistic() {
_getClassroomAttendancesStatistic = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/weapps/courses/".concat(params.coursesId, "/attendances.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _getClassroomAttendancesStatistic.apply(this, arguments);
}
function getAttendanceDetail(_x16) {
return _getAttendanceDetail.apply(this, arguments);
}
// 教学课堂 - 公告
function _getAttendanceDetail() {
_getAttendanceDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/attendances/".concat(params.id, "/edit.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _getAttendanceDetail.apply(this, arguments);
}
function getAnnouncementList(_x17) {
return _getAnnouncementList.apply(this, arguments);
}
// 教学课堂 - 资源 getAttachmentList
function _getAnnouncementList() {
_getAnnouncementList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/informs.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _getAnnouncementList.apply(this, arguments);
}
function getAttachmentList(_x18) {
return _getAttachmentList.apply(this, arguments);
}
// 教学课堂 - 视频
function _getAttachmentList() {
_getAttachmentList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/files.json", {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _getAttachmentList.apply(this, arguments);
}
function getVideoList(_x19) {
return _getVideoList.apply(this, arguments);
}
// 教学课堂 - 直播
function _getVideoList() {
_getVideoList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/course_videos.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _getVideoList.apply(this, arguments);
}
function getLiveVideoList(_x20) {
return _getLiveVideoList.apply(this, arguments);
}
// 教学课堂 我的课堂
function _getLiveVideoList() {
_getLiveVideoList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/live_links.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _getLiveVideoList.apply(this, arguments);
}
function getCoursesMine(_x21) {
return _getCoursesMine.apply(this, arguments);
}
// 教学课堂 讨论
function _getCoursesMine() {
_getCoursesMine = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/mine.json", {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _getCoursesMine.apply(this, arguments);
}
function getBoardList(_x22) {
return _getBoardList.apply(this, arguments);
}
// 教学课堂 分班
function _getBoardList() {
_getBoardList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/boards/".concat(params.categoryId, "/messages.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _getBoardList.apply(this, arguments);
}
function getCourseGroupsList(_x23) {
return _getCourseGroupsList.apply(this, arguments);
}
// 教学课堂 - 学生 getCourseStudentsList
function _getCourseGroupsList() {
_getCourseGroupsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/course_groups.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _getCourseGroupsList.apply(this, arguments);
}
function getCourseStudentsList(_x24) {
return _getCourseStudentsList.apply(this, arguments);
}
// 教学课堂 - 统计
function _getCourseStudentsList() {
_getCourseStudentsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/students.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _getCourseStudentsList.apply(this, arguments);
}
function getCourseStatistics(_x25) {
return _getCourseStatistics.apply(this, arguments);
}
// 教学课堂 - 学生成绩
function _getCourseStatistics() {
_getCourseStatistics = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/statistics.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _getCourseStatistics.apply(this, arguments);
}
function getCourseWorkscore(_x26) {
return _getCourseWorkscore.apply(this, arguments);
}
// 教学课堂 - 课堂活跃度
function _getCourseWorkscore() {
_getCourseWorkscore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/work_score.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _getCourseWorkscore.apply(this, arguments);
}
function getCourseActscore(_x27) {
return _getCourseActscore.apply(this, arguments);
}
// 教学课堂 全部实训
function _getCourseActscore() {
_getCourseActscore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/act_score.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _getCourseActscore.apply(this, arguments);
}
function getShixunLists(_x28) {
return _getShixunLists.apply(this, arguments);
}
// 从课堂实验中添加
function _getShixunLists() {
_getShixunLists = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
return _context28.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/shixun_lists.json", {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context28.stop();
}
}, _callee28);
}));
return _getShixunLists.apply(this, arguments);
}
function getExperimentLists(_x29) {
return _getExperimentLists.apply(this, arguments);
}
// 教学课堂 创建实训作业
function _getExperimentLists() {
_getExperimentLists = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
return _context29.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params === null || params === void 0 ? void 0 : params.course_id, "/homework_commons/impersonal_list.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context29.stop();
}
}, _callee29);
}));
return _getExperimentLists.apply(this, arguments);
}
function createShixunHomework(_x30) {
return _createShixunHomework.apply(this, arguments);
}
// 教学课堂 创建课堂实验作业
function _createShixunHomework() {
_createShixunHomework = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
return _context30.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/homework_commons/create_shixun_homework.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context30.stop();
}
}, _callee30);
}));
return _createShixunHomework.apply(this, arguments);
}
function createExperiment(_x31) {
return _createExperiment.apply(this, arguments);
}
// 教学课堂 全部课程
function _createExperiment() {
_createExperiment = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(params) {
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
return _context31.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params === null || params === void 0 ? void 0 : params.course_id, "/homework_commons/create_collaborators.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context31.stop();
}
}, _callee31);
}));
return _createExperiment.apply(this, arguments);
}
function getCoursesLists(_x32) {
return _getCoursesLists.apply(this, arguments);
}
// 教学课堂 创建课堂
function _getCoursesLists() {
_getCoursesLists = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) {
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
return _context32.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/subject_lists.json", {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context32.stop();
}
}, _callee32);
}));
return _getCoursesLists.apply(this, arguments);
}
function createCoursesHomework(_x33) {
return _createCoursesHomework.apply(this, arguments);
}
function _createCoursesHomework() {
_createCoursesHomework = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
return _context33.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/homework_commons/create_subject_homework.json"), {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context33.stop();
}
}, _callee33);
}));
return _createCoursesHomework.apply(this, arguments);
}
function getSchoolList(_x34) {
return _getSchoolList.apply(this, arguments);
}
function _getSchoolList() {
_getSchoolList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(params) {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
return _context34.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/schools/school_list.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context34.stop();
}
}, _callee34);
}));
return _getSchoolList.apply(this, arguments);
}
function getSearchCourseList(_x35) {
return _getSearchCourseList.apply(this, arguments);
}
function _getSearchCourseList() {
_getSearchCourseList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(params) {
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
return _context35.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/search_course_list.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context35.stop();
}
}, _callee35);
}));
return _getSearchCourseList.apply(this, arguments);
}
function submitCourses(_x36) {
return _submitCourses.apply(this, arguments);
}
function _submitCourses() {
_submitCourses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(params) {
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
return _context36.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context36.stop();
}
}, _callee36);
}));
return _submitCourses.apply(this, arguments);
}
function appplySchool(_x37) {
return _appplySchool.apply(this, arguments);
}
function _appplySchool() {
_appplySchool = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(params) {
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
while (1) switch (_context37.prev = _context37.next) {
case 0:
return _context37.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/add_school_applies.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context37.stop();
}
}, _callee37);
}));
return _appplySchool.apply(this, arguments);
}
function searchSchoolTeacherList(_x38) {
return _searchSchoolTeacherList.apply(this, arguments);
}
function _searchSchoolTeacherList() {
_searchSchoolTeacherList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(params) {
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
while (1) switch (_context38.prev = _context38.next) {
case 0:
return _context38.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/member_search.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context38.stop();
}
}, _callee38);
}));
return _searchSchoolTeacherList.apply(this, arguments);
}
function searchCoursesList(_x39) {
return _searchCoursesList.apply(this, arguments);
}
function _searchCoursesList() {
_searchCoursesList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(params) {
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
while (1) switch (_context39.prev = _context39.next) {
case 0:
return _context39.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/search_all.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context39.stop();
}
}, _callee39);
}));
return _searchCoursesList.apply(this, arguments);
}
function addTeacher(_x40) {
return _addTeacher.apply(this, arguments);
}
function _addTeacher() {
_addTeacher = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(params) {
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
while (1) switch (_context40.prev = _context40.next) {
case 0:
return _context40.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/add_teacher.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context40.stop();
}
}, _callee40);
}));
return _addTeacher.apply(this, arguments);
}
function addStudentBySearch(_x41) {
return _addStudentBySearch.apply(this, arguments);
}
function _addStudentBySearch() {
_addStudentBySearch = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(params) {
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
while (1) switch (_context41.prev = _context41.next) {
case 0:
return _context41.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/add_students_by_search.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context41.stop();
}
}, _callee41);
}));
return _addStudentBySearch.apply(this, arguments);
}
function setPublicOrPrivate(_x42) {
return _setPublicOrPrivate.apply(this, arguments);
}
function _setPublicOrPrivate() {
_setPublicOrPrivate = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(params) {
return _regeneratorRuntime().wrap(function _callee42$(_context42) {
while (1) switch (_context42.prev = _context42.next) {
case 0:
return _context42.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/set_public_or_private.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context42.stop();
}
}, _callee42);
}));
return _setPublicOrPrivate.apply(this, arguments);
}
function setInviteCodeHalt(_x43) {
return _setInviteCodeHalt.apply(this, arguments);
}
// 复制课堂
function _setInviteCodeHalt() {
_setInviteCodeHalt = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(params) {
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
while (1) switch (_context43.prev = _context43.next) {
case 0:
return _context43.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/set_invite_code_halt.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context43.stop();
}
}, _callee43);
}));
return _setInviteCodeHalt.apply(this, arguments);
}
function duplicateCourse(_x44) {
return _duplicateCourse.apply(this, arguments);
}
function _duplicateCourse() {
_duplicateCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(params) {
return _regeneratorRuntime().wrap(function _callee44$(_context44) {
while (1) switch (_context44.prev = _context44.next) {
case 0:
return _context44.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/duplicate_course.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context44.stop();
}
}, _callee44);
}));
return _duplicateCourse.apply(this, arguments);
}
function deleteCourse(_x45) {
return _deleteCourse.apply(this, arguments);
}
// 教学课堂 - 公告
function _deleteCourse() {
_deleteCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(params) {
return _regeneratorRuntime().wrap(function _callee45$(_context45) {
while (1) switch (_context45.prev = _context45.next) {
case 0:
return _context45.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, ".json"), {
method: 'delete',
body: params
}));
case 1:
case "end":
return _context45.stop();
}
}, _callee45);
}));
return _deleteCourse.apply(this, arguments);
}
function getCourseEditData(_x46) {
return _getCourseEditData.apply(this, arguments);
}
function _getCourseEditData() {
_getCourseEditData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46(params) {
return _regeneratorRuntime().wrap(function _callee46$(_context46) {
while (1) switch (_context46.prev = _context46.next) {
case 0:
return _context46.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/settings.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context46.stop();
}
}, _callee46);
}));
return _getCourseEditData.apply(this, arguments);
}
function updateCourseData(_x47) {
return _updateCourseData.apply(this, arguments);
}
function _updateCourseData() {
_updateCourseData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47(params) {
return _regeneratorRuntime().wrap(function _callee47$(_context47) {
while (1) switch (_context47.prev = _context47.next) {
case 0:
return _context47.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context47.stop();
}
}, _callee47);
}));
return _updateCourseData.apply(this, arguments);
}
function exportCourseInfo(_x48) {
return _exportCourseInfo.apply(this, arguments);
}
function _exportCourseInfo() {
_exportCourseInfo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48(params) {
return _regeneratorRuntime().wrap(function _callee48$(_context48) {
while (1) switch (_context48.prev = _context48.next) {
case 0:
return _context48.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/export_couser_info.json"), {
method: 'get',
params: {
export: true
}
}));
case 1:
case "end":
return _context48.stop();
}
}, _callee48);
}));
return _exportCourseInfo.apply(this, arguments);
}
function exportCourseActScore(_x49) {
return _exportCourseActScore.apply(this, arguments);
}
function _exportCourseActScore() {
_exportCourseActScore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(params) {
return _regeneratorRuntime().wrap(function _callee49$(_context49) {
while (1) switch (_context49.prev = _context49.next) {
case 0:
return _context49.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/export_member_act_score_async.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
export: true
}, params)
}));
case 1:
case "end":
return _context49.stop();
}
}, _callee49);
}));
return _exportCourseActScore.apply(this, arguments);
}
function exportCourseTotalScore(_x50) {
return _exportCourseTotalScore.apply(this, arguments);
}
function _exportCourseTotalScore() {
_exportCourseTotalScore = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(params) {
return _regeneratorRuntime().wrap(function _callee50$(_context50) {
while (1) switch (_context50.prev = _context50.next) {
case 0:
return _context50.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/export_total_homework_commons_score.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
export: true
}, params)
}));
case 1:
case "end":
return _context50.stop();
}
}, _callee50);
}));
return _exportCourseTotalScore.apply(this, arguments);
}
function exportCourseAndOther(_x51) {
return _exportCourseAndOther.apply(this, arguments);
}
function _exportCourseAndOther() {
_exportCourseAndOther = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(params) {
return _regeneratorRuntime().wrap(function _callee51$(_context51) {
while (1) switch (_context51.prev = _context51.next) {
case 0:
return _context51.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/export_total_exercises_and_other_score.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
export: true
}, params)
}));
case 1:
case "end":
return _context51.stop();
}
}, _callee51);
}));
return _exportCourseAndOther.apply(this, arguments);
}
function exportMoocrecords(_x52) {
return _exportMoocrecords.apply(this, arguments);
}
function _exportMoocrecords() {
_exportMoocrecords = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(params) {
return _regeneratorRuntime().wrap(function _callee52$(_context52) {
while (1) switch (_context52.prev = _context52.next) {
case 0:
return _context52.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/export_mooc_records.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
export: true
}, params)
}));
case 1:
case "end":
return _context52.stop();
}
}, _callee52);
}));
return _exportMoocrecords.apply(this, arguments);
}
function exportCourseMemberScores(_x53) {
return _exportCourseMemberScores.apply(this, arguments);
}
function _exportCourseMemberScores() {
_exportCourseMemberScores = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee53(params) {
return _regeneratorRuntime().wrap(function _callee53$(_context53) {
while (1) switch (_context53.prev = _context53.next) {
case 0:
return _context53.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/export_total_course_score.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
export: true
}, params)
}));
case 1:
case "end":
return _context53.stop();
}
}, _callee53);
}));
return _exportCourseMemberScores.apply(this, arguments);
}
function exportCourseWorkListScores(_x54) {
return _exportCourseWorkListScores.apply(this, arguments);
}
function _exportCourseWorkListScores() {
_exportCourseWorkListScores = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee54(params) {
return _regeneratorRuntime().wrap(function _callee54$(_context54) {
while (1) switch (_context54.prev = _context54.next) {
case 0:
return _context54.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/homework_commons/".concat(params.categoryId, "/export_scores.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
export: true
}, params)
}));
case 1:
case "end":
return _context54.stop();
}
}, _callee54);
}));
return _exportCourseWorkListScores.apply(this, arguments);
}
function exportCourseWorkListAppendix(_x55) {
return _exportCourseWorkListAppendix.apply(this, arguments);
}
function _exportCourseWorkListAppendix() {
_exportCourseWorkListAppendix = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee55(params) {
return _regeneratorRuntime().wrap(function _callee55$(_context55) {
while (1) switch (_context55.prev = _context55.next) {
case 0:
return _context55.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/homework_commons/".concat(params.categoryId, "/works_list.zip"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
export: true
}, params)
}));
case 1:
case "end":
return _context55.stop();
}
}, _callee55);
}));
return _exportCourseWorkListAppendix.apply(this, arguments);
}
function deleteSecondCategory(_x56) {
return _deleteSecondCategory.apply(this, arguments);
}
function _deleteSecondCategory() {
_deleteSecondCategory = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56(params) {
return _regeneratorRuntime().wrap(function _callee56$(_context56) {
while (1) switch (_context56.prev = _context56.next) {
case 0:
return _context56.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api//course_second_categories/".concat(params.id, ".json"), {
method: 'delete',
params: {
export: true
}
}));
case 1:
case "end":
return _context56.stop();
}
}, _callee56);
}));
return _deleteSecondCategory.apply(this, arguments);
}
function deleteBoardCategory(_x57) {
return _deleteBoardCategory.apply(this, arguments);
}
function _deleteBoardCategory() {
_deleteBoardCategory = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee57(params) {
return _regeneratorRuntime().wrap(function _callee57$(_context57) {
while (1) switch (_context57.prev = _context57.next) {
case 0:
return _context57.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api//boards/".concat(params.id, ".json"), {
method: 'delete',
params: {
export: true
}
}));
case 1:
case "end":
return _context57.stop();
}
}, _callee57);
}));
return _deleteBoardCategory.apply(this, arguments);
}
function stickyModule(_x58) {
return _stickyModule.apply(this, arguments);
}
function _stickyModule() {
_stickyModule = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee58(params) {
return _regeneratorRuntime().wrap(function _callee58$(_context58) {
while (1) switch (_context58.prev = _context58.next) {
case 0:
return _context58.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/course_modules/".concat(params.id, "/sticky_module.json"), {
method: 'get'
}));
case 1:
case "end":
return _context58.stop();
}
}, _callee58);
}));
return _stickyModule.apply(this, arguments);
}
function hiddenModule(_x59) {
return _hiddenModule.apply(this, arguments);
}
function _hiddenModule() {
_hiddenModule = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee59(params) {
return _regeneratorRuntime().wrap(function _callee59$(_context59) {
while (1) switch (_context59.prev = _context59.next) {
case 0:
return _context59.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/course_modules/".concat(params.id, "/hidden_module.json"), {
method: 'get'
}));
case 1:
case "end":
return _context59.stop();
}
}, _callee59);
}));
return _hiddenModule.apply(this, arguments);
}
function getNewStartClassData(_x60) {
return _getNewStartClassData.apply(this, arguments);
}
function _getNewStartClassData() {
_getNewStartClassData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee60(params) {
return _regeneratorRuntime().wrap(function _callee60$(_context60) {
while (1) switch (_context60.prev = _context60.next) {
case 0:
return _context60.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/new.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context60.stop();
}
}, _callee60);
}));
return _getNewStartClassData.apply(this, arguments);
}
function getAttendancesData(_x61) {
return _getAttendancesData.apply(this, arguments);
}
function _getAttendancesData() {
_getAttendancesData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee61(params) {
return _regeneratorRuntime().wrap(function _callee61$(_context61) {
while (1) switch (_context61.prev = _context61.next) {
case 0:
return _context61.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/weapps/attendances/".concat(params.id, ".json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context61.stop();
}
}, _callee61);
}));
return _getAttendancesData.apply(this, arguments);
}
function getCourseMemberAttendanceData(_x62) {
return _getCourseMemberAttendanceData.apply(this, arguments);
}
function _getCourseMemberAttendanceData() {
_getCourseMemberAttendanceData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee62(params) {
return _regeneratorRuntime().wrap(function _callee62$(_context62) {
while (1) switch (_context62.prev = _context62.next) {
case 0:
return _context62.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/weapps/course_member_attendances.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context62.stop();
}
}, _callee62);
}));
return _getCourseMemberAttendanceData.apply(this, arguments);
}
function updateAttendanceStatus(_x63) {
return _updateAttendanceStatus.apply(this, arguments);
}
function _updateAttendanceStatus() {
_updateAttendanceStatus = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee63(params) {
return _regeneratorRuntime().wrap(function _callee63$(_context63) {
while (1) switch (_context63.prev = _context63.next) {
case 0:
return _context63.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/weapps/course_member_attendances/update_status.json", {
method: 'post',
body: params
}));
case 1:
case "end":
return _context63.stop();
}
}, _callee63);
}));
return _updateAttendanceStatus.apply(this, arguments);
}
function exportPollsScores(_x64) {
return _exportPollsScores.apply(this, arguments);
}
function _exportPollsScores() {
_exportPollsScores = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee64(params) {
return _regeneratorRuntime().wrap(function _callee64$(_context64) {
while (1) switch (_context64.prev = _context64.next) {
case 0:
return _context64.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/polls/".concat(params.categoryId, "/commit_result.xlsx"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
export: true
}, params)
}));
case 1:
case "end":
return _context64.stop();
}
}, _callee64);
}));
return _exportPollsScores.apply(this, arguments);
}
function exportExerciseStudentScores(_x65) {
return _exportExerciseStudentScores.apply(this, arguments);
}
function _exportExerciseStudentScores() {
_exportExerciseStudentScores = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee65(params) {
return _regeneratorRuntime().wrap(function _callee65$(_context65) {
while (1) switch (_context65.prev = _context65.next) {
case 0:
return _context65.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/exercises/".concat(params.categoryId, "/export_scores.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
export: true
}, params)
}));
case 1:
case "end":
return _context65.stop();
}
}, _callee65);
}));
return _exportExerciseStudentScores.apply(this, arguments);
}
function getPollStartAnswer(params) {
return Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/polls/".concat(params.categoryId, "/start_answer.json"), {
method: 'get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
});
}
function updatePollVotes(_x66) {
return _updatePollVotes.apply(this, arguments);
}
function _updatePollVotes() {
_updatePollVotes = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee66(params) {
return _regeneratorRuntime().wrap(function _callee66$(_context66) {
while (1) switch (_context66.prev = _context66.next) {
case 0:
return _context66.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/poll_questions/".concat(params.questionId, "/poll_votes.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context66.stop();
}
}, _callee66);
}));
return _updatePollVotes.apply(this, arguments);
}
function submitPollAnswer(_x67) {
return _submitPollAnswer.apply(this, arguments);
}
function _submitPollAnswer() {
_submitPollAnswer = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee67(params) {
return _regeneratorRuntime().wrap(function _callee67$(_context67) {
while (1) switch (_context67.prev = _context67.next) {
case 0:
return _context67.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/polls/".concat(params.categoryId, "/commit_poll.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context67.stop();
}
}, _callee67);
}));
return _submitPollAnswer.apply(this, arguments);
}
function getAllTasks(_x68) {
return _getAllTasks.apply(this, arguments);
}
function _getAllTasks() {
_getAllTasks = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee68(params) {
return _regeneratorRuntime().wrap(function _callee68$(_context68) {
while (1) switch (_context68.prev = _context68.next) {
case 0:
return _context68.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.courseId, "/tasks_list.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context68.stop();
}
}, _callee68);
}));
return _getAllTasks.apply(this, arguments);
}
function updateTaskPosition(_x69) {
return _updateTaskPosition.apply(this, arguments);
}
function _updateTaskPosition() {
_updateTaskPosition = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee69(params) {
return _regeneratorRuntime().wrap(function _callee69$(_context69) {
while (1) switch (_context69.prev = _context69.next) {
case 0:
return _context69.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.courseId, "/update_task_position.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context69.stop();
}
}, _callee69);
}));
return _updateTaskPosition.apply(this, arguments);
}
function calculateAllShixunScores(_x70) {
return _calculateAllShixunScores.apply(this, arguments);
}
function _calculateAllShixunScores() {
_calculateAllShixunScores = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee70(params) {
return _regeneratorRuntime().wrap(function _callee70$(_context70) {
while (1) switch (_context70.prev = _context70.next) {
case 0:
return _context70.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/calculate_all_shixun_scores.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context70.stop();
}
}, _callee70);
}));
return _calculateAllShixunScores.apply(this, arguments);
}
function getAllCourseGroup(_x71) {
return _getAllCourseGroup.apply(this, arguments);
}
function _getAllCourseGroup() {
_getAllCourseGroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71(params) {
return _regeneratorRuntime().wrap(function _callee71$(_context71) {
while (1) switch (_context71.prev = _context71.next) {
case 0:
return _context71.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/all_course_groups.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context71.stop();
}
}, _callee71);
}));
return _getAllCourseGroup.apply(this, arguments);
}
function getCourseGroupStudents(_x72) {
return _getCourseGroupStudents.apply(this, arguments);
}
function _getCourseGroupStudents() {
_getCourseGroupStudents = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee72(params) {
return _regeneratorRuntime().wrap(function _callee72$(_context72) {
while (1) switch (_context72.prev = _context72.next) {
case 0:
return _context72.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/students.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context72.stop();
}
}, _callee72);
}));
return _getCourseGroupStudents.apply(this, arguments);
}
function renameCourseGroup(_x73) {
return _renameCourseGroup.apply(this, arguments);
}
function _renameCourseGroup() {
_renameCourseGroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee73(params) {
return _regeneratorRuntime().wrap(function _callee73$(_context73) {
while (1) switch (_context73.prev = _context73.next) {
case 0:
return _context73.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/course_groups/".concat(params.categoryId, "/rename_group.json"), {
method: 'POST',
body: params
}));
case 1:
case "end":
return _context73.stop();
}
}, _callee73);
}));
return _renameCourseGroup.apply(this, arguments);
}
function deleteCourseGroup(_x74) {
return _deleteCourseGroup.apply(this, arguments);
}
function _deleteCourseGroup() {
_deleteCourseGroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee74(params) {
return _regeneratorRuntime().wrap(function _callee74$(_context74) {
while (1) switch (_context74.prev = _context74.next) {
case 0:
return _context74.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/course_groups/".concat(params.categoryId, ".json"), {
method: 'delete',
body: params
}));
case 1:
case "end":
return _context74.stop();
}
}, _callee74);
}));
return _deleteCourseGroup.apply(this, arguments);
}
function joinCourseGroup(_x75) {
return _joinCourseGroup.apply(this, arguments);
}
function _joinCourseGroup() {
_joinCourseGroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee75(params) {
return _regeneratorRuntime().wrap(function _callee75$(_context75) {
while (1) switch (_context75.prev = _context75.next) {
case 0:
return _context75.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/join_course_group.json"), {
method: 'POST',
body: params
}));
case 1:
case "end":
return _context75.stop();
}
}, _callee75);
}));
return _joinCourseGroup.apply(this, arguments);
}
function transferToCourseGroup(_x76) {
return _transferToCourseGroup.apply(this, arguments);
}
function _transferToCourseGroup() {
_transferToCourseGroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee76(params) {
return _regeneratorRuntime().wrap(function _callee76$(_context76) {
while (1) switch (_context76.prev = _context76.next) {
case 0:
return _context76.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/transfer_to_course_group.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context76.stop();
}
}, _callee76);
}));
return _transferToCourseGroup.apply(this, arguments);
}
function deleteStudent(_x77) {
return _deleteStudent.apply(this, arguments);
}
//加入分班
function _deleteStudent() {
_deleteStudent = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77(params) {
return _regeneratorRuntime().wrap(function _callee77$(_context77) {
while (1) switch (_context77.prev = _context77.next) {
case 0:
return _context77.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/delete_from_course.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context77.stop();
}
}, _callee77);
}));
return _deleteStudent.apply(this, arguments);
}
function joincoursegroup(_x78) {
return _joincoursegroup.apply(this, arguments);
}
function _joincoursegroup() {
_joincoursegroup = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee78(params) {
return _regeneratorRuntime().wrap(function _callee78$(_context78) {
while (1) switch (_context78.prev = _context78.next) {
case 0:
return _context78.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/join_course_group.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context78.stop();
}
}, _callee78);
}));
return _joincoursegroup.apply(this, arguments);
}
function exitCourse(_x79) {
return _exitCourse.apply(this, arguments);
}
function _exitCourse() {
_exitCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee79(params) {
return _regeneratorRuntime().wrap(function _callee79$(_context79) {
while (1) switch (_context79.prev = _context79.next) {
case 0:
return _context79.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/exit_course.json"), {
method: 'post'
}));
case 1:
case "end":
return _context79.stop();
}
}, _callee79);
}));
return _exitCourse.apply(this, arguments);
}
function courseMemberAttendances(_x80) {
return _courseMemberAttendances.apply(this, arguments);
}
// 第三方慕课
function _courseMemberAttendances() {
_courseMemberAttendances = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee80(params) {
return _regeneratorRuntime().wrap(function _callee80$(_context80) {
while (1) switch (_context80.prev = _context80.next) {
case 0:
return _context80.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/weapps/course_member_attendances.json", {
method: 'post',
body: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
// attendance_id: 335
// attendance_mode: "QUICK"
}));
case 1:
case "end":
return _context80.stop();
}
}, _callee80);
}));
return _courseMemberAttendances.apply(this, arguments);
}
function getMoocEditData(_x81) {
return _getMoocEditData.apply(this, arguments);
}
function _getMoocEditData() {
_getMoocEditData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee81(params) {
return _regeneratorRuntime().wrap(function _callee81$(_context81) {
while (1) switch (_context81.prev = _context81.next) {
case 0:
return _context81.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/mooc_users/").concat(params.user_id, "/edit.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context81.stop();
}
}, _callee81);
}));
return _getMoocEditData.apply(this, arguments);
}
function createMoocData(_x82) {
return _createMoocData.apply(this, arguments);
}
function _createMoocData() {
_createMoocData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee82(params) {
return _regeneratorRuntime().wrap(function _callee82$(_context82) {
while (1) switch (_context82.prev = _context82.next) {
case 0:
return _context82.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/mooc_users.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context82.stop();
}
}, _callee82);
}));
return _createMoocData.apply(this, arguments);
}
function updateMoocData(_x83) {
return _updateMoocData.apply(this, arguments);
}
function _updateMoocData() {
_updateMoocData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee83(params) {
return _regeneratorRuntime().wrap(function _callee83$(_context83) {
while (1) switch (_context83.prev = _context83.next) {
case 0:
return _context83.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/mooc_users/").concat(params.user_id, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context83.stop();
}
}, _callee83);
}));
return _updateMoocData.apply(this, arguments);
}
function moveCategory(_x84) {
return _moveCategory.apply(this, arguments);
}
function _moveCategory() {
_moveCategory = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee84(params) {
return _regeneratorRuntime().wrap(function _callee84$(_context84) {
while (1) switch (_context84.prev = _context84.next) {
case 0:
return _context84.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/course_second_categories/".concat(params.id, "/move_category.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context84.stop();
}
}, _callee84);
}));
return _moveCategory.apply(this, arguments);
}
function moveboard(_x85) {
return _moveboard.apply(this, arguments);
}
function _moveboard() {
_moveboard = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee85(params) {
return _regeneratorRuntime().wrap(function _callee85$(_context85) {
while (1) switch (_context85.prev = _context85.next) {
case 0:
return _context85.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/boards/".concat(params.id, "/move_category.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context85.stop();
}
}, _callee85);
}));
return _moveboard.apply(this, arguments);
}
function getCourseware(_x86) {
return _getCourseware.apply(this, arguments);
}
function _getCourseware() {
_getCourseware = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee86(params) {
return _regeneratorRuntime().wrap(function _callee86$(_context86) {
while (1) switch (_context86.prev = _context86.next) {
case 0:
return _context86.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.id, "/courseware.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context86.stop();
}
}, _callee86);
}));
return _getCourseware.apply(this, arguments);
}
/***/ }),
/***/ "oVuX":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.array.join.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "RK3t");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "pkCn");
var nativeJoin = [].join;
var ES3_STRINGS = IndexedObject != Object;
var STRICT_METHOD = arrayMethodIsStrict('join', ',');
// `Array.prototype.join` method
// https://tc39.github.io/ecma262/#sec-array.prototype.join
$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, {
join: function join(separator) {
return nativeJoin.call(toIndexedObject(this), separator === undefined ? ',' : separator);
}
});
/***/ }),
/***/ "oZsa":
/*!********************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js ***!
\********************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _getPrototypeOf; });
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
/***/ }),
/***/ "ofBz":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.string.match-all.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "ntOU");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "ROdP");
var getRegExpFlags = __webpack_require__(/*! ../internals/regexp-flags */ "rW0t");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "iqWW");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var MATCH_ALL = wellKnownSymbol('matchAll');
var REGEXP_STRING = 'RegExp String';
var REGEXP_STRING_ITERATOR = REGEXP_STRING + ' Iterator';
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(REGEXP_STRING_ITERATOR);
var RegExpPrototype = RegExp.prototype;
var regExpBuiltinExec = RegExpPrototype.exec;
var nativeMatchAll = ''.matchAll;
var WORKS_WITH_NON_GLOBAL_REGEX = !!nativeMatchAll && !fails(function () {
'a'.matchAll(/./);
});
var regExpExec = function (R, S) {
var exec = R.exec;
var result;
if (typeof exec == 'function') {
result = exec.call(R, S);
if (typeof result != 'object') throw TypeError('Incorrect exec result');
return result;
} return regExpBuiltinExec.call(R, S);
};
// eslint-disable-next-line max-len
var $RegExpStringIterator = createIteratorConstructor(function RegExpStringIterator(regexp, string, global, fullUnicode) {
setInternalState(this, {
type: REGEXP_STRING_ITERATOR,
regexp: regexp,
string: string,
global: global,
unicode: fullUnicode,
done: false
});
}, REGEXP_STRING, function next() {
var state = getInternalState(this);
if (state.done) return { value: undefined, done: true };
var R = state.regexp;
var S = state.string;
var match = regExpExec(R, S);
if (match === null) return { value: undefined, done: state.done = true };
if (state.global) {
if (String(match[0]) == '') R.lastIndex = advanceStringIndex(S, toLength(R.lastIndex), state.unicode);
return { value: match, done: false };
}
state.done = true;
return { value: match, done: false };
});
var $matchAll = function (string) {
var R = anObject(this);
var S = String(string);
var C, flagsValue, flags, matcher, global, fullUnicode;
C = speciesConstructor(R, RegExp);
flagsValue = R.flags;
if (flagsValue === undefined && R instanceof RegExp && !('flags' in RegExpPrototype)) {
flagsValue = getRegExpFlags.call(R);
}
flags = flagsValue === undefined ? '' : String(flagsValue);
matcher = new C(C === RegExp ? R.source : R, flags);
global = !!~flags.indexOf('g');
fullUnicode = !!~flags.indexOf('u');
matcher.lastIndex = toLength(R.lastIndex);
return new $RegExpStringIterator(matcher, S, global, fullUnicode);
};
// `String.prototype.matchAll` method
// https://github.com/tc39/proposal-string-matchall
$({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, {
matchAll: function matchAll(regexp) {
var O = requireObjectCoercible(this);
var flags, S, matcher, rx;
if (regexp != null) {
if (isRegExp(regexp)) {
flags = String(requireObjectCoercible('flags' in RegExpPrototype
? regexp.flags
: getRegExpFlags.call(regexp)
));
if (!~flags.indexOf('g')) throw TypeError('`.matchAll` does not allow non-global regexes');
}
if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll.apply(O, arguments);
matcher = regexp[MATCH_ALL];
if (matcher === undefined && IS_PURE && classof(regexp) == 'RegExp') matcher = $matchAll;
if (matcher != null) return aFunction(matcher).call(regexp, O);
} else if (WORKS_WITH_NON_GLOBAL_REGEX) return nativeMatchAll.apply(O, arguments);
S = String(O);
rx = new RegExp(regexp, 'g');
return IS_PURE ? $matchAll.call(rx, S) : rx[MATCH_ALL](S);
}
});
IS_PURE || MATCH_ALL in RegExpPrototype || createNonEnumerableProperty(RegExpPrototype, MATCH_ALL, $matchAll);
/***/ }),
/***/ "or9q":
/*!**************************************************************!*\
!*** ./node_modules/core-js/internals/flatten-into-array.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isArray = __webpack_require__(/*! ../internals/is-array */ "6LWA");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
// `FlattenIntoArray` abstract operation
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
var flattenIntoArray = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
var targetIndex = start;
var sourceIndex = 0;
var mapFn = mapper ? bind(mapper, thisArg, 3) : false;
var element;
while (sourceIndex < sourceLen) {
if (sourceIndex in source) {
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
if (depth > 0 && isArray(element)) {
targetIndex = flattenIntoArray(target, original, element, toLength(element.length), targetIndex, depth - 1) - 1;
} else {
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
target[targetIndex] = element;
}
targetIndex++;
}
sourceIndex++;
}
return targetIndex;
};
module.exports = flattenIntoArray;
/***/ }),
/***/ "p532":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/es.promise.finally.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "/qmn");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "zfnd");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
var NON_GENERIC = !!NativePromise && fails(function () {
NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
});
// `Promise.prototype.finally` method
// https://tc39.github.io/ecma262/#sec-promise.prototype.finally
$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
'finally': function (onFinally) {
var C = speciesConstructor(this, getBuiltIn('Promise'));
var isFunction = typeof onFinally == 'function';
return this.then(
isFunction ? function (x) {
return promiseResolve(C, onFinally()).then(function () { return x; });
} : onFinally,
isFunction ? function (e) {
return promiseResolve(C, onFinally()).then(function () { throw e; });
} : onFinally
);
}
});
// patch native Promise.prototype for native async functions
if (!IS_PURE && typeof NativePromise == 'function' && !NativePromise.prototype['finally']) {
redefine(NativePromise.prototype, 'finally', getBuiltIn('Promise').prototype['finally']);
}
/***/ }),
/***/ "p5mE":
/*!*********************************************************!*\
!*** ./node_modules/core-js/internals/composite-key.js ***!
\*********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
var Map = __webpack_require__(/*! ../modules/es.map */ "Tskq");
var WeakMap = __webpack_require__(/*! ../modules/es.weak-map */ "ENF9");
var create = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var Node = function () {
// keys
this.object = null;
this.symbol = null;
// child nodes
this.primitives = null;
this.objectsByIndex = create(null);
};
Node.prototype.get = function (key, initializer) {
return this[key] || (this[key] = initializer());
};
Node.prototype.next = function (i, it, IS_OBJECT) {
var store = IS_OBJECT
? this.objectsByIndex[i] || (this.objectsByIndex[i] = new WeakMap())
: this.primitives || (this.primitives = new Map());
var entry = store.get(it);
if (!entry) store.set(it, entry = new Node());
return entry;
};
var root = new Node();
module.exports = function () {
var active = root;
var length = arguments.length;
var i, it;
// for prevent leaking, start from objects
for (i = 0; i < length; i++) {
if (isObject(it = arguments[i])) active = active.next(i, it, true);
}
if (this === Object && active === root) throw TypeError('Composite keys must contain a non-primitive component');
for (i = 0; i < length; i++) {
if (!isObject(it = arguments[i])) active = active.next(i, it, false);
} return active;
};
/***/ }),
/***/ "pDQq":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.array.splice.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "I8vh");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "ZfDv");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "hBjN");
var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "Hd5f");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice');
var USES_TO_LENGTH = arrayMethodUsesToLength('splice', { ACCESSORS: true, 0: 0, 1: 2 });
var max = Math.max;
var min = Math.min;
var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF;
var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded';
// `Array.prototype.splice` method
// https://tc39.github.io/ecma262/#sec-array.prototype.splice
// with adding support of @@species
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT || !USES_TO_LENGTH }, {
splice: function splice(start, deleteCount /* , ...items */) {
var O = toObject(this);
var len = toLength(O.length);
var actualStart = toAbsoluteIndex(start, len);
var argumentsLength = arguments.length;
var insertCount, actualDeleteCount, A, k, from, to;
if (argumentsLength === 0) {
insertCount = actualDeleteCount = 0;
} else if (argumentsLength === 1) {
insertCount = 0;
actualDeleteCount = len - actualStart;
} else {
insertCount = argumentsLength - 2;
actualDeleteCount = min(max(toInteger(deleteCount), 0), len - actualStart);
}
if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED);
}
A = arraySpeciesCreate(O, actualDeleteCount);
for (k = 0; k < actualDeleteCount; k++) {
from = actualStart + k;
if (from in O) createProperty(A, k, O[from]);
}
A.length = actualDeleteCount;
if (insertCount < actualDeleteCount) {
for (k = actualStart; k < len - actualDeleteCount; k++) {
from = k + actualDeleteCount;
to = k + insertCount;
if (from in O) O[to] = O[from];
else delete O[to];
}
for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
} else if (insertCount > actualDeleteCount) {
for (k = len - actualDeleteCount; k > actualStart; k--) {
from = k + actualDeleteCount - 1;
to = k + insertCount - 1;
if (from in O) O[to] = O[from];
else delete O[to];
}
}
for (k = 0; k < insertCount; k++) {
O[k + actualStart] = arguments[k + 2];
}
O.length = len - actualDeleteCount + insertCount;
return A;
}
});
/***/ }),
/***/ "pNMO":
/*!***************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.js ***!
\***************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "STAE");
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "/b8u");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var isArray = __webpack_require__(/*! ../internals/is-array */ "6LWA");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "XGwC");
var nativeObjectCreate = __webpack_require__(/*! ../internals/object-create */ "fHMY");
var objectKeys = __webpack_require__(/*! ../internals/object-keys */ "33Wh");
var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "JBy8");
var getOwnPropertyNamesExternal = __webpack_require__(/*! ../internals/object-get-own-property-names-external */ "BX/b");
var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "dBg+");
var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "0eef");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var redefine = __webpack_require__(/*! ../internals/redefine */ "busE");
var shared = __webpack_require__(/*! ../internals/shared */ "VpIT");
var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "93I0");
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "0BK2");
var uid = __webpack_require__(/*! ../internals/uid */ "kOOl");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "5Tg+");
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "1E5z");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var $forEach = __webpack_require__(/*! ../internals/array-iteration */ "tycR").forEach;
var HIDDEN = sharedKey('hidden');
var SYMBOL = 'Symbol';
var PROTOTYPE = 'prototype';
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
var setInternalState = InternalStateModule.set;
var getInternalState = InternalStateModule.getterFor(SYMBOL);
var ObjectPrototype = Object[PROTOTYPE];
var $Symbol = global.Symbol;
var $stringify = getBuiltIn('JSON', 'stringify');
var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
var nativeDefineProperty = definePropertyModule.f;
var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f;
var nativePropertyIsEnumerable = propertyIsEnumerableModule.f;
var AllSymbols = shared('symbols');
var ObjectPrototypeSymbols = shared('op-symbols');
var StringToSymbolRegistry = shared('string-to-symbol-registry');
var SymbolToStringRegistry = shared('symbol-to-string-registry');
var WellKnownSymbolsStore = shared('wks');
var QObject = global.QObject;
// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;
// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687
var setSymbolDescriptor = DESCRIPTORS && fails(function () {
return nativeObjectCreate(nativeDefineProperty({}, 'a', {
get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; }
})).a != 7;
}) ? function (O, P, Attributes) {
var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P);
if (ObjectPrototypeDescriptor) delete ObjectPrototype[P];
nativeDefineProperty(O, P, Attributes);
if (ObjectPrototypeDescriptor && O !== ObjectPrototype) {
nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor);
}
} : nativeDefineProperty;
var wrap = function (tag, description) {
var symbol = AllSymbols[tag] = nativeObjectCreate($Symbol[PROTOTYPE]);
setInternalState(symbol, {
type: SYMBOL,
tag: tag,
description: description
});
if (!DESCRIPTORS) symbol.description = description;
return symbol;
};
var isSymbol = USE_SYMBOL_AS_UID ? function (it) {
return typeof it == 'symbol';
} : function (it) {
return Object(it) instanceof $Symbol;
};
var $defineProperty = function defineProperty(O, P, Attributes) {
if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes);
anObject(O);
var key = toPrimitive(P, true);
anObject(Attributes);
if (has(AllSymbols, key)) {
if (!Attributes.enumerable) {
if (!has(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {}));
O[HIDDEN][key] = true;
} else {
if (has(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false;
Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) });
} return setSymbolDescriptor(O, key, Attributes);
} return nativeDefineProperty(O, key, Attributes);
};
var $defineProperties = function defineProperties(O, Properties) {
anObject(O);
var properties = toIndexedObject(Properties);
var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties));
$forEach(keys, function (key) {
if (!DESCRIPTORS || $propertyIsEnumerable.call(properties, key)) $defineProperty(O, key, properties[key]);
});
return O;
};
var $create = function create(O, Properties) {
return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties);
};
var $propertyIsEnumerable = function propertyIsEnumerable(V) {
var P = toPrimitive(V, true);
var enumerable = nativePropertyIsEnumerable.call(this, P);
if (this === ObjectPrototype && has(AllSymbols, P) && !has(ObjectPrototypeSymbols, P)) return false;
return enumerable || !has(this, P) || !has(AllSymbols, P) || has(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true;
};
var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) {
var it = toIndexedObject(O);
var key = toPrimitive(P, true);
if (it === ObjectPrototype && has(AllSymbols, key) && !has(ObjectPrototypeSymbols, key)) return;
var descriptor = nativeGetOwnPropertyDescriptor(it, key);
if (descriptor && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) {
descriptor.enumerable = true;
}
return descriptor;
};
var $getOwnPropertyNames = function getOwnPropertyNames(O) {
var names = nativeGetOwnPropertyNames(toIndexedObject(O));
var result = [];
$forEach(names, function (key) {
if (!has(AllSymbols, key) && !has(hiddenKeys, key)) result.push(key);
});
return result;
};
var $getOwnPropertySymbols = function getOwnPropertySymbols(O) {
var IS_OBJECT_PROTOTYPE = O === ObjectPrototype;
var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O));
var result = [];
$forEach(names, function (key) {
if (has(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || has(ObjectPrototype, key))) {
result.push(AllSymbols[key]);
}
});
return result;
};
// `Symbol` constructor
// https://tc39.github.io/ecma262/#sec-symbol-constructor
if (!NATIVE_SYMBOL) {
$Symbol = function Symbol() {
if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor');
var description = !arguments.length || arguments[0] === undefined ? undefined : String(arguments[0]);
var tag = uid(description);
var setter = function (value) {
if (this === ObjectPrototype) setter.call(ObjectPrototypeSymbols, value);
if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;
setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value));
};
if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter });
return wrap(tag, description);
};
redefine($Symbol[PROTOTYPE], 'toString', function toString() {
return getInternalState(this).tag;
});
redefine($Symbol, 'withoutSetter', function (description) {
return wrap(uid(description), description);
});
propertyIsEnumerableModule.f = $propertyIsEnumerable;
definePropertyModule.f = $defineProperty;
getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor;
getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames;
getOwnPropertySymbolsModule.f = $getOwnPropertySymbols;
wrappedWellKnownSymbolModule.f = function (name) {
return wrap(wellKnownSymbol(name), name);
};
if (DESCRIPTORS) {
// https://github.com/tc39/proposal-Symbol-description
nativeDefineProperty($Symbol[PROTOTYPE], 'description', {
configurable: true,
get: function description() {
return getInternalState(this).description;
}
});
if (!IS_PURE) {
redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true });
}
}
}
$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, {
Symbol: $Symbol
});
$forEach(objectKeys(WellKnownSymbolsStore), function (name) {
defineWellKnownSymbol(name);
});
$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, {
// `Symbol.for` method
// https://tc39.github.io/ecma262/#sec-symbol.for
'for': function (key) {
var string = String(key);
if (has(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string];
var symbol = $Symbol(string);
StringToSymbolRegistry[string] = symbol;
SymbolToStringRegistry[symbol] = string;
return symbol;
},
// `Symbol.keyFor` method
// https://tc39.github.io/ecma262/#sec-symbol.keyfor
keyFor: function keyFor(sym) {
if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol');
if (has(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym];
},
useSetter: function () { USE_SETTER = true; },
useSimple: function () { USE_SETTER = false; }
});
$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, {
// `Object.create` method
// https://tc39.github.io/ecma262/#sec-object.create
create: $create,
// `Object.defineProperty` method
// https://tc39.github.io/ecma262/#sec-object.defineproperty
defineProperty: $defineProperty,
// `Object.defineProperties` method
// https://tc39.github.io/ecma262/#sec-object.defineproperties
defineProperties: $defineProperties,
// `Object.getOwnPropertyDescriptor` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptors
getOwnPropertyDescriptor: $getOwnPropertyDescriptor
});
$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, {
// `Object.getOwnPropertyNames` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertynames
getOwnPropertyNames: $getOwnPropertyNames,
// `Object.getOwnPropertySymbols` method
// https://tc39.github.io/ecma262/#sec-object.getownpropertysymbols
getOwnPropertySymbols: $getOwnPropertySymbols
});
// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives
// https://bugs.chromium.org/p/v8/issues/detail?id=3443
$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, {
getOwnPropertySymbols: function getOwnPropertySymbols(it) {
return getOwnPropertySymbolsModule.f(toObject(it));
}
});
// `JSON.stringify` method behavior with symbols
// https://tc39.github.io/ecma262/#sec-json.stringify
if ($stringify) {
var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () {
var symbol = $Symbol();
// MS Edge converts symbol values to JSON as {}
return $stringify([symbol]) != '[null]'
// WebKit converts symbol values to JSON as null
|| $stringify({ a: symbol }) != '{}'
// V8 throws on boxed symbols
|| $stringify(Object(symbol)) != '{}';
});
$({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, {
// eslint-disable-next-line no-unused-vars
stringify: function stringify(it, replacer, space) {
var args = [it];
var index = 1;
var $replacer;
while (arguments.length > index) args.push(arguments[index++]);
$replacer = replacer;
if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined
if (!isArray(replacer)) replacer = function (key, value) {
if (typeof $replacer == 'function') value = $replacer.call(this, key, value);
if (!isSymbol(value)) return value;
};
args[1] = replacer;
return $stringify.apply(null, args);
}
});
}
// `Symbol.prototype[@@toPrimitive]` method
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@toprimitive
if (!$Symbol[PROTOTYPE][TO_PRIMITIVE]) {
createNonEnumerableProperty($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);
}
// `Symbol.prototype[@@toStringTag]` property
// https://tc39.github.io/ecma262/#sec-symbol.prototype-@@tostringtag
setToStringTag($Symbol, SYMBOL);
hiddenKeys[HIDDEN] = true;
/***/ }),
/***/ "pVnL":
/*!********************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/extends.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _extends() {
module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
}, module.exports.__esModule = true, module.exports["default"] = module.exports;
return _extends.apply(this, arguments);
}
module.exports = _extends, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "pevA":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.observable.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://github.com/tc39/proposal-observable
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var setSpecies = __webpack_require__(/*! ../internals/set-species */ "JiZb");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "4syw");
var getIterator = __webpack_require__(/*! ../internals/get-iterator */ "mh/w");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var hostReportErrors = __webpack_require__(/*! ../internals/host-report-errors */ "RN6c");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var OBSERVABLE = wellKnownSymbol('observable');
var getInternalState = InternalStateModule.get;
var setInternalState = InternalStateModule.set;
var getMethod = function (fn) {
return fn == null ? undefined : aFunction(fn);
};
var cleanupSubscription = function (subscriptionState) {
var cleanup = subscriptionState.cleanup;
if (cleanup) {
subscriptionState.cleanup = undefined;
try {
cleanup();
} catch (error) {
hostReportErrors(error);
}
}
};
var subscriptionClosed = function (subscriptionState) {
return subscriptionState.observer === undefined;
};
var close = function (subscription, subscriptionState) {
if (!DESCRIPTORS) {
subscription.closed = true;
var subscriptionObserver = subscriptionState.subscriptionObserver;
if (subscriptionObserver) subscriptionObserver.closed = true;
} subscriptionState.observer = undefined;
};
var Subscription = function (observer, subscriber) {
var subscriptionState = setInternalState(this, {
cleanup: undefined,
observer: anObject(observer),
subscriptionObserver: undefined
});
var start;
if (!DESCRIPTORS) this.closed = false;
try {
if (start = getMethod(observer.start)) start.call(observer, this);
} catch (error) {
hostReportErrors(error);
}
if (subscriptionClosed(subscriptionState)) return;
var subscriptionObserver = subscriptionState.subscriptionObserver = new SubscriptionObserver(this);
try {
var cleanup = subscriber(subscriptionObserver);
var subscription = cleanup;
if (cleanup != null) subscriptionState.cleanup = typeof cleanup.unsubscribe === 'function'
? function () { subscription.unsubscribe(); }
: aFunction(cleanup);
} catch (error) {
subscriptionObserver.error(error);
return;
} if (subscriptionClosed(subscriptionState)) cleanupSubscription(subscriptionState);
};
Subscription.prototype = redefineAll({}, {
unsubscribe: function unsubscribe() {
var subscriptionState = getInternalState(this);
if (!subscriptionClosed(subscriptionState)) {
close(this, subscriptionState);
cleanupSubscription(subscriptionState);
}
}
});
if (DESCRIPTORS) defineProperty(Subscription.prototype, 'closed', {
configurable: true,
get: function () {
return subscriptionClosed(getInternalState(this));
}
});
var SubscriptionObserver = function (subscription) {
setInternalState(this, { subscription: subscription });
if (!DESCRIPTORS) this.closed = false;
};
SubscriptionObserver.prototype = redefineAll({}, {
next: function next(value) {
var subscriptionState = getInternalState(getInternalState(this).subscription);
if (!subscriptionClosed(subscriptionState)) {
var observer = subscriptionState.observer;
try {
var nextMethod = getMethod(observer.next);
if (nextMethod) nextMethod.call(observer, value);
} catch (error) {
hostReportErrors(error);
}
}
},
error: function error(value) {
var subscription = getInternalState(this).subscription;
var subscriptionState = getInternalState(subscription);
if (!subscriptionClosed(subscriptionState)) {
var observer = subscriptionState.observer;
close(subscription, subscriptionState);
try {
var errorMethod = getMethod(observer.error);
if (errorMethod) errorMethod.call(observer, value);
else hostReportErrors(value);
} catch (err) {
hostReportErrors(err);
} cleanupSubscription(subscriptionState);
}
},
complete: function complete() {
var subscription = getInternalState(this).subscription;
var subscriptionState = getInternalState(subscription);
if (!subscriptionClosed(subscriptionState)) {
var observer = subscriptionState.observer;
close(subscription, subscriptionState);
try {
var completeMethod = getMethod(observer.complete);
if (completeMethod) completeMethod.call(observer);
} catch (error) {
hostReportErrors(error);
} cleanupSubscription(subscriptionState);
}
}
});
if (DESCRIPTORS) defineProperty(SubscriptionObserver.prototype, 'closed', {
configurable: true,
get: function () {
return subscriptionClosed(getInternalState(getInternalState(this).subscription));
}
});
var $Observable = function Observable(subscriber) {
anInstance(this, $Observable, 'Observable');
setInternalState(this, { subscriber: aFunction(subscriber) });
};
redefineAll($Observable.prototype, {
subscribe: function subscribe(observer) {
var length = arguments.length;
return new Subscription(typeof observer === 'function' ? {
next: observer,
error: length > 1 ? arguments[1] : undefined,
complete: length > 2 ? arguments[2] : undefined
} : isObject(observer) ? observer : {}, getInternalState(this).subscriber);
}
});
redefineAll($Observable, {
from: function from(x) {
var C = typeof this === 'function' ? this : $Observable;
var observableMethod = getMethod(anObject(x)[OBSERVABLE]);
if (observableMethod) {
var observable = anObject(observableMethod.call(x));
return observable.constructor === C ? observable : new C(function (observer) {
return observable.subscribe(observer);
});
}
var iterator = getIterator(x);
return new C(function (observer) {
iterate(iterator, function (it) {
observer.next(it);
if (observer.closed) return iterate.stop();
}, undefined, false, true);
observer.complete();
});
},
of: function of() {
var C = typeof this === 'function' ? this : $Observable;
var length = arguments.length;
var items = new Array(length);
var index = 0;
while (index < length) items[index] = arguments[index++];
return new C(function (observer) {
for (var i = 0; i < length; i++) {
observer.next(items[i]);
if (observer.closed) return;
} observer.complete();
});
}
});
createNonEnumerableProperty($Observable.prototype, OBSERVABLE, function () { return this; });
$({ global: true }, {
Observable: $Observable
});
setSpecies('Observable');
/***/ }),
/***/ "piWV":
/*!*************************************!*\
!*** ./src/models/shixuns/index.ts ***!
\*************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/toConsumableArray */ "oBTY");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_shixuns__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/service/shixuns */ "HBuW");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var ShixunsListModel = {
namespace: 'shixunsList',
state: {
name: '',
loading: true,
listParams: {
sort: 'desc',
order_by: 'new',
//new 最新hot最热
page: 1,
//第一页开始
limit: 16,
keyword: '',
status: 0,
//1. 未发布2. 已发布 3. 已关闭 0 所有
diff: 0,
//1. 初级学员 2. 中级学员 3. 高级学员 4. 顶级学员 0. 所有
hideme: false //是否隐藏自己的实训ture. 是的,其他为否
// tag_level: 1, //方向的级别1. 大类 2. 子类 3. tag 其他为所有
// tag_id: '', //方向的类id如大类id, 子类id, tag id
}
},
effects: {
getShixuns: function getShixuns(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response, listParams;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_shixuns__WEBPACK_IMPORTED_MODULE_2__[/* getShixunsList */ "T"], payload);
case 2:
response = _context.sent;
// 获取页面数据
listParams = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, payload);
_context.next = 6;
return put({
type: 'save',
payload: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({
listParams: listParams
}, response)
});
case 6:
return _context.abrupt("return", response);
case 7:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getMenus: function getMenus(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(_response$disciplines) {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_shixuns__WEBPACK_IMPORTED_MODULE_2__[/* getShixunsMenus */ "U"], payload);
case 2:
response = _context2.sent;
// 获取页面数据
response === null || response === void 0 ? void 0 : (_response$disciplines = response.disciplines) === null || _response$disciplines === void 0 ? void 0 : _response$disciplines.map(function (item) {
item.sub_repertoires = item.sub_disciplines;
return item;
});
_context2.next = 6;
return put({
type: 'save',
payload: {
menus: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])((response === null || response === void 0 ? void 0 : response.disciplines) || [])
}
});
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
// 设置操做action
clearListParams: function clearListParams(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return put({
type: 'save',
payload: {
listParams: {
sort: 'desc',
order_by: 'new',
//new 最新hot最热
page: 1,
//第一页开始
limit: 16,
keyword: '',
status: 0,
//1. 未发布2. 已发布 3. 已关闭 0 所有
diff: 0,
//1. 初级学员 2. 中级学员 3. 高级学员 4. 顶级学员 0. 所有
hideme: false //是否隐藏自己的实训ture. 是的,其他为否
// tag_level: 1, //方向的级别1. 大类 2. 子类 3. tag 其他为所有
// tag_id: '', //方向的类id如大类id, 子类id, tag id
}
}
});
case 2:
case "end":
return _context3.stop();
}
}, _callee3);
})();
}
},
reducers: {
save: function save(state, action) {
// console.log("reducers:",state,action)
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref7) {
var dispatch = _ref7.dispatch,
history = _ref7.history;
// console.log("subscriptions:", dispatch, history)
return history.listen(function (_ref8) {
var pathname = _ref8.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (ShixunsListModel);
/***/ }),
/***/ "pjDv":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.array.from.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var from = __webpack_require__(/*! ../internals/array-from */ "TfTi");
var checkCorrectnessOfIteration = __webpack_require__(/*! ../internals/check-correctness-of-iteration */ "HH4o");
var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
Array.from(iterable);
});
// `Array.from` method
// https://tc39.github.io/ecma262/#sec-array.from
$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, {
from: from
});
/***/ }),
/***/ "pkCn":
/*!******************************************************************!*\
!*** ./node_modules/core-js/internals/array-method-is-strict.js ***!
\******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
module.exports = function (METHOD_NAME, argument) {
var method = [][METHOD_NAME];
return !!method && fails(function () {
// eslint-disable-next-line no-useless-call,no-throw-literal
method.call(null, argument || function () { throw 1; }, 1);
});
};
/***/ }),
/***/ "pkW7":
/*!*****************************************!*\
!*** ./node_modules/es-errors/index.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @type {import('.')} */
module.exports = Error;
/***/ }),
/***/ "ppGB":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/to-integer.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
var ceil = Math.ceil;
var floor = Math.floor;
// `ToInteger` abstract operation
// https://tc39.github.io/ecma262/#sec-tointeger
module.exports = function (argument) {
return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
};
/***/ }),
/***/ "pv2x":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.apply.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "0GbY");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var nativeApply = getBuiltIn('Reflect', 'apply');
var functionApply = Function.apply;
// MS Edge argumentsList argument is optional
var OPTIONAL_ARGUMENTS_LIST = !fails(function () {
nativeApply(function () { /* empty */ });
});
// `Reflect.apply` method
// https://tc39.github.io/ecma262/#sec-reflect.apply
$({ target: 'Reflect', stat: true, forced: OPTIONAL_ARGUMENTS_LIST }, {
apply: function apply(target, thisArgument, argumentsList) {
aFunction(target);
anObject(argumentsList);
return nativeApply
? nativeApply(target, thisArgument, argumentsList)
: functionApply.call(target, thisArgument, argumentsList);
}
});
/***/ }),
/***/ "q0dX":
/*!**************************************************!*\
!*** ./src/models/shixuns/detail.ts + 1 modules ***!
\**************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/service/shixuns.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/util.tsx because of ./src/layouts/index.tsx */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./src/service/shixuns.ts
var shixuns = __webpack_require__("HBuW");
// CONCATENATED MODULE: ./src/models/shixuns/util.ts
var formatAuditSituationData = function formatAuditSituationData() {
var _data$content_info, _data$content_info2, _data$content_info3, _data$perference_info, _data$perference_info2, _data$perference_info3;
var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return [{
name: '内容审核情况',
id: "Content",
status: data === null || data === void 0 ? void 0 : (_data$content_info = data.content_info) === null || _data$content_info === void 0 ? void 0 : _data$content_info.status,
username: data === null || data === void 0 ? void 0 : (_data$content_info2 = data.content_info) === null || _data$content_info2 === void 0 ? void 0 : _data$content_info2.username,
time: data === null || data === void 0 ? void 0 : (_data$content_info3 = data.content_info) === null || _data$content_info3 === void 0 ? void 0 : _data$content_info3.time
}, {
name: '性能审核情况',
id: "Performance",
status: data === null || data === void 0 ? void 0 : (_data$perference_info = data.perference_info) === null || _data$perference_info === void 0 ? void 0 : _data$perference_info.status,
username: data === null || data === void 0 ? void 0 : (_data$perference_info2 = data.perference_info) === null || _data$perference_info2 === void 0 ? void 0 : _data$perference_info2.username,
time: data === null || data === void 0 ? void 0 : (_data$perference_info3 = data.perference_info) === null || _data$perference_info3 === void 0 ? void 0 : _data$perference_info3.time
}];
};
// EXTERNAL MODULE: ./src/utils/util.tsx + 6 modules
var util = __webpack_require__("1vsH");
// CONCATENATED MODULE: ./src/models/shixuns/detail.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var ShixunsDetailModel = {
namespace: 'shixunsDetail',
state: {
detail: undefined,
rightData: undefined,
challenges: undefined,
auditSituationData: undefined,
setting: undefined,
challengesNew: {},
challengesEdit: {},
editChallengesQuestion: {},
fileContent: {},
//记录操作的action key值
repository: {},
mirrorApplies: {},
infoWithJupyterLab: {},
actionTabs: {
key: '',
params: {}
}
},
effects: {
getShixunsDetail: function getShixunsDetail(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(shixuns["R" /* getShixunsDetail */], payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
detail: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getMirrorApplies: function getMirrorApplies(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(shixuns["F" /* getMirrorApplies */], payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
mirrorApplies: Object(objectSpread2["a" /* default */])({}, (response === null || response === void 0 ? void 0 : response.data) || {})
}
});
case 5:
return _context2.abrupt("return", response);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getRightData: function getRightData(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(shixuns["L" /* getRightData */], payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
rightData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
getChallengesData: function getChallengesData(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var response;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(shixuns["u" /* getChallengesData */], payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
challenges: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
execJupyter: function execJupyter(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(shixuns["r" /* execJupyter */], payload);
case 2:
return _context5.abrupt("return", _context5.sent);
case 3:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
execShixun: function execShixun(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var response;
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(shixuns["s" /* execShixun */], payload);
case 2:
response = _context6.sent;
if ((response === null || response === void 0 ? void 0 : response.status) === -3) {
Object(util["a" /* bindPhone */])();
}
return _context6.abrupt("return", response);
case 5:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
openChallenge: function openChallenge(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(shixuns["W" /* openChallenge */], payload);
case 2:
return _context7.abrupt("return", _context7.sent);
case 3:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
challengeMoveUp: function challengeMoveUp(_ref15, _ref16) {
var payload = _ref15.payload;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(shixuns["j" /* challengeMoveUp */], payload);
case 2:
return _context8.abrupt("return", _context8.sent);
case 3:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
challengeMoveDown: function challengeMoveDown(_ref17, _ref18) {
var payload = _ref17.payload;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(shixuns["i" /* challengeMoveDown */], payload);
case 2:
return _context9.abrupt("return", _context9.sent);
case 3:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
cancelCollect: function cancelCollect(_ref19, _ref20) {
var payload = _ref19.payload;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(shixuns["f" /* cancelCollect */], payload);
case 2:
return _context10.abrupt("return", _context10.sent);
case 3:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
collect: function collect(_ref21, _ref22) {
var payload = _ref21.payload;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(shixuns["l" /* collect */], payload);
case 2:
return _context11.abrupt("return", _context11.sent);
case 3:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
searchUserCourses: function searchUserCourses(_ref23, _ref24) {
var payload = _ref23.payload;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(shixuns["Z" /* searchUserCourses */], payload);
case 2:
return _context12.abrupt("return", _context12.sent);
case 3:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
sendToCourse: function sendToCourse(_ref25, _ref26) {
var payload = _ref25.payload;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(shixuns["ab" /* sendToCourse */], payload);
case 2:
return _context13.abrupt("return", _context13.sent);
case 3:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
cancelRelease: function cancelRelease(_ref27, _ref28) {
var payload = _ref27.payload;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(shixuns["h" /* cancelRelease */], payload);
case 2:
return _context14.abrupt("return", _context14.sent);
case 3:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
cancelPublic: function cancelPublic(_ref29, _ref30) {
var payload = _ref29.payload;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(shixuns["g" /* cancelPublic */], payload);
case 2:
return _context15.abrupt("return", _context15.sent);
case 3:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
applyPublic: function applyPublic(_ref31, _ref32) {
var payload = _ref31.payload;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(shixuns["d" /* applyPublic */], payload);
case 2:
return _context16.abrupt("return", _context16.sent);
case 3:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
release: function release(_ref33, _ref34) {
var payload = _ref33.payload;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return call(shixuns["Y" /* release */], payload);
case 2:
return _context17.abrupt("return", _context17.sent);
case 3:
case "end":
return _context17.stop();
}
}, _callee17);
})();
},
updateAuditSituation: function updateAuditSituation(_ref35, _ref36) {
var payload = _ref35.payload;
var call = _ref36.call,
put = _ref36.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context18.next = 2;
return call(shixuns["cb" /* updateAuditSituation */], payload);
case 2:
return _context18.abrupt("return", _context18.sent);
case 3:
case "end":
return _context18.stop();
}
}, _callee18);
})();
},
getCollaboratorsData: function getCollaboratorsData(_ref37, _ref38) {
var payload = _ref37.payload;
var call = _ref38.call,
put = _ref38.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
_context19.next = 2;
return call(shixuns["y" /* getCollaboratorsData */], payload);
case 2:
return _context19.abrupt("return", _context19.sent);
case 3:
case "end":
return _context19.stop();
}
}, _callee19);
})();
},
addCollaborator: function addCollaborator(_ref39, _ref40) {
var payload = _ref39.payload;
var call = _ref40.call,
put = _ref40.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
_context20.next = 2;
return call(shixuns["a" /* addCollaborator */], payload);
case 2:
return _context20.abrupt("return", _context20.sent);
case 3:
case "end":
return _context20.stop();
}
}, _callee20);
})();
},
addTeachGroupMember: function addTeachGroupMember(_ref41, _ref42) {
var payload = _ref41.payload;
var call = _ref42.call,
put = _ref42.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
_context21.next = 2;
return call(shixuns["c" /* addTeachGroupMember */], payload);
case 2:
return _context21.abrupt("return", _context21.sent);
case 3:
case "end":
return _context21.stop();
}
}, _callee21);
})();
},
getChangeManager: function getChangeManager(_ref43, _ref44) {
var payload = _ref43.payload;
var call = _ref44.call,
put = _ref44.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
_context22.next = 2;
return call(shixuns["x" /* getChangeManager */], payload);
case 2:
return _context22.abrupt("return", _context22.sent);
case 3:
case "end":
return _context22.stop();
}
}, _callee22);
})();
},
changeManager: function changeManager(_ref45, _ref46) {
var payload = _ref45.payload;
var call = _ref46.call,
put = _ref46.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
_context23.next = 2;
return call(shixuns["k" /* changeManager */], payload);
case 2:
return _context23.abrupt("return", _context23.sent);
case 3:
case "end":
return _context23.stop();
}
}, _callee23);
})();
},
deleteCollaborators: function deleteCollaborators(_ref47, _ref48) {
var payload = _ref47.payload;
var call = _ref48.call,
put = _ref48.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
_context24.next = 2;
return call(shixuns["n" /* deleteCollaborators */], payload);
case 2:
return _context24.abrupt("return", _context24.sent);
case 3:
case "end":
return _context24.stop();
}
}, _callee24);
})();
},
getRankingList: function getRankingList(_ref49, _ref50) {
var payload = _ref49.payload;
var call = _ref50.call,
put = _ref50.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
_context25.next = 2;
return call(shixuns["I" /* getRankingList */], payload);
case 2:
return _context25.abrupt("return", _context25.sent);
case 3:
case "end":
return _context25.stop();
}
}, _callee25);
})();
},
getMirrorScript: function getMirrorScript(_ref51, _ref52) {
var payload = _ref51.payload;
var call = _ref52.call,
put = _ref52.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
_context26.next = 2;
return call(shixuns["G" /* getMirrorScript */], payload);
case 2:
return _context26.abrupt("return", _context26.sent);
case 3:
case "end":
return _context26.stop();
}
}, _callee26);
})();
},
getScriptContent: function getScriptContent(_ref53, _ref54) {
var payload = _ref53.payload;
var call = _ref54.call,
put = _ref54.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
_context27.next = 2;
return call(shixuns["M" /* getScriptContent */], payload);
case 2:
return _context27.abrupt("return", _context27.sent);
case 3:
case "end":
return _context27.stop();
}
}, _callee27);
})();
},
getCustomScript: function getCustomScript(_ref55, _ref56) {
var payload = _ref55.payload;
var call = _ref56.call,
put = _ref56.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
_context28.next = 2;
return call(shixuns["z" /* getCustomScript */], payload);
case 2:
return _context28.abrupt("return", _context28.sent);
case 3:
case "end":
return _context28.stop();
}
}, _callee28);
})();
},
updateSettingBasicInfo: function updateSettingBasicInfo(_ref57, _ref58) {
var payload = _ref57.payload;
var call = _ref58.call,
put = _ref58.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee29() {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
_context29.next = 2;
return call(shixuns["ib" /* updateSettingBasicInfo */], payload);
case 2:
return _context29.abrupt("return", _context29.sent);
case 3:
case "end":
return _context29.stop();
}
}, _callee29);
})();
},
getShixunQuote: function getShixunQuote(_ref59, _ref60) {
var payload = _ref59.payload;
var call = _ref60.call,
put = _ref60.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee30() {
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
_context30.next = 2;
return call(shixuns["Q" /* getShixunQuote */], payload);
case 2:
return _context30.abrupt("return", _context30.sent);
case 3:
case "end":
return _context30.stop();
}
}, _callee30);
})();
},
deleteShixun: function deleteShixun(_ref61, _ref62) {
var payload = _ref61.payload;
var call = _ref62.call,
put = _ref62.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee31() {
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
_context31.next = 2;
return call(shixuns["q" /* deleteShixun */], payload);
case 2:
return _context31.abrupt("return", _context31.sent);
case 3:
case "end":
return _context31.stop();
}
}, _callee31);
})();
},
permanentClose: function permanentClose(_ref63, _ref64) {
var payload = _ref63.payload;
var call = _ref64.call,
put = _ref64.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee32() {
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
_context32.next = 2;
return call(shixuns["X" /* permanentClose */], payload);
case 2:
return _context32.abrupt("return", _context32.sent);
case 3:
case "end":
return _context32.stop();
}
}, _callee32);
})();
},
getDepartments: function getDepartments(_ref65, _ref66) {
var payload = _ref65.payload;
var call = _ref66.call,
put = _ref66.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee33() {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
_context33.next = 2;
return call(shixuns["A" /* getDepartments */], payload);
case 2:
return _context33.abrupt("return", _context33.sent);
case 3:
case "end":
return _context33.stop();
}
}, _callee33);
})();
},
updatePermissionSetting: function updatePermissionSetting(_ref67, _ref68) {
var payload = _ref67.payload;
var call = _ref68.call,
put = _ref68.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee34() {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
_context34.next = 2;
return call(shixuns["fb" /* updatePermissionSetting */], payload);
case 2:
return _context34.abrupt("return", _context34.sent);
case 3:
case "end":
return _context34.stop();
}
}, _callee34);
})();
},
updateLearnSetting: function updateLearnSetting(_ref69, _ref70) {
var payload = _ref69.payload;
var call = _ref70.call,
put = _ref70.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee35() {
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
_context35.next = 2;
return call(shixuns["eb" /* updateLearnSetting */], payload);
case 2:
return _context35.abrupt("return", _context35.sent);
case 3:
case "end":
return _context35.stop();
}
}, _callee35);
})();
},
updateSetting: function updateSetting(_ref71, _ref72) {
var payload = _ref71.payload;
var call = _ref72.call,
put = _ref72.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee36() {
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
_context36.next = 2;
return call(shixuns["hb" /* updateSetting */], payload);
case 2:
return _context36.abrupt("return", _context36.sent);
case 3:
case "end":
return _context36.stop();
}
}, _callee36);
})();
},
getSetData: function getSetData(_ref73, _ref74) {
var payload = _ref73.payload;
var call = _ref74.call,
put = _ref74.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee37() {
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
while (1) switch (_context37.prev = _context37.next) {
case 0:
_context37.next = 2;
return call(shixuns["O" /* getSetData */], payload);
case 2:
return _context37.abrupt("return", _context37.sent);
case 3:
case "end":
return _context37.stop();
}
}, _callee37);
})();
},
deleteDataSet: function deleteDataSet(_ref75, _ref76) {
var payload = _ref75.payload;
var call = _ref76.call,
put = _ref76.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee38() {
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
while (1) switch (_context38.prev = _context38.next) {
case 0:
_context38.next = 2;
return call(shixuns["o" /* deleteDataSet */], payload);
case 2:
return _context38.abrupt("return", _context38.sent);
case 3:
case "end":
return _context38.stop();
}
}, _callee38);
})();
},
deleteGitFile: function deleteGitFile(_ref77, _ref78) {
var payload = _ref77.payload;
var call = _ref78.call,
put = _ref78.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee39() {
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
while (1) switch (_context39.prev = _context39.next) {
case 0:
_context39.next = 2;
return call(shixuns["p" /* deleteGitFile */], payload);
case 2:
return _context39.abrupt("return", _context39.sent);
case 3:
case "end":
return _context39.stop();
}
}, _callee39);
})();
},
moveGitFile: function moveGitFile(_ref79, _ref80) {
var payload = _ref79.payload;
var call = _ref80.call,
put = _ref80.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee40() {
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
while (1) switch (_context40.prev = _context40.next) {
case 0:
_context40.next = 2;
return call(shixuns["V" /* moveGitFile */], payload);
case 2:
return _context40.abrupt("return", _context40.sent);
case 3:
case "end":
return _context40.stop();
}
}, _callee40);
})();
},
getRepository: function getRepository(_ref81, _ref82) {
var payload = _ref81.payload;
var call = _ref82.call,
put = _ref82.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee41() {
var response;
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
while (1) switch (_context41.prev = _context41.next) {
case 0:
_context41.next = 2;
return call(shixuns["J" /* getRepository */], payload);
case 2:
response = _context41.sent;
_context41.next = 5;
return put({
type: 'save',
payload: {
repository: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context41.abrupt("return", response);
case 6:
case "end":
return _context41.stop();
}
}, _callee41);
})();
},
getSecretRepository: function getSecretRepository(_ref83, _ref84) {
var payload = _ref83.payload;
var call = _ref84.call,
put = _ref84.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee42() {
var response;
return _regeneratorRuntime().wrap(function _callee42$(_context42) {
while (1) switch (_context42.prev = _context42.next) {
case 0:
_context42.next = 2;
return call(shixuns["N" /* getSecretRepository */], payload);
case 2:
response = _context42.sent;
_context42.next = 5;
return put({
type: 'save',
payload: {
secretRepository: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context42.abrupt("return", response);
case 6:
case "end":
return _context42.stop();
}
}, _callee42);
})();
},
addRepositoryFile: function addRepositoryFile(_ref85, _ref86) {
var payload = _ref85.payload;
var call = _ref86.call,
put = _ref86.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee43() {
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
while (1) switch (_context43.prev = _context43.next) {
case 0:
_context43.next = 2;
return call(shixuns["b" /* addRepositoryFile */], payload);
case 2:
return _context43.abrupt("return", _context43.sent);
case 3:
case "end":
return _context43.stop();
}
}, _callee43);
})();
},
getRepositoryCommit: function getRepositoryCommit(_ref87, _ref88) {
var payload = _ref87.payload;
var call = _ref88.call,
put = _ref88.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee44() {
return _regeneratorRuntime().wrap(function _callee44$(_context44) {
while (1) switch (_context44.prev = _context44.next) {
case 0:
_context44.next = 2;
return call(shixuns["K" /* getRepositoryCommit */], payload);
case 2:
return _context44.abrupt("return", _context44.sent);
case 3:
case "end":
return _context44.stop();
}
}, _callee44);
})();
},
getFileContent: function getFileContent(_ref89, _ref90) {
var payload = _ref89.payload;
var call = _ref90.call,
put = _ref90.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee45() {
var response;
return _regeneratorRuntime().wrap(function _callee45$(_context45) {
while (1) switch (_context45.prev = _context45.next) {
case 0:
_context45.next = 2;
return call(shixuns["D" /* getFileContent */], payload);
case 2:
response = _context45.sent;
_context45.next = 5;
return put({
type: 'save',
payload: {
fileContent: Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, response), {}, {
params: payload
})
}
});
case 5:
return _context45.abrupt("return", response);
case 6:
case "end":
return _context45.stop();
}
}, _callee45);
})();
},
updateRepositoryFile: function updateRepositoryFile(_ref91, _ref92) {
var payload = _ref91.payload;
var call = _ref92.call,
put = _ref92.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee46() {
return _regeneratorRuntime().wrap(function _callee46$(_context46) {
while (1) switch (_context46.prev = _context46.next) {
case 0:
_context46.next = 2;
return call(shixuns["gb" /* updateRepositoryFile */], payload);
case 2:
return _context46.abrupt("return", _context46.sent);
case 3:
case "end":
return _context46.stop();
}
}, _callee46);
})();
},
uploadGitFolder: function uploadGitFolder(_ref93, _ref94) {
var payload = _ref93.payload;
var call = _ref94.call,
put = _ref94.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee47() {
return _regeneratorRuntime().wrap(function _callee47$(_context47) {
while (1) switch (_context47.prev = _context47.next) {
case 0:
_context47.next = 2;
return call(shixuns["jb" /* uploadGitFolder */], payload);
case 2:
return _context47.abrupt("return", _context47.sent);
case 3:
case "end":
return _context47.stop();
}
}, _callee47);
})();
},
updateCollaboratorEditable: function updateCollaboratorEditable(_ref95, _ref96) {
var payload = _ref95.payload;
var call = _ref96.call,
put = _ref96.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee48() {
return _regeneratorRuntime().wrap(function _callee48$(_context48) {
while (1) switch (_context48.prev = _context48.next) {
case 0:
_context48.next = 2;
return call(shixuns["db" /* updateCollaboratorEditable */], payload);
case 2:
return _context48.abrupt("return", _context48.sent);
case 3:
case "end":
return _context48.stop();
}
}, _callee48);
})();
},
getSettingsData: function getSettingsData(_ref97, _ref98) {
var payload = _ref97.payload;
var call = _ref98.call,
put = _ref98.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee49() {
var response;
return _regeneratorRuntime().wrap(function _callee49$(_context49) {
while (1) switch (_context49.prev = _context49.next) {
case 0:
_context49.next = 2;
return call(shixuns["P" /* getSettingsData */], payload);
case 2:
response = _context49.sent;
_context49.next = 5;
return put({
type: 'save',
payload: {
setting: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context49.stop();
}
}, _callee49);
})();
},
getChallengesNew: function getChallengesNew(_ref99, _ref100) {
var payload = _ref99.payload;
var call = _ref100.call,
put = _ref100.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee50() {
var response;
return _regeneratorRuntime().wrap(function _callee50$(_context50) {
while (1) switch (_context50.prev = _context50.next) {
case 0:
_context50.next = 2;
return call(shixuns["w" /* getChallengesNew */], payload);
case 2:
response = _context50.sent;
_context50.next = 5;
return put({
type: 'save',
payload: {
challengesNew: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context50.stop();
}
}, _callee50);
})();
},
getChallengesEdit: function getChallengesEdit(_ref101, _ref102) {
var payload = _ref101.payload;
var call = _ref102.call,
put = _ref102.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee51() {
var response;
return _regeneratorRuntime().wrap(function _callee51$(_context51) {
while (1) switch (_context51.prev = _context51.next) {
case 0:
_context51.next = 2;
return call(shixuns["v" /* getChallengesEdit */], payload);
case 2:
response = _context51.sent;
_context51.next = 5;
return put({
type: 'save',
payload: {
challengesEdit: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context51.abrupt("return", response);
case 6:
case "end":
return _context51.stop();
}
}, _callee51);
})();
},
getAuditSituationData: function getAuditSituationData(_ref103, _ref104) {
var payload = _ref103.payload;
var call = _ref104.call,
put = _ref104.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee52() {
var response, auditSituationData;
return _regeneratorRuntime().wrap(function _callee52$(_context52) {
while (1) switch (_context52.prev = _context52.next) {
case 0:
_context52.next = 2;
return call(shixuns["t" /* getAuditSituationData */], payload);
case 2:
response = _context52.sent;
auditSituationData = formatAuditSituationData(response);
_context52.next = 6;
return put({
type: 'save',
payload: {
auditSituationData: auditSituationData
}
});
case 6:
case "end":
return _context52.stop();
}
}, _callee52);
})();
},
getEditChallengesQuestion: function getEditChallengesQuestion(_ref105, _ref106) {
var payload = _ref105.payload;
var call = _ref106.call,
put = _ref106.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee53() {
var response;
return _regeneratorRuntime().wrap(function _callee53$(_context53) {
while (1) switch (_context53.prev = _context53.next) {
case 0:
_context53.next = 2;
return call(shixuns["B" /* getEditChallengesQuestion */], payload);
case 2:
response = _context53.sent;
_context53.next = 5;
return put({
type: 'save',
payload: {
editChallengesQuestion: response
}
});
case 5:
return _context53.abrupt("return", response);
case 6:
case "end":
return _context53.stop();
}
}, _callee53);
})();
},
getInfoWithJupyterLab: function getInfoWithJupyterLab(_ref107, _ref108) {
var payload = _ref107.payload;
var call = _ref108.call,
put = _ref108.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee54() {
var response;
return _regeneratorRuntime().wrap(function _callee54$(_context54) {
while (1) switch (_context54.prev = _context54.next) {
case 0:
_context54.next = 2;
return call(shixuns["E" /* getInfoWithJupyterLab */], payload);
case 2:
response = _context54.sent;
_context54.next = 5;
return put({
type: 'save',
payload: {
infoWithJupyterLab: response
}
});
case 5:
return _context54.abrupt("return", response);
case 6:
case "end":
return _context54.stop();
}
}, _callee54);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref109, _ref110) {
var payload = _ref109.payload;
var call = _ref110.call,
put = _ref110.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee55() {
return _regeneratorRuntime().wrap(function _callee55$(_context55) {
while (1) switch (_context55.prev = _context55.next) {
case 0:
_context55.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context55.stop();
}
}, _callee55);
})();
}
},
reducers: {
save: function save(state, action) {
console.log('reducers:', state, action);
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref111) {
var dispatch = _ref111.dispatch,
history = _ref111.history;
// console.log("subscriptions:", dispatch, history)
return history.listen(function (_ref112) {
var pathname = _ref112.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ var detail = __webpack_exports__["a"] = (ShixunsDetailModel);
/***/ }),
/***/ "q1tI":
/*!*************************************!*\
!*** ./node_modules/react/index.js ***!
\*************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(/*! ./cjs/react.production.min.js */ "viRO");
} else {}
/***/ }),
/***/ "qCM6":
/*!******************************************************!*\
!*** ./node_modules/antd/es/button/style/index.less ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "qDJ8":
/*!****************************************!*\
!*** ./node_modules/isobject/index.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/*!
* isobject <https://github.com/jonschlinkert/isobject>
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
module.exports = function isObject(val) {
return val != null && typeof val === 'object' && Array.isArray(val) === false;
};
/***/ }),
/***/ "qHT+":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/es.array.copy-within.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var copyWithin = __webpack_require__(/*! ../internals/array-copy-within */ "FF6l");
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
// `Array.prototype.copyWithin` method
// https://tc39.github.io/ecma262/#sec-array.prototype.copywithin
$({ target: 'Array', proto: true }, {
copyWithin: copyWithin
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('copyWithin');
/***/ }),
/***/ "qJkI":
/*!*************************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/CheckCircleOutlined.js ***!
\*************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _CheckCircleOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/CheckCircleOutlined */ "GSrb"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CheckCircleOutlined = function CheckCircleOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _CheckCircleOutlined.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(CheckCircleOutlined);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "qRPo":
/*!****************************************************!*\
!*** ./node_modules/rc-util/lib/Dom/dynamicCSS.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt").default;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.clearContainerCache = clearContainerCache;
exports.injectCSS = injectCSS;
exports.removeCSS = removeCSS;
exports.updateCSS = updateCSS;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var _canUseDom = _interopRequireDefault(__webpack_require__(/*! ./canUseDom */ "3Mug"));
var _contains = _interopRequireDefault(__webpack_require__(/*! ./contains */ "bKFb"));
var APPEND_ORDER = 'data-rc-order';
var APPEND_PRIORITY = 'data-rc-priority';
var MARK_KEY = "rc-util-key";
var containerCache = new Map();
function getMark() {
var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
mark = _ref.mark;
if (mark) {
return mark.startsWith('data-') ? mark : "data-".concat(mark);
}
return MARK_KEY;
}
function getContainer(option) {
if (option.attachTo) {
return option.attachTo;
}
var head = document.querySelector('head');
return head || document.body;
}
function getOrder(prepend) {
if (prepend === 'queue') {
return 'prependQueue';
}
return prepend ? 'prepend' : 'append';
}
/**
* Find style which inject by rc-util
*/
function findStyles(container) {
return Array.from((containerCache.get(container) || container).children).filter(function (node) {
return node.tagName === 'STYLE';
});
}
function injectCSS(css) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
if (!(0, _canUseDom.default)()) {
return null;
}
var csp = option.csp,
prepend = option.prepend,
_option$priority = option.priority,
priority = _option$priority === void 0 ? 0 : _option$priority;
var mergedOrder = getOrder(prepend);
var isPrependQueue = mergedOrder === 'prependQueue';
var styleNode = document.createElement('style');
styleNode.setAttribute(APPEND_ORDER, mergedOrder);
if (isPrependQueue && priority) {
styleNode.setAttribute(APPEND_PRIORITY, "".concat(priority));
}
if (csp !== null && csp !== void 0 && csp.nonce) {
styleNode.nonce = csp === null || csp === void 0 ? void 0 : csp.nonce;
}
styleNode.innerHTML = css;
var container = getContainer(option);
var firstChild = container.firstChild;
if (prepend) {
// If is queue `prepend`, it will prepend first style and then append rest style
if (isPrependQueue) {
var existStyle = (option.styles || findStyles(container)).filter(function (node) {
// Ignore style which not injected by rc-util with prepend
if (!['prepend', 'prependQueue'].includes(node.getAttribute(APPEND_ORDER))) {
return false;
}
// Ignore style which priority less then new style
var nodePriority = Number(node.getAttribute(APPEND_PRIORITY) || 0);
return priority >= nodePriority;
});
if (existStyle.length) {
container.insertBefore(styleNode, existStyle[existStyle.length - 1].nextSibling);
return styleNode;
}
}
// Use `insertBefore` as `prepend`
container.insertBefore(styleNode, firstChild);
} else {
container.appendChild(styleNode);
}
return styleNode;
}
function findExistNode(key) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var container = getContainer(option);
return (option.styles || findStyles(container)).find(function (node) {
return node.getAttribute(getMark(option)) === key;
});
}
function removeCSS(key) {
var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var existNode = findExistNode(key, option);
if (existNode) {
var container = getContainer(option);
container.removeChild(existNode);
}
}
/**
* qiankun will inject `appendChild` to insert into other
*/
function syncRealContainer(container, option) {
var cachedRealContainer = containerCache.get(container);
// Find real container when not cached or cached container removed
if (!cachedRealContainer || !(0, _contains.default)(document, cachedRealContainer)) {
var placeholderStyle = injectCSS('', option);
var parentNode = placeholderStyle.parentNode;
containerCache.set(container, parentNode);
container.removeChild(placeholderStyle);
}
}
/**
* manually clear container cache to avoid global cache in unit testes
*/
function clearContainerCache() {
containerCache.clear();
}
function updateCSS(css, key) {
var originOption = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
var container = getContainer(originOption);
var styles = findStyles(container);
var option = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, originOption), {}, {
styles: styles
});
// Sync real parent
syncRealContainer(container, option);
var existNode = findExistNode(key, option);
if (existNode) {
var _option$csp, _option$csp2;
if ((_option$csp = option.csp) !== null && _option$csp !== void 0 && _option$csp.nonce && existNode.nonce !== ((_option$csp2 = option.csp) === null || _option$csp2 === void 0 ? void 0 : _option$csp2.nonce)) {
var _option$csp3;
existNode.nonce = (_option$csp3 = option.csp) === null || _option$csp3 === void 0 ? void 0 : _option$csp3.nonce;
}
if (existNode.innerHTML !== css) {
existNode.innerHTML = css;
}
return existNode;
}
var newNode = injectCSS(css, option);
newNode.setAttribute(getMark(option), key);
return newNode;
}
/***/ }),
/***/ "qRkn":
/*!**********************************************!*\
!*** ./node_modules/lodash/_deburrLetter.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var basePropertyOf = __webpack_require__(/*! ./_basePropertyOf */ "3cYt");
/** Used to map Latin Unicode letters to basic Latin letters. */
var deburredLetters = {
// Latin-1 Supplement block.
'\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A',
'\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a',
'\xc7': 'C', '\xe7': 'c',
'\xd0': 'D', '\xf0': 'd',
'\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E',
'\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e',
'\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I',
'\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i',
'\xd1': 'N', '\xf1': 'n',
'\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O',
'\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o',
'\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U',
'\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u',
'\xdd': 'Y', '\xfd': 'y', '\xff': 'y',
'\xc6': 'Ae', '\xe6': 'ae',
'\xde': 'Th', '\xfe': 'th',
'\xdf': 'ss',
// Latin Extended-A block.
'\u0100': 'A', '\u0102': 'A', '\u0104': 'A',
'\u0101': 'a', '\u0103': 'a', '\u0105': 'a',
'\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C',
'\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c',
'\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd',
'\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E',
'\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e',
'\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G',
'\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g',
'\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h',
'\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I',
'\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i',
'\u0134': 'J', '\u0135': 'j',
'\u0136': 'K', '\u0137': 'k', '\u0138': 'k',
'\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L',
'\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l',
'\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N',
'\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n',
'\u014c': 'O', '\u014e': 'O', '\u0150': 'O',
'\u014d': 'o', '\u014f': 'o', '\u0151': 'o',
'\u0154': 'R', '\u0156': 'R', '\u0158': 'R',
'\u0155': 'r', '\u0157': 'r', '\u0159': 'r',
'\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S',
'\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's',
'\u0162': 'T', '\u0164': 'T', '\u0166': 'T',
'\u0163': 't', '\u0165': 't', '\u0167': 't',
'\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U',
'\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u',
'\u0174': 'W', '\u0175': 'w',
'\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y',
'\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z',
'\u017a': 'z', '\u017c': 'z', '\u017e': 'z',
'\u0132': 'IJ', '\u0133': 'ij',
'\u0152': 'Oe', '\u0153': 'oe',
'\u0149': "'n", '\u017f': 's'
};
/**
* Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A
* letters to basic Latin letters.
*
* @private
* @param {string} letter The matched letter to deburr.
* @returns {string} Returns the deburred letter.
*/
var deburrLetter = basePropertyOf(deburredLetters);
module.exports = deburrLetter;
/***/ }),
/***/ "qS6X":
/*!*******************************************!*\
!*** ./src/models/classrooms/exercise.ts ***!
\*******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/defineProperty */ "jrin");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_exercise__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/service/exercise */ "V0Rq");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var ExerciseModel = {
namespace: 'exercise',
state: {
name: '普通试卷,随机试卷详情页面',
loading: true,
// 试卷作业列表
exerciseList: {},
// 用户所有试卷列表
userExerciseList: {},
// 试卷统计
statisticsList: {},
// 试卷班级
exerciseCoursesList: {},
// 题库
brankList: {},
// 编辑试卷默认数据
editData: {},
endGroups: {},
actionTabs: {
removeEventListenerExitScreen: false //取消全屏时间退出监听
},
publishGroups: {},
commonHeader: {},
reviewExercise: {},
reviewGroupExercise: {},
workSetting: {},
editRandomExercises: {},
redoModal: {},
exerciseUserInfo: {},
examinationIntelligentSettings: {},
exerciseExportHeadData: {},
//代码查重 分班
codeReviewDetail: {},
exerciseIdentityPhotos: {},
checkDomain: window.document.domain === "kepukehuan.educoder.net" || window.document.domain === "test-kepukehuan.educoder.net"
// checkDomain: window.document.domain === "localhost"
},
effects: {
// 获取当前用户下面所有试卷
getUserExercise: function getUserExercise(_ref, _ref2) {
var payload = _ref.payload,
callback = _ref.callback;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getUserExercise */ "y"], payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
userExerciseList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, (response === null || response === void 0 ? void 0 : response.data) || {})
}
});
case 5:
console.log("getUserExercise-res:", response);
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
case 7:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getExerciseIdentityPhotos: function getExerciseIdentityPhotos(_ref3, _ref4) {
var payload = _ref3.payload,
callback = _ref3.callback;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getExerciseIdentityPhotos */ "o"], payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
exerciseIdentityPhotos: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, (response === null || response === void 0 ? void 0 : response.data) || {})
}
});
case 5:
return _context2.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getExerciseExportHeadData: function getExerciseExportHeadData(_ref5, _ref6) {
var payload = _ref5.payload,
callback = _ref5.callback;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getExerciseExportHeadData */ "n"], payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
exerciseExportHeadData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
getExerciseUserInfo: function getExerciseUserInfo(_ref7, _ref8) {
var payload = _ref7.payload,
callback = _ref7.callback;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var response;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getExerciseUserInfo */ "r"], payload);
case 2:
response = _context4.sent;
if (!((response === null || response === void 0 ? void 0 : response.status) === 0)) {
_context4.next = 6;
break;
}
_context4.next = 6;
return put({
type: 'save',
payload: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, {
exerciseUserInfo: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response.data)
})
});
case 6:
return _context4.abrupt("return", response);
case 7:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
// 随机试卷
getExaminationIntelligentSettings: function getExaminationIntelligentSettings(_ref9, _ref10) {
var payload = _ref9.payload,
callback = _ref9.callback;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var response;
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getExaminationIntelligentSettings */ "l"], payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return put({
type: 'save',
payload: {
examinationIntelligentSettings: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context5.abrupt("return", response);
case 6:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
getRandomEditExercises: function getRandomEditExercises(_ref11, _ref12) {
var payload = _ref11.payload,
callback = _ref11.callback;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var response;
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getRandomEditExercises */ "t"], payload);
case 2:
response = _context6.sent;
_context6.next = 5;
return put({
type: 'save',
payload: {
editRandomExercises: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context6.abrupt("return", response);
case 6:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
// 试卷 - 作业列表
getExerciseList: function getExerciseList(_ref13, _ref14) {
var payload = _ref13.payload,
callback = _ref13.callback;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
var response;
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getExerciseList */ "p"], payload);
case 2:
response = _context7.sent;
if (response === null || response === void 0 ? void 0 : response.total_exercise_users) {
try {
localStorage['total_exercise_users'] = JSON.stringify(response.total_exercise_users);
} catch (e) {}
}
_context7.next = 6;
return put({
type: 'save',
payload: {
exerciseList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 6:
return _context7.abrupt("return", response);
case 7:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
// 试卷-统计
getExerciseStatistics: function getExerciseStatistics(_ref15, _ref16) {
var payload = _ref15.payload,
callback = _ref15.callback;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
var response;
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getExerciseStatistics */ "q"], payload);
case 2:
response = _context8.sent;
_context8.next = 5;
return put({
type: 'save',
payload: {
statisticsList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context8.abrupt("return", response);
case 6:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
// 试卷 题库列表
getBrankList: function getBrankList(_ref17, _ref18) {
var payload = _ref17.payload,
callback = _ref17.callback;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
var response;
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getBrankList */ "h"], payload);
case 2:
response = _context9.sent;
_context9.next = 5;
return put({
type: 'save',
payload: {
brankList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context9.abrupt("return", response);
case 6:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
// 试卷保存题库
saveBanks: function saveBanks(_ref19, _ref20) {
var payload = _ref19.payload,
callback = _ref19.callback;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
var response;
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* saveBanks */ "A"], payload);
case 2:
response = _context10.sent;
return _context10.abrupt("return", response);
case 4:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
// 试卷课堂列表
getExerciseCourses: function getExerciseCourses(_ref21, _ref22) {
var payload = _ref21.payload,
callback = _ref21.callback;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
var response;
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getExerciseCourses */ "m"], payload);
case 2:
response = _context11.sent;
_context11.next = 5;
return put({
type: 'save',
payload: {
exerciseCoursesList: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context11.abrupt("return", response);
case 6:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
// 新建试卷
addExercise: function addExercise(_ref23, _ref24) {
var payload = _ref23.payload,
callback = _ref23.callback;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
var response;
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* addExercise */ "a"], payload);
case 2:
response = _context12.sent;
return _context12.abrupt("return", response);
case 4:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
editExercise: function editExercise(_ref25, _ref26) {
var payload = _ref25.payload,
callback = _ref25.callback;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
var response;
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* editExercise */ "e"], payload);
case 2:
response = _context13.sent;
_context13.next = 5;
return put({
type: 'save',
payload: {
editData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context13.abrupt("return", response);
case 6:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
getTagDiscipline: function getTagDiscipline(_ref27, _ref28) {
var payload = _ref27.payload,
callback = _ref27.callback;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
var response;
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getTagDiscipline */ "x"], payload);
case 2:
response = _context14.sent;
_context14.next = 5;
return put({
type: 'save',
payload: {
tagDisciplineData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context14.abrupt("return", response);
case 6:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
// 修改试卷答题
editExerciseQuestion: function editExerciseQuestion(_ref29, _ref30) {
var payload = _ref29.payload,
callback = _ref29.callback;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
var response;
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* editExerciseQuestion */ "f"], payload);
case 2:
response = _context15.sent;
return _context15.abrupt("return", response);
case 4:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
// 添加试卷答题
addExerciseQuestion: function addExerciseQuestion(_ref31, _ref32) {
var payload = _ref31.payload,
callback = _ref31.callback;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
var response;
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* addExerciseQuestion */ "b"], payload);
case 2:
response = _context16.sent;
return _context16.abrupt("return", response);
case 4:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
// 上下移动
exeriseMoveUpDown: function exeriseMoveUpDown(_ref33, _ref34) {
var payload = _ref33.payload,
callback = _ref33.callback;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
var response;
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* exeriseMoveUpDown */ "g"], payload);
case 2:
response = _context17.sent;
return _context17.abrupt("return", response);
case 4:
case "end":
return _context17.stop();
}
}, _callee17);
})();
},
// 分组作业 立即截止
getEndGroups: function getEndGroups(_ref35, _ref36) {
var payload = _ref35.payload,
callback = _ref35.callback;
var call = _ref36.call,
put = _ref36.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
var response;
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context18.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getEndGroups */ "k"], payload);
case 2:
response = _context18.sent;
_context18.next = 5;
return put({
type: 'save',
payload: {
endGroups: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context18.abrupt("return", response);
case 6:
case "end":
return _context18.stop();
}
}, _callee18);
})();
},
getPublishGroups: function getPublishGroups(_ref37, _ref38) {
var payload = _ref37.payload,
callback = _ref37.callback;
var call = _ref38.call,
put = _ref38.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
var response;
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
_context19.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getPublishGroups */ "s"], payload);
case 2:
response = _context19.sent;
_context19.next = 5;
return put({
type: 'save',
payload: {
publishGroups: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context19.abrupt("return", response);
case 6:
case "end":
return _context19.stop();
}
}, _callee19);
})();
},
getCommonHeader: function getCommonHeader(_ref39, _ref40) {
var payload = _ref39.payload,
callback = _ref39.callback;
var call = _ref40.call,
put = _ref40.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
var response;
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
_context20.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getCommonHeader */ "j"], payload);
case 2:
response = _context20.sent;
_context20.next = 5;
return put({
type: 'save',
payload: {
commonHeader: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context20.abrupt("return", response);
case 6:
case "end":
return _context20.stop();
}
}, _callee20);
})();
},
getReviewExercise: function getReviewExercise(_ref41, _ref42) {
var payload = _ref41.payload,
callback = _ref41.callback;
var call = _ref42.call,
put = _ref42.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee21() {
var response;
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
_context21.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getReviewExercise */ "v"], payload);
case 2:
response = _context21.sent;
_context21.next = 5;
return put({
type: 'save',
payload: {
reviewExercise: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context21.abrupt("return", response);
case 6:
case "end":
return _context21.stop();
}
}, _callee21);
})();
},
clearData: function clearData(_ref43, _ref44) {
var payload = _ref43.payload,
callback = _ref43.callback;
var call = _ref44.call,
put = _ref44.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee22() {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
_context22.next = 2;
return put({
type: 'save',
payload: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload.key, {})
});
case 2:
case "end":
return _context22.stop();
}
}, _callee22);
})();
},
getReviewGroupExercise: function getReviewGroupExercise(_ref45, _ref46) {
var payload = _ref45.payload,
callback = _ref45.callback;
var call = _ref46.call,
put = _ref46.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee23() {
var response;
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
_context23.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getReviewGroupExercise */ "w"], payload);
case 2:
response = _context23.sent;
_context23.next = 5;
return put({
type: 'save',
payload: {
reviewGroupExercise: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context23.abrupt("return", response);
case 6:
case "end":
return _context23.stop();
}
}, _callee23);
})();
},
getWorkSetting: function getWorkSetting(_ref47, _ref48) {
var payload = _ref47.payload,
callback = _ref47.callback;
var call = _ref48.call,
put = _ref48.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee24() {
var response;
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
_context24.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getWorkSetting */ "z"], payload);
case 2:
response = _context24.sent;
_context24.next = 5;
return put({
type: 'save',
payload: {
workSetting: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context24.abrupt("return", response);
case 6:
case "end":
return _context24.stop();
}
}, _callee24);
})();
},
getRedoModal: function getRedoModal(_ref49, _ref50) {
var payload = _ref49.payload,
callback = _ref49.callback;
var call = _ref50.call,
put = _ref50.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee25() {
var response;
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
_context25.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getRedoModal */ "u"], payload);
case 2:
response = _context25.sent;
_context25.next = 5;
return put({
type: 'save',
payload: {
redoModal: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context25.abrupt("return", response);
case 6:
case "end":
return _context25.stop();
}
}, _callee25);
})();
},
//试卷代码查重
getCodeReviewDetail: function getCodeReviewDetail(_ref51, _ref52) {
var payload = _ref51.payload,
callback = _ref51.callback;
var call = _ref52.call,
put = _ref52.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee26() {
var response;
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
_context26.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* getCodeReviewDetail */ "i"], payload);
case 2:
response = _context26.sent;
_context26.next = 5;
return put({
type: 'save',
payload: {
codeReviewDetail: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response)
}
});
case 5:
return _context26.abrupt("return", response);
case 6:
case "end":
return _context26.stop();
}
}, _callee26);
})();
},
// 试卷代码查重调整评分
changeScore: function changeScore(_ref53, _ref54) {
var payload = _ref53.payload,
callback = _ref53.callback;
var call = _ref54.call,
put = _ref54.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee27() {
var response;
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
_context27.next = 2;
return call(_service_exercise__WEBPACK_IMPORTED_MODULE_2__[/* changeScore */ "c"], payload);
case 2:
response = _context27.sent;
return _context27.abrupt("return", response);
case 4:
case "end":
return _context27.stop();
}
}, _callee27);
})();
},
// 试卷发送至课堂
// *postCoursesPublish({ payload, callback }, { call, put }) {
// const response = yield call(postCoursesPublish, payload);
// return response;
// },
// 设置操做action
setActionTabs: function setActionTabs(_ref55, _ref56) {
var payload = _ref55.payload;
var call = _ref56.call,
put = _ref56.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee28() {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
_context28.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context28.stop();
}
}, _callee28);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref57) {
var dispatch = _ref57.dispatch,
history = _ref57.history;
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (ExerciseModel);
/***/ }),
/***/ "qT12":
/*!**************************************************************!*\
!*** ./node_modules/react-is/cjs/react-is.production.min.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;
exports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return"object"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};
exports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};
exports.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;
/***/ }),
/***/ "qVdP":
/*!******************************************************!*\
!*** ./node_modules/antd/es/dropdown/style/index.js ***!
\******************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "KAsB");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _button_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../button/style */ "+L6B");
// style dependencies
/***/ }),
/***/ "qXVe":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.every.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $every = __webpack_require__(/*! ../internals/array-iteration */ "tycR").every;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.every` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.every
exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) {
return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/***/ "qY7S":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/collection-from.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// https://tc39.github.io/proposal-setmap-offrom/
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
module.exports = function from(source /* , mapFn, thisArg */) {
var length = arguments.length;
var mapFn = length > 1 ? arguments[1] : undefined;
var mapping, A, n, boundFunction;
aFunction(this);
mapping = mapFn !== undefined;
if (mapping) aFunction(mapFn);
if (source == undefined) return new this();
A = [];
if (mapping) {
n = 0;
boundFunction = bind(mapFn, length > 2 ? arguments[2] : undefined, 2);
iterate(source, function (nextItem) {
A.push(boundFunction(nextItem, n++));
});
} else {
iterate(source, A.push, A);
}
return new this(A);
};
/***/ }),
/***/ "qYE9":
/*!***************************************************************!*\
!*** ./node_modules/core-js/internals/array-buffer-native.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = typeof ArrayBuffer !== 'undefined' && typeof DataView !== 'undefined';
/***/ }),
/***/ "qaHo":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.some.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.some` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
some: function some(callbackfn /* , thisArg */) {
var set = anObject(this);
var iterator = getSetIterator(set);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
return iterate(iterator, function (value) {
if (boundFunction(value, value, set)) return iterate.stop();
}, undefined, false, true).stopped;
}
});
/***/ }),
/***/ "qc1c":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.merge.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Map.prototype.merge` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
// eslint-disable-next-line no-unused-vars
merge: function merge(iterable /* ...iterbles */) {
var map = anObject(this);
var setter = aFunction(map.set);
var i = 0;
while (i < arguments.length) {
iterate(arguments[i++], setter, map, true);
}
return map;
}
});
/***/ }),
/***/ "qdXH":
/*!******************************!*\
!*** ./src/service/video.ts ***!
\******************************/
/*! exports provided: getVideoStatisticsList, getVideoStatistics, getOneVideoStatisticsList, getStudentVideoStatisticsList, getVideoDetail, addVideoItems, getVideoEditData, starVideo, updateVideo, videoSendToCourse, getVideoMyCourses, viewVideo, addSchool, getVideoPeopleStatics, getVideoDurationStatics, getStageData */
/*! exports used: getOneVideoStatisticsList, getStageData, getStudentVideoStatisticsList, getVideoDetail, getVideoDurationStatics, getVideoPeopleStatics, getVideoStatistics, getVideoStatisticsList */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return getVideoStatisticsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getVideoStatistics; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getOneVideoStatisticsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return getStudentVideoStatisticsList; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return getVideoDetail; });
/* unused harmony export addVideoItems */
/* unused harmony export getVideoEditData */
/* unused harmony export starVideo */
/* unused harmony export updateVideo */
/* unused harmony export videoSendToCourse */
/* unused harmony export getVideoMyCourses */
/* unused harmony export viewVideo */
/* unused harmony export addSchool */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getVideoPeopleStatics; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getVideoDurationStatics; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getStageData; });
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "9og8");
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/utils/fetch */ "ErOA");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
//视频统计列表
function getVideoStatisticsList(_x) {
return _getVideoStatisticsList.apply(this, arguments);
}
// 视频统计数据
function _getVideoStatisticsList() {
_getVideoStatisticsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/watch_video_histories.json"), {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getVideoStatisticsList.apply(this, arguments);
}
function getVideoStatistics(_x2) {
return _getVideoStatistics.apply(this, arguments);
}
// 单一视频记录统计
function _getVideoStatistics() {
_getVideoStatistics = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/watch_statics.json"), {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getVideoStatistics.apply(this, arguments);
}
function getOneVideoStatisticsList(_x3) {
return _getOneVideoStatisticsList.apply(this, arguments);
}
//学生视频统计
function _getOneVideoStatisticsList() {
_getOneVideoStatisticsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/course_videos/".concat(params.videoId, "/watch_histories.json"), {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getOneVideoStatisticsList.apply(this, arguments);
}
function getStudentVideoStatisticsList(_x4) {
return _getStudentVideoStatisticsList.apply(this, arguments);
}
function _getStudentVideoStatisticsList() {
_getStudentVideoStatisticsList = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.coursesId, "/own_watch_histories.json"), {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getStudentVideoStatisticsList.apply(this, arguments);
}
function getVideoDetail(_x5) {
return _getVideoDetail.apply(this, arguments);
}
function _getVideoDetail() {
_getVideoDetail = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/video_items/".concat(params.id, ".json"), {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getVideoDetail.apply(this, arguments);
}
function addVideoItems(_x6) {
return _addVideoItems.apply(this, arguments);
}
function _addVideoItems() {
_addVideoItems = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])('/api/video_items.json', {
method: 'post',
body: params
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _addVideoItems.apply(this, arguments);
}
function getVideoEditData(_x7) {
return _getVideoEditData.apply(this, arguments);
}
function _getVideoEditData() {
_getVideoEditData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/video_items/".concat(params.id, "/edit.json"), {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getVideoEditData.apply(this, arguments);
}
function starVideo(_x8) {
return _starVideo.apply(this, arguments);
}
function _starVideo() {
_starVideo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/video_items/".concat(params.id, "/star.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _starVideo.apply(this, arguments);
}
function updateVideo(_x9) {
return _updateVideo.apply(this, arguments);
}
function _updateVideo() {
_updateVideo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/video_items/".concat(params.id, ".json"), {
method: 'put',
body: params
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _updateVideo.apply(this, arguments);
}
function videoSendToCourse(_x10) {
return _videoSendToCourse.apply(this, arguments);
}
function _videoSendToCourse() {
_videoSendToCourse = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/video_items/".concat(params.id, "/send_to_course.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _videoSendToCourse.apply(this, arguments);
}
function getVideoMyCourses(_x11) {
return _getVideoMyCourses.apply(this, arguments);
}
function _getVideoMyCourses() {
_getVideoMyCourses = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/users/my_courses.json", {
method: 'Get',
params: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _getVideoMyCourses.apply(this, arguments);
}
function viewVideo(_x12) {
return _viewVideo.apply(this, arguments);
}
function _viewVideo() {
_viewVideo = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/video_items/".concat(params.id, "/view_video.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _viewVideo.apply(this, arguments);
}
function addSchool(_x13) {
return _addSchool.apply(this, arguments);
}
// 视频学习人数变化
function _addSchool() {
_addSchool = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/video_items/".concat(params.id, "/add_school.json"), {
method: 'post',
body: params
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _addSchool.apply(this, arguments);
}
function getVideoPeopleStatics(_x14) {
return _getVideoPeopleStatics.apply(this, arguments);
}
// 视频学习时长变化
function _getVideoPeopleStatics() {
_getVideoPeopleStatics = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.course_id, "/video_people_statics.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _getVideoPeopleStatics.apply(this, arguments);
}
function getVideoDurationStatics(_x15) {
return _getVideoDurationStatics.apply(this, arguments);
}
// 获取视频列表
function _getVideoDurationStatics() {
_getVideoDurationStatics = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/courses/".concat(params.course_id, "/video_duration_statics.json"), {
method: 'get',
params: params
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _getVideoDurationStatics.apply(this, arguments);
}
function getStageData(_x16) {
return _getStageData.apply(this, arguments);
}
function _getStageData() {
_getStageData = Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])("/api/stages.json", {
method: 'get',
params: params
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _getStageData.apply(this, arguments);
}
/***/ }),
/***/ "qgGA":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.reflect.metadata.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var toMetadataKey = ReflectMetadataModule.toKey;
var ordinaryDefineOwnMetadata = ReflectMetadataModule.set;
// `Reflect.metadata` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
metadata: function metadata(metadataKey, metadataValue) {
return function decorator(target, key) {
ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetadataKey(key));
};
}
});
/***/ }),
/***/ "qhky":
/*!************************************************!*\
!*** ./node_modules/react-helmet/es/Helmet.js ***!
\************************************************/
/*! exports provided: default, Helmet */
/*! ModuleConcatenation bailout: Module uses injected variables (global) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* unused harmony export Helmet */
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! prop-types */ "17x9");
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react_side_effect__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-side-effect */ "8+s/");
/* harmony import */ var react_side_effect__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_side_effect__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-fast-compare */ "bmMU");
/* harmony import */ var react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_fast_compare__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var object_assign__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! object-assign */ "MgzW");
/* harmony import */ var object_assign__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(object_assign__WEBPACK_IMPORTED_MODULE_4__);
var ATTRIBUTE_NAMES = {
BODY: "bodyAttributes",
HTML: "htmlAttributes",
TITLE: "titleAttributes"
};
var TAG_NAMES = {
BASE: "base",
BODY: "body",
HEAD: "head",
HTML: "html",
LINK: "link",
META: "meta",
NOSCRIPT: "noscript",
SCRIPT: "script",
STYLE: "style",
TITLE: "title"
};
var VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {
return TAG_NAMES[name];
});
var TAG_PROPERTIES = {
CHARSET: "charset",
CSS_TEXT: "cssText",
HREF: "href",
HTTPEQUIV: "http-equiv",
INNER_HTML: "innerHTML",
ITEM_PROP: "itemprop",
NAME: "name",
PROPERTY: "property",
REL: "rel",
SRC: "src",
TARGET: "target"
};
var REACT_TAG_MAP = {
accesskey: "accessKey",
charset: "charSet",
class: "className",
contenteditable: "contentEditable",
contextmenu: "contextMenu",
"http-equiv": "httpEquiv",
itemprop: "itemProp",
tabindex: "tabIndex"
};
var HELMET_PROPS = {
DEFAULT_TITLE: "defaultTitle",
DEFER: "defer",
ENCODE_SPECIAL_CHARACTERS: "encodeSpecialCharacters",
ON_CHANGE_CLIENT_STATE: "onChangeClientState",
TITLE_TEMPLATE: "titleTemplate"
};
var HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {
obj[REACT_TAG_MAP[key]] = key;
return obj;
}, {});
var SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];
var HELMET_ATTRIBUTE = "data-react-helmet";
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) {
return typeof obj;
} : function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
var classCallCheck = function (instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
};
var createClass = function () {
function defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
return function (Constructor, protoProps, staticProps) {
if (protoProps) defineProperties(Constructor.prototype, protoProps);
if (staticProps) defineProperties(Constructor, staticProps);
return Constructor;
};
}();
var _extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
var inherits = function (subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
enumerable: false,
writable: true,
configurable: true
}
});
if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;
};
var objectWithoutProperties = function (obj, keys) {
var target = {};
for (var i in obj) {
if (keys.indexOf(i) >= 0) continue;
if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;
target[i] = obj[i];
}
return target;
};
var possibleConstructorReturn = function (self, call) {
if (!self) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return call && (typeof call === "object" || typeof call === "function") ? call : self;
};
var encodeSpecialCharacters = function encodeSpecialCharacters(str) {
var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
if (encode === false) {
return String(str);
}
return String(str).replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&#x27;");
};
var getTitleFromPropsList = function getTitleFromPropsList(propsList) {
var innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE);
var innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);
if (innermostTemplate && innermostTitle) {
// use function arg to avoid need to escape $ characters
return innermostTemplate.replace(/%s/g, function () {
return Array.isArray(innermostTitle) ? innermostTitle.join("") : innermostTitle;
});
}
var innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);
return innermostTitle || innermostDefaultTitle || undefined;
};
var getOnChangeClientState = function getOnChangeClientState(propsList) {
return getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};
};
var getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {
return propsList.filter(function (props) {
return typeof props[tagType] !== "undefined";
}).map(function (props) {
return props[tagType];
}).reduce(function (tagAttrs, current) {
return _extends({}, tagAttrs, current);
}, {});
};
var getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {
return propsList.filter(function (props) {
return typeof props[TAG_NAMES.BASE] !== "undefined";
}).map(function (props) {
return props[TAG_NAMES.BASE];
}).reverse().reduce(function (innermostBaseTag, tag) {
if (!innermostBaseTag.length) {
var keys = Object.keys(tag);
for (var i = 0; i < keys.length; i++) {
var attributeKey = keys[i];
var lowerCaseAttributeKey = attributeKey.toLowerCase();
if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {
return innermostBaseTag.concat(tag);
}
}
}
return innermostBaseTag;
}, []);
};
var getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {
// Calculate list of tags, giving priority innermost component (end of the propslist)
var approvedSeenTags = {};
return propsList.filter(function (props) {
if (Array.isArray(props[tagName])) {
return true;
}
if (typeof props[tagName] !== "undefined") {
warn("Helmet: " + tagName + " should be of type \"Array\". Instead found type \"" + _typeof(props[tagName]) + "\"");
}
return false;
}).map(function (props) {
return props[tagName];
}).reverse().reduce(function (approvedTags, instanceTags) {
var instanceSeenTags = {};
instanceTags.filter(function (tag) {
var primaryAttributeKey = void 0;
var keys = Object.keys(tag);
for (var i = 0; i < keys.length; i++) {
var attributeKey = keys[i];
var lowerCaseAttributeKey = attributeKey.toLowerCase();
// Special rule with link tags, since rel and href are both primary tags, rel takes priority
if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === "canonical") && !(lowerCaseAttributeKey === TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === "stylesheet")) {
primaryAttributeKey = lowerCaseAttributeKey;
}
// Special case for innerHTML which doesn't work lowercased
if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)) {
primaryAttributeKey = attributeKey;
}
}
if (!primaryAttributeKey || !tag[primaryAttributeKey]) {
return false;
}
var value = tag[primaryAttributeKey].toLowerCase();
if (!approvedSeenTags[primaryAttributeKey]) {
approvedSeenTags[primaryAttributeKey] = {};
}
if (!instanceSeenTags[primaryAttributeKey]) {
instanceSeenTags[primaryAttributeKey] = {};
}
if (!approvedSeenTags[primaryAttributeKey][value]) {
instanceSeenTags[primaryAttributeKey][value] = true;
return true;
}
return false;
}).reverse().forEach(function (tag) {
return approvedTags.push(tag);
});
// Update seen tags with tags from this instance
var keys = Object.keys(instanceSeenTags);
for (var i = 0; i < keys.length; i++) {
var attributeKey = keys[i];
var tagUnion = object_assign__WEBPACK_IMPORTED_MODULE_4___default()({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);
approvedSeenTags[attributeKey] = tagUnion;
}
return approvedTags;
}, []).reverse();
};
var getInnermostProperty = function getInnermostProperty(propsList, property) {
for (var i = propsList.length - 1; i >= 0; i--) {
var props = propsList[i];
if (props.hasOwnProperty(property)) {
return props[property];
}
}
return null;
};
var reducePropsToState = function reducePropsToState(propsList) {
return {
baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF, TAG_PROPERTIES.TARGET], propsList),
bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList),
defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),
encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),
htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList),
linkTags: getTagsFromPropsList(TAG_NAMES.LINK, [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF], propsList),
metaTags: getTagsFromPropsList(TAG_NAMES.META, [TAG_PROPERTIES.NAME, TAG_PROPERTIES.CHARSET, TAG_PROPERTIES.HTTPEQUIV, TAG_PROPERTIES.PROPERTY, TAG_PROPERTIES.ITEM_PROP], propsList),
noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList),
onChangeClientState: getOnChangeClientState(propsList),
scriptTags: getTagsFromPropsList(TAG_NAMES.SCRIPT, [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML], propsList),
styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList),
title: getTitleFromPropsList(propsList),
titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList)
};
};
var rafPolyfill = function () {
var clock = Date.now();
return function (callback) {
var currentTime = Date.now();
if (currentTime - clock > 16) {
clock = currentTime;
callback(currentTime);
} else {
setTimeout(function () {
rafPolyfill(callback);
}, 0);
}
};
}();
var cafPolyfill = function cafPolyfill(id) {
return clearTimeout(id);
};
var requestAnimationFrame = typeof window !== "undefined" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;
var cancelAnimationFrame = typeof window !== "undefined" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;
var warn = function warn(msg) {
return console && typeof console.warn === "function" && console.warn(msg);
};
var _helmetCallback = null;
var handleClientStateChange = function handleClientStateChange(newState) {
if (_helmetCallback) {
cancelAnimationFrame(_helmetCallback);
}
if (newState.defer) {
_helmetCallback = requestAnimationFrame(function () {
commitTagChanges(newState, function () {
_helmetCallback = null;
});
});
} else {
commitTagChanges(newState);
_helmetCallback = null;
}
};
var commitTagChanges = function commitTagChanges(newState, cb) {
var baseTag = newState.baseTag,
bodyAttributes = newState.bodyAttributes,
htmlAttributes = newState.htmlAttributes,
linkTags = newState.linkTags,
metaTags = newState.metaTags,
noscriptTags = newState.noscriptTags,
onChangeClientState = newState.onChangeClientState,
scriptTags = newState.scriptTags,
styleTags = newState.styleTags,
title = newState.title,
titleAttributes = newState.titleAttributes;
updateAttributes(TAG_NAMES.BODY, bodyAttributes);
updateAttributes(TAG_NAMES.HTML, htmlAttributes);
updateTitle(title, titleAttributes);
var tagUpdates = {
baseTag: updateTags(TAG_NAMES.BASE, baseTag),
linkTags: updateTags(TAG_NAMES.LINK, linkTags),
metaTags: updateTags(TAG_NAMES.META, metaTags),
noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags),
scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags),
styleTags: updateTags(TAG_NAMES.STYLE, styleTags)
};
var addedTags = {};
var removedTags = {};
Object.keys(tagUpdates).forEach(function (tagType) {
var _tagUpdates$tagType = tagUpdates[tagType],
newTags = _tagUpdates$tagType.newTags,
oldTags = _tagUpdates$tagType.oldTags;
if (newTags.length) {
addedTags[tagType] = newTags;
}
if (oldTags.length) {
removedTags[tagType] = tagUpdates[tagType].oldTags;
}
});
cb && cb();
onChangeClientState(newState, addedTags, removedTags);
};
var flattenArray = function flattenArray(possibleArray) {
return Array.isArray(possibleArray) ? possibleArray.join("") : possibleArray;
};
var updateTitle = function updateTitle(title, attributes) {
if (typeof title !== "undefined" && document.title !== title) {
document.title = flattenArray(title);
}
updateAttributes(TAG_NAMES.TITLE, attributes);
};
var updateAttributes = function updateAttributes(tagName, attributes) {
var elementTag = document.getElementsByTagName(tagName)[0];
if (!elementTag) {
return;
}
var helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);
var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(",") : [];
var attributesToRemove = [].concat(helmetAttributes);
var attributeKeys = Object.keys(attributes);
for (var i = 0; i < attributeKeys.length; i++) {
var attribute = attributeKeys[i];
var value = attributes[attribute] || "";
if (elementTag.getAttribute(attribute) !== value) {
elementTag.setAttribute(attribute, value);
}
if (helmetAttributes.indexOf(attribute) === -1) {
helmetAttributes.push(attribute);
}
var indexToSave = attributesToRemove.indexOf(attribute);
if (indexToSave !== -1) {
attributesToRemove.splice(indexToSave, 1);
}
}
for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {
elementTag.removeAttribute(attributesToRemove[_i]);
}
if (helmetAttributes.length === attributesToRemove.length) {
elementTag.removeAttribute(HELMET_ATTRIBUTE);
} else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(",")) {
elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(","));
}
};
var updateTags = function updateTags(type, tags) {
var headElement = document.head || document.querySelector(TAG_NAMES.HEAD);
var tagNodes = headElement.querySelectorAll(type + "[" + HELMET_ATTRIBUTE + "]");
var oldTags = Array.prototype.slice.call(tagNodes);
var newTags = [];
var indexToDelete = void 0;
if (tags && tags.length) {
tags.forEach(function (tag) {
var newElement = document.createElement(type);
for (var attribute in tag) {
if (tag.hasOwnProperty(attribute)) {
if (attribute === TAG_PROPERTIES.INNER_HTML) {
newElement.innerHTML = tag.innerHTML;
} else if (attribute === TAG_PROPERTIES.CSS_TEXT) {
if (newElement.styleSheet) {
newElement.styleSheet.cssText = tag.cssText;
} else {
newElement.appendChild(document.createTextNode(tag.cssText));
}
} else {
var value = typeof tag[attribute] === "undefined" ? "" : tag[attribute];
newElement.setAttribute(attribute, value);
}
}
}
newElement.setAttribute(HELMET_ATTRIBUTE, "true");
// Remove a duplicate tag from domTagstoRemove, so it isn't cleared.
if (oldTags.some(function (existingTag, index) {
indexToDelete = index;
return newElement.isEqualNode(existingTag);
})) {
oldTags.splice(indexToDelete, 1);
} else {
newTags.push(newElement);
}
});
}
oldTags.forEach(function (tag) {
return tag.parentNode.removeChild(tag);
});
newTags.forEach(function (tag) {
return headElement.appendChild(tag);
});
return {
oldTags: oldTags,
newTags: newTags
};
};
var generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {
return Object.keys(attributes).reduce(function (str, key) {
var attr = typeof attributes[key] !== "undefined" ? key + "=\"" + attributes[key] + "\"" : "" + key;
return str ? str + " " + attr : attr;
}, "");
};
var generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {
var attributeString = generateElementAttributesAsString(attributes);
var flattenedTitle = flattenArray(title);
return attributeString ? "<" + type + " " + HELMET_ATTRIBUTE + "=\"true\" " + attributeString + ">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">" : "<" + type + " " + HELMET_ATTRIBUTE + "=\"true\">" + encodeSpecialCharacters(flattenedTitle, encode) + "</" + type + ">";
};
var generateTagsAsString = function generateTagsAsString(type, tags, encode) {
return tags.reduce(function (str, tag) {
var attributeHtml = Object.keys(tag).filter(function (attribute) {
return !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT);
}).reduce(function (string, attribute) {
var attr = typeof tag[attribute] === "undefined" ? attribute : attribute + "=\"" + encodeSpecialCharacters(tag[attribute], encode) + "\"";
return string ? string + " " + attr : attr;
}, "");
var tagContent = tag.innerHTML || tag.cssText || "";
var isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;
return str + "<" + type + " " + HELMET_ATTRIBUTE + "=\"true\" " + attributeHtml + (isSelfClosing ? "/>" : ">" + tagContent + "</" + type + ">");
}, "");
};
var convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {
var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
return Object.keys(attributes).reduce(function (obj, key) {
obj[REACT_TAG_MAP[key] || key] = attributes[key];
return obj;
}, initProps);
};
var convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {
var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
return Object.keys(props).reduce(function (obj, key) {
obj[HTML_TAG_MAP[key] || key] = props[key];
return obj;
}, initAttributes);
};
var generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {
var _initProps;
// assigning into an array to define toString function on it
var initProps = (_initProps = {
key: title
}, _initProps[HELMET_ATTRIBUTE] = true, _initProps);
var props = convertElementAttributestoReactProps(attributes, initProps);
return [react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(TAG_NAMES.TITLE, props, title)];
};
var generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {
return tags.map(function (tag, i) {
var _mappedTag;
var mappedTag = (_mappedTag = {
key: i
}, _mappedTag[HELMET_ATTRIBUTE] = true, _mappedTag);
Object.keys(tag).forEach(function (attribute) {
var mappedAttribute = REACT_TAG_MAP[attribute] || attribute;
if (mappedAttribute === TAG_PROPERTIES.INNER_HTML || mappedAttribute === TAG_PROPERTIES.CSS_TEXT) {
var content = tag.innerHTML || tag.cssText;
mappedTag.dangerouslySetInnerHTML = { __html: content };
} else {
mappedTag[mappedAttribute] = tag[attribute];
}
});
return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(type, mappedTag);
});
};
var getMethodsForTag = function getMethodsForTag(type, tags, encode) {
switch (type) {
case TAG_NAMES.TITLE:
return {
toComponent: function toComponent() {
return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode);
},
toString: function toString() {
return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);
}
};
case ATTRIBUTE_NAMES.BODY:
case ATTRIBUTE_NAMES.HTML:
return {
toComponent: function toComponent() {
return convertElementAttributestoReactProps(tags);
},
toString: function toString() {
return generateElementAttributesAsString(tags);
}
};
default:
return {
toComponent: function toComponent() {
return generateTagsAsReactComponent(type, tags);
},
toString: function toString() {
return generateTagsAsString(type, tags, encode);
}
};
}
};
var mapStateOnServer = function mapStateOnServer(_ref) {
var baseTag = _ref.baseTag,
bodyAttributes = _ref.bodyAttributes,
encode = _ref.encode,
htmlAttributes = _ref.htmlAttributes,
linkTags = _ref.linkTags,
metaTags = _ref.metaTags,
noscriptTags = _ref.noscriptTags,
scriptTags = _ref.scriptTags,
styleTags = _ref.styleTags,
_ref$title = _ref.title,
title = _ref$title === undefined ? "" : _ref$title,
titleAttributes = _ref.titleAttributes;
return {
base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),
bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),
htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),
link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),
meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),
noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),
script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),
style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),
title: getMethodsForTag(TAG_NAMES.TITLE, { title: title, titleAttributes: titleAttributes }, encode)
};
};
var Helmet = function Helmet(Component) {
var _class, _temp;
return _temp = _class = function (_React$Component) {
inherits(HelmetWrapper, _React$Component);
function HelmetWrapper() {
classCallCheck(this, HelmetWrapper);
return possibleConstructorReturn(this, _React$Component.apply(this, arguments));
}
HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {
return !react_fast_compare__WEBPACK_IMPORTED_MODULE_2___default()(this.props, nextProps);
};
HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {
if (!nestedChildren) {
return null;
}
switch (child.type) {
case TAG_NAMES.SCRIPT:
case TAG_NAMES.NOSCRIPT:
return {
innerHTML: nestedChildren
};
case TAG_NAMES.STYLE:
return {
cssText: nestedChildren
};
}
throw new Error("<" + child.type + " /> elements are self-closing and can not contain children. Refer to our API for more information.");
};
HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {
var _babelHelpers$extends;
var child = _ref.child,
arrayTypeChildren = _ref.arrayTypeChildren,
newChildProps = _ref.newChildProps,
nestedChildren = _ref.nestedChildren;
return _extends({}, arrayTypeChildren, (_babelHelpers$extends = {}, _babelHelpers$extends[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _babelHelpers$extends));
};
HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {
var _babelHelpers$extends2, _babelHelpers$extends3;
var child = _ref2.child,
newProps = _ref2.newProps,
newChildProps = _ref2.newChildProps,
nestedChildren = _ref2.nestedChildren;
switch (child.type) {
case TAG_NAMES.TITLE:
return _extends({}, newProps, (_babelHelpers$extends2 = {}, _babelHelpers$extends2[child.type] = nestedChildren, _babelHelpers$extends2.titleAttributes = _extends({}, newChildProps), _babelHelpers$extends2));
case TAG_NAMES.BODY:
return _extends({}, newProps, {
bodyAttributes: _extends({}, newChildProps)
});
case TAG_NAMES.HTML:
return _extends({}, newProps, {
htmlAttributes: _extends({}, newChildProps)
});
}
return _extends({}, newProps, (_babelHelpers$extends3 = {}, _babelHelpers$extends3[child.type] = _extends({}, newChildProps), _babelHelpers$extends3));
};
HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {
var newFlattenedProps = _extends({}, newProps);
Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {
var _babelHelpers$extends4;
newFlattenedProps = _extends({}, newFlattenedProps, (_babelHelpers$extends4 = {}, _babelHelpers$extends4[arrayChildName] = arrayTypeChildren[arrayChildName], _babelHelpers$extends4));
});
return newFlattenedProps;
};
HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {
if (false) {}
return true;
};
HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {
var _this2 = this;
var arrayTypeChildren = {};
react__WEBPACK_IMPORTED_MODULE_3___default.a.Children.forEach(children, function (child) {
if (!child || !child.props) {
return;
}
var _child$props = child.props,
nestedChildren = _child$props.children,
childProps = objectWithoutProperties(_child$props, ["children"]);
var newChildProps = convertReactPropstoHtmlAttributes(childProps);
_this2.warnOnInvalidChildren(child, nestedChildren);
switch (child.type) {
case TAG_NAMES.LINK:
case TAG_NAMES.META:
case TAG_NAMES.NOSCRIPT:
case TAG_NAMES.SCRIPT:
case TAG_NAMES.STYLE:
arrayTypeChildren = _this2.flattenArrayTypeChildren({
child: child,
arrayTypeChildren: arrayTypeChildren,
newChildProps: newChildProps,
nestedChildren: nestedChildren
});
break;
default:
newProps = _this2.mapObjectTypeChildren({
child: child,
newProps: newProps,
newChildProps: newChildProps,
nestedChildren: nestedChildren
});
break;
}
});
newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);
return newProps;
};
HelmetWrapper.prototype.render = function render() {
var _props = this.props,
children = _props.children,
props = objectWithoutProperties(_props, ["children"]);
var newProps = _extends({}, props);
if (children) {
newProps = this.mapChildrenToProps(children, newProps);
}
return react__WEBPACK_IMPORTED_MODULE_3___default.a.createElement(Component, newProps);
};
createClass(HelmetWrapper, null, [{
key: "canUseDOM",
// Component.peek comes from react-side-effect:
// For testing, you may use a static peek() method available on the returned component.
// It lets you get the current state without resetting the mounted instance stack.
// Dont use it for anything other than testing.
/**
* @param {Object} base: {"target": "_blank", "href": "http://mysite.com/"}
* @param {Object} bodyAttributes: {"className": "root"}
* @param {String} defaultTitle: "Default Title"
* @param {Boolean} defer: true
* @param {Boolean} encodeSpecialCharacters: true
* @param {Object} htmlAttributes: {"lang": "en", "amp": undefined}
* @param {Array} link: [{"rel": "canonical", "href": "http://mysite.com/example"}]
* @param {Array} meta: [{"name": "description", "content": "Test description"}]
* @param {Array} noscript: [{"innerHTML": "<img src='http://mysite.com/js/test.js'"}]
* @param {Function} onChangeClientState: "(newState) => console.log(newState)"
* @param {Array} script: [{"type": "text/javascript", "src": "http://mysite.com/js/test.js"}]
* @param {Array} style: [{"type": "text/css", "cssText": "div { display: block; color: blue; }"}]
* @param {String} title: "Title"
* @param {Object} titleAttributes: {"itemprop": "name"}
* @param {String} titleTemplate: "MySite.com - %s"
*/
set: function set$$1(canUseDOM) {
Component.canUseDOM = canUseDOM;
}
}]);
return HelmetWrapper;
}(react__WEBPACK_IMPORTED_MODULE_3___default.a.Component), _class.propTypes = {
base: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object,
bodyAttributes: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object,
children: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.oneOfType([prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.node), prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.node]),
defaultTitle: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,
defer: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,
encodeSpecialCharacters: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.bool,
htmlAttributes: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object,
link: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object),
meta: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object),
noscript: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object),
onChangeClientState: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.func,
script: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object),
style: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object),
title: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string,
titleAttributes: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.object,
titleTemplate: prop_types__WEBPACK_IMPORTED_MODULE_0___default.a.string
}, _class.defaultProps = {
defer: true,
encodeSpecialCharacters: true
}, _class.peek = Component.peek, _class.rewind = function () {
var mappedState = Component.rewind();
if (!mappedState) {
// provide fallback if mappedState is undefined
mappedState = mapStateOnServer({
baseTag: [],
bodyAttributes: {},
encodeSpecialCharacters: true,
htmlAttributes: {},
linkTags: [],
metaTags: [],
noscriptTags: [],
scriptTags: [],
styleTags: [],
title: "",
titleAttributes: {}
});
}
return mappedState;
}, _temp;
};
var NullComponent = function NullComponent() {
return null;
};
var HelmetSideEffects = react_side_effect__WEBPACK_IMPORTED_MODULE_1___default()(reducePropsToState, handleClientStateChange, mapStateOnServer)(NullComponent);
var HelmetExport = Helmet(HelmetSideEffects);
HelmetExport.renderStatic = HelmetExport.rewind;
/* unused harmony default export */ var _unused_webpack_default_export = (HelmetExport);
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "qlaj":
/*!*****************************************************!*\
!*** ./node_modules/hash.js/lib/hash/sha/common.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ "w8CP");
var rotr32 = utils.rotr32;
function ft_1(s, x, y, z) {
if (s === 0)
return ch32(x, y, z);
if (s === 1 || s === 3)
return p32(x, y, z);
if (s === 2)
return maj32(x, y, z);
}
exports.ft_1 = ft_1;
function ch32(x, y, z) {
return (x & y) ^ ((~x) & z);
}
exports.ch32 = ch32;
function maj32(x, y, z) {
return (x & y) ^ (x & z) ^ (y & z);
}
exports.maj32 = maj32;
function p32(x, y, z) {
return x ^ y ^ z;
}
exports.p32 = p32;
function s0_256(x) {
return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);
}
exports.s0_256 = s0_256;
function s1_256(x) {
return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);
}
exports.s1_256 = s1_256;
function g0_256(x) {
return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);
}
exports.g0_256 = g0_256;
function g1_256(x) {
return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);
}
exports.g1_256 = g1_256;
/***/ }),
/***/ "qrJ5":
/*!******************************************!*\
!*** ./node_modules/antd/es/grid/row.js ***!
\******************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "pVnL");
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ "lSNA");
/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
/* harmony import */ var _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/slicedToArray */ "J4zp");
/* harmony import */ var _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_4__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! classnames */ "TSYQ");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../config-provider */ "H84U");
/* harmony import */ var _RowContext__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./RowContext */ "o/2+");
/* harmony import */ var _util_type__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../_util/type */ "CWQg");
/* harmony import */ var _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../_util/responsiveObserve */ "ACnJ");
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var RowAligns = Object(_util_type__WEBPACK_IMPORTED_MODULE_8__[/* tuple */ "a"])('top', 'middle', 'bottom', 'stretch');
var RowJustify = Object(_util_type__WEBPACK_IMPORTED_MODULE_8__[/* tuple */ "a"])('start', 'end', 'center', 'space-around', 'space-between');
var Row = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["forwardRef"](function (props, ref) {
var _React$useState = react__WEBPACK_IMPORTED_MODULE_4__["useState"]({
xs: true,
sm: true,
md: true,
lg: true,
xl: true,
xxl: true
}),
_React$useState2 = _babel_runtime_helpers_slicedToArray__WEBPACK_IMPORTED_MODULE_3___default()(_React$useState, 2),
screens = _React$useState2[0],
setScreens = _React$useState2[1];
var gutterRef = react__WEBPACK_IMPORTED_MODULE_4__["useRef"]();
gutterRef.current = props.gutter;
react__WEBPACK_IMPORTED_MODULE_4__["useEffect"](function () {
var token = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].subscribe(function (screen) {
var currentGutter = gutterRef.current || 0;
if (!Array.isArray(currentGutter) && _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2___default()(currentGutter) === 'object' || Array.isArray(currentGutter) && (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2___default()(currentGutter[0]) === 'object' || _babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2___default()(currentGutter[1]) === 'object')) {
setScreens(screen);
}
});
return function () {
_util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* default */ "a"].unsubscribe(token);
};
}, []);
var getGutter = function getGutter() {
var results = [0, 0];
var _props$gutter = props.gutter,
gutter = _props$gutter === void 0 ? 0 : _props$gutter;
var normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, 0];
normalizedGutter.forEach(function (g, index) {
if (_babel_runtime_helpers_typeof__WEBPACK_IMPORTED_MODULE_2___default()(g) === 'object') {
for (var i = 0; i < _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* responsiveArray */ "b"].length; i++) {
var breakpoint = _util_responsiveObserve__WEBPACK_IMPORTED_MODULE_9__[/* responsiveArray */ "b"][i];
if (screens[breakpoint] && g[breakpoint] !== undefined) {
results[index] = g[breakpoint];
break;
}
}
} else {
results[index] = g || 0;
}
});
return results;
};
var renderRow = function renderRow(_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls,
direction = _ref.direction;
var customizePrefixCls = props.prefixCls,
justify = props.justify,
align = props.align,
className = props.className,
style = props.style,
children = props.children,
others = __rest(props, ["prefixCls", "justify", "align", "className", "style", "children"]);
var prefixCls = getPrefixCls('row', customizePrefixCls);
var gutter = getGutter();
var classes = classnames__WEBPACK_IMPORTED_MODULE_5___default()(prefixCls, (_classNames = {}, _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-").concat(justify), justify), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-").concat(align), align), _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_1___default()(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className);
var rowStyle = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, gutter[0] > 0 ? {
marginLeft: gutter[0] / -2,
marginRight: gutter[0] / -2
} : {}), gutter[1] > 0 ? {
marginTop: gutter[1] / -2,
marginBottom: gutter[1] / 2
} : {}), style);
var otherProps = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, others);
delete otherProps.gutter;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_RowContext__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"].Provider, {
value: {
gutter: gutter
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"]("div", _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, otherProps, {
className: classes,
style: rowStyle,
ref: ref
}), children));
};
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4__["createElement"](_config_provider__WEBPACK_IMPORTED_MODULE_6__[/* ConfigConsumer */ "a"], null, renderRow);
});
Row.displayName = 'Row';
/* harmony default export */ __webpack_exports__["a"] = (Row);
/***/ }),
/***/ "quyA":
/*!********************************************!*\
!*** ./node_modules/lodash/_hasUnicode.js ***!
\********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
/** Used to compose unicode character classes. */
var rsAstralRange = '\\ud800-\\udfff',
rsComboMarksRange = '\\u0300-\\u036f',
reComboHalfMarksRange = '\\ufe20-\\ufe2f',
rsComboSymbolsRange = '\\u20d0-\\u20ff',
rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,
rsVarRange = '\\ufe0e\\ufe0f';
/** Used to compose unicode capture groups. */
var rsZWJ = '\\u200d';
/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */
var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');
/**
* Checks if `string` contains Unicode symbols.
*
* @private
* @param {string} string The string to inspect.
* @returns {boolean} Returns `true` if a symbol is found, else `false`.
*/
function hasUnicode(string) {
return reHasUnicode.test(string);
}
module.exports = hasUnicode;
/***/ }),
/***/ "qx4F":
/*!*****************************************************!*\
!*** ./node_modules/rc-util/es/getScrollBarSize.js ***!
\*****************************************************/
/*! exports provided: default, getTargetScrollBarSize */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getScrollBarSize; });
/* unused harmony export getTargetScrollBarSize */
/* harmony import */ var _Dom_dynamicCSS__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Dom/dynamicCSS */ "BU3w");
/* eslint-disable no-param-reassign */
var cached;
function measureScrollbarSize(ele) {
var randomId = "rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7));
var measureEle = document.createElement('div');
measureEle.id = randomId;
// Create Style
var measureStyle = measureEle.style;
measureStyle.position = 'absolute';
measureStyle.left = '0';
measureStyle.top = '0';
measureStyle.width = '100px';
measureStyle.height = '100px';
measureStyle.overflow = 'scroll';
// Clone Style if needed
var fallbackWidth;
var fallbackHeight;
if (ele) {
var targetStyle = getComputedStyle(ele);
measureStyle.scrollbarColor = targetStyle.scrollbarColor;
measureStyle.scrollbarWidth = targetStyle.scrollbarWidth;
// Set Webkit style
var webkitScrollbarStyle = getComputedStyle(ele, '::-webkit-scrollbar');
var width = parseInt(webkitScrollbarStyle.width, 10);
var height = parseInt(webkitScrollbarStyle.height, 10);
// Try wrap to handle CSP case
try {
var widthStyle = width ? "width: ".concat(webkitScrollbarStyle.width, ";") : '';
var heightStyle = height ? "height: ".concat(webkitScrollbarStyle.height, ";") : '';
Object(_Dom_dynamicCSS__WEBPACK_IMPORTED_MODULE_0__[/* updateCSS */ "b"])("\n#".concat(randomId, "::-webkit-scrollbar {\n").concat(widthStyle, "\n").concat(heightStyle, "\n}"), randomId);
} catch (e) {
// Can't wrap, just log error
console.error(e);
// Get from style directly
fallbackWidth = width;
fallbackHeight = height;
}
}
document.body.appendChild(measureEle);
// Measure. Get fallback style if provided
var scrollWidth = ele && fallbackWidth && !isNaN(fallbackWidth) ? fallbackWidth : measureEle.offsetWidth - measureEle.clientWidth;
var scrollHeight = ele && fallbackHeight && !isNaN(fallbackHeight) ? fallbackHeight : measureEle.offsetHeight - measureEle.clientHeight;
// Clean up
document.body.removeChild(measureEle);
Object(_Dom_dynamicCSS__WEBPACK_IMPORTED_MODULE_0__[/* removeCSS */ "a"])(randomId);
return {
width: scrollWidth,
height: scrollHeight
};
}
function getScrollBarSize(fresh) {
if (typeof document === 'undefined') {
return 0;
}
if (fresh || cached === undefined) {
cached = measureScrollbarSize();
}
return cached.width;
}
function getTargetScrollBarSize(target) {
if (typeof document === 'undefined' || !target || !(target instanceof Element)) {
return {
width: 0,
height: 0
};
}
return measureScrollbarSize(target);
}
/***/ }),
/***/ "qxPZ":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/internals/correct-is-regexp-logic.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var MATCH = wellKnownSymbol('match');
module.exports = function (METHOD_NAME) {
var regexp = /./;
try {
'/./'[METHOD_NAME](regexp);
} catch (e) {
try {
regexp[MATCH] = false;
return '/./'[METHOD_NAME](regexp);
} catch (f) { /* empty */ }
} return false;
};
/***/ }),
/***/ "r/Vq":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.number.max-safe-integer.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Number.MAX_SAFE_INTEGER` constant
// https://tc39.github.io/ecma262/#sec-number.max_safe_integer
$({ target: 'Number', stat: true }, {
MAX_SAFE_INTEGER: 0x1FFFFFFFFFFFFF
});
/***/ }),
/***/ "r5Og":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.object.seal.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var onFreeze = __webpack_require__(/*! ../internals/internal-metadata */ "8YOa").onFreeze;
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "uy83");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var nativeSeal = Object.seal;
var FAILS_ON_PRIMITIVES = fails(function () { nativeSeal(1); });
// `Object.seal` method
// https://tc39.github.io/ecma262/#sec-object.seal
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
seal: function seal(it) {
return nativeSeal && isObject(it) ? nativeSeal(onFreeze(it)) : it;
}
});
/***/ }),
/***/ "rB9j":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.regexp.exec.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var exec = __webpack_require__(/*! ../internals/regexp-exec */ "kmMV");
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
exec: exec
});
/***/ }),
/***/ "rBZX":
/*!********************************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.delete-property.js ***!
\********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
// `Reflect.deleteProperty` method
// https://tc39.github.io/ecma262/#sec-reflect.deleteproperty
$({ target: 'Reflect', stat: true }, {
deleteProperty: function deleteProperty(target, propertyKey) {
var descriptor = getOwnPropertyDescriptor(anObject(target), propertyKey);
return descriptor && !descriptor.configurable ? false : delete target[propertyKey];
}
});
/***/ }),
/***/ "rKzb":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/collection-weak.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "4syw");
var getWeakData = __webpack_require__(/*! ../internals/internal-metadata */ "8YOa").getWeakData;
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var anInstance = __webpack_require__(/*! ../internals/an-instance */ "GarU");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var ArrayIterationModule = __webpack_require__(/*! ../internals/array-iteration */ "tycR");
var $has = __webpack_require__(/*! ../internals/has */ "UTVS");
var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "afO8");
var setInternalState = InternalStateModule.set;
var internalStateGetterFor = InternalStateModule.getterFor;
var find = ArrayIterationModule.find;
var findIndex = ArrayIterationModule.findIndex;
var id = 0;
// fallback for uncaught frozen keys
var uncaughtFrozenStore = function (store) {
return store.frozen || (store.frozen = new UncaughtFrozenStore());
};
var UncaughtFrozenStore = function () {
this.entries = [];
};
var findUncaughtFrozen = function (store, key) {
return find(store.entries, function (it) {
return it[0] === key;
});
};
UncaughtFrozenStore.prototype = {
get: function (key) {
var entry = findUncaughtFrozen(this, key);
if (entry) return entry[1];
},
has: function (key) {
return !!findUncaughtFrozen(this, key);
},
set: function (key, value) {
var entry = findUncaughtFrozen(this, key);
if (entry) entry[1] = value;
else this.entries.push([key, value]);
},
'delete': function (key) {
var index = findIndex(this.entries, function (it) {
return it[0] === key;
});
if (~index) this.entries.splice(index, 1);
return !!~index;
}
};
module.exports = {
getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {
var C = wrapper(function (that, iterable) {
anInstance(that, C, CONSTRUCTOR_NAME);
setInternalState(that, {
type: CONSTRUCTOR_NAME,
id: id++,
frozen: undefined
});
if (iterable != undefined) iterate(iterable, that[ADDER], that, IS_MAP);
});
var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);
var define = function (that, key, value) {
var state = getInternalState(that);
var data = getWeakData(anObject(key), true);
if (data === true) uncaughtFrozenStore(state).set(key, value);
else data[state.id] = value;
return that;
};
redefineAll(C.prototype, {
// 23.3.3.2 WeakMap.prototype.delete(key)
// 23.4.3.3 WeakSet.prototype.delete(value)
'delete': function (key) {
var state = getInternalState(this);
if (!isObject(key)) return false;
var data = getWeakData(key);
if (data === true) return uncaughtFrozenStore(state)['delete'](key);
return data && $has(data, state.id) && delete data[state.id];
},
// 23.3.3.4 WeakMap.prototype.has(key)
// 23.4.3.4 WeakSet.prototype.has(value)
has: function has(key) {
var state = getInternalState(this);
if (!isObject(key)) return false;
var data = getWeakData(key);
if (data === true) return uncaughtFrozenStore(state).has(key);
return data && $has(data, state.id);
}
});
redefineAll(C.prototype, IS_MAP ? {
// 23.3.3.3 WeakMap.prototype.get(key)
get: function get(key) {
var state = getInternalState(this);
if (isObject(key)) {
var data = getWeakData(key);
if (data === true) return uncaughtFrozenStore(state).get(key);
return data ? data[state.id] : undefined;
}
},
// 23.3.3.5 WeakMap.prototype.set(key, value)
set: function set(key, value) {
return define(this, key, value);
}
} : {
// 23.4.3.1 WeakSet.prototype.add(value)
add: function add(value) {
return define(this, value, true);
}
});
return C;
}
};
/***/ }),
/***/ "rSSe":
/*!************************************************************!*\
!*** ./node_modules/antd/es/notification/style/index.less ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
// extracted by mini-css-extract-plugin
/***/ }),
/***/ "rW0t":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/regexp-flags.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
// `RegExp.prototype.flags` getter implementation
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
module.exports = function () {
var that = anObject(this);
var result = '';
if (that.global) result += 'g';
if (that.ignoreCase) result += 'i';
if (that.multiline) result += 'm';
if (that.dotAll) result += 's';
if (that.unicode) result += 'u';
if (that.sticky) result += 'y';
return result;
};
/***/ }),
/***/ "rZ3M":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.string.replace-all.js ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "HYAF");
var isRegExp = __webpack_require__(/*! ../internals/is-regexp */ "ROdP");
var getRegExpFlags = __webpack_require__(/*! ../internals/regexp-flags */ "rW0t");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var REPLACE = wellKnownSymbol('replace');
var RegExpPrototype = RegExp.prototype;
// `String.prototype.replaceAll` method
// https://github.com/tc39/proposal-string-replace-all
$({ target: 'String', proto: true }, {
replaceAll: function replaceAll(searchValue, replaceValue) {
var O = requireObjectCoercible(this);
var IS_REG_EXP, flags, replacer, string, searchString, template, result, position, index;
if (searchValue != null) {
IS_REG_EXP = isRegExp(searchValue);
if (IS_REG_EXP) {
flags = String(requireObjectCoercible('flags' in RegExpPrototype
? searchValue.flags
: getRegExpFlags.call(searchValue)
));
if (!~flags.indexOf('g')) throw TypeError('`.replaceAll` does not allow non-global regexes');
}
replacer = searchValue[REPLACE];
if (replacer !== undefined) {
return replacer.call(searchValue, O, replaceValue);
} else if (IS_PURE && IS_REG_EXP) {
return String(O).replace(searchValue, replaceValue);
}
}
string = String(O);
searchString = String(searchValue);
if (searchString === '') return replaceAll.call(string, /(?:)/g, replaceValue);
template = string.split(searchString);
if (typeof replaceValue !== 'function') {
return template.join(String(replaceValue));
}
result = template[0];
position = result.length;
for (index = 1; index < template.length; index++) {
result += String(replaceValue(searchString, position, string));
position += searchString.length + template[index].length;
result += template[index];
}
return result;
}
});
/***/ }),
/***/ "rb3L":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.weak-set.of.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var of = __webpack_require__(/*! ../internals/collection-of */ "P940");
// `WeakSet.of` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of
$({ target: 'WeakSet', stat: true }, {
of: of
});
/***/ }),
/***/ "rePB":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/defineProperty.js ***!
\*******************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _defineProperty; });
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "o46R");
function _defineProperty(obj, key, value) {
key = Object(_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(key);
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
/***/ }),
/***/ "rhT+":
/*!*****************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/iterableToArray.js ***!
\*****************************************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
module.exports = _iterableToArray;
/***/ }),
/***/ "rkAj":
/*!***********************************************************************!*\
!*** ./node_modules/core-js/internals/array-method-uses-to-length.js ***!
\***********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var defineProperty = Object.defineProperty;
var cache = {};
var thrower = function (it) { throw it; };
module.exports = function (METHOD_NAME, options) {
if (has(cache, METHOD_NAME)) return cache[METHOD_NAME];
if (!options) options = {};
var method = [][METHOD_NAME];
var ACCESSORS = has(options, 'ACCESSORS') ? options.ACCESSORS : false;
var argument0 = has(options, 0) ? options[0] : thrower;
var argument1 = has(options, 1) ? options[1] : undefined;
return cache[METHOD_NAME] = !!method && !fails(function () {
if (ACCESSORS && !DESCRIPTORS) return true;
var O = { length: -1 };
if (ACCESSORS) defineProperty(O, 1, { enumerable: true, get: thrower });
else O[1] = 1;
method.call(O, argument0, argument1);
});
};
/***/ }),
/***/ "rlch":
/*!************************************************************************!*\
!*** ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js ***!
\************************************************************************/
/*! exports provided: Link, MemoryRouter, NavLink, Prompt, Redirect, Route, Router, StaticRouter, Switch, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter, __RouterContext, createBrowserHistory, createHashHistory, createMemoryHistory, ApplyPluginsType, Plugin, dynamic */
/*! exports used: ApplyPluginsType */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return ApplyPluginsType; });
/* unused harmony export Plugin */
/* unused harmony export dynamic */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var use_subscription__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! use-subscription */ "bw0O");
/* harmony import */ var use_subscription__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(use_subscription__WEBPACK_IMPORTED_MODULE_1__);
function _typeof(obj) {
"@babel/helpers - typeof";
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _toArray(arr) {
return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArray(iter) {
if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter);
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _createForOfIteratorHelper(o) {
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
var i = 0;
var F = function () {};
return {
s: F,
n: function () {
if (i >= o.length) return {
done: true
};
return {
done: false,
value: o[i++]
};
},
e: function (e) {
throw e;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var it,
normalCompletion = true,
didErr = false,
err;
return {
s: function () {
it = o[Symbol.iterator]();
},
n: function () {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function (e) {
didErr = true;
err = e;
},
f: function () {
try {
if (!normalCompletion && it.return != null) it.return();
} finally {
if (didErr) throw err;
}
}
};
}
function assert(value, message) {
if (!value) throw new Error(message);
}
var ApplyPluginsType;
(function (ApplyPluginsType) {
ApplyPluginsType["compose"] = "compose";
ApplyPluginsType["modify"] = "modify";
ApplyPluginsType["event"] = "event";
})(ApplyPluginsType || (ApplyPluginsType = {}));
function _compose(_ref) {
var fns = _ref.fns,
args = _ref.args;
if (fns.length === 1) {
return fns[0];
}
var last = fns.pop();
return fns.reduce(function (a, b) {
return function () {
return b(a, args);
};
}, last);
}
function isPromiseLike(obj) {
return !!obj && _typeof(obj) === 'object' && typeof obj.then === 'function';
}
var Plugin = /*#__PURE__*/function () {
function Plugin(opts) {
_classCallCheck(this, Plugin);
this.hooks = {};
this.validKeys = (opts === null || opts === void 0 ? void 0 : opts.validKeys) || [];
}
_createClass(Plugin, [{
key: "register",
value: function register(plugin) {
var _this = this;
assert(!!plugin.apply, "register failed, plugin.apply must supplied");
assert(!!plugin.path, "register failed, plugin.path must supplied");
Object.keys(plugin.apply).forEach(function (key) {
assert(_this.validKeys.indexOf(key) > -1, "register failed, invalid key ".concat(key, " from plugin ").concat(plugin.path, "."));
if (!_this.hooks[key]) _this.hooks[key] = [];
_this.hooks[key] = _this.hooks[key].concat(plugin.apply[key]);
});
}
}, {
key: "getHooks",
value: function getHooks(keyWithDot) {
var _keyWithDot$split = keyWithDot.split('.'),
_keyWithDot$split2 = _toArray(_keyWithDot$split),
key = _keyWithDot$split2[0],
memberKeys = _keyWithDot$split2.slice(1);
var hooks = this.hooks[key] || [];
if (memberKeys.length) {
hooks = hooks.map(function (hook) {
try {
var ret = hook;
var _iterator = _createForOfIteratorHelper(memberKeys),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var memberKey = _step.value;
ret = ret[memberKey];
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
return ret;
} catch (e) {
return null;
}
}).filter(Boolean);
}
return hooks;
}
}, {
key: "applyPlugins",
value: function applyPlugins(_ref2) {
var key = _ref2.key,
type = _ref2.type,
initialValue = _ref2.initialValue,
args = _ref2.args,
async = _ref2.async;
var hooks = this.getHooks(key) || [];
if (args) {
assert(_typeof(args) === 'object', "applyPlugins failed, args must be plain object.");
}
switch (type) {
case ApplyPluginsType.modify:
if (async) {
return hooks.reduce( /*#__PURE__*/function () {
var _ref3 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(memo, hook) {
var ret;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
assert(typeof hook === 'function' || _typeof(hook) === 'object' || isPromiseLike(hook), "applyPlugins failed, all hooks for key ".concat(key, " must be function, plain object or Promise."));
if (!isPromiseLike(memo)) {
_context.next = 5;
break;
}
_context.next = 4;
return memo;
case 4:
memo = _context.sent;
case 5:
if (!(typeof hook === 'function')) {
_context.next = 16;
break;
}
ret = hook(memo, args);
if (!isPromiseLike(ret)) {
_context.next = 13;
break;
}
_context.next = 10;
return ret;
case 10:
return _context.abrupt("return", _context.sent);
case 13:
return _context.abrupt("return", ret);
case 14:
_context.next = 21;
break;
case 16:
if (!isPromiseLike(hook)) {
_context.next = 20;
break;
}
_context.next = 19;
return hook;
case 19:
hook = _context.sent;
case 20:
return _context.abrupt("return", _objectSpread2({}, memo, {}, hook));
case 21:
case "end":
return _context.stop();
}
}
}, _callee);
}));
return function (_x, _x2) {
return _ref3.apply(this, arguments);
};
}(), isPromiseLike(initialValue) ? initialValue : Promise.resolve(initialValue));
} else {
return hooks.reduce(function (memo, hook) {
assert(typeof hook === 'function' || _typeof(hook) === 'object', "applyPlugins failed, all hooks for key ".concat(key, " must be function or plain object."));
if (typeof hook === 'function') {
return hook(memo, args);
} else {
// TODO: deepmerge?
return _objectSpread2({}, memo, {}, hook);
}
}, initialValue);
}
case ApplyPluginsType.event:
return hooks.forEach(function (hook) {
assert(typeof hook === 'function', "applyPlugins failed, all hooks for key ".concat(key, " must be function."));
hook(args);
});
case ApplyPluginsType.compose:
return function () {
return _compose({
fns: hooks.concat(initialValue),
args: args
})();
};
}
}
}]);
return Plugin;
}();
var LoadableContext = Object(react__WEBPACK_IMPORTED_MODULE_0__["createContext"])(null);
var ALL_INITIALIZERS = [];
var READY_INITIALIZERS = [];
var initialized = false;
function load(loader) {
var promise = loader();
var state = {
loading: true,
loaded: null,
error: null
};
state.promise = promise.then(function (loaded) {
state.loading = false;
state.loaded = loaded;
return loaded;
}).catch(function (err) {
state.loading = false;
state.error = err;
throw err;
});
return state;
}
function loadMap(obj) {
var state = {
loading: false,
loaded: {},
error: null
};
var promises = [];
try {
Object.keys(obj).forEach(function (key) {
var result = load(obj[key]);
if (!result.loading) {
state.loaded[key] = result.loaded;
state.error = result.error;
} else {
state.loading = true;
}
promises.push(result.promise);
result.promise.then(function (res) {
state.loaded[key] = res;
}).catch(function (err) {
state.error = err;
});
});
} catch (err) {
state.error = err;
}
state.promise = Promise.all(promises).then(function (res) {
state.loading = false;
return res;
}).catch(function (err) {
state.loading = false;
throw err;
});
return state;
}
function resolve(obj) {
return obj && obj.__esModule ? obj.default : obj;
}
function render(loaded, props) {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(resolve(loaded), props);
}
function createLoadableComponent(loadFn, options) {
var opts = Object.assign({
loader: null,
loading: null,
delay: 200,
timeout: null,
render: render,
webpack: null,
modules: null
}, options);
var subscription = null;
function init() {
if (!subscription) {
var sub = new LoadableSubscription(loadFn, opts);
subscription = {
getCurrentValue: sub.getCurrentValue.bind(sub),
subscribe: sub.subscribe.bind(sub),
retry: sub.retry.bind(sub),
promise: sub.promise.bind(sub)
};
}
return subscription.promise();
} // Server only
if (typeof window === 'undefined') {
ALL_INITIALIZERS.push(init);
} // Client only
if (!initialized && typeof window !== 'undefined' && typeof opts.webpack === 'function') {
var moduleIds = opts.webpack();
READY_INITIALIZERS.push(function (ids) {
var _iterator = _createForOfIteratorHelper(moduleIds),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var moduleId = _step.value;
if (ids.indexOf(moduleId) !== -1) {
return init();
}
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
});
}
var LoadableComponent = function LoadableComponent(props, ref) {
init();
var context = react__WEBPACK_IMPORTED_MODULE_0___default.a.useContext(LoadableContext);
var state = Object(use_subscription__WEBPACK_IMPORTED_MODULE_1__["useSubscription"])(subscription);
react__WEBPACK_IMPORTED_MODULE_0___default.a.useImperativeHandle(ref, function () {
return {
retry: subscription.retry
};
});
if (context && Array.isArray(opts.modules)) {
opts.modules.forEach(function (moduleName) {
context(moduleName);
});
}
if (state.loading || state.error) {
return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(opts.loading, {
isLoading: state.loading,
pastDelay: state.pastDelay,
timedOut: state.timedOut,
error: state.error,
retry: subscription.retry
});
} else if (state.loaded) {
return opts.render(state.loaded, props);
} else {
return null;
}
};
var LoadableComponentWithRef = react__WEBPACK_IMPORTED_MODULE_0___default.a.forwardRef(LoadableComponent); // add static method in React.forwardRef
// https://github.com/facebook/react/issues/17830
LoadableComponentWithRef.preload = function () {
return init();
};
LoadableComponentWithRef.displayName = 'LoadableComponent';
return LoadableComponentWithRef;
}
var LoadableSubscription = /*#__PURE__*/function () {
function LoadableSubscription(loadFn, opts) {
_classCallCheck(this, LoadableSubscription);
this._loadFn = loadFn;
this._opts = opts;
this._callbacks = new Set();
this._delay = null;
this._timeout = null;
this.retry();
}
_createClass(LoadableSubscription, [{
key: "promise",
value: function promise() {
return this._res.promise;
}
}, {
key: "retry",
value: function retry() {
var _this = this;
this._clearTimeouts();
this._res = this._loadFn(this._opts.loader);
this._state = {
pastDelay: false,
timedOut: false
};
var res = this._res,
opts = this._opts;
if (res.loading) {
if (typeof opts.delay === 'number') {
if (opts.delay === 0) {
this._state.pastDelay = true;
} else {
this._delay = setTimeout(function () {
_this._update({
pastDelay: true
});
}, opts.delay);
}
}
if (typeof opts.timeout === 'number') {
this._timeout = setTimeout(function () {
_this._update({
timedOut: true
});
}, opts.timeout);
}
}
this._res.promise.then(function () {
_this._update();
_this._clearTimeouts();
}) // eslint-disable-next-line handle-callback-err
.catch(function (err) {
_this._update();
_this._clearTimeouts();
});
this._update({});
}
}, {
key: "_update",
value: function _update(partial) {
this._state = _objectSpread2({}, this._state, {}, partial);
this._callbacks.forEach(function (callback) {
return callback();
});
}
}, {
key: "_clearTimeouts",
value: function _clearTimeouts() {
clearTimeout(this._delay);
clearTimeout(this._timeout);
}
}, {
key: "getCurrentValue",
value: function getCurrentValue() {
return _objectSpread2({}, this._state, {
error: this._res.error,
loaded: this._res.loaded,
loading: this._res.loading
});
}
}, {
key: "subscribe",
value: function subscribe(callback) {
var _this2 = this;
this._callbacks.add(callback);
return function () {
_this2._callbacks.delete(callback);
};
}
}]);
return LoadableSubscription;
}();
function Loadable(opts) {
return createLoadableComponent(load, opts);
}
function LoadableMap(opts) {
if (typeof opts.render !== 'function') {
throw new Error('LoadableMap requires a `render(loaded, props)` function');
}
return createLoadableComponent(loadMap, opts);
}
Loadable.Map = LoadableMap;
function flushInitializers(initializers, ids) {
var promises = [];
while (initializers.length) {
var init = initializers.pop();
promises.push(init(ids));
}
return Promise.all(promises).then(function () {
if (initializers.length) {
return flushInitializers(initializers, ids);
}
});
}
Loadable.preloadAll = function () {
return new Promise(function (resolve, reject) {
flushInitializers(ALL_INITIALIZERS).then(resolve, reject);
});
};
Loadable.preloadReady = function () {
var ids = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
return new Promise(function (resolve) {
var res = function res() {
initialized = true;
return resolve();
}; // We always will resolve, errors should be handled within loading UIs.
flushInitializers(READY_INITIALIZERS, ids).then(res, res);
});
};
if (typeof window !== 'undefined') {
window.__NEXT_PRELOADREADY = Loadable.preloadReady;
}
function dynamic (opts) {
var loadableFn = Loadable;
var loadableOptions = {
loading: function loading(_ref) {
var error = _ref.error,
isLoading = _ref.isLoading;
if (false) {}
return /*#__PURE__*/Object(react__WEBPACK_IMPORTED_MODULE_0__["createElement"])("p", null, "loading...");
}
}; // Support for direct import(),
// eg: dynamic(() => import('../hello-world'))
if (typeof opts === 'function') {
loadableOptions.loader = opts; // Support for having first argument being options,
// eg: dynamic({loader: import('../hello-world')})
} else if (_typeof(opts) === 'object') {
loadableOptions = _objectSpread2({}, loadableOptions, {}, opts);
} else {
throw new Error("Unexpect arguments ".concat(opts));
} // Support for passing options,
// eg: dynamic(import('../hello-world'), {loading: () => <p>Loading something</p>})
// loadableOptions = { ...loadableOptions, ...options };
return loadableFn(loadableOptions);
}
/***/ }),
/***/ "rpNk":
/*!**********************************************************!*\
!*** ./node_modules/core-js/internals/iterators-core.js ***!
\**********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var ITERATOR = wellKnownSymbol('iterator');
var BUGGY_SAFARI_ITERATORS = false;
var returnThis = function () { return this; };
// `%IteratorPrototype%` object
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
if ([].keys) {
arrayIterator = [].keys();
// Safari 8 has buggy iterators w/o `next`
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;
else {
PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
}
}
if (IteratorPrototype == undefined) IteratorPrototype = {};
// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
if (!IS_PURE && !has(IteratorPrototype, ITERATOR)) {
createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
}
module.exports = {
IteratorPrototype: IteratorPrototype,
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
};
/***/ }),
/***/ "rwPt":
/*!**************************************************************!*\
!*** ./node_modules/core-js/internals/string-html-forced.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
// check the existence of a method, lowercase
// of a tag and escaping quotes in arguments
module.exports = function (METHOD_NAME) {
return fails(function () {
var test = ''[METHOD_NAME]('"');
return test !== test.toLowerCase() || test.split('"').length > 3;
});
};
/***/ }),
/***/ "s4An":
/*!*******************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js ***!
\*******************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _setPrototypeOf; });
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
/***/ }),
/***/ "s5qe":
/*!*************************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.to-locale-string.js ***!
\*************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var Int8Array = global.Int8Array;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var $toLocaleString = [].toLocaleString;
var $slice = [].slice;
// iOS Safari 6.x fails here
var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () {
$toLocaleString.call(new Int8Array(1));
});
var FORCED = fails(function () {
return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString();
}) || !fails(function () {
Int8Array.prototype.toLocaleString.call([1, 2]);
});
// `%TypedArray%.prototype.toLocaleString` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.tolocalestring
exportTypedArrayMethod('toLocaleString', function toLocaleString() {
return $toLocaleString.apply(TO_LOCALE_STRING_BUG ? $slice.call(aTypedArray(this)) : aTypedArray(this), arguments);
}, FORCED);
/***/ }),
/***/ "sEFX":
/*!************************************************************!*\
!*** ./node_modules/core-js/internals/object-to-string.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var TO_STRING_TAG_SUPPORT = __webpack_require__(/*! ../internals/to-string-tag-support */ "AO7/");
var classof = __webpack_require__(/*! ../internals/classof */ "9d/t");
// `Object.prototype.toString` method implementation
// https://tc39.github.io/ecma262/#sec-object.prototype.tostring
module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {
return '[object ' + classof(this) + ']';
};
/***/ }),
/***/ "sEfC":
/*!*****************************************!*\
!*** ./node_modules/lodash/debounce.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./isObject */ "GoyQ"),
now = __webpack_require__(/*! ./now */ "QIyF"),
toNumber = __webpack_require__(/*! ./toNumber */ "tLB3");
/** Error message constants. */
var FUNC_ERROR_TEXT = 'Expected a function';
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max,
nativeMin = Math.min;
/**
* Creates a debounced function that delays invoking `func` until after `wait`
* milliseconds have elapsed since the last time the debounced function was
* invoked. The debounced function comes with a `cancel` method to cancel
* delayed `func` invocations and a `flush` method to immediately invoke them.
* Provide `options` to indicate whether `func` should be invoked on the
* leading and/or trailing edge of the `wait` timeout. The `func` is invoked
* with the last arguments provided to the debounced function. Subsequent
* calls to the debounced function return the result of the last `func`
* invocation.
*
* **Note:** If `leading` and `trailing` options are `true`, `func` is
* invoked on the trailing edge of the timeout only if the debounced function
* is invoked more than once during the `wait` timeout.
*
* If `wait` is `0` and `leading` is `false`, `func` invocation is deferred
* until to the next tick, similar to `setTimeout` with a timeout of `0`.
*
* See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)
* for details over the differences between `_.debounce` and `_.throttle`.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Function
* @param {Function} func The function to debounce.
* @param {number} [wait=0] The number of milliseconds to delay.
* @param {Object} [options={}] The options object.
* @param {boolean} [options.leading=false]
* Specify invoking on the leading edge of the timeout.
* @param {number} [options.maxWait]
* The maximum time `func` is allowed to be delayed before it's invoked.
* @param {boolean} [options.trailing=true]
* Specify invoking on the trailing edge of the timeout.
* @returns {Function} Returns the new debounced function.
* @example
*
* // Avoid costly calculations while the window size is in flux.
* jQuery(window).on('resize', _.debounce(calculateLayout, 150));
*
* // Invoke `sendMail` when clicked, debouncing subsequent calls.
* jQuery(element).on('click', _.debounce(sendMail, 300, {
* 'leading': true,
* 'trailing': false
* }));
*
* // Ensure `batchLog` is invoked once after 1 second of debounced calls.
* var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });
* var source = new EventSource('/stream');
* jQuery(source).on('message', debounced);
*
* // Cancel the trailing debounced invocation.
* jQuery(window).on('popstate', debounced.cancel);
*/
function debounce(func, wait, options) {
var lastArgs,
lastThis,
maxWait,
result,
timerId,
lastCallTime,
lastInvokeTime = 0,
leading = false,
maxing = false,
trailing = true;
if (typeof func != 'function') {
throw new TypeError(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = 'maxWait' in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = 'trailing' in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs,
thisArg = lastThis;
lastArgs = lastThis = undefined;
lastInvokeTime = time;
result = func.apply(thisArg, args);
return result;
}
function leadingEdge(time) {
// Reset any `maxWait` timer.
lastInvokeTime = time;
// Start the timer for the trailing edge.
timerId = setTimeout(timerExpired, wait);
// Invoke the leading edge.
return leading ? invokeFunc(time) : result;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime,
timeWaiting = wait - timeSinceLastCall;
return maxing
? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)
: timeWaiting;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime,
timeSinceLastInvoke = time - lastInvokeTime;
// Either this is the first call, activity has stopped and we're at the
// trailing edge, the system time has gone backwards and we're treating
// it as the trailing edge, or we've hit the `maxWait` limit.
return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||
(timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));
}
function timerExpired() {
var time = now();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
// Restart the timer.
timerId = setTimeout(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined;
// Only invoke if we have `lastArgs` which means `func` has been
// debounced at least once.
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = undefined;
return result;
}
function cancel() {
if (timerId !== undefined) {
clearTimeout(timerId);
}
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined;
}
function flush() {
return timerId === undefined ? result : trailingEdge(now());
}
function debounced() {
var time = now(),
isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined) {
return leadingEdge(lastCallTime);
}
if (maxing) {
// Handle invocations in a tight loop.
clearTimeout(timerId);
timerId = setTimeout(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined) {
timerId = setTimeout(timerExpired, wait);
}
return result;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
module.exports = debounce;
/***/ }),
/***/ "sFpY":
/*!******************************************************************!*\
!*** ./node_modules/@umijs/plugin-model/lib/helpers/executor.js ***!
\******************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
var _default = function _default(props) {
var hook = props.hook,
onUpdate = props.onUpdate,
namespace = props.namespace;
var updateRef = (0, _react.useRef)(onUpdate);
updateRef.current = onUpdate;
var initialLoad = (0, _react.useRef)(false);
var data;
try {
data = hook();
if (false) { var count; }
} catch (e) {
console.error("plugin-model: Invoking '".concat(namespace || 'unknown', "' model failed:"), e);
} // 首次执行时立刻返回初始值
(0, _react.useMemo)(function () {
updateRef.current(data);
initialLoad.current = false;
}, []); // React 16.13 后 update 函数用 useEffect 包裹
(0, _react.useEffect)(function () {
if (initialLoad.current) {
updateRef.current(data);
} else {
initialLoad.current = true;
}
});
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null);
};
exports.default = _default;
/***/ }),
/***/ "sKbD":
/*!*******************************************************************!*\
!*** ./node_modules/@ant-design/icons/ExclamationCircleFilled.js ***!
\*******************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ExclamationCircleFilled = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/ExclamationCircleFilled */ "b/UD"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _ExclamationCircleFilled;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "sM0O":
/*!***********************************************************************!*\
!*** ./node_modules/@ant-design/icons-svg/lib/asn/LoadingOutlined.js ***!
\***********************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
// This icon file is generated automatically.
Object.defineProperty(exports, "__esModule", { value: true });
var LoadingOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" } }] }, "name": "loading", "theme": "outlined" };
exports.default = LoadingOutlined;
/***/ }),
/***/ "sMBO":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.function.name.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "m/L8").f;
var FunctionPrototype = Function.prototype;
var FunctionPrototypeToString = FunctionPrototype.toString;
var nameRE = /^\s*function ([^ (]*)/;
var NAME = 'name';
// Function instances `.name` property
// https://tc39.github.io/ecma262/#sec-function-instances-name
if (DESCRIPTORS && !(NAME in FunctionPrototype)) {
defineProperty(FunctionPrototype, NAME, {
configurable: true,
get: function () {
try {
return FunctionPrototypeToString.call(this).match(nameRE)[1];
} catch (error) {
return '';
}
}
});
}
/***/ }),
/***/ "sQ9d":
/*!******************************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.reflect.get-own-metadata-keys.js ***!
\******************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var ordinaryOwnMetadataKeys = ReflectMetadataModule.keys;
var toMetadataKey = ReflectMetadataModule.toKey;
// `Reflect.getOwnMetadataKeys` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
getOwnMetadataKeys: function getOwnMetadataKeys(target /* , targetKey */) {
var targetKey = arguments.length < 2 ? undefined : toMetadataKey(arguments[1]);
return ordinaryOwnMetadataKeys(anObject(target), targetKey);
}
});
/***/ }),
/***/ "sRBo":
/*!******************************************************!*\
!*** ./node_modules/antd/es/checkbox/style/index.js ***!
\******************************************************/
/*! no exports provided */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/index.less */ "cIOH");
/* harmony import */ var _style_index_less__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_style_index_less__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index.less */ "KCY9");
/* harmony import */ var _index_less__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_index_less__WEBPACK_IMPORTED_MODULE_1__);
/***/ }),
/***/ "sgoq":
/*!**************************************************!*\
!*** ./node_modules/lodash/_createCompounder.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var arrayReduce = __webpack_require__(/*! ./_arrayReduce */ "asDA"),
deburr = __webpack_require__(/*! ./deburr */ "TKrE"),
words = __webpack_require__(/*! ./words */ "6nK8");
/** Used to compose unicode capture groups. */
var rsApos = "['\u2019]";
/** Used to match apostrophes. */
var reApos = RegExp(rsApos, 'g');
/**
* Creates a function like `_.camelCase`.
*
* @private
* @param {Function} callback The function to combine each word.
* @returns {Function} Returns the new compounder function.
*/
function createCompounder(callback) {
return function(string) {
return arrayReduce(words(deburr(string).replace(reApos, '')), callback, '');
};
}
module.exports = createCompounder;
/***/ }),
/***/ "spTT":
/*!**************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.weak-set.from.js ***!
\**************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var from = __webpack_require__(/*! ../internals/collection-from */ "qY7S");
// `WeakSet.from` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.from
$({ target: 'WeakSet', stat: true }, {
from: from
});
/***/ }),
/***/ "sxOR":
/*!****************************************!*\
!*** ./node_modules/qs/lib/formats.js ***!
\****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var replace = String.prototype.replace;
var percentTwenties = /%20/g;
var Format = {
RFC1738: 'RFC1738',
RFC3986: 'RFC3986'
};
module.exports = {
'default': Format.RFC3986,
formatters: {
RFC1738: function (value) {
return replace.call(value, percentTwenties, '+');
},
RFC3986: function (value) {
return String(value);
}
},
RFC1738: Format.RFC1738,
RFC3986: Format.RFC3986
};
/***/ }),
/***/ "sxS5":
/*!*******************************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/ExclamationCircleOutlined.js ***!
\*******************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _ExclamationCircleOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/ExclamationCircleOutlined */ "OwbQ"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var ExclamationCircleOutlined = function ExclamationCircleOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _ExclamationCircleOutlined.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(ExclamationCircleOutlined);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "t6Hw":
/*!*************************************************************!*\
!*** ./node_modules/rc-util/node_modules/react-is/index.js ***!
\*************************************************************/
/*! no static exports found */
/*! exports used: ForwardRef, isFragment, isMemo */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
if (true) {
module.exports = __webpack_require__(/*! ./cjs/react-is.production.min.js */ "Qfp8");
} else {}
/***/ }),
/***/ "tB8F":
/*!*************************************************!*\
!*** ./src/.umi-production/umi.ts + 13 modules ***!
\*************************************************/
/*! exports provided: default */
/*! all exports used */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/history.ts because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/plugin.ts because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-dva/dva.ts because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-locale/locale.tsx because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/plugin-model/useModel.tsx because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/pages/metting/api.js because of ./src/pages/metting/track/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/plugin-model/lib/helpers/constant.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/plugin-model/lib/helpers/dispatcher.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/plugin-model/lib/helpers/executor.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/preset-built-in/node_modules/@umijs/runtime/dist/index.esm.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/renderer-react/dist/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/style/index.js because of ./src/pages/Competitions/Entered/Enteredmodel/Addteams.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/index.js because of ./src/pages/Competitions/Detail/components/InitGitLink/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/spin/style/index.js because of ./src/pages/metting/information/index.jsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/layouts/index.less?modules (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/moment/moment.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// NAMESPACE OBJECT: ./src/app.tsx
var app_namespaceObject = {};
__webpack_require__.r(app_namespaceObject);
__webpack_require__.d(app_namespaceObject, "dva", function() { return dva; });
// NAMESPACE OBJECT: ./src/.umi-production/plugin-dva/runtime.tsx
var plugin_dva_runtime_namespaceObject = {};
__webpack_require__.r(plugin_dva_runtime_namespaceObject);
__webpack_require__.d(plugin_dva_runtime_namespaceObject, "rootContainer", function() { return rootContainer; });
// NAMESPACE OBJECT: ./src/.umi-production/plugin-initial-state/runtime.tsx
var plugin_initial_state_runtime_namespaceObject = {};
__webpack_require__.r(plugin_initial_state_runtime_namespaceObject);
__webpack_require__.d(plugin_initial_state_runtime_namespaceObject, "rootContainer", function() { return runtime_rootContainer; });
// NAMESPACE OBJECT: ./src/.umi-production/plugin-locale/runtime.tsx
var plugin_locale_runtime_namespaceObject = {};
__webpack_require__.r(plugin_locale_runtime_namespaceObject);
__webpack_require__.d(plugin_locale_runtime_namespaceObject, "rootContainer", function() { return plugin_locale_runtime_rootContainer; });
// NAMESPACE OBJECT: ./src/.umi-production/plugin-model/runtime.tsx
var plugin_model_runtime_namespaceObject = {};
__webpack_require__.r(plugin_model_runtime_namespaceObject);
__webpack_require__.d(plugin_model_runtime_namespaceObject, "rootContainer", function() { return plugin_model_runtime_rootContainer; });
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.js
var es_symbol = __webpack_require__("pNMO");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.description.js
var es_symbol_description = __webpack_require__("4Brf");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.async-iterator.js
var es_symbol_async_iterator = __webpack_require__("tjZM");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.has-instance.js
var es_symbol_has_instance = __webpack_require__("3I1R");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.is-concat-spreadable.js
var es_symbol_is_concat_spreadable = __webpack_require__("7+kd");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.iterator.js
var es_symbol_iterator = __webpack_require__("0oug");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.match.js
var es_symbol_match = __webpack_require__("KhsS");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.replace.js
var es_symbol_replace = __webpack_require__("gOCb");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.search.js
var es_symbol_search = __webpack_require__("a57n");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.species.js
var es_symbol_species = __webpack_require__("GXvd");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.split.js
var es_symbol_split = __webpack_require__("I1Gw");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.to-primitive.js
var es_symbol_to_primitive = __webpack_require__("gXIK");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.to-string-tag.js
var es_symbol_to_string_tag = __webpack_require__("lEou");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.symbol.unscopables.js
var es_symbol_unscopables = __webpack_require__("gbiT");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.concat.js
var es_array_concat = __webpack_require__("ma9I");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.copy-within.js
var es_array_copy_within = __webpack_require__("qHT+");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.fill.js
var es_array_fill = __webpack_require__("yyme");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.filter.js
var es_array_filter = __webpack_require__("TeQF");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find.js
var es_array_find = __webpack_require__("fbCW");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.find-index.js
var es_array_find_index = __webpack_require__("x0AG");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.flat.js
var es_array_flat = __webpack_require__("BIHw");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.flat-map.js
var es_array_flat_map = __webpack_require__("XbcX");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.from.js
var es_array_from = __webpack_require__("pjDv");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.includes.js
var es_array_includes = __webpack_require__("yq1k");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.iterator.js
var es_array_iterator = __webpack_require__("4mDm");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.join.js
var es_array_join = __webpack_require__("oVuX");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.map.js
var es_array_map = __webpack_require__("2B1R");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.of.js
var es_array_of = __webpack_require__("Xe3L");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reduce.js
var es_array_reduce = __webpack_require__("E9XD");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.reduce-right.js
var es_array_reduce_right = __webpack_require__("9N29");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.slice.js
var es_array_slice = __webpack_require__("+2oP");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.sort.js
var es_array_sort = __webpack_require__("ToJy");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.species.js
var es_array_species = __webpack_require__("94Xl");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.splice.js
var es_array_splice = __webpack_require__("pDQq");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.unscopables.flat.js
var es_array_unscopables_flat = __webpack_require__("QGkA");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.array.unscopables.flat-map.js
var es_array_unscopables_flat_map = __webpack_require__("c9m3");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.date.to-primitive.js
var es_date_to_primitive = __webpack_require__("7+zs");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.has-instance.js
var es_function_has_instance = __webpack_require__("tW5y");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.function.name.js
var es_function_name = __webpack_require__("sMBO");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.json.to-string-tag.js
var es_json_to_string_tag = __webpack_require__("DEfu");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.map.js
var es_map = __webpack_require__("Tskq");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.acosh.js
var es_math_acosh = __webpack_require__("Uydy");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.asinh.js
var es_math_asinh = __webpack_require__("eajv");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.atanh.js
var es_math_atanh = __webpack_require__("n/mU");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.cbrt.js
var es_math_cbrt = __webpack_require__("PqOI");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.clz32.js
var es_math_clz32 = __webpack_require__("QNnp");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.cosh.js
var es_math_cosh = __webpack_require__("/5zm");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.expm1.js
var es_math_expm1 = __webpack_require__("CsgD");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.fround.js
var es_math_fround = __webpack_require__("9mRW");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.hypot.js
var es_math_hypot = __webpack_require__("QFcT");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.imul.js
var es_math_imul = __webpack_require__("vAFs");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.log10.js
var es_math_log10 = __webpack_require__("a5NK");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.log1p.js
var es_math_log1p = __webpack_require__("yiG3");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.log2.js
var es_math_log2 = __webpack_require__("kNcU");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.sign.js
var es_math_sign = __webpack_require__("KvGi");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.sinh.js
var es_math_sinh = __webpack_require__("AmFO");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.tanh.js
var es_math_tanh = __webpack_require__("eJiR");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.to-string-tag.js
var es_math_to_string_tag = __webpack_require__("I9xj");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.math.trunc.js
var es_math_trunc = __webpack_require__("tl/u");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.epsilon.js
var es_number_epsilon = __webpack_require__("NbN+");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.is-finite.js
var es_number_is_finite = __webpack_require__("8AyJ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.is-integer.js
var es_number_is_integer = __webpack_require__("i6QF");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.is-nan.js
var es_number_is_nan = __webpack_require__("kSko");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.is-safe-integer.js
var es_number_is_safe_integer = __webpack_require__("WDsR");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.max-safe-integer.js
var es_number_max_safe_integer = __webpack_require__("r/Vq");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.min-safe-integer.js
var es_number_min_safe_integer = __webpack_require__("5uH8");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.parse-float.js
var es_number_parse_float = __webpack_require__("w1rZ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.parse-int.js
var es_number_parse_int = __webpack_require__("JevA");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.number.to-fixed.js
var es_number_to_fixed = __webpack_require__("toAj");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.assign.js
var es_object_assign = __webpack_require__("zKZe");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.define-getter.js
var es_object_define_getter = __webpack_require__("Eqjn");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.define-setter.js
var es_object_define_setter = __webpack_require__("5xtp");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.entries.js
var es_object_entries = __webpack_require__("T63A");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.freeze.js
var es_object_freeze = __webpack_require__("3KgV");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.from-entries.js
var es_object_from_entries = __webpack_require__("wfmh");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptor.js
var es_object_get_own_property_descriptor = __webpack_require__("5DmW");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-descriptors.js
var es_object_get_own_property_descriptors = __webpack_require__("27RR");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-own-property-names.js
var es_object_get_own_property_names = __webpack_require__("cDke");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.get-prototype-of.js
var es_object_get_prototype_of = __webpack_require__("NBAS");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.is.js
var es_object_is = __webpack_require__("Kxld");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.is-extensible.js
var es_object_is_extensible = __webpack_require__("yQYn");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.is-frozen.js
var es_object_is_frozen = __webpack_require__("4h0Y");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.is-sealed.js
var es_object_is_sealed = __webpack_require__("5D5o");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.keys.js
var es_object_keys = __webpack_require__("tkto");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.lookup-getter.js
var es_object_lookup_getter = __webpack_require__("v5b1");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.lookup-setter.js
var es_object_lookup_setter = __webpack_require__("W/eh");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.prevent-extensions.js
var es_object_prevent_extensions = __webpack_require__("zuhW");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.seal.js
var es_object_seal = __webpack_require__("r5Og");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.to-string.js
var es_object_to_string = __webpack_require__("07d7");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.object.values.js
var es_object_values = __webpack_require__("B6y2");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.js
var es_promise = __webpack_require__("5s+n");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.promise.finally.js
var es_promise_finally = __webpack_require__("p532");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.apply.js
var es_reflect_apply = __webpack_require__("pv2x");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.construct.js
var es_reflect_construct = __webpack_require__("SuFq");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.define-property.js
var es_reflect_define_property = __webpack_require__("PzqY");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.delete-property.js
var es_reflect_delete_property = __webpack_require__("rBZX");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.get.js
var es_reflect_get = __webpack_require__("XUE8");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.get-own-property-descriptor.js
var es_reflect_get_own_property_descriptor = __webpack_require__("nkod");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.get-prototype-of.js
var es_reflect_get_prototype_of = __webpack_require__("f3jH");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.has.js
var es_reflect_has = __webpack_require__("x2An");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.is-extensible.js
var es_reflect_is_extensible = __webpack_require__("25bX");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.own-keys.js
var es_reflect_own_keys = __webpack_require__("G/JM");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.prevent-extensions.js
var es_reflect_prevent_extensions = __webpack_require__("1t3B");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.set.js
var es_reflect_set = __webpack_require__("ftMj");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.reflect.set-prototype-of.js
var es_reflect_set_prototype_of = __webpack_require__("i5pp");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.exec.js
var es_regexp_exec = __webpack_require__("rB9j");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.flags.js
var es_regexp_flags = __webpack_require__("U3f4");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.regexp.to-string.js
var es_regexp_to_string = __webpack_require__("JfAA");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.set.js
var es_set = __webpack_require__("YGK4");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.code-point-at.js
var es_string_code_point_at = __webpack_require__("9bJ7");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.ends-with.js
var es_string_ends_with = __webpack_require__("inlA");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.from-code-point.js
var es_string_from_code_point = __webpack_require__("9tb/");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.includes.js
var es_string_includes = __webpack_require__("JTJg");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.iterator.js
var es_string_iterator = __webpack_require__("PKPk");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.match.js
var es_string_match = __webpack_require__("Rm1S");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.pad-end.js
var es_string_pad_end = __webpack_require__("hDyC");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.pad-start.js
var es_string_pad_start = __webpack_require__("TZCg");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.raw.js
var es_string_raw = __webpack_require__("2A+d");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.repeat.js
var es_string_repeat = __webpack_require__("OM9Z");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.replace.js
var es_string_replace = __webpack_require__("UxlC");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.search.js
var es_string_search = __webpack_require__("hByQ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.split.js
var es_string_split = __webpack_require__("EnZy");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.starts-with.js
var es_string_starts_with = __webpack_require__("LKBx");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim.js
var es_string_trim = __webpack_require__("SYor");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim-end.js
var es_string_trim_end = __webpack_require__("HiXI");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.trim-start.js
var es_string_trim_start = __webpack_require__("7ueG");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.anchor.js
var es_string_anchor = __webpack_require__("GKVU");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.big.js
var es_string_big = __webpack_require__("E5NM");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.blink.js
var es_string_blink = __webpack_require__("BNMt");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.bold.js
var es_string_bold = __webpack_require__("zHFu");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.fixed.js
var es_string_fixed = __webpack_require__("x83w");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.fontcolor.js
var es_string_fontcolor = __webpack_require__("l2dK");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.fontsize.js
var es_string_fontsize = __webpack_require__("GRPF");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.italics.js
var es_string_italics = __webpack_require__("xdBZ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.link.js
var es_string_link = __webpack_require__("mRH6");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.small.js
var es_string_small = __webpack_require__("yWo2");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.strike.js
var es_string_strike = __webpack_require__("IxXR");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.sub.js
var es_string_sub = __webpack_require__("TFPT");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.string.sup.js
var es_string_sup = __webpack_require__("Zk8X");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.float32-array.js
var es_typed_array_float32_array = __webpack_require__("z8NH");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.float64-array.js
var es_typed_array_float64_array = __webpack_require__("SpvK");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.int8-array.js
var es_typed_array_int8_array = __webpack_require__("/Yfv");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.int16-array.js
var es_typed_array_int16_array = __webpack_require__("iwkZ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.int32-array.js
var es_typed_array_int32_array = __webpack_require__("FDzp");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-array.js
var es_typed_array_uint8_array = __webpack_require__("XMab");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint8-clamped-array.js
var es_typed_array_uint8_clamped_array = __webpack_require__("ilnZ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint16-array.js
var es_typed_array_uint16_array = __webpack_require__("hMMk");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.uint32-array.js
var es_typed_array_uint32_array = __webpack_require__("+ywr");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.copy-within.js
var es_typed_array_copy_within = __webpack_require__("moxL");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.every.js
var es_typed_array_every = __webpack_require__("qXVe");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.fill.js
var es_typed_array_fill = __webpack_require__("c162");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.filter.js
var es_typed_array_filter = __webpack_require__("waxf");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find.js
var es_typed_array_find = __webpack_require__("0TkE");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.find-index.js
var es_typed_array_find_index = __webpack_require__("Onu3");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.for-each.js
var es_typed_array_for_each = __webpack_require__("1dYe");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.from.js
var es_typed_array_from = __webpack_require__("IL/d");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.includes.js
var es_typed_array_includes = __webpack_require__("gvgV");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.index-of.js
var es_typed_array_index_of = __webpack_require__("6R/c");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.iterator.js
var es_typed_array_iterator = __webpack_require__("YL0P");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.join.js
var es_typed_array_join = __webpack_require__("X5Zq");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.last-index-of.js
var es_typed_array_last_index_of = __webpack_require__("MoCz");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.map.js
var es_typed_array_map = __webpack_require__("P8wP");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.of.js
var es_typed_array_of = __webpack_require__("7JcK");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce.js
var es_typed_array_reduce = __webpack_require__("ypFw");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reduce-right.js
var es_typed_array_reduce_right = __webpack_require__("JaFt");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.reverse.js
var es_typed_array_reverse = __webpack_require__("zSZm");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.set.js
var es_typed_array_set = __webpack_require__("PF2M");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.slice.js
var es_typed_array_slice = __webpack_require__("KVSy");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.some.js
var es_typed_array_some = __webpack_require__("ZJ55");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.sort.js
var es_typed_array_sort = __webpack_require__("IZzc");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.subarray.js
var es_typed_array_subarray = __webpack_require__("Fwt+");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-locale-string.js
var es_typed_array_to_locale_string = __webpack_require__("s5qe");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.typed-array.to-string.js
var es_typed_array_to_string = __webpack_require__("cvf0");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.weak-map.js
var es_weak_map = __webpack_require__("ENF9");
// EXTERNAL MODULE: ./node_modules/core-js/modules/es.weak-set.js
var es_weak_set = __webpack_require__("H+LF");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.aggregate-error.js
var esnext_aggregate_error = __webpack_require__("66V8");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.array.last-index.js
var esnext_array_last_index = __webpack_require__("iIM6");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.array.last-item.js
var esnext_array_last_item = __webpack_require__("2tOg");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.composite-key.js
var esnext_composite_key = __webpack_require__("gYJb");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.composite-symbol.js
var esnext_composite_symbol = __webpack_require__("EDT/");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.global-this.js
var esnext_global_this = __webpack_require__("j+VE");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.delete-all.js
var esnext_map_delete_all = __webpack_require__("wgYD");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.every.js
var esnext_map_every = __webpack_require__("R3/m");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.filter.js
var esnext_map_filter = __webpack_require__("l/vG");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.find.js
var esnext_map_find = __webpack_require__("0q/z");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.find-key.js
var esnext_map_find_key = __webpack_require__("n5pg");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.from.js
var esnext_map_from = __webpack_require__("zu+z");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.group-by.js
var esnext_map_group_by = __webpack_require__("ihrJ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.includes.js
var esnext_map_includes = __webpack_require__("Q7Pz");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.key-by.js
var esnext_map_key_by = __webpack_require__("unQa");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.key-of.js
var esnext_map_key_of = __webpack_require__("Vnov");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.map-keys.js
var esnext_map_map_keys = __webpack_require__("nIe3");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.map-values.js
var esnext_map_map_values = __webpack_require__("CUyW");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.merge.js
var esnext_map_merge = __webpack_require__("qc1c");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.of.js
var esnext_map_of = __webpack_require__("5921");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.reduce.js
var esnext_map_reduce = __webpack_require__("VOz1");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.some.js
var esnext_map_some = __webpack_require__("Thag");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.map.update.js
var esnext_map_update = __webpack_require__("9D6x");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.clamp.js
var esnext_math_clamp = __webpack_require__("cOPa");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.deg-per-rad.js
var esnext_math_deg_per_rad = __webpack_require__("vdRX");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.degrees.js
var esnext_math_degrees = __webpack_require__("KrxN");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.fscale.js
var esnext_math_fscale = __webpack_require__("SL6q");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.iaddh.js
var esnext_math_iaddh = __webpack_require__("lehK");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.imulh.js
var esnext_math_imulh = __webpack_require__("eO0o");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.isubh.js
var esnext_math_isubh = __webpack_require__("NqR8");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.rad-per-deg.js
var esnext_math_rad_per_deg = __webpack_require__("w7s6");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.radians.js
var esnext_math_radians = __webpack_require__("uWhJ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.scale.js
var esnext_math_scale = __webpack_require__("WPzJ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.seeded-prng.js
var esnext_math_seeded_prng = __webpack_require__("NV22");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.signbit.js
var esnext_math_signbit = __webpack_require__("ny8l");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.math.umulh.js
var esnext_math_umulh = __webpack_require__("a5/B");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.number.from-string.js
var esnext_number_from_string = __webpack_require__("vzwy");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.observable.js
var esnext_observable = __webpack_require__("pevA");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.promise.all-settled.js
var esnext_promise_all_settled = __webpack_require__("8go2");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.promise.any.js
var esnext_promise_any = __webpack_require__("DrvE");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.promise.try.js
var esnext_promise_try = __webpack_require__("kCkZ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.reflect.define-metadata.js
var esnext_reflect_define_metadata = __webpack_require__("++zV");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.reflect.delete-metadata.js
var esnext_reflect_delete_metadata = __webpack_require__("Y4C7");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.reflect.get-metadata.js
var esnext_reflect_get_metadata = __webpack_require__("ZsH6");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.reflect.get-metadata-keys.js
var esnext_reflect_get_metadata_keys = __webpack_require__("vZi8");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.reflect.get-own-metadata.js
var esnext_reflect_get_own_metadata = __webpack_require__("5r1n");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.reflect.get-own-metadata-keys.js
var esnext_reflect_get_own_metadata_keys = __webpack_require__("sQ9d");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.reflect.has-metadata.js
var esnext_reflect_has_metadata = __webpack_require__("bdeN");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.reflect.has-own-metadata.js
var esnext_reflect_has_own_metadata = __webpack_require__("AwgR");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.reflect.metadata.js
var esnext_reflect_metadata = __webpack_require__("qgGA");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.add-all.js
var esnext_set_add_all = __webpack_require__("49+q");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.delete-all.js
var esnext_set_delete_all = __webpack_require__("AVoK");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.difference.js
var esnext_set_difference = __webpack_require__("hcok");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.every.js
var esnext_set_every = __webpack_require__("dNT4");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.filter.js
var esnext_set_filter = __webpack_require__("3uUd");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.find.js
var esnext_set_find = __webpack_require__("tijO");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.from.js
var esnext_set_from = __webpack_require__("1kQv");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.intersection.js
var esnext_set_intersection = __webpack_require__("ZY7T");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.is-disjoint-from.js
var esnext_set_is_disjoint_from = __webpack_require__("C1JJ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.is-subset-of.js
var esnext_set_is_subset_of = __webpack_require__("lmH4");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.is-superset-of.js
var esnext_set_is_superset_of = __webpack_require__("Co1j");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.join.js
var esnext_set_join = __webpack_require__("5JV0");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.map.js
var esnext_set_map = __webpack_require__("ctDJ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.of.js
var esnext_set_of = __webpack_require__("8r4s");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.reduce.js
var esnext_set_reduce = __webpack_require__("JwUS");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.some.js
var esnext_set_some = __webpack_require__("qaHo");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.symmetric-difference.js
var esnext_set_symmetric_difference = __webpack_require__("Si40");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.set.union.js
var esnext_set_union = __webpack_require__("BGb9");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.string.at.js
var esnext_string_at = __webpack_require__("fN96");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.string.code-points.js
var esnext_string_code_points = __webpack_require__("UzNg");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.string.match-all.js
var esnext_string_match_all = __webpack_require__("DhMN");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.string.replace-all.js
var esnext_string_replace_all = __webpack_require__("rZ3M");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.symbol.dispose.js
var esnext_symbol_dispose = __webpack_require__("apDx");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.symbol.observable.js
var esnext_symbol_observable = __webpack_require__("4XaG");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.symbol.pattern-match.js
var esnext_symbol_pattern_match = __webpack_require__("6V7H");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.weak-map.delete-all.js
var esnext_weak_map_delete_all = __webpack_require__("cfiF");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.weak-map.from.js
var esnext_weak_map_from = __webpack_require__("702D");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.weak-map.of.js
var esnext_weak_map_of = __webpack_require__("TJ79");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.weak-set.add-all.js
var esnext_weak_set_add_all = __webpack_require__("Z4nd");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.weak-set.delete-all.js
var esnext_weak_set_delete_all = __webpack_require__("8STE");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.weak-set.from.js
var esnext_weak_set_from = __webpack_require__("spTT");
// EXTERNAL MODULE: ./node_modules/core-js/modules/esnext.weak-set.of.js
var esnext_weak_set_of = __webpack_require__("rb3L");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.for-each.js
var web_dom_collections_for_each = __webpack_require__("FZtP");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.dom-collections.iterator.js
var web_dom_collections_iterator = __webpack_require__("3bBZ");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.immediate.js
var web_immediate = __webpack_require__("Ew+T");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.queue-microtask.js
var web_queue_microtask = __webpack_require__("n5b4");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.js
var web_url = __webpack_require__("Kz25");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url.to-json.js
var web_url_to_json = __webpack_require__("vxnP");
// EXTERNAL MODULE: ./node_modules/core-js/modules/web.url-search-params.js
var web_url_search_params = __webpack_require__("mGGf");
// EXTERNAL MODULE: ./node_modules/@umijs/preset-built-in/node_modules/regenerator-runtime/runtime.js
var runtime = __webpack_require__("VWci");
// CONCATENATED MODULE: ./src/.umi-production/core/polyfill.ts
// @ts-nocheck
// EXTERNAL MODULE: ./node_modules/intl/index.js
var intl = __webpack_require__("FoZm");
// EXTERNAL MODULE: ./src/.umi-production/core/plugin.ts
var core_plugin = __webpack_require__("bCY9");
// EXTERNAL MODULE: ./node_modules/antd/es/message/style/index.js
var style = __webpack_require__("miYZ");
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
var message = __webpack_require__("tsqr");
// EXTERNAL MODULE: ./node_modules/moment/moment.js
var moment = __webpack_require__("wd/R");
var moment_default = /*#__PURE__*/__webpack_require__.n(moment);
// EXTERNAL MODULE: ./src/styles/iconfont/iconfont.css
var iconfont = __webpack_require__("/EoS");
// EXTERNAL MODULE: ./src/styles/iconeditor/iconfont.css
var iconeditor_iconfont = __webpack_require__("4MGa");
// EXTERNAL MODULE: ./src/styles/markdown.css
var markdown = __webpack_require__("22qN");
// EXTERNAL MODULE: ./src/styles/animated.less
var animated = __webpack_require__("YdpX");
// EXTERNAL MODULE: ./src/styles/reset.less
var styles_reset = __webpack_require__("T5T7");
// EXTERNAL MODULE: ./src/styles/base.less
var base = __webpack_require__("58Ye");
// EXTERNAL MODULE: ./src/styles/animate.min.css
var animate_min = __webpack_require__("OIXA");
// CONCATENATED MODULE: ./src/app.tsx
// import createLogger from 'redux-logger';
moment_default.a.locale('ZH-cn');
var dva = {
config: {
// onAction: createLogger(),
onError: function onError(e) {
message["b" /* default */].error(e.message, 3);
}
}
};
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
var react_default = /*#__PURE__*/__webpack_require__.n(react);
// EXTERNAL MODULE: ./src/.umi-production/plugin-dva/dva.ts + 1 modules
var plugin_dva_dva = __webpack_require__("uRV1");
// CONCATENATED MODULE: ./src/.umi-production/plugin-dva/runtime.tsx
// @ts-nocheck
function rootContainer(container) {
return /*#__PURE__*/react_default.a.createElement(plugin_dva_dva["a" /* _DvaContainer */], null, container);
}
// EXTERNAL MODULE: ./src/.umi-production/plugin-model/useModel.tsx
var useModel = __webpack_require__("I5X1");
// CONCATENATED MODULE: ./src/.umi-production/plugin-initial-state/Provider.tsx
// @ts-nocheck
if (typeof useModel["a" /* useModel */] !== 'function') {
throw new Error('[plugin-initial-state]: useModel is not a function, @umijs/plugin-model is required.');
}
/* harmony default export */ var Provider = (function (props) {
var children = props.children;
var appLoaded = Object(react["useRef"])(false);
var _ref = Object(useModel["a" /* useModel */])('@@initialState') || {},
_ref$loading = _ref.loading,
loading = _ref$loading === void 0 ? false : _ref$loading;
Object(react["useEffect"])(function () {
if (!loading) {
appLoaded.current = true;
}
}, [loading]);
// initial state loading 时,阻塞渲染
if (loading && !appLoaded.current) {
return null;
}
return children;
});
// CONCATENATED MODULE: ./src/.umi-production/plugin-initial-state/runtime.tsx
// @ts-nocheck
function runtime_rootContainer(container) {
return /*#__PURE__*/react_default.a.createElement(
// 这里的 plugin-initial-state 不能从 constant 里取,里面有 path 依赖
// 但 webpack-5 没有 node 补丁(包括 path
Provider, null, container);
}
// EXTERNAL MODULE: ./src/.umi-production/plugin-locale/locale.tsx
var locale = __webpack_require__("ZW6p");
// CONCATENATED MODULE: ./src/.umi-production/plugin-locale/runtime.tsx
// @ts-nocheck
// @ts-ignore
function plugin_locale_runtime_rootContainer(container) {
return /*#__PURE__*/react_default.a.createElement(locale["b" /* _LocaleContainer */], null, container);
}
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
var slicedToArray = __webpack_require__("tJVT");
// CONCATENATED MODULE: ./src/.umi-production/plugin-initial-state/models/initialState.ts
// @ts-nocheck
/* harmony default export */ var initialState = (function () {
return {
loading: false,
refresh: function refresh() {}
};
});
// EXTERNAL MODULE: ./src/pages/metting/api.js + 39 modules
var api = __webpack_require__("Lj8O");
// CONCATENATED MODULE: ./src/models/defaultConfig.js
function Page() {
var _useState = Object(react["useState"])({}),
_useState2 = Object(slicedToArray["a" /* default */])(_useState, 2),
dirList = _useState2[0],
setDirList = _useState2[1];
var _useState3 = Object(react["useState"])({}),
_useState4 = Object(slicedToArray["a" /* default */])(_useState3, 2),
mainInfo = _useState4[0],
setMainInfo = _useState4[1];
Object(react["useEffect"])(function () {
Object(api["b" /* getDirList */])().then(function (res) {
if (res && res.rows.length > 0) {
var idList = {};
res.rows.map(function (e) {
idList[e.name] = e.id;
});
setDirList(idList);
}
});
Object(api["a" /* getBaseInfo */])().then(function (result) {
setMainInfo(result.data);
}).catch(console.error());
}, []);
return {
dirList: dirList,
mainInfo: mainInfo
};
}
;
// EXTERNAL MODULE: ./node_modules/@umijs/plugin-model/lib/helpers/dispatcher.js
var dispatcher = __webpack_require__("7xWI");
var dispatcher_default = /*#__PURE__*/__webpack_require__.n(dispatcher);
// EXTERNAL MODULE: ./node_modules/@umijs/plugin-model/lib/helpers/executor.js
var executor = __webpack_require__("sFpY");
var executor_default = /*#__PURE__*/__webpack_require__.n(executor);
// EXTERNAL MODULE: ./node_modules/@umijs/plugin-model/lib/helpers/constant.js
var constant = __webpack_require__("FMtG");
// CONCATENATED MODULE: ./src/.umi-production/plugin-model/Provider.tsx
// @ts-nocheck
// @ts-ignore
// @ts-ignore
// @ts-ignore
var models = {
'@@initialState': initialState,
'defaultConfig': Page
};
var Provider_dispatcher = new dispatcher_default.a();
var Exe = executor_default.a;
/* harmony default export */ var plugin_model_Provider = (function (_ref) {
var children = _ref.children;
return /*#__PURE__*/react_default.a.createElement(constant["UmiContext"].Provider, {
value: Provider_dispatcher
}, Object.entries(models).map(function (pair) {
return /*#__PURE__*/react_default.a.createElement(Exe, {
key: pair[0],
namespace: pair[0],
hook: pair[1],
onUpdate: function onUpdate(val) {
var _ref2 = pair,
_ref3 = Object(slicedToArray["a" /* default */])(_ref2, 1),
ns = _ref3[0];
Provider_dispatcher.data[ns] = val;
Provider_dispatcher.update(ns);
}
});
}), children);
});
// CONCATENATED MODULE: ./src/.umi-production/plugin-model/runtime.tsx
// @ts-nocheck
/* eslint-disable import/no-dynamic-require */
function plugin_model_runtime_rootContainer(container) {
return /*#__PURE__*/react_default.a.createElement(plugin_model_Provider, null, container);
}
// CONCATENATED MODULE: ./src/.umi-production/core/pluginRegister.ts
// @ts-nocheck
core_plugin["a" /* plugin */].register({
apply: app_namespaceObject,
path: 'D:/projects/competitions/forgeplus-react/src/app.tsx'
});
core_plugin["a" /* plugin */].register({
apply: plugin_dva_runtime_namespaceObject,
path: 'D:/projects/competitions/forgeplus-react/src/.umi-production/plugin-dva/runtime.tsx'
});
core_plugin["a" /* plugin */].register({
apply: plugin_initial_state_runtime_namespaceObject,
path: '../plugin-initial-state/runtime'
});
core_plugin["a" /* plugin */].register({
apply: plugin_locale_runtime_namespaceObject,
path: 'D:/projects/competitions/forgeplus-react/src/.umi-production/plugin-locale/runtime.tsx'
});
core_plugin["a" /* plugin */].register({
apply: plugin_model_runtime_namespaceObject,
path: '../plugin-model/runtime'
});
// EXTERNAL MODULE: ./src/.umi-production/core/history.ts
var core_history = __webpack_require__("FfOG");
// EXTERNAL MODULE: ./node_modules/@umijs/preset-built-in/node_modules/@umijs/runtime/dist/index.esm.js
var index_esm = __webpack_require__("HyNC");
// EXTERNAL MODULE: ./node_modules/@umijs/renderer-react/dist/index.js
var dist = __webpack_require__("zlVK");
// EXTERNAL MODULE: ./node_modules/antd/es/spin/style/index.js
var spin_style = __webpack_require__("T2oS");
// EXTERNAL MODULE: ./node_modules/antd/es/spin/index.js
var spin = __webpack_require__("W9HT");
// EXTERNAL MODULE: ./src/layouts/index.less?modules
var layoutsmodules = __webpack_require__("H4Hi");
var layoutsmodules_default = /*#__PURE__*/__webpack_require__.n(layoutsmodules);
// CONCATENATED MODULE: ./src/layouts/Loading.tsx
/* harmony default export */ var Loading = (function () {
return /*#__PURE__*/react_default.a.createElement(spin["a" /* default */], {
size: "large",
className: layoutsmodules_default.a.loading
});
});
// CONCATENATED MODULE: ./src/.umi-production/core/routes.ts
// @ts-nocheck
function getRoutes() {
var routes = [{
"path": "/",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | layouts__index */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(5), __webpack_require__.e(9)]).then(__webpack_require__.bind(null, /*! @/layouts/index */ "+ego"));
},
loading: Loading
}),
"routes": [{
"path": "/competitions",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | layouts__SimpleLayouts */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(3), __webpack_require__.e(8)]).then(__webpack_require__.bind(null, /*! @/layouts/SimpleLayouts */ "H8y1"));
},
loading: Loading
}),
"routes": [{
"path": "/competitions/index",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Index */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(6), __webpack_require__.e(5), __webpack_require__.e(13)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Index */ "QgcY"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/2024/information/:id",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__metting__information__detail */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(3), __webpack_require__.e(4), __webpack_require__.e(18)]).then(__webpack_require__.bind(null, /*! @/pages/metting/information/detail */ "1143"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/2024",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return __webpack_require__.e(/*! import() | p__metting__banner */ 15).then(__webpack_require__.bind(null, /*! @/pages/metting/banner */ "ml2I"));
},
loading: Loading
}),
"routes": [{
"path": "/competitions/2024",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return __webpack_require__.e(/*! import() | p__metting__home */ 16).then(__webpack_require__.bind(null, /*! @/pages/metting/home */ "x/aC"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/2024/organization",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__metting__organization */[__webpack_require__.e(0), __webpack_require__.e(3), __webpack_require__.e(4), __webpack_require__.e(19)]).then(__webpack_require__.bind(null, /*! @/pages/metting/organization */ "HEqF"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/2024/track/:id",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__metting__track */[__webpack_require__.e(0), __webpack_require__.e(3), __webpack_require__.e(4), __webpack_require__.e(20)]).then(__webpack_require__.bind(null, /*! @/pages/metting/track */ "2yHG"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/2024/information",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__metting__information */[__webpack_require__.e(2), __webpack_require__.e(17)]).then(__webpack_require__.bind(null, /*! @/pages/metting/information */ "7zYu"));
},
loading: Loading
}),
"exact": true
}]
}, {
"path": "/competitions",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Index */[__webpack_require__.e(0), __webpack_require__.e(2), __webpack_require__.e(6), __webpack_require__.e(5), __webpack_require__.e(13)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Index */ "QgcY"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/:identifier",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Detail */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(3), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Detail */ "GRO8"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/:identifier/enroll",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Entered */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(6), __webpack_require__.e(11)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Entered */ "Hm3h"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/:identifier/UpdateTeanname/:Teannameid",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Update */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(23), __webpack_require__.e(14)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Update */ "jmm4"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/:identifier/teamDetail/:Teamid",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Entered__Assembly__TeamDateil */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(6), __webpack_require__.e(5), __webpack_require__.e(12)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Entered/Assembly/TeamDateil */ "mKwH"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/index/:identifier",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Detail */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(3), __webpack_require__.e(10)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Detail */ "GRO8"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/index/:identifier/enroll",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Entered */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(6), __webpack_require__.e(11)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Entered */ "Hm3h"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/index/:identifier/UpdateTeanname/:Teannameid",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Update */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(2), __webpack_require__.e(23), __webpack_require__.e(14)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Update */ "jmm4"));
},
loading: Loading
}),
"exact": true
}, {
"path": "/competitions/index/:identifier/teamDetail/:Teamid",
"component": Object(index_esm["c" /* dynamic */])({
loader: function loader() {
return Promise.all(/*! import() | p__Competitions__Entered__Assembly__TeamDateil */[__webpack_require__.e(0), __webpack_require__.e(1), __webpack_require__.e(6), __webpack_require__.e(5), __webpack_require__.e(12)]).then(__webpack_require__.bind(null, /*! @/pages/Competitions/Entered/Assembly/TeamDateil */ "mKwH"));
},
loading: Loading
}),
"exact": true
}]
}]
}];
// allow user to extend routes
core_plugin["a" /* plugin */].applyPlugins({
key: 'patchRoutes',
type: index_esm["a" /* ApplyPluginsType */].event,
args: {
routes: routes
}
});
return routes;
}
// CONCATENATED MODULE: ./src/.umi-production/umi.ts
// @ts-nocheck
__webpack_require__(/*! ../global.less */ "hh8c");
Object(locale["c" /* _onCreate */])();
var umi_getClientRender = function getClientRender() {
var args = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return core_plugin["a" /* plugin */].applyPlugins({
key: 'render',
type: index_esm["a" /* ApplyPluginsType */].compose,
initialValue: function initialValue() {
var opts = core_plugin["a" /* plugin */].applyPlugins({
key: 'modifyClientRenderOpts',
type: index_esm["a" /* ApplyPluginsType */].modify,
initialValue: {
routes: args.routes || getRoutes(),
plugin: core_plugin["a" /* plugin */],
history: Object(core_history["a" /* createHistory */])(args.hot),
isServer: Object({"NODE_ENV":"production"}).__IS_SERVER,
dynamicImport: true,
rootElement: 'root',
defaultTitle: "GitLink"
}
});
return Object(dist["renderClient"])(opts);
},
args: args
});
};
var clientRender = umi_getClientRender();
/* harmony default export */ var umi = __webpack_exports__["default"] = (clientRender());
window.g_umi = {
version: '3.2.17'
};
// hot module replacement
// @ts-ignore
if (false) {}
/***/ }),
/***/ "tJVT":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules ***!
\*******************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _slicedToArray; });
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
var arrayWithHoles = __webpack_require__("+kx5");
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
var unsupportedIterableToArray = __webpack_require__("Qw5x");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
var nonIterableRest = __webpack_require__("u6e6");
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/slicedToArray.js
function _slicedToArray(arr, i) {
return Object(arrayWithHoles["a" /* default */])(arr) || _iterableToArrayLimit(arr, i) || Object(unsupportedIterableToArray["a" /* default */])(arr, i) || Object(nonIterableRest["a" /* default */])();
}
/***/ }),
/***/ "tLB3":
/*!*****************************************!*\
!*** ./node_modules/lodash/toNumber.js ***!
\*****************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var baseTrim = __webpack_require__(/*! ./_baseTrim */ "jXQH"),
isObject = __webpack_require__(/*! ./isObject */ "GoyQ"),
isSymbol = __webpack_require__(/*! ./isSymbol */ "/9aa");
/** Used as references for various `Number` constants. */
var NAN = 0 / 0;
/** Used to detect bad signed hexadecimal string values. */
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
/** Used to detect binary string values. */
var reIsBinary = /^0b[01]+$/i;
/** Used to detect octal string values. */
var reIsOctal = /^0o[0-7]+$/i;
/** Built-in method references without a dependency on `root`. */
var freeParseInt = parseInt;
/**
* Converts `value` to a number.
*
* @static
* @memberOf _
* @since 4.0.0
* @category Lang
* @param {*} value The value to process.
* @returns {number} Returns the number.
* @example
*
* _.toNumber(3.2);
* // => 3.2
*
* _.toNumber(Number.MIN_VALUE);
* // => 5e-324
*
* _.toNumber(Infinity);
* // => Infinity
*
* _.toNumber('3.2');
* // => 3.2
*/
function toNumber(value) {
if (typeof value == 'number') {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == 'function' ? value.valueOf() : value;
value = isObject(other) ? (other + '') : other;
}
if (typeof value != 'string') {
return value === 0 ? value : +value;
}
value = baseTrim(value);
var isBinary = reIsBinary.test(value);
return (isBinary || reIsOctal.test(value))
? freeParseInt(value.slice(2), isBinary ? 2 : 8)
: (reIsBadHex.test(value) ? NAN : +value);
}
module.exports = toNumber;
/***/ }),
/***/ "tSWc":
/*!**************************************************!*\
!*** ./node_modules/hash.js/lib/hash/sha/512.js ***!
\**************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ "w8CP");
var common = __webpack_require__(/*! ../common */ "7ckf");
var assert = __webpack_require__(/*! minimalistic-assert */ "2j6C");
var rotr64_hi = utils.rotr64_hi;
var rotr64_lo = utils.rotr64_lo;
var shr64_hi = utils.shr64_hi;
var shr64_lo = utils.shr64_lo;
var sum64 = utils.sum64;
var sum64_hi = utils.sum64_hi;
var sum64_lo = utils.sum64_lo;
var sum64_4_hi = utils.sum64_4_hi;
var sum64_4_lo = utils.sum64_4_lo;
var sum64_5_hi = utils.sum64_5_hi;
var sum64_5_lo = utils.sum64_5_lo;
var BlockHash = common.BlockHash;
var sha512_K = [
0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
];
function SHA512() {
if (!(this instanceof SHA512))
return new SHA512();
BlockHash.call(this);
this.h = [
0x6a09e667, 0xf3bcc908,
0xbb67ae85, 0x84caa73b,
0x3c6ef372, 0xfe94f82b,
0xa54ff53a, 0x5f1d36f1,
0x510e527f, 0xade682d1,
0x9b05688c, 0x2b3e6c1f,
0x1f83d9ab, 0xfb41bd6b,
0x5be0cd19, 0x137e2179 ];
this.k = sha512_K;
this.W = new Array(160);
}
utils.inherits(SHA512, BlockHash);
module.exports = SHA512;
SHA512.blockSize = 1024;
SHA512.outSize = 512;
SHA512.hmacStrength = 192;
SHA512.padLength = 128;
SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {
var W = this.W;
// 32 x 32bit words
for (var i = 0; i < 32; i++)
W[i] = msg[start + i];
for (; i < W.length; i += 2) {
var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2
var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);
var c1_hi = W[i - 14]; // i - 7
var c1_lo = W[i - 13];
var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15
var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);
var c3_hi = W[i - 32]; // i - 16
var c3_lo = W[i - 31];
W[i] = sum64_4_hi(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo);
W[i + 1] = sum64_4_lo(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo);
}
};
SHA512.prototype._update = function _update(msg, start) {
this._prepareBlock(msg, start);
var W = this.W;
var ah = this.h[0];
var al = this.h[1];
var bh = this.h[2];
var bl = this.h[3];
var ch = this.h[4];
var cl = this.h[5];
var dh = this.h[6];
var dl = this.h[7];
var eh = this.h[8];
var el = this.h[9];
var fh = this.h[10];
var fl = this.h[11];
var gh = this.h[12];
var gl = this.h[13];
var hh = this.h[14];
var hl = this.h[15];
assert(this.k.length === W.length);
for (var i = 0; i < W.length; i += 2) {
var c0_hi = hh;
var c0_lo = hl;
var c1_hi = s1_512_hi(eh, el);
var c1_lo = s1_512_lo(eh, el);
var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);
var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);
var c3_hi = this.k[i];
var c3_lo = this.k[i + 1];
var c4_hi = W[i];
var c4_lo = W[i + 1];
var T1_hi = sum64_5_hi(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo,
c4_hi, c4_lo);
var T1_lo = sum64_5_lo(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo,
c4_hi, c4_lo);
c0_hi = s0_512_hi(ah, al);
c0_lo = s0_512_lo(ah, al);
c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);
c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);
var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);
var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);
hh = gh;
hl = gl;
gh = fh;
gl = fl;
fh = eh;
fl = el;
eh = sum64_hi(dh, dl, T1_hi, T1_lo);
el = sum64_lo(dl, dl, T1_hi, T1_lo);
dh = ch;
dl = cl;
ch = bh;
cl = bl;
bh = ah;
bl = al;
ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);
al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);
}
sum64(this.h, 0, ah, al);
sum64(this.h, 2, bh, bl);
sum64(this.h, 4, ch, cl);
sum64(this.h, 6, dh, dl);
sum64(this.h, 8, eh, el);
sum64(this.h, 10, fh, fl);
sum64(this.h, 12, gh, gl);
sum64(this.h, 14, hh, hl);
};
SHA512.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'big');
else
return utils.split32(this.h, 'big');
};
function ch64_hi(xh, xl, yh, yl, zh) {
var r = (xh & yh) ^ ((~xh) & zh);
if (r < 0)
r += 0x100000000;
return r;
}
function ch64_lo(xh, xl, yh, yl, zh, zl) {
var r = (xl & yl) ^ ((~xl) & zl);
if (r < 0)
r += 0x100000000;
return r;
}
function maj64_hi(xh, xl, yh, yl, zh) {
var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);
if (r < 0)
r += 0x100000000;
return r;
}
function maj64_lo(xh, xl, yh, yl, zh, zl) {
var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);
if (r < 0)
r += 0x100000000;
return r;
}
function s0_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 28);
var c1_hi = rotr64_hi(xl, xh, 2); // 34
var c2_hi = rotr64_hi(xl, xh, 7); // 39
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function s0_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 28);
var c1_lo = rotr64_lo(xl, xh, 2); // 34
var c2_lo = rotr64_lo(xl, xh, 7); // 39
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
function s1_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 14);
var c1_hi = rotr64_hi(xh, xl, 18);
var c2_hi = rotr64_hi(xl, xh, 9); // 41
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function s1_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 14);
var c1_lo = rotr64_lo(xh, xl, 18);
var c2_lo = rotr64_lo(xl, xh, 9); // 41
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
function g0_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 1);
var c1_hi = rotr64_hi(xh, xl, 8);
var c2_hi = shr64_hi(xh, xl, 7);
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function g0_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 1);
var c1_lo = rotr64_lo(xh, xl, 8);
var c2_lo = shr64_lo(xh, xl, 7);
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
function g1_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 19);
var c1_hi = rotr64_hi(xl, xh, 29); // 61
var c2_hi = shr64_hi(xh, xl, 6);
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function g1_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 19);
var c1_lo = rotr64_lo(xl, xh, 29); // 61
var c2_lo = shr64_lo(xh, xl, 6);
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
/***/ }),
/***/ "tW5y":
/*!******************************************************************!*\
!*** ./node_modules/core-js/modules/es.function.has-instance.js ***!
\******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "m/L8");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "tiKp");
var HAS_INSTANCE = wellKnownSymbol('hasInstance');
var FunctionPrototype = Function.prototype;
// `Function.prototype[@@hasInstance]` method
// https://tc39.github.io/ecma262/#sec-function.prototype-@@hasinstance
if (!(HAS_INSTANCE in FunctionPrototype)) {
definePropertyModule.f(FunctionPrototype, HAS_INSTANCE, { value: function (O) {
if (typeof this != 'function' || !isObject(O)) return false;
if (!isObject(this.prototype)) return O instanceof this;
// for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this:
while (O = getPrototypeOf(O)) if (this.prototype === O) return true;
return false;
} });
}
/***/ }),
/***/ "tXUg":
/*!*****************************************************!*\
!*** ./node_modules/core-js/internals/microtask.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
var classof = __webpack_require__(/*! ../internals/classof-raw */ "xrYK");
var macrotask = __webpack_require__(/*! ../internals/task */ "LPSS").set;
var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "HNyW");
var MutationObserver = global.MutationObserver || global.WebKitMutationObserver;
var process = global.process;
var Promise = global.Promise;
var IS_NODE = classof(process) == 'process';
// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask');
var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
var flush, head, last, notify, toggle, node, promise, then;
// modern engines have queueMicrotask method
if (!queueMicrotask) {
flush = function () {
var parent, fn;
if (IS_NODE && (parent = process.domain)) parent.exit();
while (head) {
fn = head.fn;
head = head.next;
try {
fn();
} catch (error) {
if (head) notify();
else last = undefined;
throw error;
}
} last = undefined;
if (parent) parent.enter();
};
// Node.js
if (IS_NODE) {
notify = function () {
process.nextTick(flush);
};
// browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
} else if (MutationObserver && !IS_IOS) {
toggle = true;
node = document.createTextNode('');
new MutationObserver(flush).observe(node, { characterData: true });
notify = function () {
node.data = toggle = !toggle;
};
// environments with maybe non-completely correct, but existent Promise
} else if (Promise && Promise.resolve) {
// Promise.resolve without an argument throws an error in LG WebOS 2
promise = Promise.resolve(undefined);
then = promise.then;
notify = function () {
then.call(promise, flush);
};
// for other environments - macrotask based on:
// - setImmediate
// - MessageChannel
// - window.postMessag
// - onreadystatechange
// - setTimeout
} else {
notify = function () {
// strange IE + webpack dev server bug - use .call(global)
macrotask.call(global, flush);
};
}
}
module.exports = queueMicrotask || function (fn) {
var task = { fn: fn, next: undefined };
if (last) last.next = task;
if (!head) {
head = task;
notify();
} last = task;
};
/***/ }),
/***/ "tiKp":
/*!*************************************************************!*\
!*** ./node_modules/core-js/internals/well-known-symbol.js ***!
\*************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var shared = __webpack_require__(/*! ../internals/shared */ "VpIT");
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var uid = __webpack_require__(/*! ../internals/uid */ "kOOl");
var NATIVE_SYMBOL = __webpack_require__(/*! ../internals/native-symbol */ "STAE");
var USE_SYMBOL_AS_UID = __webpack_require__(/*! ../internals/use-symbol-as-uid */ "/b8u");
var WellKnownSymbolsStore = shared('wks');
var Symbol = global.Symbol;
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;
module.exports = function (name) {
if (!has(WellKnownSymbolsStore, name)) {
if (NATIVE_SYMBOL && has(Symbol, name)) WellKnownSymbolsStore[name] = Symbol[name];
else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
} return WellKnownSymbolsStore[name];
};
/***/ }),
/***/ "tijO":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.set.find.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "WGBp");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
// `Set.prototype.find` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Set', proto: true, real: true, forced: IS_PURE }, {
find: function find(callbackfn /* , thisArg */) {
var set = anObject(this);
var iterator = getSetIterator(set);
var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);
return iterate(iterator, function (value) {
if (boundFunction(value, value, set)) return iterate.stop(value);
}, undefined, false, true).result;
}
});
/***/ }),
/***/ "tjZM":
/*!******************************************************************!*\
!*** ./node_modules/core-js/modules/es.symbol.async-iterator.js ***!
\******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var defineWellKnownSymbol = __webpack_require__(/*! ../internals/define-well-known-symbol */ "dG/n");
// `Symbol.asyncIterator` well-known symbol
// https://tc39.github.io/ecma262/#sec-symbol.asynciterator
defineWellKnownSymbol('asyncIterator');
/***/ }),
/***/ "tkto":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.object.keys.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ "33Wh");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
// `Object.keys` method
// https://tc39.github.io/ecma262/#sec-object.keys
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
keys: function keys(it) {
return nativeKeys(toObject(it));
}
});
/***/ }),
/***/ "tl/u":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.trunc.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var ceil = Math.ceil;
var floor = Math.floor;
// `Math.trunc` method
// https://tc39.github.io/ecma262/#sec-math.trunc
$({ target: 'Math', stat: true }, {
trunc: function trunc(it) {
return (it > 0 ? floor : ceil)(it);
}
});
/***/ }),
/***/ "toAj":
/*!************************************************************!*\
!*** ./node_modules/core-js/modules/es.number.to-fixed.js ***!
\************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var thisNumberValue = __webpack_require__(/*! ../internals/this-number-value */ "QIpd");
var repeat = __webpack_require__(/*! ../internals/string-repeat */ "EUja");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var nativeToFixed = 1.0.toFixed;
var floor = Math.floor;
var pow = function (x, n, acc) {
return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
};
var log = function (x) {
var n = 0;
var x2 = x;
while (x2 >= 4096) {
n += 12;
x2 /= 4096;
}
while (x2 >= 2) {
n += 1;
x2 /= 2;
} return n;
};
var FORCED = nativeToFixed && (
0.00008.toFixed(3) !== '0.000' ||
0.9.toFixed(0) !== '1' ||
1.255.toFixed(2) !== '1.25' ||
1000000000000000128.0.toFixed(0) !== '1000000000000000128'
) || !fails(function () {
// V8 ~ Android 4.3-
nativeToFixed.call({});
});
// `Number.prototype.toFixed` method
// https://tc39.github.io/ecma262/#sec-number.prototype.tofixed
$({ target: 'Number', proto: true, forced: FORCED }, {
// eslint-disable-next-line max-statements
toFixed: function toFixed(fractionDigits) {
var number = thisNumberValue(this);
var fractDigits = toInteger(fractionDigits);
var data = [0, 0, 0, 0, 0, 0];
var sign = '';
var result = '0';
var e, z, j, k;
var multiply = function (n, c) {
var index = -1;
var c2 = c;
while (++index < 6) {
c2 += n * data[index];
data[index] = c2 % 1e7;
c2 = floor(c2 / 1e7);
}
};
var divide = function (n) {
var index = 6;
var c = 0;
while (--index >= 0) {
c += data[index];
data[index] = floor(c / n);
c = (c % n) * 1e7;
}
};
var dataToString = function () {
var index = 6;
var s = '';
while (--index >= 0) {
if (s !== '' || index === 0 || data[index] !== 0) {
var t = String(data[index]);
s = s === '' ? t : s + repeat.call('0', 7 - t.length) + t;
}
} return s;
};
if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits');
// eslint-disable-next-line no-self-compare
if (number != number) return 'NaN';
if (number <= -1e21 || number >= 1e21) return String(number);
if (number < 0) {
sign = '-';
number = -number;
}
if (number > 1e-21) {
e = log(number * pow(2, 69, 1)) - 69;
z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);
z *= 0x10000000000000;
e = 52 - e;
if (e > 0) {
multiply(0, z);
j = fractDigits;
while (j >= 7) {
multiply(1e7, 0);
j -= 7;
}
multiply(pow(10, j, 1), 0);
j = e - 1;
while (j >= 23) {
divide(1 << 23);
j -= 23;
}
divide(1 << j);
multiply(1, 1);
divide(2);
result = dataToString();
} else {
multiply(0, z);
multiply(1 << -e, 0);
result = dataToString() + repeat.call('0', fractDigits);
}
}
if (fractDigits > 0) {
k = result.length;
result = sign + (k <= fractDigits
? '0.' + repeat.call('0', fractDigits - k) + result
: result.slice(0, k - fractDigits) + '.' + result.slice(k - fractDigits));
} else {
result = sign + result;
} return result;
}
});
/***/ }),
/***/ "tsqr":
/*!***********************************************************!*\
!*** ./node_modules/antd/es/message/index.js + 1 modules ***!
\***********************************************************/
/*! exports provided: getKeyThenIncreaseKey, attachTypeApi, default */
/*! exports used: attachTypeApi, default, getKeyThenIncreaseKey */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CheckCircleFilled.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/CloseCircleFilled.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/ExclamationCircleFilled.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/InfoCircleFilled.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/LoadingOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/index.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/useNotification.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "c", function() { return /* binding */ getKeyThenIncreaseKey; });
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ attachTypeApi; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/rc-notification/es/index.js + 6 modules
var es = __webpack_require__("8tx+");
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/LoadingOutlined.js
var LoadingOutlined = __webpack_require__("gZBC");
var LoadingOutlined_default = /*#__PURE__*/__webpack_require__.n(LoadingOutlined);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/ExclamationCircleFilled.js
var ExclamationCircleFilled = __webpack_require__("sKbD");
var ExclamationCircleFilled_default = /*#__PURE__*/__webpack_require__.n(ExclamationCircleFilled);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CloseCircleFilled.js
var CloseCircleFilled = __webpack_require__("kbBi");
var CloseCircleFilled_default = /*#__PURE__*/__webpack_require__.n(CloseCircleFilled);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/CheckCircleFilled.js
var CheckCircleFilled = __webpack_require__("J84W");
var CheckCircleFilled_default = /*#__PURE__*/__webpack_require__.n(CheckCircleFilled);
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/InfoCircleFilled.js
var InfoCircleFilled = __webpack_require__("72Ab");
var InfoCircleFilled_default = /*#__PURE__*/__webpack_require__.n(InfoCircleFilled);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("J4zp");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/rc-notification/es/useNotification.js
var useNotification = __webpack_require__("8HVG");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var context = __webpack_require__("H84U");
// CONCATENATED MODULE: ./node_modules/antd/es/message/hooks/useMessage.js
function createUseMessage(getRcNotificationInstance, getRCNoticeProps) {
var useMessage = function useMessage() {
// We can only get content by render
var getPrefixCls; // We create a proxy to handle delay created instance
var innerInstance = null;
var proxy = {
add: function add(noticeProps, holderCallback) {
innerInstance === null || innerInstance === void 0 ? void 0 : innerInstance.component.add(noticeProps, holderCallback);
}
};
var _useRCNotification = Object(useNotification["a" /* default */])(proxy),
_useRCNotification2 = slicedToArray_default()(_useRCNotification, 2),
hookNotify = _useRCNotification2[0],
holder = _useRCNotification2[1];
function notify(args) {
var customizePrefixCls = args.prefixCls;
var mergedPrefixCls = getPrefixCls('message', customizePrefixCls);
var target = args.key || getKeyThenIncreaseKey();
var closePromise = new Promise(function (resolve) {
var callback = function callback() {
if (typeof args.onClose === 'function') {
args.onClose();
}
return resolve(true);
};
getRcNotificationInstance(extends_default()(extends_default()({}, args), {
prefixCls: mergedPrefixCls
}), function (_ref) {
var prefixCls = _ref.prefixCls,
instance = _ref.instance;
innerInstance = instance;
hookNotify(getRCNoticeProps(extends_default()(extends_default()({}, args), {
key: target,
onClose: callback
}), prefixCls));
});
});
var result = function result() {
if (innerInstance) {
innerInstance.removeNotice(target);
}
};
result.then = function (filled, rejected) {
return closePromise.then(filled, rejected);
};
result.promise = closePromise;
return result;
} // Fill functions
var hookApiRef = react["useRef"]({});
hookApiRef.current.open = notify;
['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) {
return attachTypeApi(hookApiRef.current, type);
});
return [hookApiRef.current, /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], {
key: "holder"
}, function (context) {
getPrefixCls = context.getPrefixCls;
return holder;
})];
};
return useMessage;
}
// CONCATENATED MODULE: ./node_modules/antd/es/message/index.js
var messageInstance;
var defaultDuration = 3;
var defaultTop;
var key = 1;
var localPrefixCls = 'ant-message';
var transitionName = 'move-up';
var getContainer;
var maxCount;
var rtl = false;
function getKeyThenIncreaseKey() {
return key++;
}
function setMessageConfig(options) {
if (options.top !== undefined) {
defaultTop = options.top;
messageInstance = null; // delete messageInstance for new defaultTop
}
if (options.duration !== undefined) {
defaultDuration = options.duration;
}
if (options.prefixCls !== undefined) {
localPrefixCls = options.prefixCls;
}
if (options.getContainer !== undefined) {
getContainer = options.getContainer;
}
if (options.transitionName !== undefined) {
transitionName = options.transitionName;
messageInstance = null; // delete messageInstance for new transitionName
}
if (options.maxCount !== undefined) {
maxCount = options.maxCount;
messageInstance = null;
}
if (options.rtl !== undefined) {
rtl = options.rtl;
}
}
function getRCNotificationInstance(args, callback) {
var prefixCls = args.prefixCls || localPrefixCls;
if (messageInstance) {
callback({
prefixCls: prefixCls,
instance: messageInstance
});
return;
}
es["a" /* default */].newInstance({
prefixCls: prefixCls,
transitionName: transitionName,
style: {
top: defaultTop
},
getContainer: getContainer,
maxCount: maxCount
}, function (instance) {
if (messageInstance) {
callback({
prefixCls: prefixCls,
instance: messageInstance
});
return;
}
messageInstance = instance;
callback({
prefixCls: prefixCls,
instance: instance
});
});
}
var typeToIcon = {
info: InfoCircleFilled_default.a,
success: CheckCircleFilled_default.a,
error: CloseCircleFilled_default.a,
warning: ExclamationCircleFilled_default.a,
loading: LoadingOutlined_default.a
};
function message_getRCNoticeProps(args, prefixCls) {
var _classNames;
var duration = args.duration !== undefined ? args.duration : defaultDuration;
var IconComponent = typeToIcon[args.type];
var messageClass = classnames_default()("".concat(prefixCls, "-custom-content"), (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-").concat(args.type), args.type), defineProperty_default()(_classNames, "".concat(prefixCls, "-rtl"), rtl === true), _classNames));
return {
key: args.key,
duration: duration,
style: args.style || {},
className: args.className,
content: /*#__PURE__*/react["createElement"]("div", {
className: messageClass
}, args.icon || IconComponent && /*#__PURE__*/react["createElement"](IconComponent, null), /*#__PURE__*/react["createElement"]("span", null, args.content)),
onClose: args.onClose
};
}
function notice(args) {
var target = args.key || key++;
var closePromise = new Promise(function (resolve) {
var callback = function callback() {
if (typeof args.onClose === 'function') {
args.onClose();
}
return resolve(true);
};
getRCNotificationInstance(args, function (_ref) {
var prefixCls = _ref.prefixCls,
instance = _ref.instance;
instance.notice(message_getRCNoticeProps(extends_default()(extends_default()({}, args), {
key: target,
onClose: callback
}), prefixCls));
});
});
var result = function result() {
if (messageInstance) {
messageInstance.removeNotice(target);
}
};
result.then = function (filled, rejected) {
return closePromise.then(filled, rejected);
};
result.promise = closePromise;
return result;
}
function isArgsProps(content) {
return Object.prototype.toString.call(content) === '[object Object]' && !!content.content;
}
var api = {
open: notice,
config: setMessageConfig,
destroy: function destroy(messageKey) {
if (messageInstance) {
if (messageKey) {
var _messageInstance = messageInstance,
removeNotice = _messageInstance.removeNotice;
removeNotice(messageKey);
} else {
var _messageInstance2 = messageInstance,
destroy = _messageInstance2.destroy;
destroy();
messageInstance = null;
}
}
}
};
function attachTypeApi(originalApi, type) {
originalApi[type] = function (content, duration, onClose) {
if (isArgsProps(content)) {
return originalApi.open(extends_default()(extends_default()({}, content), {
type: type
}));
}
if (typeof duration === 'function') {
onClose = duration;
duration = undefined;
}
return originalApi.open({
content: content,
duration: duration,
type: type,
onClose: onClose
});
};
}
['success', 'info', 'warning', 'error', 'loading'].forEach(function (type) {
return attachTypeApi(api, type);
});
api.warn = api.warning;
api.useMessage = createUseMessage(getRCNotificationInstance, message_getRCNoticeProps);
/* harmony default export */ var message = __webpack_exports__["b"] = (api);
/***/ }),
/***/ "tycR":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/array-iteration.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var bind = __webpack_require__(/*! ../internals/function-bind-context */ "A2ZE");
var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "RK3t");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toLength = __webpack_require__(/*! ../internals/to-length */ "UMSQ");
var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "ZfDv");
var push = [].push;
// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex }` methods implementation
var createMethod = function (TYPE) {
var IS_MAP = TYPE == 1;
var IS_FILTER = TYPE == 2;
var IS_SOME = TYPE == 3;
var IS_EVERY = TYPE == 4;
var IS_FIND_INDEX = TYPE == 6;
var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;
return function ($this, callbackfn, that, specificCreate) {
var O = toObject($this);
var self = IndexedObject(O);
var boundFunction = bind(callbackfn, that, 3);
var length = toLength(self.length);
var index = 0;
var create = specificCreate || arraySpeciesCreate;
var target = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;
var value, result;
for (;length > index; index++) if (NO_HOLES || index in self) {
value = self[index];
result = boundFunction(value, index, O);
if (TYPE) {
if (IS_MAP) target[index] = result; // map
else if (result) switch (TYPE) {
case 3: return true; // some
case 5: return value; // find
case 6: return index; // findIndex
case 2: push.call(target, value); // filter
} else if (IS_EVERY) return false; // every
}
}
return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
};
};
module.exports = {
// `Array.prototype.forEach` method
// https://tc39.github.io/ecma262/#sec-array.prototype.foreach
forEach: createMethod(0),
// `Array.prototype.map` method
// https://tc39.github.io/ecma262/#sec-array.prototype.map
map: createMethod(1),
// `Array.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-array.prototype.filter
filter: createMethod(2),
// `Array.prototype.some` method
// https://tc39.github.io/ecma262/#sec-array.prototype.some
some: createMethod(3),
// `Array.prototype.every` method
// https://tc39.github.io/ecma262/#sec-array.prototype.every
every: createMethod(4),
// `Array.prototype.find` method
// https://tc39.github.io/ecma262/#sec-array.prototype.find
find: createMethod(5),
// `Array.prototype.findIndex` method
// https://tc39.github.io/ecma262/#sec-array.prototype.findIndex
findIndex: createMethod(6)
};
/***/ }),
/***/ "tzui":
/*!********************************************************!*\
!*** ./src/models/classrooms/homeworks.ts + 1 modules ***!
\********************************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/pages/Competitions/Entered/Assembly/TeamDateil.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/fetch.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/lodash.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/lodash/lodash.js
var lodash = __webpack_require__("LvDl");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js
var asyncToGenerator = __webpack_require__("9og8");
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__("ErOA");
// CONCATENATED MODULE: ./src/service/shixunHomeworks.ts
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
//实训首页列表
function shixunHomeworks_getWorkList(_x) {
return _getWorkList.apply(this, arguments);
}
// 作业详情
function _getWorkList() {
_getWorkList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params) {
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/works_list.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _getWorkList.apply(this, arguments);
}
function shixunHomeworks_getWorkDetail(_x2) {
return _getWorkDetail.apply(this, arguments);
}
// 实训作业 代码查重
function _getWorkDetail() {
_getWorkDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(params) {
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, ".json"), {
method: 'get'
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _getWorkDetail.apply(this, arguments);
}
function shixunHomeworks_getCodeReview(_x3) {
return _getCodeReview.apply(this, arguments);
}
function _getCodeReview() {
_getCodeReview = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(params) {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/code_review_results.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _getCodeReview.apply(this, arguments);
}
function shixunHomeworks_getCodeReviewDetail(_x4) {
return _getCodeReviewDetail.apply(this, arguments);
}
// 实训作业 设置
function _getCodeReviewDetail() {
_getCodeReviewDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(params) {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/code_review_detail.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _getCodeReviewDetail.apply(this, arguments);
}
function shixunHomeworks_getWorkSetting(_x5) {
return _getWorkSetting.apply(this, arguments);
}
// 实训作业 设置更新
function _getWorkSetting() {
_getWorkSetting = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(params) {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/settings.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _getWorkSetting.apply(this, arguments);
}
function shixunHomeworks_updateSetting(_x6) {
return _updateSetting.apply(this, arguments);
}
// 代码重查分班
function _updateSetting() {
_updateSetting = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6(params) {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/update_settings.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _updateSetting.apply(this, arguments);
}
function shixunHomeworks_getCodeReviewCourse(_x7) {
return _getCodeReviewCourse.apply(this, arguments);
}
// 实训作业 导出成绩
function _getCodeReviewCourse() {
_getCodeReviewCourse = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee7(params) {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/group_list.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _getCodeReviewCourse.apply(this, arguments);
}
function shixunHomeworks_exportShixunWorks(_x8) {
return _exportShixunWorks.apply(this, arguments);
}
// 分组作业 题库详情
function _exportShixunWorks() {
_exportShixunWorks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee8(params) {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/works_list.xlsx"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _exportShixunWorks.apply(this, arguments);
}
function shixunHomeworks_getReferenceAnswer(_x9) {
return _getReferenceAnswer.apply(this, arguments);
}
// 分组作业 班级列表
function _getReferenceAnswer() {
_getReferenceAnswer = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee9(params) {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.coursesId, "/reference_answer.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _getReferenceAnswer.apply(this, arguments);
}
function shixunHomeworks_getPublishGroups(_x10) {
return _getPublishGroups.apply(this, arguments);
}
// 分组作业 截止班级列表
function _getPublishGroups() {
_getPublishGroups = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee10(params) {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/publish_groups.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _getPublishGroups.apply(this, arguments);
}
function shixunHomeworks_getEndGroups(_x11) {
return _getEndGroups.apply(this, arguments);
}
// 分组作业 题库选用列表
function _getEndGroups() {
_getEndGroups = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee11(params) {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/end_groups.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _getEndGroups.apply(this, arguments);
}
function shixunHomeworks_getBrankList(_x12) {
return _getBrankList.apply(this, arguments);
}
// 分组作业 保存题库
function _getBrankList() {
_getBrankList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(params) {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", Object(fetch["a" /* default */])("/api/question_banks/bank_list.json", {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _getBrankList.apply(this, arguments);
}
function shixunHomeworks_saveBanks(_x13) {
return _saveBanks.apply(this, arguments);
}
function _saveBanks() {
_saveBanks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(params) {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", Object(fetch["a" /* default */])("/api/question_banks/save_banks.json", {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _saveBanks.apply(this, arguments);
}
function shixunHomeworks_getShixunWorkReport(_x14) {
return _getShixunWorkReport.apply(this, arguments);
}
function _getShixunWorkReport() {
_getShixunWorkReport = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(params) {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.homeworkId, "/shixun_work_report.json"), {
method: 'get'
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _getShixunWorkReport.apply(this, arguments);
}
function shixunHomeworks_changeScore(_x15) {
return _changeScore.apply(this, arguments);
}
function _changeScore() {
_changeScore = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(params) {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.categoryId, "/adjust_review_score.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _changeScore.apply(this, arguments);
}
function shixunHomeworks_getReplyList(_x16) {
return _getReplyList.apply(this, arguments);
}
function _getReplyList() {
_getReplyList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/show_comment.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _getReplyList.apply(this, arguments);
}
function shixunHomeworks_createReply(_x17) {
return _createReply.apply(this, arguments);
}
function _createReply() {
_createReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee17(params) {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", Object(fetch["a" /* default */])("/api/users/reply_message.json", {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _createReply.apply(this, arguments);
}
function shixunHomeworks_replyLike(_x18) {
return _replyLike.apply(this, arguments);
}
function _replyLike() {
_replyLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(params) {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/like.json", {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _replyLike.apply(this, arguments);
}
function shixunHomeworks_replyUnLike(_x19) {
return _replyUnLike.apply(this, arguments);
}
function _replyUnLike() {
_replyUnLike = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee19(params) {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", Object(fetch["a" /* default */])("/api/praise_tread/unlike.json", {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _replyUnLike.apply(this, arguments);
}
function shixunHomeworks_deleteReply(_x20) {
return _deleteReply.apply(this, arguments);
}
function _deleteReply() {
_deleteReply = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee20(params) {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", Object(fetch["a" /* default */])("/api/commons/delete.json", {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _deleteReply.apply(this, arguments);
}
function shixunHomeworks_updateWork(_x21) {
return _updateWork.apply(this, arguments);
}
function _updateWork() {
_updateWork = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee21(params) {
return _regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/update_explanation.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _updateWork.apply(this, arguments);
}
function AddCommonHomework(_x22) {
return _AddCommonHomework.apply(this, arguments);
}
function _AddCommonHomework() {
_AddCommonHomework = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee22(params) {
return _regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/homework_commons.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _AddCommonHomework.apply(this, arguments);
}
function editCommonHomeWork(_x23) {
return _editCommonHomeWork.apply(this, arguments);
}
function _editCommonHomeWork() {
_editCommonHomeWork = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee23(params) {
return _regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _editCommonHomeWork.apply(this, arguments);
}
function editBankCommonHomeWork(_x24) {
return _editBankCommonHomeWork.apply(this, arguments);
}
function _editBankCommonHomeWork() {
_editBankCommonHomeWork = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee24(params) {
return _regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", Object(fetch["a" /* default */])("/api/homework_banks/".concat(params.id, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _editBankCommonHomeWork.apply(this, arguments);
}
function shixunHomeworks_addStudentWorkDefaultData(_x25) {
return _addStudentWorkDefaultData.apply(this, arguments);
}
function _addStudentWorkDefaultData() {
_addStudentWorkDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee25(params) {
return _regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.commonHomeworkId, "/student_works/new.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _addStudentWorkDefaultData.apply(this, arguments);
}
function shixunHomeworks_editStudentWorkDefaultData(_x26) {
return _editStudentWorkDefaultData.apply(this, arguments);
}
function _editStudentWorkDefaultData() {
_editStudentWorkDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee26(params) {
return _regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.homeworkId, "/edit.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _editStudentWorkDefaultData.apply(this, arguments);
}
function editStudentWork(_x27) {
return _editStudentWork.apply(this, arguments);
}
function _editStudentWork() {
_editStudentWork = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee27(params) {
return _regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.homeworkId, ".json"), {
method: 'put',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _editStudentWork.apply(this, arguments);
}
function reviseAttachment(_x28) {
return _reviseAttachment.apply(this, arguments);
}
function _reviseAttachment() {
_reviseAttachment = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee28(params) {
return _regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
return _context28.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.homeworkId, "/revise_attachment.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context28.stop();
}
}, _callee28);
}));
return _reviseAttachment.apply(this, arguments);
}
function addStudentWork(_x29) {
return _addStudentWork.apply(this, arguments);
}
function _addStudentWork() {
_addStudentWork = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee29(params) {
return _regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
return _context29.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.commonHomeworkId, "/student_works.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context29.stop();
}
}, _callee29);
}));
return _addStudentWork.apply(this, arguments);
}
function relateProject(_x30) {
return _relateProject.apply(this, arguments);
}
function _relateProject() {
_relateProject = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee30(params) {
return _regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
return _context30.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.homeworkId, "/student_works/relate_project.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context30.stop();
}
}, _callee30);
}));
return _relateProject.apply(this, arguments);
}
function cancelRelateProject(_x31) {
return _cancelRelateProject.apply(this, arguments);
}
function _cancelRelateProject() {
_cancelRelateProject = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee31(params) {
return _regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
return _context31.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.homeworkId, "/student_works/cancel_relate_project.json"), {
method: 'get'
}));
case 1:
case "end":
return _context31.stop();
}
}, _callee31);
}));
return _cancelRelateProject.apply(this, arguments);
}
function shixunHomeworks_getProjectList(_x32) {
return _getProjectList.apply(this, arguments);
}
function _getProjectList() {
_getProjectList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee32(params) {
return _regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
return _context32.abrupt("return", Object(fetch["a" /* default */])("/api/users/projects/search.json", {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context32.stop();
}
}, _callee32);
}));
return _getProjectList.apply(this, arguments);
}
function shixunHomeworks_getSearchMemberList(_x33) {
return _getSearchMemberList.apply(this, arguments);
}
function _getSearchMemberList() {
_getSearchMemberList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee33(params) {
return _regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
return _context33.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.commonHomeworkId, "/student_works/search_member_list.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context33.stop();
}
}, _callee33);
}));
return _getSearchMemberList.apply(this, arguments);
}
function shixunHomeworks_addCommonHomeWorkDefaultData(_x34) {
return _addCommonHomeWorkDefaultData.apply(this, arguments);
}
function _addCommonHomeWorkDefaultData() {
_addCommonHomeWorkDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee34(params) {
return _regeneratorRuntime().wrap(function _callee34$(_context34) {
while (1) switch (_context34.prev = _context34.next) {
case 0:
return _context34.abrupt("return", Object(fetch["a" /* default */])("/api/courses/".concat(params.coursesId, "/homework_commons/new.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context34.stop();
}
}, _callee34);
}));
return _addCommonHomeWorkDefaultData.apply(this, arguments);
}
function shixunHomeworks_editCommonHomeWorkDefaultData(_x35) {
return _editCommonHomeWorkDefaultData.apply(this, arguments);
}
function _editCommonHomeWorkDefaultData() {
_editCommonHomeWorkDefaultData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee35(params) {
return _regeneratorRuntime().wrap(function _callee35$(_context35) {
while (1) switch (_context35.prev = _context35.next) {
case 0:
return _context35.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/edit.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context35.stop();
}
}, _callee35);
}));
return _editCommonHomeWorkDefaultData.apply(this, arguments);
}
function shixunHomeworks_editCommonHomeWorkDefaultBankData(_x36) {
return _editCommonHomeWorkDefaultBankData.apply(this, arguments);
}
function _editCommonHomeWorkDefaultBankData() {
_editCommonHomeWorkDefaultBankData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee36(params) {
return _regeneratorRuntime().wrap(function _callee36$(_context36) {
while (1) switch (_context36.prev = _context36.next) {
case 0:
return _context36.abrupt("return", Object(fetch["a" /* default */])("/api/homework_banks/".concat(params.id, ".json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context36.stop();
}
}, _callee36);
}));
return _editCommonHomeWorkDefaultBankData.apply(this, arguments);
}
function shixunHomeworks_getStudentWorkDetail(_x37) {
return _getStudentWorkDetail.apply(this, arguments);
}
function _getStudentWorkDetail() {
_getStudentWorkDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee37(params) {
return _regeneratorRuntime().wrap(function _callee37$(_context37) {
while (1) switch (_context37.prev = _context37.next) {
case 0:
return _context37.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.userId, ".json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context37.stop();
}
}, _callee37);
}));
return _getStudentWorkDetail.apply(this, arguments);
}
function shixunHomeworks_getStudentWorkSupplyDetail(_x38) {
return _getStudentWorkSupplyDetail.apply(this, arguments);
}
function _getStudentWorkSupplyDetail() {
_getStudentWorkSupplyDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee38(params) {
return _regeneratorRuntime().wrap(function _callee38$(_context38) {
while (1) switch (_context38.prev = _context38.next) {
case 0:
return _context38.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.userId, "/supply_attachments.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context38.stop();
}
}, _callee38);
}));
return _getStudentWorkSupplyDetail.apply(this, arguments);
}
function shixunHomeworks_getStudentWorkCommon(_x39) {
return _getStudentWorkCommon.apply(this, arguments);
}
function _getStudentWorkCommon() {
_getStudentWorkCommon = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee39(params) {
return _regeneratorRuntime().wrap(function _callee39$(_context39) {
while (1) switch (_context39.prev = _context39.next) {
case 0:
return _context39.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.userId, "/comment_list.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context39.stop();
}
}, _callee39);
}));
return _getStudentWorkCommon.apply(this, arguments);
}
function delStudentWorkScore(_x40) {
return _delStudentWorkScore.apply(this, arguments);
}
function _delStudentWorkScore() {
_delStudentWorkScore = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee40(params) {
return _regeneratorRuntime().wrap(function _callee40$(_context40) {
while (1) switch (_context40.prev = _context40.next) {
case 0:
return _context40.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.userId, "/destroy_score.json"), {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context40.stop();
}
}, _callee40);
}));
return _delStudentWorkScore.apply(this, arguments);
}
function addStudentWorkScoreCommit(_x41) {
return _addStudentWorkScoreCommit.apply(this, arguments);
}
function _addStudentWorkScoreCommit() {
_addStudentWorkScoreCommit = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee41(params) {
return _regeneratorRuntime().wrap(function _callee41$(_context41) {
while (1) switch (_context41.prev = _context41.next) {
case 0:
return _context41.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.userId, "/add_score_reply.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context41.stop();
}
}, _callee41);
}));
return _addStudentWorkScoreCommit.apply(this, arguments);
}
function shixunHomeworks_getAllStudentWorks(_x42) {
return _getAllStudentWorks.apply(this, arguments);
}
function _getAllStudentWorks() {
_getAllStudentWorks = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee42(params) {
return _regeneratorRuntime().wrap(function _callee42$(_context42) {
while (1) switch (_context42.prev = _context42.next) {
case 0:
return _context42.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/all_student_works.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context42.stop();
}
}, _callee42);
}));
return _getAllStudentWorks.apply(this, arguments);
}
function deleteStudentWorkScoreCommit(_x43) {
return _deleteStudentWorkScoreCommit.apply(this, arguments);
}
function _deleteStudentWorkScoreCommit() {
_deleteStudentWorkScoreCommit = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee43(params) {
return _regeneratorRuntime().wrap(function _callee43$(_context43) {
while (1) switch (_context43.prev = _context43.next) {
case 0:
return _context43.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.homeworkId, "/destroy_work_comment.json"), {
method: 'delete',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context43.stop();
}
}, _callee43);
}));
return _deleteStudentWorkScoreCommit.apply(this, arguments);
}
function getScoreStatus(_x44) {
return _getScoreStatus.apply(this, arguments);
}
function _getScoreStatus() {
_getScoreStatus = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee44(params) {
return _regeneratorRuntime().wrap(function _callee44$(_context44) {
while (1) switch (_context44.prev = _context44.next) {
case 0:
return _context44.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/score_status.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context44.stop();
}
}, _callee44);
}));
return _getScoreStatus.apply(this, arguments);
}
function updateScore(_x45) {
return _updateScore.apply(this, arguments);
}
function _updateScore() {
_updateScore = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee45(params) {
return _regeneratorRuntime().wrap(function _callee45$(_context45) {
while (1) switch (_context45.prev = _context45.next) {
case 0:
return _context45.abrupt("return", Object(fetch["a" /* default */])("/api/homework_commons/".concat(params.categoryId, "/update_score.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context45.stop();
}
}, _callee45);
}));
return _updateScore.apply(this, arguments);
}
function addStudentWorkScore(_x46) {
return _addStudentWorkScore.apply(this, arguments);
}
function _addStudentWorkScore() {
_addStudentWorkScore = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee46(params) {
return _regeneratorRuntime().wrap(function _callee46$(_context46) {
while (1) switch (_context46.prev = _context46.next) {
case 0:
return _context46.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.userId, "/add_score.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context46.stop();
}
}, _callee46);
}));
return _addStudentWorkScore.apply(this, arguments);
}
function cancelAppeal(_x47) {
return _cancelAppeal.apply(this, arguments);
}
function _cancelAppeal() {
_cancelAppeal = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee47(params) {
return _regeneratorRuntime().wrap(function _callee47$(_context47) {
while (1) switch (_context47.prev = _context47.next) {
case 0:
return _context47.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.userId, "/cancel_appeal.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context47.stop();
}
}, _callee47);
}));
return _cancelAppeal.apply(this, arguments);
}
function appealAnonymousScore(_x48) {
return _appealAnonymousScore.apply(this, arguments);
}
function _appealAnonymousScore() {
_appealAnonymousScore = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee48(params) {
return _regeneratorRuntime().wrap(function _callee48$(_context48) {
while (1) switch (_context48.prev = _context48.next) {
case 0:
return _context48.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.userId, "/appeal_anonymous_score.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context48.stop();
}
}, _callee48);
}));
return _appealAnonymousScore.apply(this, arguments);
}
function dealAppealScore(_x49) {
return _dealAppealScore.apply(this, arguments);
}
function _dealAppealScore() {
_dealAppealScore = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee49(params) {
return _regeneratorRuntime().wrap(function _callee49$(_context49) {
while (1) switch (_context49.prev = _context49.next) {
case 0:
return _context49.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.userId, "/deal_appeal_score.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context49.stop();
}
}, _callee49);
}));
return _dealAppealScore.apply(this, arguments);
}
function shixunResetMyGame(_x50) {
return _shixunResetMyGame.apply(this, arguments);
}
function _shixunResetMyGame() {
_shixunResetMyGame = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee50(params) {
return _regeneratorRuntime().wrap(function _callee50$(_context50) {
while (1) switch (_context50.prev = _context50.next) {
case 0:
return _context50.abrupt("return", Object(fetch["a" /* default */])("/api/myshixuns/".concat(params.id, "/reset_my_game.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context50.stop();
}
}, _callee50);
}));
return _shixunResetMyGame.apply(this, arguments);
}
function getHomeWorkCommitDes(_x51) {
return _getHomeWorkCommitDes.apply(this, arguments);
}
function _getHomeWorkCommitDes() {
_getHomeWorkCommitDes = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee51(params) {
return _regeneratorRuntime().wrap(function _callee51$(_context51) {
while (1) switch (_context51.prev = _context51.next) {
case 0:
return _context51.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.homeworkId, "/commit_des.json"), {
method: 'get',
params: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context51.stop();
}
}, _callee51);
}));
return _getHomeWorkCommitDes.apply(this, arguments);
}
function updateHomeWorkCommitDes(_x52) {
return _updateHomeWorkCommitDes.apply(this, arguments);
}
function _updateHomeWorkCommitDes() {
_updateHomeWorkCommitDes = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/_regeneratorRuntime().mark(function _callee52(params) {
return _regeneratorRuntime().wrap(function _callee52$(_context52) {
while (1) switch (_context52.prev = _context52.next) {
case 0:
return _context52.abrupt("return", Object(fetch["a" /* default */])("/api/student_works/".concat(params.homeworkId, "/update_des.json"), {
method: 'post',
body: Object(objectSpread2["a" /* default */])({}, params)
}));
case 1:
case "end":
return _context52.stop();
}
}, _callee52);
}));
return _updateHomeWorkCommitDes.apply(this, arguments);
}
// CONCATENATED MODULE: ./src/models/classrooms/homeworks.ts
function homeworks_regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ homeworks_regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var ShixunHomeworksListModel = {
namespace: 'shixunHomeworks',
state: {
name: '',
loading: true,
// 实训作业列表
workList: {},
// 实训作业评阅
shixunWorkReport: {},
// 代码查重列表
codeReview: {},
codeReviewDetail: {},
// 作业设置
workSetting: {},
// 弹框对比数据
changeData: {},
//代码查重 分班
codeReviewCourse: {},
// 分组作业题库详情
referenceAnswer: {},
// 作业详情 立即发布分班列表
publishGroups: {},
// 作业详情 立即截止分班列表
endGroups: {},
// 普通作业 题库选用
brankList: {},
// 回复列表
replyList: {},
// 作业详情
workDetail: {},
commonHomeWorkAddDefaultData: {},
studentWorkAddDefaultData: {},
studentWorkEditDefaultData: {},
commonHomeWorkEditDefaultData: {},
studentWorkDetail: {},
studentWorkSupplyDetail: {},
studentWorkCommon: {},
allStudentWorks: {},
searchMemberList: {},
searchProjectList: {},
//记录操作的action key值
actionTabs: {
key: ''
},
listParams: {
order: 'all',
page: 1,
//第一页开始
limit: 16,
search: ''
}
},
effects: {
// 实训作业 - 作业列表
getWorkList: function getWorkList(_ref, _ref2) {
var payload = _ref.payload,
callback = _ref.callback;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(shixunHomeworks_getWorkList, payload);
case 2:
response = _context.sent;
//
try {
sessionStorage['all_student_works'] = JSON.stringify(response['all_student_works']);
sessionStorage['all_student_works_params'] = JSON.stringify(payload);
localStorage.setItem('all_student_works_param', JSON.stringify(payload));
} catch (e) {}
_context.next = 6;
return put({
type: 'save',
payload: {
workList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 6:
return _context.abrupt("return", response);
case 7:
case "end":
return _context.stop();
}
}, _callee);
})();
},
// 实训作业 代码查重
getCodeReview: function getCodeReview(_ref3, _ref4) {
var payload = _ref3.payload,
callback = _ref3.callback;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee2() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(shixunHomeworks_getCodeReview, payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
codeReview: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context2.abrupt("return", response);
case 6:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
// code_review_detail
getCodeReviewDetail: function getCodeReviewDetail(_ref5, _ref6) {
var payload = _ref5.payload,
callback = _ref5.callback;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee3() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(shixunHomeworks_getCodeReviewDetail, payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
codeReviewDetail: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
// 实训作业 作业详情
getWorkDetail: function getWorkDetail(_ref7, _ref8) {
var payload = _ref7.payload,
callback = _ref7.callback;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee4() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(shixunHomeworks_getWorkDetail, payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
workDetail: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
// 实训作业更新
updateWork: function updateWork(_ref9, _ref10) {
var payload = _ref9.payload,
callback = _ref9.callback;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee5() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(shixunHomeworks_updateWork, payload);
case 2:
response = _context5.sent;
return _context5.abrupt("return", response);
case 4:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
// 实训作业 作业报表详情
getShixunWorkReport: function getShixunWorkReport(_ref11, _ref12) {
var payload = _ref11.payload,
callback = _ref11.callback;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee6() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(shixunHomeworks_getShixunWorkReport, payload);
case 2:
response = _context6.sent;
try {
response['all_student_works'] = JSON.parse(sessionStorage['all_student_works'] || '[]');
} catch (e) {}
_context6.next = 6;
return put({
type: 'save',
payload: {
shixunWorkReport: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 6:
return _context6.abrupt("return", response);
case 7:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
// 实训作业 设置
getWorkSetting: function getWorkSetting(_ref13, _ref14) {
var payload = _ref13.payload,
callback = _ref13.callback;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee7(_response$group_setti, _response$allow_late_) {
var response, changeData;
return homeworks_regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(shixunHomeworks_getWorkSetting, payload);
case 2:
response = _context7.sent;
response === null || response === void 0 ? void 0 : (_response$group_setti = response.group_settings) === null || _response$group_setti === void 0 ? void 0 : _response$group_setti.map(function (v) {
v.value = v.group_name;
v.id = v.group_id;
v.group_id = [v.group_id];
});
response === null || response === void 0 ? void 0 : (_response$allow_late_ = response.allow_late_settings) === null || _response$allow_late_ === void 0 ? void 0 : _response$allow_late_.map(function (v) {
v.value = v.group_name;
v.id = v.group_id;
v.group_id = [v.group_id];
});
changeData = {
shixun_evaluation: response.shixun_evaluation,
challenge_settings: response.challenge_settings
};
_context7.next = 8;
return put({
type: 'save',
payload: {
workSetting: Object(objectSpread2["a" /* default */])({}, response),
changeData: Object(lodash["cloneDeep"])(changeData)
}
});
case 8:
return _context7.abrupt("return", response);
case 9:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
//实训作业 设置更新
updateSetting: function updateSetting(_ref15, _ref16) {
var payload = _ref15.payload,
callback = _ref15.callback;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee8() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(shixunHomeworks_updateSetting, payload);
case 2:
response = _context8.sent;
return _context8.abrupt("return", response);
case 4:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
// 代码查重 分班
getCodeReviewCourse: function getCodeReviewCourse(_ref17, _ref18) {
var payload = _ref17.payload,
callback = _ref17.callback;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee9() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(shixunHomeworks_getCodeReviewCourse, payload);
case 2:
response = _context9.sent;
_context9.next = 5;
return put({
type: 'save',
payload: {
codeReviewCourse: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context9.abrupt("return", response);
case 6:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
// 实训作业 学生成绩导出
exportShixunWorks: function exportShixunWorks(_ref19, _ref20) {
var payload = _ref19.payload,
callback = _ref19.callback;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee10() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(shixunHomeworks_exportShixunWorks, payload);
case 2:
response = _context10.sent;
case 3:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
// 分组作业 题库详情
getReferenceAnswer: function getReferenceAnswer(_ref21, _ref22) {
var payload = _ref21.payload,
callback = _ref21.callback;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee11() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(shixunHomeworks_getReferenceAnswer, payload);
case 2:
response = _context11.sent;
_context11.next = 5;
return put({
type: 'save',
payload: {
referenceAnswer: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context11.abrupt("return", response);
case 6:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
// 分组作业 作业分班列表
getPublishGroups: function getPublishGroups(_ref23, _ref24) {
var payload = _ref23.payload,
callback = _ref23.callback;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee12() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(shixunHomeworks_getPublishGroups, payload);
case 2:
response = _context12.sent;
_context12.next = 5;
return put({
type: 'save',
payload: {
publishGroups: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context12.abrupt("return", response);
case 6:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
// 分组作业 立即截止
getEndGroups: function getEndGroups(_ref25, _ref26) {
var payload = _ref25.payload,
callback = _ref25.callback;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee13() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(shixunHomeworks_getEndGroups, payload);
case 2:
response = _context13.sent;
_context13.next = 5;
return put({
type: 'save',
payload: {
endGroups: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context13.abrupt("return", response);
case 6:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
// 普通作业 题库选用
getBrankList: function getBrankList(_ref27, _ref28) {
var payload = _ref27.payload,
callback = _ref27.callback;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee14() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(shixunHomeworks_getBrankList, payload);
case 2:
response = _context14.sent;
_context14.next = 5;
return put({
type: 'save',
payload: {
brankList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context14.abrupt("return", response);
case 6:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
// 调整评分
changeScore: function changeScore(_ref29, _ref30) {
var payload = _ref29.payload,
callback = _ref29.callback;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee15() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(shixunHomeworks_changeScore, payload);
case 2:
response = _context15.sent;
return _context15.abrupt("return", response);
case 4:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
//普通作业 保存到题库
saveBanks: function saveBanks(_ref31, _ref32) {
var payload = _ref31.payload,
callback = _ref31.callback;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee16() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(shixunHomeworks_saveBanks, payload);
case 2:
response = _context16.sent;
return _context16.abrupt("return", response);
case 4:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
// 普通作业添加默认数据
addCommonHomeWorkDefaultData: function addCommonHomeWorkDefaultData(_ref33, _ref34) {
var payload = _ref33.payload,
callback = _ref33.callback;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee17() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return call(shixunHomeworks_addCommonHomeWorkDefaultData, payload);
case 2:
response = _context17.sent;
_context17.next = 5;
return put({
type: 'save',
payload: {
commonHomeWorkAddDefaultData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context17.abrupt("return", response);
case 6:
case "end":
return _context17.stop();
}
}, _callee17);
})();
},
getSearchMemberList: function getSearchMemberList(_ref35, _ref36) {
var payload = _ref35.payload,
callback = _ref35.callback;
var call = _ref36.call,
put = _ref36.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee18() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context18.next = 2;
return call(shixunHomeworks_getSearchMemberList, payload);
case 2:
response = _context18.sent;
_context18.next = 5;
return put({
type: 'save',
payload: {
searchMemberList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context18.abrupt("return", response);
case 6:
case "end":
return _context18.stop();
}
}, _callee18);
})();
},
getProjectList: function getProjectList(_ref37, _ref38) {
var payload = _ref37.payload,
callback = _ref37.callback;
var call = _ref38.call,
put = _ref38.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee19() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
_context19.next = 2;
return call(shixunHomeworks_getProjectList, payload);
case 2:
response = _context19.sent;
_context19.next = 5;
return put({
type: 'save',
payload: {
searchProjectList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context19.abrupt("return", response);
case 6:
case "end":
return _context19.stop();
}
}, _callee19);
})();
},
addStudentWorkDefaultData: function addStudentWorkDefaultData(_ref39, _ref40) {
var payload = _ref39.payload,
callback = _ref39.callback;
var call = _ref40.call,
put = _ref40.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee20() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
_context20.next = 2;
return call(shixunHomeworks_addStudentWorkDefaultData, payload);
case 2:
response = _context20.sent;
_context20.next = 5;
return put({
type: 'save',
payload: {
studentWorkAddDefaultData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context20.abrupt("return", response);
case 6:
case "end":
return _context20.stop();
}
}, _callee20);
})();
},
editStudentWorkDefaultData: function editStudentWorkDefaultData(_ref41, _ref42) {
var payload = _ref41.payload,
callback = _ref41.callback;
var call = _ref42.call,
put = _ref42.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee21() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
_context21.next = 2;
return call(shixunHomeworks_editStudentWorkDefaultData, payload);
case 2:
response = _context21.sent;
_context21.next = 5;
return put({
type: 'save',
payload: {
studentWorkEditDefaultData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context21.abrupt("return", response);
case 6:
case "end":
return _context21.stop();
}
}, _callee21);
})();
},
// 普通作业修改默认数据
editCommonHomeWorkDefaultData: function editCommonHomeWorkDefaultData(_ref43, _ref44) {
var payload = _ref43.payload,
callback = _ref43.callback;
var call = _ref44.call,
put = _ref44.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee22() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
_context22.next = 2;
return call(shixunHomeworks_editCommonHomeWorkDefaultData, payload);
case 2:
response = _context22.sent;
_context22.next = 5;
return put({
type: 'save',
payload: {
commonHomeWorkEditDefaultData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context22.abrupt("return", response);
case 6:
case "end":
return _context22.stop();
}
}, _callee22);
})();
},
// 题库普通作业修改默认数据
editCommonHomeWorkDefaultBankData: function editCommonHomeWorkDefaultBankData(_ref45, _ref46) {
var payload = _ref45.payload,
callback = _ref45.callback;
var call = _ref46.call,
put = _ref46.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee23() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
_context23.next = 2;
return call(shixunHomeworks_editCommonHomeWorkDefaultBankData, payload);
case 2:
response = _context23.sent;
_context23.next = 5;
return put({
type: 'save',
payload: {
commonHomeWorkEditDefaultData: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context23.abrupt("return", response);
case 6:
case "end":
return _context23.stop();
}
}, _callee23);
})();
},
// 讨论回复列表
getReplyList: function getReplyList(_ref47, _ref48) {
var payload = _ref47.payload,
callback = _ref47.callback;
var call = _ref48.call,
put = _ref48.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee24() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
_context24.next = 2;
return call(shixunHomeworks_getReplyList, payload);
case 2:
response = _context24.sent;
_context24.next = 5;
return put({
type: 'save',
payload: {
replyList: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context24.stop();
}
}, _callee24);
})();
},
getStudentWorkDetail: function getStudentWorkDetail(_ref49, _ref50) {
var payload = _ref49.payload,
callback = _ref49.callback;
var call = _ref50.call,
put = _ref50.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee25() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
_context25.next = 2;
return call(shixunHomeworks_getStudentWorkDetail, payload);
case 2:
response = _context25.sent;
_context25.next = 5;
return put({
type: 'save',
payload: {
studentWorkDetail: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context25.stop();
}
}, _callee25);
})();
},
getStudentWorkSupplyDetail: function getStudentWorkSupplyDetail(_ref51, _ref52) {
var payload = _ref51.payload,
callback = _ref51.callback;
var call = _ref52.call,
put = _ref52.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee26() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
_context26.next = 2;
return call(shixunHomeworks_getStudentWorkSupplyDetail, payload);
case 2:
response = _context26.sent;
_context26.next = 5;
return put({
type: 'save',
payload: {
studentWorkSupplyDetail: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context26.stop();
}
}, _callee26);
})();
},
getStudentWorkCommon: function getStudentWorkCommon(_ref53, _ref54) {
var payload = _ref53.payload,
callback = _ref53.callback;
var call = _ref54.call,
put = _ref54.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee27() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
_context27.next = 2;
return call(shixunHomeworks_getStudentWorkCommon, payload);
case 2:
response = _context27.sent;
_context27.next = 5;
return put({
type: 'save',
payload: {
studentWorkCommon: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
case "end":
return _context27.stop();
}
}, _callee27);
})();
},
getAllStudentWorks: function getAllStudentWorks(_ref55, _ref56) {
var payload = _ref55.payload,
callback = _ref55.callback;
var call = _ref56.call,
put = _ref56.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee28() {
var response;
return homeworks_regeneratorRuntime().wrap(function _callee28$(_context28) {
while (1) switch (_context28.prev = _context28.next) {
case 0:
_context28.next = 2;
return call(shixunHomeworks_getAllStudentWorks, payload);
case 2:
response = _context28.sent;
_context28.next = 5;
return put({
type: 'save',
payload: {
allStudentWorks: Object(objectSpread2["a" /* default */])({}, response)
}
});
case 5:
return _context28.abrupt("return", response);
case 6:
case "end":
return _context28.stop();
}
}, _callee28);
})();
},
// 讨论创建回复
createReply: function createReply(_ref57, _ref58) {
var payload = _ref57.payload,
callback = _ref57.callback;
var call = _ref58.call,
put = _ref58.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee29() {
return homeworks_regeneratorRuntime().wrap(function _callee29$(_context29) {
while (1) switch (_context29.prev = _context29.next) {
case 0:
_context29.next = 2;
return call(shixunHomeworks_createReply, payload);
case 2:
return _context29.abrupt("return", _context29.sent);
case 3:
case "end":
return _context29.stop();
}
}, _callee29);
})();
},
// 讨论回复点赞
replyLike: function replyLike(_ref59, _ref60) {
var payload = _ref59.payload,
callback = _ref59.callback;
var call = _ref60.call,
put = _ref60.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee30() {
return homeworks_regeneratorRuntime().wrap(function _callee30$(_context30) {
while (1) switch (_context30.prev = _context30.next) {
case 0:
_context30.next = 2;
return call(shixunHomeworks_replyLike, payload);
case 2:
return _context30.abrupt("return", _context30.sent);
case 3:
case "end":
return _context30.stop();
}
}, _callee30);
})();
},
// 讨论回复取消点赞
replyUnLike: function replyUnLike(_ref61, _ref62) {
var payload = _ref61.payload,
callback = _ref61.callback;
var call = _ref62.call,
put = _ref62.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee31() {
return homeworks_regeneratorRuntime().wrap(function _callee31$(_context31) {
while (1) switch (_context31.prev = _context31.next) {
case 0:
_context31.next = 2;
return call(shixunHomeworks_replyUnLike, payload);
case 2:
return _context31.abrupt("return", _context31.sent);
case 3:
case "end":
return _context31.stop();
}
}, _callee31);
})();
},
// 讨论回复删除
deleteReply: function deleteReply(_ref63, _ref64) {
var payload = _ref63.payload,
callback = _ref63.callback;
var call = _ref64.call,
put = _ref64.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee32() {
return homeworks_regeneratorRuntime().wrap(function _callee32$(_context32) {
while (1) switch (_context32.prev = _context32.next) {
case 0:
_context32.next = 2;
return call(shixunHomeworks_deleteReply, payload);
case 2:
return _context32.abrupt("return", _context32.sent);
case 3:
case "end":
return _context32.stop();
}
}, _callee32);
})();
},
// 设置操做action
setActionTabs: function setActionTabs(_ref65, _ref66) {
var payload = _ref65.payload;
var call = _ref66.call,
put = _ref66.put;
return /*#__PURE__*/homeworks_regeneratorRuntime().mark(function _callee33() {
return homeworks_regeneratorRuntime().wrap(function _callee33$(_context33) {
while (1) switch (_context33.prev = _context33.next) {
case 0:
_context33.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(objectSpread2["a" /* default */])({}, payload)
}
});
case 2:
case "end":
return _context33.stop();
}
}, _callee33);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref67) {
var dispatch = _ref67.dispatch,
history = _ref67.history;
// console.log("subscriptions:", dispatch, history)
return history.listen(function (_ref68) {
var pathname = _ref68.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ var homeworks = __webpack_exports__["a"] = (ShixunHomeworksListModel);
/***/ }),
/***/ "u0Sq":
/*!*************************************************!*\
!*** ./node_modules/hash.js/lib/hash/ripemd.js ***!
\*************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ./utils */ "w8CP");
var common = __webpack_require__(/*! ./common */ "7ckf");
var rotl32 = utils.rotl32;
var sum32 = utils.sum32;
var sum32_3 = utils.sum32_3;
var sum32_4 = utils.sum32_4;
var BlockHash = common.BlockHash;
function RIPEMD160() {
if (!(this instanceof RIPEMD160))
return new RIPEMD160();
BlockHash.call(this);
this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];
this.endian = 'little';
}
utils.inherits(RIPEMD160, BlockHash);
exports.ripemd160 = RIPEMD160;
RIPEMD160.blockSize = 512;
RIPEMD160.outSize = 160;
RIPEMD160.hmacStrength = 192;
RIPEMD160.padLength = 64;
RIPEMD160.prototype._update = function update(msg, start) {
var A = this.h[0];
var B = this.h[1];
var C = this.h[2];
var D = this.h[3];
var E = this.h[4];
var Ah = A;
var Bh = B;
var Ch = C;
var Dh = D;
var Eh = E;
for (var j = 0; j < 80; j++) {
var T = sum32(
rotl32(
sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),
s[j]),
E);
A = E;
E = D;
D = rotl32(C, 10);
C = B;
B = T;
T = sum32(
rotl32(
sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),
sh[j]),
Eh);
Ah = Eh;
Eh = Dh;
Dh = rotl32(Ch, 10);
Ch = Bh;
Bh = T;
}
T = sum32_3(this.h[1], C, Dh);
this.h[1] = sum32_3(this.h[2], D, Eh);
this.h[2] = sum32_3(this.h[3], E, Ah);
this.h[3] = sum32_3(this.h[4], A, Bh);
this.h[4] = sum32_3(this.h[0], B, Ch);
this.h[0] = T;
};
RIPEMD160.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'little');
else
return utils.split32(this.h, 'little');
};
function f(j, x, y, z) {
if (j <= 15)
return x ^ y ^ z;
else if (j <= 31)
return (x & y) | ((~x) & z);
else if (j <= 47)
return (x | (~y)) ^ z;
else if (j <= 63)
return (x & z) | (y & (~z));
else
return x ^ (y | (~z));
}
function K(j) {
if (j <= 15)
return 0x00000000;
else if (j <= 31)
return 0x5a827999;
else if (j <= 47)
return 0x6ed9eba1;
else if (j <= 63)
return 0x8f1bbcdc;
else
return 0xa953fd4e;
}
function Kh(j) {
if (j <= 15)
return 0x50a28be6;
else if (j <= 31)
return 0x5c4dd124;
else if (j <= 47)
return 0x6d703ef3;
else if (j <= 63)
return 0x7a6d76e9;
else
return 0x00000000;
}
var r = [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
];
var rh = [
5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
];
var s = [
11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
];
var sh = [
8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
];
/***/ }),
/***/ "u6S6":
/*!******************************************!*\
!*** ./node_modules/lodash/camelCase.js ***!
\******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var capitalize = __webpack_require__(/*! ./capitalize */ "6acW"),
createCompounder = __webpack_require__(/*! ./_createCompounder */ "sgoq");
/**
* Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).
*
* @static
* @memberOf _
* @since 3.0.0
* @category String
* @param {string} [string=''] The string to convert.
* @returns {string} Returns the camel cased string.
* @example
*
* _.camelCase('Foo Bar');
* // => 'fooBar'
*
* _.camelCase('--foo-bar--');
* // => 'fooBar'
*
* _.camelCase('__FOO_BAR__');
* // => 'fooBar'
*/
var camelCase = createCompounder(function(result, word, index) {
word = word.toLowerCase();
return result + (index ? capitalize(word) : word);
});
module.exports = camelCase;
/***/ }),
/***/ "u6e6":
/*!*********************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js ***!
\*********************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _nonIterableRest; });
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
/***/ }),
/***/ "uRV1":
/*!***********************************************************!*\
!*** ./src/.umi-production/plugin-dva/dva.ts + 1 modules ***!
\***********************************************************/
/*! exports provided: _onCreate, getApp, _DvaContainer */
/*! exports used: _DvaContainer, getApp */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./node_modules/@ant-design/icons/es/utils.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./src/components/modal.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./src/.umi-production/core/umiExports.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/account/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/announcement.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/attachment.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/boards.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/exercise.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/graduation.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/homeworks.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/new.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/polls.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/teacher.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/classrooms/video.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/competitions/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/engineering/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/forums/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/forums/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/globalSetting.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/homePage.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/messages/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paperlibrary/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paths/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paths/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/paths/new.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/problemset/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/problemset/preview.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/resetFul/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/new.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/shixuns/practiceSetting.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/user/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/user/index.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./src/models/video/detail.ts because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/dva/dist/index.esm.js because of ./src/pages/Competitions/Detail/SubmitResult.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js because of ./src/.umi-production/umi.ts */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "b", function() { return /* binding */ getApp; });
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ dva_DvaContainer; });
// UNUSED EXPORTS: _onCreate
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/classCallCheck.js
var classCallCheck = __webpack_require__("fWQN");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/createClass.js
var createClass = __webpack_require__("mtLc");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js + 2 modules
var possibleConstructorReturn = __webpack_require__("Nsem");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js
var isNativeReflectConstruct = __webpack_require__("cHpt");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js
var getPrototypeOf = __webpack_require__("oZsa");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules
var inherits = __webpack_require__("yKVA");
// EXTERNAL MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var objectSpread2 = __webpack_require__("k1fw");
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/umi/node_modules/@umijs/runtime/dist/index.esm.js
var index_esm = __webpack_require__("rlch");
// EXTERNAL MODULE: ./node_modules/dva/dist/index.esm.js + 28 modules
var dist_index_esm = __webpack_require__("Hg0r");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js
var regenerator = __webpack_require__("o0o1");
var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js
var defineProperty = __webpack_require__("rePB");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js
var esm_objectSpread2 = __webpack_require__("VTBJ");
// CONCATENATED MODULE: ./node_modules/dva-loading/dist/index.esm.js
var SHOW = '@@DVA_LOADING/SHOW';
var HIDE = '@@DVA_LOADING/HIDE';
var NAMESPACE = 'loading';
function createLoading() {
var opts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var namespace = opts.namespace || NAMESPACE;
var _opts$only = opts.only,
only = _opts$only === void 0 ? [] : _opts$only,
_opts$except = opts.except,
except = _opts$except === void 0 ? [] : _opts$except;
if (only.length > 0 && except.length > 0) {
throw Error('It is ambiguous to configurate `only` and `except` items at the same time.');
}
var initialState = {
global: false,
models: {},
effects: {}
};
var extraReducers = Object(defineProperty["a" /* default */])({}, namespace, function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
var _ref = arguments.length > 1 ? arguments[1] : undefined,
type = _ref.type,
payload = _ref.payload;
var _ref2 = payload || {},
namespace = _ref2.namespace,
actionType = _ref2.actionType;
var ret;
switch (type) {
case SHOW:
ret = Object(esm_objectSpread2["a" /* default */])(Object(esm_objectSpread2["a" /* default */])({}, state), {}, {
global: true,
models: Object(esm_objectSpread2["a" /* default */])(Object(esm_objectSpread2["a" /* default */])({}, state.models), {}, Object(defineProperty["a" /* default */])({}, namespace, true)),
effects: Object(esm_objectSpread2["a" /* default */])(Object(esm_objectSpread2["a" /* default */])({}, state.effects), {}, Object(defineProperty["a" /* default */])({}, actionType, true))
});
break;
case HIDE:
{
var effects = Object(esm_objectSpread2["a" /* default */])(Object(esm_objectSpread2["a" /* default */])({}, state.effects), {}, Object(defineProperty["a" /* default */])({}, actionType, false));
var models = Object(esm_objectSpread2["a" /* default */])(Object(esm_objectSpread2["a" /* default */])({}, state.models), {}, Object(defineProperty["a" /* default */])({}, namespace, Object.keys(effects).some(function (actionType) {
var _namespace = actionType.split('/')[0];
if (_namespace !== namespace) return false;
return effects[actionType];
})));
var global = Object.keys(models).some(function (namespace) {
return models[namespace];
});
ret = Object(esm_objectSpread2["a" /* default */])(Object(esm_objectSpread2["a" /* default */])({}, state), {}, {
global: global,
models: models,
effects: effects
});
break;
}
default:
ret = state;
break;
}
return ret;
});
function onEffect(effect, _ref3, model, actionType) {
var put = _ref3.put;
var namespace = model.namespace;
if (only.length === 0 && except.length === 0 || only.length > 0 && only.indexOf(actionType) !== -1 || except.length > 0 && except.indexOf(actionType) === -1) {
return /*#__PURE__*/regenerator_default.a.mark(function _callee() {
var _args = arguments;
return regenerator_default.a.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return put({
type: SHOW,
payload: {
namespace: namespace,
actionType: actionType
}
});
case 2:
_context.next = 4;
return effect.apply(void 0, _args);
case 4:
_context.next = 6;
return put({
type: HIDE,
payload: {
namespace: namespace,
actionType: actionType
}
});
case 6:
case "end":
return _context.stop();
}
}
}, _callee);
});
} else {
return effect;
}
}
return {
extraReducers: extraReducers,
onEffect: onEffect
};
}
/* harmony default export */ var dva_loading_dist_index_esm = (createLoading);
// EXTERNAL MODULE: ./src/.umi-production/core/umiExports.ts + 19 modules
var umiExports = __webpack_require__("9kvl");
// EXTERNAL MODULE: ./src/models/account/index.ts + 1 modules
var account = __webpack_require__("OSZE");
// EXTERNAL MODULE: ./src/models/classrooms/announcement.ts + 1 modules
var announcement = __webpack_require__("6YAi");
// EXTERNAL MODULE: ./src/models/classrooms/attachment.ts + 1 modules
var attachment = __webpack_require__("0BeC");
// EXTERNAL MODULE: ./src/models/classrooms/boards.ts + 1 modules
var boards = __webpack_require__("FzKp");
// EXTERNAL MODULE: ./src/models/classrooms/exercise.ts
var exercise = __webpack_require__("qS6X");
// EXTERNAL MODULE: ./src/models/classrooms/graduation.ts + 1 modules
var graduation = __webpack_require__("02UQ");
// EXTERNAL MODULE: ./src/models/classrooms/homeworks.ts + 1 modules
var homeworks = __webpack_require__("tzui");
// EXTERNAL MODULE: ./src/models/classrooms/index.ts
var classrooms = __webpack_require__("5mCs");
// EXTERNAL MODULE: ./src/models/classrooms/new.ts
var classrooms_new = __webpack_require__("wCfY");
// EXTERNAL MODULE: ./src/models/classrooms/polls.ts + 1 modules
var polls = __webpack_require__("Cb9Y");
// EXTERNAL MODULE: ./src/models/classrooms/teacher.ts + 1 modules
var teacher = __webpack_require__("N9QN");
// EXTERNAL MODULE: ./src/models/classrooms/video.ts
var video = __webpack_require__("ggIM");
// EXTERNAL MODULE: ./src/models/competitions/index.ts
var competitions = __webpack_require__("3blH");
// EXTERNAL MODULE: ./src/models/engineering/index.ts
var engineering = __webpack_require__("amTc");
// EXTERNAL MODULE: ./src/models/forums/detail.ts
var detail = __webpack_require__("5FVT");
// EXTERNAL MODULE: ./src/models/forums/index.ts
var forums = __webpack_require__("Xq8t");
// EXTERNAL MODULE: ./src/models/globalSetting.ts + 1 modules
var globalSetting = __webpack_require__("7VZV");
// EXTERNAL MODULE: ./src/models/homePage.ts
var homePage = __webpack_require__("b6mv");
// EXTERNAL MODULE: ./src/models/messages/index.ts + 1 modules
var messages = __webpack_require__("9hUv");
// EXTERNAL MODULE: ./src/models/paperlibrary/index.ts + 2 modules
var paperlibrary = __webpack_require__("WRKT");
// EXTERNAL MODULE: ./src/models/paths/detail.ts
var paths_detail = __webpack_require__("noRp");
// EXTERNAL MODULE: ./src/models/paths/index.ts
var paths = __webpack_require__("TPcJ");
// EXTERNAL MODULE: ./src/models/paths/new.ts
var paths_new = __webpack_require__("en47");
// EXTERNAL MODULE: ./src/models/problemset/index.ts
var problemset = __webpack_require__("zU+Z");
// EXTERNAL MODULE: ./src/models/problemset/preview.ts
var preview = __webpack_require__("Zkxe");
// EXTERNAL MODULE: ./src/models/resetFul/index.ts + 1 modules
var resetFul = __webpack_require__("To2U");
// EXTERNAL MODULE: ./src/models/shixuns/detail.ts + 1 modules
var shixuns_detail = __webpack_require__("q0dX");
// EXTERNAL MODULE: ./src/models/shixuns/index.ts
var shixuns = __webpack_require__("piWV");
// EXTERNAL MODULE: ./src/models/shixuns/new.ts
var shixuns_new = __webpack_require__("aZPP");
// EXTERNAL MODULE: ./src/models/shixuns/practiceSetting.ts + 1 modules
var practiceSetting = __webpack_require__("1cmj");
// EXTERNAL MODULE: ./src/models/user/detail.ts
var user_detail = __webpack_require__("XuYy");
// EXTERNAL MODULE: ./src/models/user/index.ts
var user = __webpack_require__("G+G9");
// EXTERNAL MODULE: ./src/models/video/detail.ts + 1 modules
var video_detail = __webpack_require__("iUp/");
// CONCATENATED MODULE: ./src/.umi-production/plugin-dva/dva.ts
function _callSuper(t, o, e) { return o = Object(getPrototypeOf["a" /* default */])(o), Object(possibleConstructorReturn["a" /* default */])(t, Object(isNativeReflectConstruct["a" /* default */])() ? Reflect.construct(o, e || [], Object(getPrototypeOf["a" /* default */])(t).constructor) : o.apply(t, e)); }
// @ts-nocheck
// @ts-ignore
var app = null;
function _onCreate() {
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var runtimeDva = umiExports["d" /* plugin */].applyPlugins({
key: 'dva',
type: index_esm["a" /* ApplyPluginsType */].modify,
initialValue: {}
});
app = Object(dist_index_esm["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])(Object(objectSpread2["a" /* default */])({
history: umiExports["c" /* history */]
}, runtimeDva.config || {}), typeof window !== 'undefined' && window.g_useSSR ? {
initialState: window.g_initialProps
} : {}), options || {}));
app.use(dva_loading_dist_index_esm());
app.use(__webpack_require__(/*! ./node_modules/dva-immer/dist/index.js */ "Quko")());
(runtimeDva.plugins || []).forEach(function (plugin) {
app.use(plugin);
});
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, account["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'announcement'
}, announcement["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'attachment'
}, attachment["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'boards'
}, boards["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'exercise'
}, exercise["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'graduation'
}, graduation["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'homeworks'
}, homeworks["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, classrooms["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'new'
}, classrooms_new["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'polls'
}, polls["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'teacher'
}, teacher["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'video'
}, video["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, competitions["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, engineering["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'detail'
}, detail["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, forums["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'globalSetting'
}, globalSetting["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'homePage'
}, homePage["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, messages["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, paperlibrary["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'detail'
}, paths_detail["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, paths["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'new'
}, paths_new["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, problemset["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'preview'
}, preview["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, resetFul["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'detail'
}, shixuns_detail["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, shixuns["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'new'
}, shixuns_new["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'practiceSetting'
}, practiceSetting["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'detail'
}, user_detail["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'index'
}, user["a" /* default */]));
app.model(Object(objectSpread2["a" /* default */])({
namespace: 'detail'
}, video_detail["a" /* default */]));
return app;
}
function getApp() {
return app;
}
var dva_DvaContainer = /*#__PURE__*/function (_Component) {
function _DvaContainer(props) {
var _this;
Object(classCallCheck["a" /* default */])(this, _DvaContainer);
_this = _callSuper(this, _DvaContainer, [props]);
// run only in client, avoid override server _onCreate()
if (typeof window !== 'undefined') {
_onCreate();
}
return _this;
}
Object(inherits["a" /* default */])(_DvaContainer, _Component);
return Object(createClass["a" /* default */])(_DvaContainer, [{
key: "componentWillUnmount",
value: function componentWillUnmount() {
var app = getApp();
app._models.forEach(function (model) {
app.unmodel(model.namespace);
});
app._models = [];
try {
// 释放 appfor gc
// immer 场景 app 是 read-only 的,这里 try catch 一下
app = null;
} catch (e) {
console.error(e);
}
}
}, {
key: "render",
value: function render() {
var _this2 = this;
var app = getApp();
app.router(function () {
return _this2.props.children;
});
return app.start()();
}
}]);
}(react["Component"]);
/***/ }),
/***/ "uWhJ":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.radians.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DEG_PER_RAD = Math.PI / 180;
// `Math.radians` method
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true }, {
radians: function radians(degrees) {
return degrees * DEG_PER_RAD;
}
});
/***/ }),
/***/ "uaoM":
/*!**************************************************!*\
!*** ./node_modules/antd/es/_util/devWarning.js ***!
\**************************************************/
/*! exports provided: resetWarned, default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var rc_util_es_warning__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/warning */ "Kwbf");
/* harmony default export */ __webpack_exports__["a"] = (function (valid, component, message) {
Object(rc_util_es_warning__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(valid, "[antd: ".concat(component, "] ").concat(message));
});
/***/ }),
/***/ "ub+h":
/*!**********************************************!*\
!*** ./node_modules/rc-util/es/utils/get.js ***!
\**********************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return get; });
function get(entity, path) {
var current = entity;
for (var i = 0; i < path.length; i += 1) {
if (current === null || current === undefined) {
return undefined;
}
current = current[path[i]];
}
return current;
}
/***/ }),
/***/ "ul5b":
/*!**********************************************!*\
!*** ./node_modules/antd/es/modal/locale.js ***!
\**********************************************/
/*! exports provided: changeConfirmLocale, getConfirmLocale */
/*! exports used: changeConfirmLocale, getConfirmLocale */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return changeConfirmLocale; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getConfirmLocale; });
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "pVnL");
/* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _locale_default__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../locale/default */ "ZvpZ");
var runtimeLocale = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, _locale_default__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].Modal);
function changeConfirmLocale(newLocale) {
if (newLocale) {
runtimeLocale = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()(_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, runtimeLocale), newLocale);
} else {
runtimeLocale = _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0___default()({}, _locale_default__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"].Modal);
}
}
function getConfirmLocale() {
return runtimeLocale;
}
/***/ }),
/***/ "unQa":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.key-by.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var aFunction = __webpack_require__(/*! ../internals/a-function */ "HAuM");
// `Map.keyBy` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', stat: true }, {
keyBy: function keyBy(iterable, keyDerivative) {
var newMap = new this();
aFunction(keyDerivative);
var setter = aFunction(newMap.set);
iterate(iterable, function (element) {
setter.call(newMap, keyDerivative(element), element);
});
return newMap;
}
});
/***/ }),
/***/ "uy83":
/*!****************************************************!*\
!*** ./node_modules/core-js/internals/freezing.js ***!
\****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
module.exports = !fails(function () {
return Object.isExtensible(Object.preventExtensions({}));
});
/***/ }),
/***/ "v5b1":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.lookup-getter.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "g6v/");
var FORCED = __webpack_require__(/*! ../internals/object-prototype-accessors-forced */ "6x0u");
var toObject = __webpack_require__(/*! ../internals/to-object */ "ewvW");
var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "wE6v");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "Bs8V").f;
// `Object.prototype.__lookupGetter__` method
// https://tc39.github.io/ecma262/#sec-object.prototype.__lookupGetter__
if (DESCRIPTORS) {
$({ target: 'Object', proto: true, forced: FORCED }, {
__lookupGetter__: function __lookupGetter__(P) {
var O = toObject(this);
var key = toPrimitive(P, true);
var desc;
do {
if (desc = getOwnPropertyDescriptor(O, key)) return desc.get;
} while (O = getPrototypeOf(O));
}
});
}
/***/ }),
/***/ "vAFs":
/*!******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.imul.js ***!
\******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var nativeImul = Math.imul;
var FORCED = fails(function () {
return nativeImul(0xFFFFFFFF, 5) != -5 || nativeImul.length != 2;
});
// `Math.imul` method
// https://tc39.github.io/ecma262/#sec-math.imul
// some WebKit versions fails with big numbers, some has wrong arity
$({ target: 'Math', stat: true, forced: FORCED }, {
imul: function imul(x, y) {
var UINT16 = 0xFFFF;
var xn = +x;
var yn = +y;
var xl = UINT16 & xn;
var yl = UINT16 & yn;
return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0);
}
});
/***/ }),
/***/ "vRGJ":
/*!**********************************************!*\
!*** ./node_modules/path-to-regexp/index.js ***!
\**********************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isarray = __webpack_require__(/*! isarray */ "AqCL")
/**
* Expose `pathToRegexp`.
*/
module.exports = pathToRegexp
module.exports.parse = parse
module.exports.compile = compile
module.exports.tokensToFunction = tokensToFunction
module.exports.tokensToRegExp = tokensToRegExp
/**
* The main path matching regexp utility.
*
* @type {RegExp}
*/
var PATH_REGEXP = new RegExp([
// Match escaped characters that would otherwise appear in future matches.
// This allows the user to escape special characters that won't transform.
'(\\\\.)',
// Match Express-style parameters and un-named parameters with a prefix
// and optional suffixes. Matches appear as:
//
// "/:test(\\d+)?" => ["/", "test", "\d+", undefined, "?", undefined]
// "/route(\\d+)" => [undefined, undefined, undefined, "\d+", undefined, undefined]
// "/*" => ["/", undefined, undefined, undefined, undefined, "*"]
'([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))'
].join('|'), 'g')
/**
* Parse a string for the raw tokens.
*
* @param {string} str
* @param {Object=} options
* @return {!Array}
*/
function parse (str, options) {
var tokens = []
var key = 0
var index = 0
var path = ''
var defaultDelimiter = options && options.delimiter || '/'
var res
while ((res = PATH_REGEXP.exec(str)) != null) {
var m = res[0]
var escaped = res[1]
var offset = res.index
path += str.slice(index, offset)
index = offset + m.length
// Ignore already escaped sequences.
if (escaped) {
path += escaped[1]
continue
}
var next = str[index]
var prefix = res[2]
var name = res[3]
var capture = res[4]
var group = res[5]
var modifier = res[6]
var asterisk = res[7]
// Push the current path onto the tokens.
if (path) {
tokens.push(path)
path = ''
}
var partial = prefix != null && next != null && next !== prefix
var repeat = modifier === '+' || modifier === '*'
var optional = modifier === '?' || modifier === '*'
var delimiter = res[2] || defaultDelimiter
var pattern = capture || group
tokens.push({
name: name || key++,
prefix: prefix || '',
delimiter: delimiter,
optional: optional,
repeat: repeat,
partial: partial,
asterisk: !!asterisk,
pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : '[^' + escapeString(delimiter) + ']+?')
})
}
// Match any characters still remaining.
if (index < str.length) {
path += str.substr(index)
}
// If the path exists, push it onto the end.
if (path) {
tokens.push(path)
}
return tokens
}
/**
* Compile a string to a template function for the path.
*
* @param {string} str
* @param {Object=} options
* @return {!function(Object=, Object=)}
*/
function compile (str, options) {
return tokensToFunction(parse(str, options), options)
}
/**
* Prettier encoding of URI path segments.
*
* @param {string}
* @return {string}
*/
function encodeURIComponentPretty (str) {
return encodeURI(str).replace(/[\/?#]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
})
}
/**
* Encode the asterisk parameter. Similar to `pretty`, but allows slashes.
*
* @param {string}
* @return {string}
*/
function encodeAsterisk (str) {
return encodeURI(str).replace(/[?#]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase()
})
}
/**
* Expose a method for transforming tokens into the path function.
*/
function tokensToFunction (tokens, options) {
// Compile all the tokens into regexps.
var matches = new Array(tokens.length)
// Compile all the patterns before compilation.
for (var i = 0; i < tokens.length; i++) {
if (typeof tokens[i] === 'object') {
matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))
}
}
return function (obj, opts) {
var path = ''
var data = obj || {}
var options = opts || {}
var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i]
if (typeof token === 'string') {
path += token
continue
}
var value = data[token.name]
var segment
if (value == null) {
if (token.optional) {
// Prepend partial segment prefixes.
if (token.partial) {
path += token.prefix
}
continue
} else {
throw new TypeError('Expected "' + token.name + '" to be defined')
}
}
if (isarray(value)) {
if (!token.repeat) {
throw new TypeError('Expected "' + token.name + '" to not repeat, but received `' + JSON.stringify(value) + '`')
}
if (value.length === 0) {
if (token.optional) {
continue
} else {
throw new TypeError('Expected "' + token.name + '" to not be empty')
}
}
for (var j = 0; j < value.length; j++) {
segment = encode(value[j])
if (!matches[i].test(segment)) {
throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but received `' + JSON.stringify(segment) + '`')
}
path += (j === 0 ? token.prefix : token.delimiter) + segment
}
continue
}
segment = token.asterisk ? encodeAsterisk(value) : encode(value)
if (!matches[i].test(segment)) {
throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but received "' + segment + '"')
}
path += token.prefix + segment
}
return path
}
}
/**
* Escape a regular expression string.
*
* @param {string} str
* @return {string}
*/
function escapeString (str) {
return str.replace(/([.+*?=^!:${}()[\]|\/\\])/g, '\\$1')
}
/**
* Escape the capturing group by escaping special characters and meaning.
*
* @param {string} group
* @return {string}
*/
function escapeGroup (group) {
return group.replace(/([=!:$\/()])/g, '\\$1')
}
/**
* Attach the keys as a property of the regexp.
*
* @param {!RegExp} re
* @param {Array} keys
* @return {!RegExp}
*/
function attachKeys (re, keys) {
re.keys = keys
return re
}
/**
* Get the flags for a regexp from the options.
*
* @param {Object} options
* @return {string}
*/
function flags (options) {
return options && options.sensitive ? '' : 'i'
}
/**
* Pull out keys from a regexp.
*
* @param {!RegExp} path
* @param {!Array} keys
* @return {!RegExp}
*/
function regexpToRegexp (path, keys) {
// Use a negative lookahead to match only capturing groups.
var groups = path.source.match(/\((?!\?)/g)
if (groups) {
for (var i = 0; i < groups.length; i++) {
keys.push({
name: i,
prefix: null,
delimiter: null,
optional: false,
repeat: false,
partial: false,
asterisk: false,
pattern: null
})
}
}
return attachKeys(path, keys)
}
/**
* Transform an array into a regexp.
*
* @param {!Array} path
* @param {Array} keys
* @param {!Object} options
* @return {!RegExp}
*/
function arrayToRegexp (path, keys, options) {
var parts = []
for (var i = 0; i < path.length; i++) {
parts.push(pathToRegexp(path[i], keys, options).source)
}
var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))
return attachKeys(regexp, keys)
}
/**
* Create a path regexp from string input.
*
* @param {string} path
* @param {!Array} keys
* @param {!Object} options
* @return {!RegExp}
*/
function stringToRegexp (path, keys, options) {
return tokensToRegExp(parse(path, options), keys, options)
}
/**
* Expose a function for taking tokens and returning a RegExp.
*
* @param {!Array} tokens
* @param {(Array|Object)=} keys
* @param {Object=} options
* @return {!RegExp}
*/
function tokensToRegExp (tokens, keys, options) {
if (!isarray(keys)) {
options = /** @type {!Object} */ (keys || options)
keys = []
}
options = options || {}
var strict = options.strict
var end = options.end !== false
var route = ''
// Iterate over the tokens and create our regexp string.
for (var i = 0; i < tokens.length; i++) {
var token = tokens[i]
if (typeof token === 'string') {
route += escapeString(token)
} else {
var prefix = escapeString(token.prefix)
var capture = '(?:' + token.pattern + ')'
keys.push(token)
if (token.repeat) {
capture += '(?:' + prefix + capture + ')*'
}
if (token.optional) {
if (!token.partial) {
capture = '(?:' + prefix + '(' + capture + '))?'
} else {
capture = prefix + '(' + capture + ')?'
}
} else {
capture = prefix + '(' + capture + ')'
}
route += capture
}
}
var delimiter = escapeString(options.delimiter || '/')
var endsWithDelimiter = route.slice(-delimiter.length) === delimiter
// In non-strict mode we allow a slash at the end of match. If the path to
// match already ends with a slash, we remove it for consistency. The slash
// is valid at the end of a path match, not in the middle. This is important
// in non-ending mode, where "/test/" shouldn't match "/test//route".
if (!strict) {
route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'
}
if (end) {
route += '$'
} else {
// In non-ending mode, we need the capturing groups to match as much as
// possible by using a positive lookahead to the end or next path segment.
route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'
}
return attachKeys(new RegExp('^' + route, flags(options)), keys)
}
/**
* Normalize the given path string, returning a regular expression.
*
* An empty array can be passed in for the keys, which will hold the
* placeholder key descriptions. For example, using `/user/:id`, `keys` will
* contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.
*
* @param {(string|RegExp|Array)} path
* @param {(Array|Object)=} keys
* @param {Object=} options
* @return {!RegExp}
*/
function pathToRegexp (path, keys, options) {
if (!isarray(keys)) {
options = /** @type {!Object} */ (keys || options)
keys = []
}
options = options || {}
if (path instanceof RegExp) {
return regexpToRegexp(path, /** @type {!Array} */ (keys))
}
if (isarray(path)) {
return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)
}
return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)
}
/***/ }),
/***/ "vZi8":
/*!**************************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.reflect.get-metadata-keys.js ***!
\**************************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
var Set = __webpack_require__(/*! ../modules/es.set */ "YGK4");
var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "eDxR");
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "4WOD");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var ordinaryOwnMetadataKeys = ReflectMetadataModule.keys;
var toMetadataKey = ReflectMetadataModule.toKey;
var from = function (iter) {
var result = [];
iterate(iter, result.push, result);
return result;
};
var ordinaryMetadataKeys = function (O, P) {
var oKeys = ordinaryOwnMetadataKeys(O, P);
var parent = getPrototypeOf(O);
if (parent === null) return oKeys;
var pKeys = ordinaryMetadataKeys(parent, P);
return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys;
};
// `Reflect.getMetadataKeys` method
// https://github.com/rbuckton/reflect-metadata
$({ target: 'Reflect', stat: true }, {
getMetadataKeys: function getMetadataKeys(target /* , targetKey */) {
var targetKey = arguments.length < 2 ? undefined : toMetadataKey(arguments[1]);
return ordinaryMetadataKeys(anObject(target), targetKey);
}
});
/***/ }),
/***/ "vdRX":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.deg-per-rad.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Math.DEG_PER_RAD` constant
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true }, {
DEG_PER_RAD: Math.PI / 180
});
/***/ }),
/***/ "vgmO":
/*!***************************************!*\
!*** ./node_modules/global/window.js ***!
\***************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var win;
if (typeof window !== "undefined") {
win = window;
} else if (typeof global !== "undefined") {
win = global;
} else if (typeof self !== "undefined"){
win = self;
} else {
win = {};
}
module.exports = win;
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "viRO":
/*!********************************************************!*\
!*** ./node_modules/react/cjs/react.production.min.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v16.12.0
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var h=__webpack_require__(/*! object-assign */ "MgzW"),n="function"===typeof Symbol&&Symbol.for,p=n?Symbol.for("react.element"):60103,q=n?Symbol.for("react.portal"):60106,r=n?Symbol.for("react.fragment"):60107,t=n?Symbol.for("react.strict_mode"):60108,u=n?Symbol.for("react.profiler"):60114,v=n?Symbol.for("react.provider"):60109,w=n?Symbol.for("react.context"):60110,x=n?Symbol.for("react.forward_ref"):60112,y=n?Symbol.for("react.suspense"):60113;n&&Symbol.for("react.suspense_list");
var z=n?Symbol.for("react.memo"):60115,aa=n?Symbol.for("react.lazy"):60116;n&&Symbol.for("react.fundamental");n&&Symbol.for("react.responder");n&&Symbol.for("react.scope");var A="function"===typeof Symbol&&Symbol.iterator;
function B(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},D={};
function E(a,b,c){this.props=a;this.context=b;this.refs=D;this.updater=c||C}E.prototype.isReactComponent={};E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error(B(85));this.updater.enqueueSetState(this,a,b,"setState")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate")};function F(){}F.prototype=E.prototype;function G(a,b,c){this.props=a;this.context=b;this.refs=D;this.updater=c||C}var H=G.prototype=new F;
H.constructor=G;h(H,E.prototype);H.isPureReactComponent=!0;var I={current:null},J={current:null},K=Object.prototype.hasOwnProperty,L={key:!0,ref:!0,__self:!0,__source:!0};
function M(a,b,c){var e,d={},g=null,l=null;if(null!=b)for(e in void 0!==b.ref&&(l=b.ref),void 0!==b.key&&(g=""+b.key),b)K.call(b,e)&&!L.hasOwnProperty(e)&&(d[e]=b[e]);var f=arguments.length-2;if(1===f)d.children=c;else if(1<f){for(var k=Array(f),m=0;m<f;m++)k[m]=arguments[m+2];d.children=k}if(a&&a.defaultProps)for(e in f=a.defaultProps,f)void 0===d[e]&&(d[e]=f[e]);return{$$typeof:p,type:a,key:g,ref:l,props:d,_owner:J.current}}
function ba(a,b){return{$$typeof:p,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function N(a){return"object"===typeof a&&null!==a&&a.$$typeof===p}function escape(a){var b={"=":"=0",":":"=2"};return"$"+(""+a).replace(/[=:]/g,function(a){return b[a]})}var O=/\/+/g,P=[];function Q(a,b,c,e){if(P.length){var d=P.pop();d.result=a;d.keyPrefix=b;d.func=c;d.context=e;d.count=0;return d}return{result:a,keyPrefix:b,func:c,context:e,count:0}}
function R(a){a.result=null;a.keyPrefix=null;a.func=null;a.context=null;a.count=0;10>P.length&&P.push(a)}
function S(a,b,c,e){var d=typeof a;if("undefined"===d||"boolean"===d)a=null;var g=!1;if(null===a)g=!0;else switch(d){case "string":case "number":g=!0;break;case "object":switch(a.$$typeof){case p:case q:g=!0}}if(g)return c(e,a,""===b?"."+T(a,0):b),1;g=0;b=""===b?".":b+":";if(Array.isArray(a))for(var l=0;l<a.length;l++){d=a[l];var f=b+T(d,l);g+=S(d,f,c,e)}else if(null===a||"object"!==typeof a?f=null:(f=A&&a[A]||a["@@iterator"],f="function"===typeof f?f:null),"function"===typeof f)for(a=f.call(a),l=
0;!(d=a.next()).done;)d=d.value,f=b+T(d,l++),g+=S(d,f,c,e);else if("object"===d)throw c=""+a,Error(B(31,"[object Object]"===c?"object with keys {"+Object.keys(a).join(", ")+"}":c,""));return g}function U(a,b,c){return null==a?0:S(a,"",b,c)}function T(a,b){return"object"===typeof a&&null!==a&&null!=a.key?escape(a.key):b.toString(36)}function ca(a,b){a.func.call(a.context,b,a.count++)}
function da(a,b,c){var e=a.result,d=a.keyPrefix;a=a.func.call(a.context,b,a.count++);Array.isArray(a)?V(a,e,c,function(a){return a}):null!=a&&(N(a)&&(a=ba(a,d+(!a.key||b&&b.key===a.key?"":(""+a.key).replace(O,"$&/")+"/")+c)),e.push(a))}function V(a,b,c,e,d){var g="";null!=c&&(g=(""+c).replace(O,"$&/")+"/");b=Q(b,g,e,d);U(a,da,b);R(b)}function W(){var a=I.current;if(null===a)throw Error(B(321));return a}
var X={Children:{map:function(a,b,c){if(null==a)return a;var e=[];V(a,e,null,b,c);return e},forEach:function(a,b,c){if(null==a)return a;b=Q(null,null,b,c);U(a,ca,b);R(b)},count:function(a){return U(a,function(){return null},null)},toArray:function(a){var b=[];V(a,b,null,function(a){return a});return b},only:function(a){if(!N(a))throw Error(B(143));return a}},createRef:function(){return{current:null}},Component:E,PureComponent:G,createContext:function(a,b){void 0===b&&(b=null);a={$$typeof:w,_calculateChangedBits:b,
_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null};a.Provider={$$typeof:v,_context:a};return a.Consumer=a},forwardRef:function(a){return{$$typeof:x,render:a}},lazy:function(a){return{$$typeof:aa,_ctor:a,_status:-1,_result:null}},memo:function(a,b){return{$$typeof:z,type:a,compare:void 0===b?null:b}},useCallback:function(a,b){return W().useCallback(a,b)},useContext:function(a,b){return W().useContext(a,b)},useEffect:function(a,b){return W().useEffect(a,b)},useImperativeHandle:function(a,
b,c){return W().useImperativeHandle(a,b,c)},useDebugValue:function(){},useLayoutEffect:function(a,b){return W().useLayoutEffect(a,b)},useMemo:function(a,b){return W().useMemo(a,b)},useReducer:function(a,b,c){return W().useReducer(a,b,c)},useRef:function(a){return W().useRef(a)},useState:function(a){return W().useState(a)},Fragment:r,Profiler:u,StrictMode:t,Suspense:y,createElement:M,cloneElement:function(a,b,c){if(null===a||void 0===a)throw Error(B(267,a));var e=h({},a.props),d=a.key,g=a.ref,l=a._owner;
if(null!=b){void 0!==b.ref&&(g=b.ref,l=J.current);void 0!==b.key&&(d=""+b.key);if(a.type&&a.type.defaultProps)var f=a.type.defaultProps;for(k in b)K.call(b,k)&&!L.hasOwnProperty(k)&&(e[k]=void 0===b[k]&&void 0!==f?f[k]:b[k])}var k=arguments.length-2;if(1===k)e.children=c;else if(1<k){f=Array(k);for(var m=0;m<k;m++)f[m]=arguments[m+2];e.children=f}return{$$typeof:p,type:a.type,key:d,ref:g,props:e,_owner:l}},createFactory:function(a){var b=M.bind(null,a);b.type=a;return b},isValidElement:N,version:"16.12.0",
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:I,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:J,IsSomeRendererActing:{current:!1},assign:h}},Y={default:X},Z=Y&&X||Y;module.exports=Z.default||Z;
/***/ }),
/***/ "vmBS":
/*!*****************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/utils.js ***!
\*****************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof3 = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.generate = generate;
exports.getSecondaryColor = getSecondaryColor;
exports.iconStyles = void 0;
exports.isIconDefinition = isIconDefinition;
exports.normalizeAttrs = normalizeAttrs;
exports.normalizeTwoToneColors = normalizeTwoToneColors;
exports.useInsertStyles = exports.svgBaseProps = void 0;
exports.warning = warning;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var _typeof2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5"));
var _colors = __webpack_require__(/*! @ant-design/colors */ "AJpP");
var _react = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _warning = _interopRequireDefault(__webpack_require__(/*! rc-util/lib/warning */ "cOkC"));
var _dynamicCSS = __webpack_require__(/*! rc-util/lib/Dom/dynamicCSS */ "qRPo");
var _Context = _interopRequireDefault(__webpack_require__(/*! ./components/Context */ "Bgsj"));
var _camelCase = _interopRequireDefault(__webpack_require__(/*! lodash/camelCase */ "u6S6"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof3(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
function warning(valid, message) {
(0, _warning.default)(valid, "[@ant-design/icons] ".concat(message));
}
function isIconDefinition(target) {
return (0, _typeof2.default)(target) === 'object' && typeof target.name === 'string' && typeof target.theme === 'string' && ((0, _typeof2.default)(target.icon) === 'object' || typeof target.icon === 'function');
}
function normalizeAttrs() {
var attrs = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
return Object.keys(attrs).reduce(function (acc, key) {
var val = attrs[key];
switch (key) {
case 'class':
acc.className = val;
delete acc.class;
break;
default:
delete acc[key];
acc[(0, _camelCase.default)(key)] = val;
}
return acc;
}, {});
}
function generate(node, key, rootProps) {
if (!rootProps) {
return /*#__PURE__*/_react.default.createElement(node.tag, (0, _objectSpread2.default)({
key: key
}, normalizeAttrs(node.attrs)), (node.children || []).map(function (child, index) {
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
}));
}
return /*#__PURE__*/_react.default.createElement(node.tag, (0, _objectSpread2.default)((0, _objectSpread2.default)({
key: key
}, normalizeAttrs(node.attrs)), rootProps), (node.children || []).map(function (child, index) {
return generate(child, "".concat(key, "-").concat(node.tag, "-").concat(index));
}));
}
function getSecondaryColor(primaryColor) {
// choose the second color
return (0, _colors.generate)(primaryColor)[0];
}
function normalizeTwoToneColors(twoToneColor) {
if (!twoToneColor) {
return [];
}
return Array.isArray(twoToneColor) ? twoToneColor : [twoToneColor];
}
// These props make sure that the SVG behaviours like general text.
// Reference: https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
var svgBaseProps = exports.svgBaseProps = {
width: '1em',
height: '1em',
fill: 'currentColor',
'aria-hidden': 'true',
focusable: 'false'
};
var iconStyles = exports.iconStyles = "\n.anticon {\n display: inline-flex;\n alignItems: center;\n color: inherit;\n font-style: normal;\n line-height: 0;\n text-align: center;\n text-transform: none;\n vertical-align: -0.125em;\n text-rendering: optimizeLegibility;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n line-height: 1;\n}\n\n.anticon svg {\n display: inline-block;\n}\n\n.anticon::before {\n display: none;\n}\n\n.anticon .anticon-icon {\n display: block;\n}\n\n.anticon[tabindex] {\n cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n display: inline-block;\n -webkit-animation: loadingCircle 1s infinite linear;\n animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes loadingCircle {\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n";
var useInsertStyles = exports.useInsertStyles = function useInsertStyles() {
var styleStr = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : iconStyles;
var _useContext = (0, _react.useContext)(_Context.default),
csp = _useContext.csp;
(0, _react.useEffect)(function () {
(0, _dynamicCSS.updateCSS)(styleStr, '@ant-design-icons', {
prepend: true,
csp: csp
});
}, []);
};
/***/ }),
/***/ "vo4V":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/math-fround.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var sign = __webpack_require__(/*! ../internals/math-sign */ "90hW");
var abs = Math.abs;
var pow = Math.pow;
var EPSILON = pow(2, -52);
var EPSILON32 = pow(2, -23);
var MAX32 = pow(2, 127) * (2 - EPSILON32);
var MIN32 = pow(2, -126);
var roundTiesToEven = function (n) {
return n + 1 / EPSILON - 1 / EPSILON;
};
// `Math.fround` method implementation
// https://tc39.github.io/ecma262/#sec-math.fround
module.exports = Math.fround || function fround(x) {
var $abs = abs(x);
var $sign = sign(x);
var a, result;
if ($abs < MIN32) return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32;
a = (1 + EPSILON32 / EPSILON) * $abs;
result = a - (a - $abs);
// eslint-disable-next-line no-self-compare
if (result > MAX32 || result != result) return $sign * Infinity;
return $sign * result;
};
/***/ }),
/***/ "voyM":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/math-scale.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
// `Math.scale` method implementation
// https://rwaldron.github.io/proposal-math-extensions/
module.exports = Math.scale || function scale(x, inLow, inHigh, outLow, outHigh) {
if (
arguments.length === 0
/* eslint-disable no-self-compare */
|| x != x
|| inLow != inLow
|| inHigh != inHigh
|| outLow != outLow
|| outHigh != outHigh
/* eslint-enable no-self-compare */
) return NaN;
if (x === Infinity || x === -Infinity) return x;
return (x - inLow) * (outHigh - outLow) / (inHigh - inLow) + outLow;
};
/***/ }),
/***/ "vuIU":
/*!****************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/createClass.js ***!
\****************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _createClass; });
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./toPropertyKey.js */ "o46R");
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, Object(_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
/***/ }),
/***/ "vxnP":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/web.url.to-json.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `URL.prototype.toJSON` method
// https://url.spec.whatwg.org/#dom-url-tojson
$({ target: 'URL', proto: true, enumerable: true }, {
toJSON: function toJSON() {
return URL.prototype.toString.call(this);
}
});
/***/ }),
/***/ "vzwy":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.number.from-string.js ***!
\*******************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var toInteger = __webpack_require__(/*! ../internals/to-integer */ "ppGB");
var parseInt = __webpack_require__(/*! ../internals/number-parse-int */ "wg0c");
var INVALID_NUMBER_REPRESENTATION = 'Invalid number representation';
var INVALID_RADIX = 'Invalid radix';
var valid = /^[\da-z]+$/;
// `Number.fromString` method
// https://github.com/tc39/proposal-number-fromstring
$({ target: 'Number', stat: true }, {
fromString: function fromString(string, radix) {
var sign = 1;
var R, mathNum;
if (typeof string != 'string') throw TypeError(INVALID_NUMBER_REPRESENTATION);
if (!string.length) throw SyntaxError(INVALID_NUMBER_REPRESENTATION);
if (string.charAt(0) == '-') {
sign = -1;
string = string.slice(1);
if (!string.length) throw SyntaxError(INVALID_NUMBER_REPRESENTATION);
}
R = radix === undefined ? 10 : toInteger(radix);
if (R < 2 || R > 36) throw RangeError(INVALID_RADIX);
if (!valid.test(string) || (mathNum = parseInt(string, R)).toString(R) !== string) {
throw SyntaxError(INVALID_NUMBER_REPRESENTATION);
}
return sign * mathNum;
}
});
/***/ }),
/***/ "w1rZ":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/es.number.parse-float.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var parseFloat = __webpack_require__(/*! ../internals/number-parse-float */ "fhKU");
// `Number.parseFloat` method
// https://tc39.github.io/ecma262/#sec-number.parseFloat
$({ target: 'Number', stat: true, forced: Number.parseFloat != parseFloat }, {
parseFloat: parseFloat
});
/***/ }),
/***/ "w7s6":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.math.rad-per-deg.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Math.RAD_PER_DEG` constant
// https://rwaldron.github.io/proposal-math-extensions/
$({ target: 'Math', stat: true }, {
RAD_PER_DEG: 180 / Math.PI
});
/***/ }),
/***/ "w8CP":
/*!************************************************!*\
!*** ./node_modules/hash.js/lib/hash/utils.js ***!
\************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var assert = __webpack_require__(/*! minimalistic-assert */ "2j6C");
var inherits = __webpack_require__(/*! inherits */ "P7XM");
exports.inherits = inherits;
function isSurrogatePair(msg, i) {
if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {
return false;
}
if (i < 0 || i + 1 >= msg.length) {
return false;
}
return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;
}
function toArray(msg, enc) {
if (Array.isArray(msg))
return msg.slice();
if (!msg)
return [];
var res = [];
if (typeof msg === 'string') {
if (!enc) {
// Inspired by stringToUtf8ByteArray() in closure-library by Google
// https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143
// Apache License 2.0
// https://github.com/google/closure-library/blob/master/LICENSE
var p = 0;
for (var i = 0; i < msg.length; i++) {
var c = msg.charCodeAt(i);
if (c < 128) {
res[p++] = c;
} else if (c < 2048) {
res[p++] = (c >> 6) | 192;
res[p++] = (c & 63) | 128;
} else if (isSurrogatePair(msg, i)) {
c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);
res[p++] = (c >> 18) | 240;
res[p++] = ((c >> 12) & 63) | 128;
res[p++] = ((c >> 6) & 63) | 128;
res[p++] = (c & 63) | 128;
} else {
res[p++] = (c >> 12) | 224;
res[p++] = ((c >> 6) & 63) | 128;
res[p++] = (c & 63) | 128;
}
}
} else if (enc === 'hex') {
msg = msg.replace(/[^a-z0-9]+/ig, '');
if (msg.length % 2 !== 0)
msg = '0' + msg;
for (i = 0; i < msg.length; i += 2)
res.push(parseInt(msg[i] + msg[i + 1], 16));
}
} else {
for (i = 0; i < msg.length; i++)
res[i] = msg[i] | 0;
}
return res;
}
exports.toArray = toArray;
function toHex(msg) {
var res = '';
for (var i = 0; i < msg.length; i++)
res += zero2(msg[i].toString(16));
return res;
}
exports.toHex = toHex;
function htonl(w) {
var res = (w >>> 24) |
((w >>> 8) & 0xff00) |
((w << 8) & 0xff0000) |
((w & 0xff) << 24);
return res >>> 0;
}
exports.htonl = htonl;
function toHex32(msg, endian) {
var res = '';
for (var i = 0; i < msg.length; i++) {
var w = msg[i];
if (endian === 'little')
w = htonl(w);
res += zero8(w.toString(16));
}
return res;
}
exports.toHex32 = toHex32;
function zero2(word) {
if (word.length === 1)
return '0' + word;
else
return word;
}
exports.zero2 = zero2;
function zero8(word) {
if (word.length === 7)
return '0' + word;
else if (word.length === 6)
return '00' + word;
else if (word.length === 5)
return '000' + word;
else if (word.length === 4)
return '0000' + word;
else if (word.length === 3)
return '00000' + word;
else if (word.length === 2)
return '000000' + word;
else if (word.length === 1)
return '0000000' + word;
else
return word;
}
exports.zero8 = zero8;
function join32(msg, start, end, endian) {
var len = end - start;
assert(len % 4 === 0);
var res = new Array(len / 4);
for (var i = 0, k = start; i < res.length; i++, k += 4) {
var w;
if (endian === 'big')
w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];
else
w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];
res[i] = w >>> 0;
}
return res;
}
exports.join32 = join32;
function split32(msg, endian) {
var res = new Array(msg.length * 4);
for (var i = 0, k = 0; i < msg.length; i++, k += 4) {
var m = msg[i];
if (endian === 'big') {
res[k] = m >>> 24;
res[k + 1] = (m >>> 16) & 0xff;
res[k + 2] = (m >>> 8) & 0xff;
res[k + 3] = m & 0xff;
} else {
res[k + 3] = m >>> 24;
res[k + 2] = (m >>> 16) & 0xff;
res[k + 1] = (m >>> 8) & 0xff;
res[k] = m & 0xff;
}
}
return res;
}
exports.split32 = split32;
function rotr32(w, b) {
return (w >>> b) | (w << (32 - b));
}
exports.rotr32 = rotr32;
function rotl32(w, b) {
return (w << b) | (w >>> (32 - b));
}
exports.rotl32 = rotl32;
function sum32(a, b) {
return (a + b) >>> 0;
}
exports.sum32 = sum32;
function sum32_3(a, b, c) {
return (a + b + c) >>> 0;
}
exports.sum32_3 = sum32_3;
function sum32_4(a, b, c, d) {
return (a + b + c + d) >>> 0;
}
exports.sum32_4 = sum32_4;
function sum32_5(a, b, c, d, e) {
return (a + b + c + d + e) >>> 0;
}
exports.sum32_5 = sum32_5;
function sum64(buf, pos, ah, al) {
var bh = buf[pos];
var bl = buf[pos + 1];
var lo = (al + bl) >>> 0;
var hi = (lo < al ? 1 : 0) + ah + bh;
buf[pos] = hi >>> 0;
buf[pos + 1] = lo;
}
exports.sum64 = sum64;
function sum64_hi(ah, al, bh, bl) {
var lo = (al + bl) >>> 0;
var hi = (lo < al ? 1 : 0) + ah + bh;
return hi >>> 0;
}
exports.sum64_hi = sum64_hi;
function sum64_lo(ah, al, bh, bl) {
var lo = al + bl;
return lo >>> 0;
}
exports.sum64_lo = sum64_lo;
function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {
var carry = 0;
var lo = al;
lo = (lo + bl) >>> 0;
carry += lo < al ? 1 : 0;
lo = (lo + cl) >>> 0;
carry += lo < cl ? 1 : 0;
lo = (lo + dl) >>> 0;
carry += lo < dl ? 1 : 0;
var hi = ah + bh + ch + dh + carry;
return hi >>> 0;
}
exports.sum64_4_hi = sum64_4_hi;
function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {
var lo = al + bl + cl + dl;
return lo >>> 0;
}
exports.sum64_4_lo = sum64_4_lo;
function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
var carry = 0;
var lo = al;
lo = (lo + bl) >>> 0;
carry += lo < al ? 1 : 0;
lo = (lo + cl) >>> 0;
carry += lo < cl ? 1 : 0;
lo = (lo + dl) >>> 0;
carry += lo < dl ? 1 : 0;
lo = (lo + el) >>> 0;
carry += lo < el ? 1 : 0;
var hi = ah + bh + ch + dh + eh + carry;
return hi >>> 0;
}
exports.sum64_5_hi = sum64_5_hi;
function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
var lo = al + bl + cl + dl + el;
return lo >>> 0;
}
exports.sum64_5_lo = sum64_5_lo;
function rotr64_hi(ah, al, num) {
var r = (al << (32 - num)) | (ah >>> num);
return r >>> 0;
}
exports.rotr64_hi = rotr64_hi;
function rotr64_lo(ah, al, num) {
var r = (ah << (32 - num)) | (al >>> num);
return r >>> 0;
}
exports.rotr64_lo = rotr64_lo;
function shr64_hi(ah, al, num) {
return ah >>> num;
}
exports.shr64_hi = shr64_hi;
function shr64_lo(ah, al, num) {
var r = (ah << (32 - num)) | (al >>> num);
return r >>> 0;
}
exports.shr64_lo = shr64_lo;
/***/ }),
/***/ "wCfY":
/*!**************************************!*\
!*** ./src/models/classrooms/new.ts ***!
\**************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_classrooms__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/classrooms */ "oUNq");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var NewClassroomModel = {
namespace: 'newClassroom',
state: {
schoolList: [],
searchCourseList: [],
actionTabs: {
key: '',
params: {}
}
},
effects: {
getSchoolList: function getSchoolList(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_1__[/* getSchoolList */ "R"], payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
schoolList: (response === null || response === void 0 ? void 0 : response.school_names) || []
}
});
case 5:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getSearchCourseList: function getSearchCourseList(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_1__[/* getSearchCourseList */ "S"], payload);
case 2:
response = _context2.sent;
_context2.next = 5;
return put({
type: 'save',
payload: {
searchCourseList: (response === null || response === void 0 ? void 0 : response.course_lists) || []
}
});
case 5:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
submitCourses: function submitCourses(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_1__[/* submitCourses */ "Y"], payload);
case 2:
return _context3.abrupt("return", _context3.sent);
case 3:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
appplySchool: function appplySchool(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_1__[/* appplySchool */ "a"], payload);
case 2:
return _context4.abrupt("return", _context4.sent);
case 3:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
setActionTabs: function setActionTabs(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
joincoursegroup: function joincoursegroup(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_1__[/* joincoursegroup */ "W"], payload);
case 2:
return _context6.abrupt("return", _context6.sent);
case 3:
case "end":
return _context6.stop();
}
}, _callee6);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref13) {
var dispatch = _ref13.dispatch,
history = _ref13.history;
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (NewClassroomModel);
/***/ }),
/***/ "wE6v":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/to-primitive.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
// `ToPrimitive` abstract operation
// https://tc39.github.io/ecma262/#sec-toprimitive
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
// and the second argument - flag - preferred type is a string
module.exports = function (input, PREFERRED_STRING) {
if (!isObject(input)) return input;
var fn, val;
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
throw TypeError("Can't convert object to primitive value");
};
/***/ }),
/***/ "wEI+":
/*!*******************************************************************!*\
!*** ./node_modules/antd/es/config-provider/index.js + 1 modules ***!
\*******************************************************************/
/*! exports provided: ConfigContext, ConfigConsumer, configConsumerProps, default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/classCallCheck.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createClass.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createSuper.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./node_modules/antd/es/input/Input.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./node_modules/antd/es/table/Table.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/components/User/PopLoginRegister/PopLogin.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/context.js because of ./src/components/User/PopLoginRegister/PopLogin.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js because of ./src/pages/Competitions/Entered/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/locale.js because of ./src/components/User/PopLoginRegister/PopLogin.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/notification/index.js because of ./src/.umi-production/umi.ts */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-field-form/es/index.js because of ./node_modules/antd/es/form/Form.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// UNUSED EXPORTS: ConfigContext, ConfigConsumer, configConsumerProps
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/rc-field-form/es/index.js + 11 modules
var es = __webpack_require__("85Yc");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
var classCallCheck = __webpack_require__("lwsE");
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
var createClass = __webpack_require__("W8MJ");
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
var inherits = __webpack_require__("7W2i");
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createSuper.js
var createSuper = __webpack_require__("LQ03");
var createSuper_default = /*#__PURE__*/__webpack_require__.n(createSuper);
// EXTERNAL MODULE: ./node_modules/antd/es/_util/devWarning.js
var devWarning = __webpack_require__("uaoM");
// EXTERNAL MODULE: ./node_modules/antd/es/modal/locale.js
var modal_locale = __webpack_require__("ul5b");
// EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/context.js
var locale_provider_context = __webpack_require__("YlG9");
// CONCATENATED MODULE: ./node_modules/antd/es/locale-provider/index.js
var ANT_MARK = 'internalMark';
var locale_provider_LocaleProvider = /*#__PURE__*/function (_React$Component) {
inherits_default()(LocaleProvider, _React$Component);
var _super = createSuper_default()(LocaleProvider);
function LocaleProvider(props) {
var _this;
classCallCheck_default()(this, LocaleProvider);
_this = _super.call(this, props);
Object(modal_locale["a" /* changeConfirmLocale */])(props.locale && props.locale.Modal);
Object(devWarning["a" /* default */])(props._ANT_MARK__ === ANT_MARK, 'LocaleProvider', '`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale');
return _this;
}
createClass_default()(LocaleProvider, [{
key: "componentDidUpdate",
value: function componentDidUpdate(prevProps) {
var locale = this.props.locale;
if (prevProps.locale !== locale) {
Object(modal_locale["a" /* changeConfirmLocale */])(locale && locale.Modal);
}
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
Object(modal_locale["a" /* changeConfirmLocale */])();
}
}, {
key: "render",
value: function render() {
var _this$props = this.props,
locale = _this$props.locale,
children = _this$props.children;
return /*#__PURE__*/react["createElement"](locale_provider_context["a" /* default */].Provider, {
value: extends_default()(extends_default()({}, locale), {
exist: true
})
}, children);
}
}]);
return LocaleProvider;
}(react["Component"]);
locale_provider_LocaleProvider.defaultProps = {
locale: {}
};
// EXTERNAL MODULE: ./node_modules/antd/es/locale-provider/LocaleReceiver.js + 1 modules
var LocaleReceiver = __webpack_require__("YMnH");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var config_provider_context = __webpack_require__("H84U");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/SizeContext.js
var SizeContext = __webpack_require__("3Nzz");
// EXTERNAL MODULE: ./node_modules/antd/es/message/index.js + 1 modules
var message = __webpack_require__("tsqr");
// EXTERNAL MODULE: ./node_modules/antd/es/notification/index.js + 1 modules
var notification = __webpack_require__("TeRw");
// CONCATENATED MODULE: ./node_modules/antd/es/config-provider/index.js
// TODO: remove this lint
// SFC has specified a displayName, but not worked.
/* eslint-disable react/display-name */
var configConsumerProps = ['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader'];
var config_provider_ConfigProvider = function ConfigProvider(props) {
react["useEffect"](function () {
if (props.direction) {
message["b" /* default */].config({
rtl: props.direction === 'rtl'
});
notification["a" /* default */].config({
rtl: props.direction === 'rtl'
});
}
}, [props.direction]);
var getPrefixClsWrapper = function getPrefixClsWrapper(context) {
return function (suffixCls, customizePrefixCls) {
var prefixCls = props.prefixCls;
if (customizePrefixCls) return customizePrefixCls;
var mergedPrefixCls = prefixCls || context.getPrefixCls('');
return suffixCls ? "".concat(mergedPrefixCls, "-").concat(suffixCls) : mergedPrefixCls;
};
};
var renderProvider = function renderProvider(context, legacyLocale) {
var children = props.children,
getTargetContainer = props.getTargetContainer,
getPopupContainer = props.getPopupContainer,
renderEmpty = props.renderEmpty,
csp = props.csp,
autoInsertSpaceInButton = props.autoInsertSpaceInButton,
form = props.form,
input = props.input,
locale = props.locale,
pageHeader = props.pageHeader,
componentSize = props.componentSize,
direction = props.direction,
space = props.space,
virtual = props.virtual,
dropdownMatchSelectWidth = props.dropdownMatchSelectWidth;
var config = extends_default()(extends_default()({}, context), {
getPrefixCls: getPrefixClsWrapper(context),
csp: csp,
autoInsertSpaceInButton: autoInsertSpaceInButton,
locale: locale || legacyLocale,
direction: direction,
space: space,
virtual: virtual,
dropdownMatchSelectWidth: dropdownMatchSelectWidth
});
if (getTargetContainer) {
config.getTargetContainer = getTargetContainer;
}
if (getPopupContainer) {
config.getPopupContainer = getPopupContainer;
}
if (renderEmpty) {
config.renderEmpty = renderEmpty;
}
if (pageHeader) {
config.pageHeader = pageHeader;
}
if (input) {
config.input = input;
}
var childNode = children; // Additional Form provider
var validateMessages = {};
if (locale && locale.Form && locale.Form.defaultValidateMessages) {
validateMessages = locale.Form.defaultValidateMessages;
}
if (form && form.validateMessages) {
validateMessages = extends_default()(extends_default()({}, validateMessages), form.validateMessages);
}
if (Object.keys(validateMessages).length > 0) {
childNode = /*#__PURE__*/react["createElement"](es["b" /* FormProvider */], {
validateMessages: validateMessages
}, children);
}
return /*#__PURE__*/react["createElement"](SizeContext["a" /* SizeContextProvider */], {
size: componentSize
}, /*#__PURE__*/react["createElement"](config_provider_context["b" /* ConfigContext */].Provider, {
value: config
}, /*#__PURE__*/react["createElement"](locale_provider_LocaleProvider, {
locale: locale || legacyLocale,
_ANT_MARK__: ANT_MARK
}, childNode)));
};
return /*#__PURE__*/react["createElement"](LocaleReceiver["a" /* default */], null, function (_, __, legacyLocale) {
return /*#__PURE__*/react["createElement"](config_provider_context["a" /* ConfigConsumer */], null, function (context) {
return renderProvider(context, legacyLocale);
});
});
};
/* harmony default export */ var config_provider = __webpack_exports__["a"] = (config_provider_ConfigProvider);
/***/ }),
/***/ "wTVA":
/*!***************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/arrayWithHoles.js ***!
\***************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
module.exports = _arrayWithHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "waxf":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.filter.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $filter = __webpack_require__(/*! ../internals/array-iteration */ "tycR").filter;
var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "SEBh");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.filter` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.filter
exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) {
var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined);
var C = speciesConstructor(this, this.constructor);
var index = 0;
var length = list.length;
var result = new (aTypedArrayConstructor(C))(length);
while (length > index) result[index] = list[index++];
return result;
});
/***/ }),
/***/ "wd/R":
/*!***************************************!*\
!*** ./node_modules/moment/moment.js ***!
\***************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js
//! version : 2.30.1
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
//! license : MIT
//! momentjs.com
;(function (global, factory) {
true ? module.exports = factory() :
undefined
}(this, (function () { 'use strict';
var hookCallback;
function hooks() {
return hookCallback.apply(null, arguments);
}
// This is done to register the method called with moment()
// without creating circular dependencies.
function setHookCallback(callback) {
hookCallback = callback;
}
function isArray(input) {
return (
input instanceof Array ||
Object.prototype.toString.call(input) === '[object Array]'
);
}
function isObject(input) {
// IE8 will treat undefined and null as object if it wasn't for
// input != null
return (
input != null &&
Object.prototype.toString.call(input) === '[object Object]'
);
}
function hasOwnProp(a, b) {
return Object.prototype.hasOwnProperty.call(a, b);
}
function isObjectEmpty(obj) {
if (Object.getOwnPropertyNames) {
return Object.getOwnPropertyNames(obj).length === 0;
} else {
var k;
for (k in obj) {
if (hasOwnProp(obj, k)) {
return false;
}
}
return true;
}
}
function isUndefined(input) {
return input === void 0;
}
function isNumber(input) {
return (
typeof input === 'number' ||
Object.prototype.toString.call(input) === '[object Number]'
);
}
function isDate(input) {
return (
input instanceof Date ||
Object.prototype.toString.call(input) === '[object Date]'
);
}
function map(arr, fn) {
var res = [],
i,
arrLen = arr.length;
for (i = 0; i < arrLen; ++i) {
res.push(fn(arr[i], i));
}
return res;
}
function extend(a, b) {
for (var i in b) {
if (hasOwnProp(b, i)) {
a[i] = b[i];
}
}
if (hasOwnProp(b, 'toString')) {
a.toString = b.toString;
}
if (hasOwnProp(b, 'valueOf')) {
a.valueOf = b.valueOf;
}
return a;
}
function createUTC(input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, true).utc();
}
function defaultParsingFlags() {
// We need to deep clone this object.
return {
empty: false,
unusedTokens: [],
unusedInput: [],
overflow: -2,
charsLeftOver: 0,
nullInput: false,
invalidEra: null,
invalidMonth: null,
invalidFormat: false,
userInvalidated: false,
iso: false,
parsedDateParts: [],
era: null,
meridiem: null,
rfc2822: false,
weekdayMismatch: false,
};
}
function getParsingFlags(m) {
if (m._pf == null) {
m._pf = defaultParsingFlags();
}
return m._pf;
}
var some;
if (Array.prototype.some) {
some = Array.prototype.some;
} else {
some = function (fun) {
var t = Object(this),
len = t.length >>> 0,
i;
for (i = 0; i < len; i++) {
if (i in t && fun.call(this, t[i], i, t)) {
return true;
}
}
return false;
};
}
function isValid(m) {
var flags = null,
parsedParts = false,
isNowValid = m._d && !isNaN(m._d.getTime());
if (isNowValid) {
flags = getParsingFlags(m);
parsedParts = some.call(flags.parsedDateParts, function (i) {
return i != null;
});
isNowValid =
flags.overflow < 0 &&
!flags.empty &&
!flags.invalidEra &&
!flags.invalidMonth &&
!flags.invalidWeekday &&
!flags.weekdayMismatch &&
!flags.nullInput &&
!flags.invalidFormat &&
!flags.userInvalidated &&
(!flags.meridiem || (flags.meridiem && parsedParts));
if (m._strict) {
isNowValid =
isNowValid &&
flags.charsLeftOver === 0 &&
flags.unusedTokens.length === 0 &&
flags.bigHour === undefined;
}
}
if (Object.isFrozen == null || !Object.isFrozen(m)) {
m._isValid = isNowValid;
} else {
return isNowValid;
}
return m._isValid;
}
function createInvalid(flags) {
var m = createUTC(NaN);
if (flags != null) {
extend(getParsingFlags(m), flags);
} else {
getParsingFlags(m).userInvalidated = true;
}
return m;
}
// Plugins that add properties should also add the key here (null value),
// so we can properly clone ourselves.
var momentProperties = (hooks.momentProperties = []),
updateInProgress = false;
function copyConfig(to, from) {
var i,
prop,
val,
momentPropertiesLen = momentProperties.length;
if (!isUndefined(from._isAMomentObject)) {
to._isAMomentObject = from._isAMomentObject;
}
if (!isUndefined(from._i)) {
to._i = from._i;
}
if (!isUndefined(from._f)) {
to._f = from._f;
}
if (!isUndefined(from._l)) {
to._l = from._l;
}
if (!isUndefined(from._strict)) {
to._strict = from._strict;
}
if (!isUndefined(from._tzm)) {
to._tzm = from._tzm;
}
if (!isUndefined(from._isUTC)) {
to._isUTC = from._isUTC;
}
if (!isUndefined(from._offset)) {
to._offset = from._offset;
}
if (!isUndefined(from._pf)) {
to._pf = getParsingFlags(from);
}
if (!isUndefined(from._locale)) {
to._locale = from._locale;
}
if (momentPropertiesLen > 0) {
for (i = 0; i < momentPropertiesLen; i++) {
prop = momentProperties[i];
val = from[prop];
if (!isUndefined(val)) {
to[prop] = val;
}
}
}
return to;
}
// Moment prototype object
function Moment(config) {
copyConfig(this, config);
this._d = new Date(config._d != null ? config._d.getTime() : NaN);
if (!this.isValid()) {
this._d = new Date(NaN);
}
// Prevent infinite loop in case updateOffset creates new moment
// objects.
if (updateInProgress === false) {
updateInProgress = true;
hooks.updateOffset(this);
updateInProgress = false;
}
}
function isMoment(obj) {
return (
obj instanceof Moment || (obj != null && obj._isAMomentObject != null)
);
}
function warn(msg) {
if (
hooks.suppressDeprecationWarnings === false &&
typeof console !== 'undefined' &&
console.warn
) {
console.warn('Deprecation warning: ' + msg);
}
}
function deprecate(msg, fn) {
var firstTime = true;
return extend(function () {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(null, msg);
}
if (firstTime) {
var args = [],
arg,
i,
key,
argLen = arguments.length;
for (i = 0; i < argLen; i++) {
arg = '';
if (typeof arguments[i] === 'object') {
arg += '\n[' + i + '] ';
for (key in arguments[0]) {
if (hasOwnProp(arguments[0], key)) {
arg += key + ': ' + arguments[0][key] + ', ';
}
}
arg = arg.slice(0, -2); // Remove trailing comma and space
} else {
arg = arguments[i];
}
args.push(arg);
}
warn(
msg +
'\nArguments: ' +
Array.prototype.slice.call(args).join('') +
'\n' +
new Error().stack
);
firstTime = false;
}
return fn.apply(this, arguments);
}, fn);
}
var deprecations = {};
function deprecateSimple(name, msg) {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(name, msg);
}
if (!deprecations[name]) {
warn(msg);
deprecations[name] = true;
}
}
hooks.suppressDeprecationWarnings = false;
hooks.deprecationHandler = null;
function isFunction(input) {
return (
(typeof Function !== 'undefined' && input instanceof Function) ||
Object.prototype.toString.call(input) === '[object Function]'
);
}
function set(config) {
var prop, i;
for (i in config) {
if (hasOwnProp(config, i)) {
prop = config[i];
if (isFunction(prop)) {
this[i] = prop;
} else {
this['_' + i] = prop;
}
}
}
this._config = config;
// Lenient ordinal parsing accepts just a number in addition to
// number + (possibly) stuff coming from _dayOfMonthOrdinalParse.
// TODO: Remove "ordinalParse" fallback in next major release.
this._dayOfMonthOrdinalParseLenient = new RegExp(
(this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) +
'|' +
/\d{1,2}/.source
);
}
function mergeConfigs(parentConfig, childConfig) {
var res = extend({}, parentConfig),
prop;
for (prop in childConfig) {
if (hasOwnProp(childConfig, prop)) {
if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
res[prop] = {};
extend(res[prop], parentConfig[prop]);
extend(res[prop], childConfig[prop]);
} else if (childConfig[prop] != null) {
res[prop] = childConfig[prop];
} else {
delete res[prop];
}
}
}
for (prop in parentConfig) {
if (
hasOwnProp(parentConfig, prop) &&
!hasOwnProp(childConfig, prop) &&
isObject(parentConfig[prop])
) {
// make sure changes to properties don't modify parent config
res[prop] = extend({}, res[prop]);
}
}
return res;
}
function Locale(config) {
if (config != null) {
this.set(config);
}
}
var keys;
if (Object.keys) {
keys = Object.keys;
} else {
keys = function (obj) {
var i,
res = [];
for (i in obj) {
if (hasOwnProp(obj, i)) {
res.push(i);
}
}
return res;
};
}
var defaultCalendar = {
sameDay: '[Today at] LT',
nextDay: '[Tomorrow at] LT',
nextWeek: 'dddd [at] LT',
lastDay: '[Yesterday at] LT',
lastWeek: '[Last] dddd [at] LT',
sameElse: 'L',
};
function calendar(key, mom, now) {
var output = this._calendar[key] || this._calendar['sameElse'];
return isFunction(output) ? output.call(mom, now) : output;
}
function zeroFill(number, targetLength, forceSign) {
var absNumber = '' + Math.abs(number),
zerosToFill = targetLength - absNumber.length,
sign = number >= 0;
return (
(sign ? (forceSign ? '+' : '') : '-') +
Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) +
absNumber
);
}
var formattingTokens =
/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,
localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,
formatFunctions = {},
formatTokenFunctions = {};
// token: 'M'
// padded: ['MM', 2]
// ordinal: 'Mo'
// callback: function () { this.month() + 1 }
function addFormatToken(token, padded, ordinal, callback) {
var func = callback;
if (typeof callback === 'string') {
func = function () {
return this[callback]();
};
}
if (token) {
formatTokenFunctions[token] = func;
}
if (padded) {
formatTokenFunctions[padded[0]] = function () {
return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
};
}
if (ordinal) {
formatTokenFunctions[ordinal] = function () {
return this.localeData().ordinal(
func.apply(this, arguments),
token
);
};
}
}
function removeFormattingTokens(input) {
if (input.match(/\[[\s\S]/)) {
return input.replace(/^\[|\]$/g, '');
}
return input.replace(/\\/g, '');
}
function makeFormatFunction(format) {
var array = format.match(formattingTokens),
i,
length;
for (i = 0, length = array.length; i < length; i++) {
if (formatTokenFunctions[array[i]]) {
array[i] = formatTokenFunctions[array[i]];
} else {
array[i] = removeFormattingTokens(array[i]);
}
}
return function (mom) {
var output = '',
i;
for (i = 0; i < length; i++) {
output += isFunction(array[i])
? array[i].call(mom, format)
: array[i];
}
return output;
};
}
// format date using native date object
function formatMoment(m, format) {
if (!m.isValid()) {
return m.localeData().invalidDate();
}
format = expandFormat(format, m.localeData());
formatFunctions[format] =
formatFunctions[format] || makeFormatFunction(format);
return formatFunctions[format](m);
}
function expandFormat(format, locale) {
var i = 5;
function replaceLongDateFormatTokens(input) {
return locale.longDateFormat(input) || input;
}
localFormattingTokens.lastIndex = 0;
while (i >= 0 && localFormattingTokens.test(format)) {
format = format.replace(
localFormattingTokens,
replaceLongDateFormatTokens
);
localFormattingTokens.lastIndex = 0;
i -= 1;
}
return format;
}
var defaultLongDateFormat = {
LTS: 'h:mm:ss A',
LT: 'h:mm A',
L: 'MM/DD/YYYY',
LL: 'MMMM D, YYYY',
LLL: 'MMMM D, YYYY h:mm A',
LLLL: 'dddd, MMMM D, YYYY h:mm A',
};
function longDateFormat(key) {
var format = this._longDateFormat[key],
formatUpper = this._longDateFormat[key.toUpperCase()];
if (format || !formatUpper) {
return format;
}
this._longDateFormat[key] = formatUpper
.match(formattingTokens)
.map(function (tok) {
if (
tok === 'MMMM' ||
tok === 'MM' ||
tok === 'DD' ||
tok === 'dddd'
) {
return tok.slice(1);
}
return tok;
})
.join('');
return this._longDateFormat[key];
}
var defaultInvalidDate = 'Invalid date';
function invalidDate() {
return this._invalidDate;
}
var defaultOrdinal = '%d',
defaultDayOfMonthOrdinalParse = /\d{1,2}/;
function ordinal(number) {
return this._ordinal.replace('%d', number);
}
var defaultRelativeTime = {
future: 'in %s',
past: '%s ago',
s: 'a few seconds',
ss: '%d seconds',
m: 'a minute',
mm: '%d minutes',
h: 'an hour',
hh: '%d hours',
d: 'a day',
dd: '%d days',
w: 'a week',
ww: '%d weeks',
M: 'a month',
MM: '%d months',
y: 'a year',
yy: '%d years',
};
function relativeTime(number, withoutSuffix, string, isFuture) {
var output = this._relativeTime[string];
return isFunction(output)
? output(number, withoutSuffix, string, isFuture)
: output.replace(/%d/i, number);
}
function pastFuture(diff, output) {
var format = this._relativeTime[diff > 0 ? 'future' : 'past'];
return isFunction(format) ? format(output) : format.replace(/%s/i, output);
}
var aliases = {
D: 'date',
dates: 'date',
date: 'date',
d: 'day',
days: 'day',
day: 'day',
e: 'weekday',
weekdays: 'weekday',
weekday: 'weekday',
E: 'isoWeekday',
isoweekdays: 'isoWeekday',
isoweekday: 'isoWeekday',
DDD: 'dayOfYear',
dayofyears: 'dayOfYear',
dayofyear: 'dayOfYear',
h: 'hour',
hours: 'hour',
hour: 'hour',
ms: 'millisecond',
milliseconds: 'millisecond',
millisecond: 'millisecond',
m: 'minute',
minutes: 'minute',
minute: 'minute',
M: 'month',
months: 'month',
month: 'month',
Q: 'quarter',
quarters: 'quarter',
quarter: 'quarter',
s: 'second',
seconds: 'second',
second: 'second',
gg: 'weekYear',
weekyears: 'weekYear',
weekyear: 'weekYear',
GG: 'isoWeekYear',
isoweekyears: 'isoWeekYear',
isoweekyear: 'isoWeekYear',
w: 'week',
weeks: 'week',
week: 'week',
W: 'isoWeek',
isoweeks: 'isoWeek',
isoweek: 'isoWeek',
y: 'year',
years: 'year',
year: 'year',
};
function normalizeUnits(units) {
return typeof units === 'string'
? aliases[units] || aliases[units.toLowerCase()]
: undefined;
}
function normalizeObjectUnits(inputObject) {
var normalizedInput = {},
normalizedProp,
prop;
for (prop in inputObject) {
if (hasOwnProp(inputObject, prop)) {
normalizedProp = normalizeUnits(prop);
if (normalizedProp) {
normalizedInput[normalizedProp] = inputObject[prop];
}
}
}
return normalizedInput;
}
var priorities = {
date: 9,
day: 11,
weekday: 11,
isoWeekday: 11,
dayOfYear: 4,
hour: 13,
millisecond: 16,
minute: 14,
month: 8,
quarter: 7,
second: 15,
weekYear: 1,
isoWeekYear: 1,
week: 5,
isoWeek: 5,
year: 1,
};
function getPrioritizedUnits(unitsObj) {
var units = [],
u;
for (u in unitsObj) {
if (hasOwnProp(unitsObj, u)) {
units.push({ unit: u, priority: priorities[u] });
}
}
units.sort(function (a, b) {
return a.priority - b.priority;
});
return units;
}
var match1 = /\d/, // 0 - 9
match2 = /\d\d/, // 00 - 99
match3 = /\d{3}/, // 000 - 999
match4 = /\d{4}/, // 0000 - 9999
match6 = /[+-]?\d{6}/, // -999999 - 999999
match1to2 = /\d\d?/, // 0 - 99
match3to4 = /\d\d\d\d?/, // 999 - 9999
match5to6 = /\d\d\d\d\d\d?/, // 99999 - 999999
match1to3 = /\d{1,3}/, // 0 - 999
match1to4 = /\d{1,4}/, // 0 - 9999
match1to6 = /[+-]?\d{1,6}/, // -999999 - 999999
matchUnsigned = /\d+/, // 0 - inf
matchSigned = /[+-]?\d+/, // -inf - inf
matchOffset = /Z|[+-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z
matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, // +00 -00 +00:00 -00:00 +0000 -0000 or Z
matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123
// any word (or two) characters or numbers including two/three word month in arabic.
// includes scottish gaelic two word and hyphenated months
matchWord =
/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,
match1to2NoLeadingZero = /^[1-9]\d?/, // 1-99
match1to2HasZero = /^([1-9]\d|\d)/, // 0-99
regexes;
regexes = {};
function addRegexToken(token, regex, strictRegex) {
regexes[token] = isFunction(regex)
? regex
: function (isStrict, localeData) {
return isStrict && strictRegex ? strictRegex : regex;
};
}
function getParseRegexForToken(token, config) {
if (!hasOwnProp(regexes, token)) {
return new RegExp(unescapeFormat(token));
}
return regexes[token](config._strict, config._locale);
}
// Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript
function unescapeFormat(s) {
return regexEscape(
s
.replace('\\', '')
.replace(
/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
function (matched, p1, p2, p3, p4) {
return p1 || p2 || p3 || p4;
}
)
);
}
function regexEscape(s) {
return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
}
function absFloor(number) {
if (number < 0) {
// -0 -> 0
return Math.ceil(number) || 0;
} else {
return Math.floor(number);
}
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion,
value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
value = absFloor(coercedNumber);
}
return value;
}
var tokens = {};
function addParseToken(token, callback) {
var i,
func = callback,
tokenLen;
if (typeof token === 'string') {
token = [token];
}
if (isNumber(callback)) {
func = function (input, array) {
array[callback] = toInt(input);
};
}
tokenLen = token.length;
for (i = 0; i < tokenLen; i++) {
tokens[token[i]] = func;
}
}
function addWeekParseToken(token, callback) {
addParseToken(token, function (input, array, config, token) {
config._w = config._w || {};
callback(input, config._w, config, token);
});
}
function addTimeToArrayFromToken(token, input, config) {
if (input != null && hasOwnProp(tokens, token)) {
tokens[token](input, config._a, config, token);
}
}
function isLeapYear(year) {
return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0;
}
var YEAR = 0,
MONTH = 1,
DATE = 2,
HOUR = 3,
MINUTE = 4,
SECOND = 5,
MILLISECOND = 6,
WEEK = 7,
WEEKDAY = 8;
// FORMATTING
addFormatToken('Y', 0, 0, function () {
var y = this.year();
return y <= 9999 ? zeroFill(y, 4) : '+' + y;
});
addFormatToken(0, ['YY', 2], 0, function () {
return this.year() % 100;
});
addFormatToken(0, ['YYYY', 4], 0, 'year');
addFormatToken(0, ['YYYYY', 5], 0, 'year');
addFormatToken(0, ['YYYYYY', 6, true], 0, 'year');
// PARSING
addRegexToken('Y', matchSigned);
addRegexToken('YY', match1to2, match2);
addRegexToken('YYYY', match1to4, match4);
addRegexToken('YYYYY', match1to6, match6);
addRegexToken('YYYYYY', match1to6, match6);
addParseToken(['YYYYY', 'YYYYYY'], YEAR);
addParseToken('YYYY', function (input, array) {
array[YEAR] =
input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
});
addParseToken('YY', function (input, array) {
array[YEAR] = hooks.parseTwoDigitYear(input);
});
addParseToken('Y', function (input, array) {
array[YEAR] = parseInt(input, 10);
});
// HELPERS
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
// HOOKS
hooks.parseTwoDigitYear = function (input) {
return toInt(input) + (toInt(input) > 68 ? 1900 : 2000);
};
// MOMENTS
var getSetYear = makeGetSet('FullYear', true);
function getIsLeapYear() {
return isLeapYear(this.year());
}
function makeGetSet(unit, keepTime) {
return function (value) {
if (value != null) {
set$1(this, unit, value);
hooks.updateOffset(this, keepTime);
return this;
} else {
return get(this, unit);
}
};
}
function get(mom, unit) {
if (!mom.isValid()) {
return NaN;
}
var d = mom._d,
isUTC = mom._isUTC;
switch (unit) {
case 'Milliseconds':
return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
case 'Seconds':
return isUTC ? d.getUTCSeconds() : d.getSeconds();
case 'Minutes':
return isUTC ? d.getUTCMinutes() : d.getMinutes();
case 'Hours':
return isUTC ? d.getUTCHours() : d.getHours();
case 'Date':
return isUTC ? d.getUTCDate() : d.getDate();
case 'Day':
return isUTC ? d.getUTCDay() : d.getDay();
case 'Month':
return isUTC ? d.getUTCMonth() : d.getMonth();
case 'FullYear':
return isUTC ? d.getUTCFullYear() : d.getFullYear();
default:
return NaN; // Just in case
}
}
function set$1(mom, unit, value) {
var d, isUTC, year, month, date;
if (!mom.isValid() || isNaN(value)) {
return;
}
d = mom._d;
isUTC = mom._isUTC;
switch (unit) {
case 'Milliseconds':
return void (isUTC
? d.setUTCMilliseconds(value)
: d.setMilliseconds(value));
case 'Seconds':
return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
case 'Minutes':
return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
case 'Hours':
return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
case 'Date':
return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
// case 'Day': // Not real
// return void (isUTC ? d.setUTCDay(value) : d.setDay(value));
// case 'Month': // Not used because we need to pass two variables
// return void (isUTC ? d.setUTCMonth(value) : d.setMonth(value));
case 'FullYear':
break; // See below ...
default:
return; // Just in case
}
year = value;
month = mom.month();
date = mom.date();
date = date === 29 && month === 1 && !isLeapYear(year) ? 28 : date;
void (isUTC
? d.setUTCFullYear(year, month, date)
: d.setFullYear(year, month, date));
}
// MOMENTS
function stringGet(units) {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units]();
}
return this;
}
function stringSet(units, value) {
if (typeof units === 'object') {
units = normalizeObjectUnits(units);
var prioritized = getPrioritizedUnits(units),
i,
prioritizedLen = prioritized.length;
for (i = 0; i < prioritizedLen; i++) {
this[prioritized[i].unit](units[prioritized[i].unit]);
}
} else {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units](value);
}
}
return this;
}
function mod(n, x) {
return ((n % x) + x) % x;
}
var indexOf;
if (Array.prototype.indexOf) {
indexOf = Array.prototype.indexOf;
} else {
indexOf = function (o) {
// I know
var i;
for (i = 0; i < this.length; ++i) {
if (this[i] === o) {
return i;
}
}
return -1;
};
}
function daysInMonth(year, month) {
if (isNaN(year) || isNaN(month)) {
return NaN;
}
var modMonth = mod(month, 12);
year += (month - modMonth) / 12;
return modMonth === 1
? isLeapYear(year)
? 29
: 28
: 31 - ((modMonth % 7) % 2);
}
// FORMATTING
addFormatToken('M', ['MM', 2], 'Mo', function () {
return this.month() + 1;
});
addFormatToken('MMM', 0, 0, function (format) {
return this.localeData().monthsShort(this, format);
});
addFormatToken('MMMM', 0, 0, function (format) {
return this.localeData().months(this, format);
});
// PARSING
addRegexToken('M', match1to2, match1to2NoLeadingZero);
addRegexToken('MM', match1to2, match2);
addRegexToken('MMM', function (isStrict, locale) {
return locale.monthsShortRegex(isStrict);
});
addRegexToken('MMMM', function (isStrict, locale) {
return locale.monthsRegex(isStrict);
});
addParseToken(['M', 'MM'], function (input, array) {
array[MONTH] = toInt(input) - 1;
});
addParseToken(['MMM', 'MMMM'], function (input, array, config, token) {
var month = config._locale.monthsParse(input, token, config._strict);
// if we didn't find a month name, mark the date as invalid.
if (month != null) {
array[MONTH] = month;
} else {
getParsingFlags(config).invalidMonth = input;
}
});
// LOCALES
var defaultLocaleMonths =
'January_February_March_April_May_June_July_August_September_October_November_December'.split(
'_'
),
defaultLocaleMonthsShort =
'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'),
MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,
defaultMonthsShortRegex = matchWord,
defaultMonthsRegex = matchWord;
function localeMonths(m, format) {
if (!m) {
return isArray(this._months)
? this._months
: this._months['standalone'];
}
return isArray(this._months)
? this._months[m.month()]
: this._months[
(this._months.isFormat || MONTHS_IN_FORMAT).test(format)
? 'format'
: 'standalone'
][m.month()];
}
function localeMonthsShort(m, format) {
if (!m) {
return isArray(this._monthsShort)
? this._monthsShort
: this._monthsShort['standalone'];
}
return isArray(this._monthsShort)
? this._monthsShort[m.month()]
: this._monthsShort[
MONTHS_IN_FORMAT.test(format) ? 'format' : 'standalone'
][m.month()];
}
function handleStrictParse(monthName, format, strict) {
var i,
ii,
mom,
llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
// this is not used
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
for (i = 0; i < 12; ++i) {
mom = createUTC([2000, i]);
this._shortMonthsParse[i] = this.monthsShort(
mom,
''
).toLocaleLowerCase();
this._longMonthsParse[i] = this.months(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'MMM') {
ii = indexOf.call(this._shortMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeMonthsParse(monthName, format, strict) {
var i, mom, regex;
if (this._monthsParseExact) {
return handleStrictParse.call(this, monthName, format, strict);
}
if (!this._monthsParse) {
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
}
// TODO: add sorting
// Sorting makes sure if one month (or abbr) is a prefix of another
// see sorting in computeMonthsParse
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, i]);
if (strict && !this._longMonthsParse[i]) {
this._longMonthsParse[i] = new RegExp(
'^' + this.months(mom, '').replace('.', '') + '$',
'i'
);
this._shortMonthsParse[i] = new RegExp(
'^' + this.monthsShort(mom, '').replace('.', '') + '$',
'i'
);
}
if (!strict && !this._monthsParse[i]) {
regex =
'^' + this.months(mom, '') + '|^' + this.monthsShort(mom, '');
this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (
strict &&
format === 'MMMM' &&
this._longMonthsParse[i].test(monthName)
) {
return i;
} else if (
strict &&
format === 'MMM' &&
this._shortMonthsParse[i].test(monthName)
) {
return i;
} else if (!strict && this._monthsParse[i].test(monthName)) {
return i;
}
}
}
// MOMENTS
function setMonth(mom, value) {
if (!mom.isValid()) {
// No op
return mom;
}
if (typeof value === 'string') {
if (/^\d+$/.test(value)) {
value = toInt(value);
} else {
value = mom.localeData().monthsParse(value);
// TODO: Another silent failure?
if (!isNumber(value)) {
return mom;
}
}
}
var month = value,
date = mom.date();
date = date < 29 ? date : Math.min(date, daysInMonth(mom.year(), month));
void (mom._isUTC
? mom._d.setUTCMonth(month, date)
: mom._d.setMonth(month, date));
return mom;
}
function getSetMonth(value) {
if (value != null) {
setMonth(this, value);
hooks.updateOffset(this, true);
return this;
} else {
return get(this, 'Month');
}
}
function getDaysInMonth() {
return daysInMonth(this.year(), this.month());
}
function monthsShortRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsShortStrictRegex;
} else {
return this._monthsShortRegex;
}
} else {
if (!hasOwnProp(this, '_monthsShortRegex')) {
this._monthsShortRegex = defaultMonthsShortRegex;
}
return this._monthsShortStrictRegex && isStrict
? this._monthsShortStrictRegex
: this._monthsShortRegex;
}
}
function monthsRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, '_monthsRegex')) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsStrictRegex;
} else {
return this._monthsRegex;
}
} else {
if (!hasOwnProp(this, '_monthsRegex')) {
this._monthsRegex = defaultMonthsRegex;
}
return this._monthsStrictRegex && isStrict
? this._monthsStrictRegex
: this._monthsRegex;
}
}
function computeMonthsParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var shortPieces = [],
longPieces = [],
mixedPieces = [],
i,
mom,
shortP,
longP;
for (i = 0; i < 12; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, i]);
shortP = regexEscape(this.monthsShort(mom, ''));
longP = regexEscape(this.months(mom, ''));
shortPieces.push(shortP);
longPieces.push(longP);
mixedPieces.push(longP);
mixedPieces.push(shortP);
}
// Sorting makes sure if one month (or abbr) is a prefix of another it
// will match the longer piece.
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
this._monthsRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._monthsShortRegex = this._monthsRegex;
this._monthsStrictRegex = new RegExp(
'^(' + longPieces.join('|') + ')',
'i'
);
this._monthsShortStrictRegex = new RegExp(
'^(' + shortPieces.join('|') + ')',
'i'
);
}
function createDate(y, m, d, h, M, s, ms) {
// can't just apply() to create a date:
// https://stackoverflow.com/q/181348
var date;
// the date constructor remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
// preserve leap years using a full 400 year cycle, then reset
date = new Date(y + 400, m, d, h, M, s, ms);
if (isFinite(date.getFullYear())) {
date.setFullYear(y);
}
} else {
date = new Date(y, m, d, h, M, s, ms);
}
return date;
}
function createUTCDate(y) {
var date, args;
// the Date.UTC function remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
args = Array.prototype.slice.call(arguments);
// preserve leap years using a full 400 year cycle, then reset
args[0] = y + 400;
date = new Date(Date.UTC.apply(null, args));
if (isFinite(date.getUTCFullYear())) {
date.setUTCFullYear(y);
}
} else {
date = new Date(Date.UTC.apply(null, arguments));
}
return date;
}
// start-of-first-week - start-of-year
function firstWeekOffset(year, dow, doy) {
var // first-week day -- which january is always in the first week (4 for iso, 1 for other)
fwd = 7 + dow - doy,
// first-week day local weekday -- which local weekday is fwd
fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
return -fwdlw + fwd - 1;
}
// https://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
var localWeekday = (7 + weekday - dow) % 7,
weekOffset = firstWeekOffset(year, dow, doy),
dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset,
resYear,
resDayOfYear;
if (dayOfYear <= 0) {
resYear = year - 1;
resDayOfYear = daysInYear(resYear) + dayOfYear;
} else if (dayOfYear > daysInYear(year)) {
resYear = year + 1;
resDayOfYear = dayOfYear - daysInYear(year);
} else {
resYear = year;
resDayOfYear = dayOfYear;
}
return {
year: resYear,
dayOfYear: resDayOfYear,
};
}
function weekOfYear(mom, dow, doy) {
var weekOffset = firstWeekOffset(mom.year(), dow, doy),
week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1,
resWeek,
resYear;
if (week < 1) {
resYear = mom.year() - 1;
resWeek = week + weeksInYear(resYear, dow, doy);
} else if (week > weeksInYear(mom.year(), dow, doy)) {
resWeek = week - weeksInYear(mom.year(), dow, doy);
resYear = mom.year() + 1;
} else {
resYear = mom.year();
resWeek = week;
}
return {
week: resWeek,
year: resYear,
};
}
function weeksInYear(year, dow, doy) {
var weekOffset = firstWeekOffset(year, dow, doy),
weekOffsetNext = firstWeekOffset(year + 1, dow, doy);
return (daysInYear(year) - weekOffset + weekOffsetNext) / 7;
}
// FORMATTING
addFormatToken('w', ['ww', 2], 'wo', 'week');
addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek');
// PARSING
addRegexToken('w', match1to2, match1to2NoLeadingZero);
addRegexToken('ww', match1to2, match2);
addRegexToken('W', match1to2, match1to2NoLeadingZero);
addRegexToken('WW', match1to2, match2);
addWeekParseToken(
['w', 'ww', 'W', 'WW'],
function (input, week, config, token) {
week[token.substr(0, 1)] = toInt(input);
}
);
// HELPERS
// LOCALES
function localeWeek(mom) {
return weekOfYear(mom, this._week.dow, this._week.doy).week;
}
var defaultLocaleWeek = {
dow: 0, // Sunday is the first day of the week.
doy: 6, // The week that contains Jan 6th is the first week of the year.
};
function localeFirstDayOfWeek() {
return this._week.dow;
}
function localeFirstDayOfYear() {
return this._week.doy;
}
// MOMENTS
function getSetWeek(input) {
var week = this.localeData().week(this);
return input == null ? week : this.add((input - week) * 7, 'd');
}
function getSetISOWeek(input) {
var week = weekOfYear(this, 1, 4).week;
return input == null ? week : this.add((input - week) * 7, 'd');
}
// FORMATTING
addFormatToken('d', 0, 'do', 'day');
addFormatToken('dd', 0, 0, function (format) {
return this.localeData().weekdaysMin(this, format);
});
addFormatToken('ddd', 0, 0, function (format) {
return this.localeData().weekdaysShort(this, format);
});
addFormatToken('dddd', 0, 0, function (format) {
return this.localeData().weekdays(this, format);
});
addFormatToken('e', 0, 0, 'weekday');
addFormatToken('E', 0, 0, 'isoWeekday');
// PARSING
addRegexToken('d', match1to2);
addRegexToken('e', match1to2);
addRegexToken('E', match1to2);
addRegexToken('dd', function (isStrict, locale) {
return locale.weekdaysMinRegex(isStrict);
});
addRegexToken('ddd', function (isStrict, locale) {
return locale.weekdaysShortRegex(isStrict);
});
addRegexToken('dddd', function (isStrict, locale) {
return locale.weekdaysRegex(isStrict);
});
addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config, token) {
var weekday = config._locale.weekdaysParse(input, token, config._strict);
// if we didn't get a weekday name, mark the date as invalid
if (weekday != null) {
week.d = weekday;
} else {
getParsingFlags(config).invalidWeekday = input;
}
});
addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) {
week[token] = toInt(input);
});
// HELPERS
function parseWeekday(input, locale) {
if (typeof input !== 'string') {
return input;
}
if (!isNaN(input)) {
return parseInt(input, 10);
}
input = locale.weekdaysParse(input);
if (typeof input === 'number') {
return input;
}
return null;
}
function parseIsoWeekday(input, locale) {
if (typeof input === 'string') {
return locale.weekdaysParse(input) % 7 || 7;
}
return isNaN(input) ? null : input;
}
// LOCALES
function shiftWeekdays(ws, n) {
return ws.slice(n, 7).concat(ws.slice(0, n));
}
var defaultLocaleWeekdays =
'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'),
defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'),
defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'),
defaultWeekdaysRegex = matchWord,
defaultWeekdaysShortRegex = matchWord,
defaultWeekdaysMinRegex = matchWord;
function localeWeekdays(m, format) {
var weekdays = isArray(this._weekdays)
? this._weekdays
: this._weekdays[
m && m !== true && this._weekdays.isFormat.test(format)
? 'format'
: 'standalone'
];
return m === true
? shiftWeekdays(weekdays, this._week.dow)
: m
? weekdays[m.day()]
: weekdays;
}
function localeWeekdaysShort(m) {
return m === true
? shiftWeekdays(this._weekdaysShort, this._week.dow)
: m
? this._weekdaysShort[m.day()]
: this._weekdaysShort;
}
function localeWeekdaysMin(m) {
return m === true
? shiftWeekdays(this._weekdaysMin, this._week.dow)
: m
? this._weekdaysMin[m.day()]
: this._weekdaysMin;
}
function handleStrictParse$1(weekdayName, format, strict) {
var i,
ii,
mom,
llc = weekdayName.toLocaleLowerCase();
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._shortWeekdaysParse = [];
this._minWeekdaysParse = [];
for (i = 0; i < 7; ++i) {
mom = createUTC([2000, 1]).day(i);
this._minWeekdaysParse[i] = this.weekdaysMin(
mom,
''
).toLocaleLowerCase();
this._shortWeekdaysParse[i] = this.weekdaysShort(
mom,
''
).toLocaleLowerCase();
this._weekdaysParse[i] = this.weekdays(mom, '').toLocaleLowerCase();
}
}
if (strict) {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format === 'dddd') {
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format === 'ddd') {
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeWeekdaysParse(weekdayName, format, strict) {
var i, mom, regex;
if (this._weekdaysParseExact) {
return handleStrictParse$1.call(this, weekdayName, format, strict);
}
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._minWeekdaysParse = [];
this._shortWeekdaysParse = [];
this._fullWeekdaysParse = [];
}
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, 1]).day(i);
if (strict && !this._fullWeekdaysParse[i]) {
this._fullWeekdaysParse[i] = new RegExp(
'^' + this.weekdays(mom, '').replace('.', '\\.?') + '$',
'i'
);
this._shortWeekdaysParse[i] = new RegExp(
'^' + this.weekdaysShort(mom, '').replace('.', '\\.?') + '$',
'i'
);
this._minWeekdaysParse[i] = new RegExp(
'^' + this.weekdaysMin(mom, '').replace('.', '\\.?') + '$',
'i'
);
}
if (!this._weekdaysParse[i]) {
regex =
'^' +
this.weekdays(mom, '') +
'|^' +
this.weekdaysShort(mom, '') +
'|^' +
this.weekdaysMin(mom, '');
this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i');
}
// test the regex
if (
strict &&
format === 'dddd' &&
this._fullWeekdaysParse[i].test(weekdayName)
) {
return i;
} else if (
strict &&
format === 'ddd' &&
this._shortWeekdaysParse[i].test(weekdayName)
) {
return i;
} else if (
strict &&
format === 'dd' &&
this._minWeekdaysParse[i].test(weekdayName)
) {
return i;
} else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
return i;
}
}
}
// MOMENTS
function getSetDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var day = get(this, 'Day');
if (input != null) {
input = parseWeekday(input, this.localeData());
return this.add(input - day, 'd');
} else {
return day;
}
}
function getSetLocaleDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
return input == null ? weekday : this.add(input - weekday, 'd');
}
function getSetISODayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
// behaves the same as moment#day except
// as a getter, returns 7 instead of 0 (1-7 range instead of 0-6)
// as a setter, sunday should belong to the previous week.
if (input != null) {
var weekday = parseIsoWeekday(input, this.localeData());
return this.day(this.day() % 7 ? weekday : weekday - 7);
} else {
return this.day() || 7;
}
}
function weekdaysRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysStrictRegex;
} else {
return this._weekdaysRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysRegex')) {
this._weekdaysRegex = defaultWeekdaysRegex;
}
return this._weekdaysStrictRegex && isStrict
? this._weekdaysStrictRegex
: this._weekdaysRegex;
}
}
function weekdaysShortRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysShortStrictRegex;
} else {
return this._weekdaysShortRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysShortRegex')) {
this._weekdaysShortRegex = defaultWeekdaysShortRegex;
}
return this._weekdaysShortStrictRegex && isStrict
? this._weekdaysShortStrictRegex
: this._weekdaysShortRegex;
}
}
function weekdaysMinRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, '_weekdaysRegex')) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysMinStrictRegex;
} else {
return this._weekdaysMinRegex;
}
} else {
if (!hasOwnProp(this, '_weekdaysMinRegex')) {
this._weekdaysMinRegex = defaultWeekdaysMinRegex;
}
return this._weekdaysMinStrictRegex && isStrict
? this._weekdaysMinStrictRegex
: this._weekdaysMinRegex;
}
}
function computeWeekdaysParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var minPieces = [],
shortPieces = [],
longPieces = [],
mixedPieces = [],
i,
mom,
minp,
shortp,
longp;
for (i = 0; i < 7; i++) {
// make the regex if we don't have it already
mom = createUTC([2000, 1]).day(i);
minp = regexEscape(this.weekdaysMin(mom, ''));
shortp = regexEscape(this.weekdaysShort(mom, ''));
longp = regexEscape(this.weekdays(mom, ''));
minPieces.push(minp);
shortPieces.push(shortp);
longPieces.push(longp);
mixedPieces.push(minp);
mixedPieces.push(shortp);
mixedPieces.push(longp);
}
// Sorting makes sure if one weekday (or abbr) is a prefix of another it
// will match the longer piece.
minPieces.sort(cmpLenRev);
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
this._weekdaysRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._weekdaysShortRegex = this._weekdaysRegex;
this._weekdaysMinRegex = this._weekdaysRegex;
this._weekdaysStrictRegex = new RegExp(
'^(' + longPieces.join('|') + ')',
'i'
);
this._weekdaysShortStrictRegex = new RegExp(
'^(' + shortPieces.join('|') + ')',
'i'
);
this._weekdaysMinStrictRegex = new RegExp(
'^(' + minPieces.join('|') + ')',
'i'
);
}
// FORMATTING
function hFormat() {
return this.hours() % 12 || 12;
}
function kFormat() {
return this.hours() || 24;
}
addFormatToken('H', ['HH', 2], 0, 'hour');
addFormatToken('h', ['hh', 2], 0, hFormat);
addFormatToken('k', ['kk', 2], 0, kFormat);
addFormatToken('hmm', 0, 0, function () {
return '' + hFormat.apply(this) + zeroFill(this.minutes(), 2);
});
addFormatToken('hmmss', 0, 0, function () {
return (
'' +
hFormat.apply(this) +
zeroFill(this.minutes(), 2) +
zeroFill(this.seconds(), 2)
);
});
addFormatToken('Hmm', 0, 0, function () {
return '' + this.hours() + zeroFill(this.minutes(), 2);
});
addFormatToken('Hmmss', 0, 0, function () {
return (
'' +
this.hours() +
zeroFill(this.minutes(), 2) +
zeroFill(this.seconds(), 2)
);
});
function meridiem(token, lowercase) {
addFormatToken(token, 0, 0, function () {
return this.localeData().meridiem(
this.hours(),
this.minutes(),
lowercase
);
});
}
meridiem('a', true);
meridiem('A', false);
// PARSING
function matchMeridiem(isStrict, locale) {
return locale._meridiemParse;
}
addRegexToken('a', matchMeridiem);
addRegexToken('A', matchMeridiem);
addRegexToken('H', match1to2, match1to2HasZero);
addRegexToken('h', match1to2, match1to2NoLeadingZero);
addRegexToken('k', match1to2, match1to2NoLeadingZero);
addRegexToken('HH', match1to2, match2);
addRegexToken('hh', match1to2, match2);
addRegexToken('kk', match1to2, match2);
addRegexToken('hmm', match3to4);
addRegexToken('hmmss', match5to6);
addRegexToken('Hmm', match3to4);
addRegexToken('Hmmss', match5to6);
addParseToken(['H', 'HH'], HOUR);
addParseToken(['k', 'kk'], function (input, array, config) {
var kInput = toInt(input);
array[HOUR] = kInput === 24 ? 0 : kInput;
});
addParseToken(['a', 'A'], function (input, array, config) {
config._isPm = config._locale.isPM(input);
config._meridiem = input;
});
addParseToken(['h', 'hh'], function (input, array, config) {
array[HOUR] = toInt(input);
getParsingFlags(config).bigHour = true;
});
addParseToken('hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
getParsingFlags(config).bigHour = true;
});
addParseToken('hmmss', function (input, array, config) {
var pos1 = input.length - 4,
pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
getParsingFlags(config).bigHour = true;
});
addParseToken('Hmm', function (input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
});
addParseToken('Hmmss', function (input, array, config) {
var pos1 = input.length - 4,
pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
});
// LOCALES
function localeIsPM(input) {
// IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays
// Using charAt should be more compatible.
return (input + '').toLowerCase().charAt(0) === 'p';
}
var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i,
// Setting the hour should keep the time, because the user explicitly
// specified which hour they want. So trying to maintain the same hour (in
// a new timezone) makes sense. Adding/subtracting hours does not follow
// this rule.
getSetHour = makeGetSet('Hours', true);
function localeMeridiem(hours, minutes, isLower) {
if (hours > 11) {
return isLower ? 'pm' : 'PM';
} else {
return isLower ? 'am' : 'AM';
}
}
var baseConfig = {
calendar: defaultCalendar,
longDateFormat: defaultLongDateFormat,
invalidDate: defaultInvalidDate,
ordinal: defaultOrdinal,
dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
relativeTime: defaultRelativeTime,
months: defaultLocaleMonths,
monthsShort: defaultLocaleMonthsShort,
week: defaultLocaleWeek,
weekdays: defaultLocaleWeekdays,
weekdaysMin: defaultLocaleWeekdaysMin,
weekdaysShort: defaultLocaleWeekdaysShort,
meridiemParse: defaultLocaleMeridiemParse,
};
// internal storage for locale config files
var locales = {},
localeFamilies = {},
globalLocale;
function commonPrefix(arr1, arr2) {
var i,
minl = Math.min(arr1.length, arr2.length);
for (i = 0; i < minl; i += 1) {
if (arr1[i] !== arr2[i]) {
return i;
}
}
return minl;
}
function normalizeLocale(key) {
return key ? key.toLowerCase().replace('_', '-') : key;
}
// pick the locale from the array
// try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each
// substring from most specific to least, but move to the next array item if it's a more specific variant than the current root
function chooseLocale(names) {
var i = 0,
j,
next,
locale,
split;
while (i < names.length) {
split = normalizeLocale(names[i]).split('-');
j = split.length;
next = normalizeLocale(names[i + 1]);
next = next ? next.split('-') : null;
while (j > 0) {
locale = loadLocale(split.slice(0, j).join('-'));
if (locale) {
return locale;
}
if (
next &&
next.length >= j &&
commonPrefix(split, next) >= j - 1
) {
//the next array item is better than a shallower substring of this one
break;
}
j--;
}
i++;
}
return globalLocale;
}
function isLocaleNameSane(name) {
// Prevent names that look like filesystem paths, i.e contain '/' or '\'
// Ensure name is available and function returns boolean
return !!(name && name.match('^[^/\\\\]*$'));
}
function loadLocale(name) {
var oldLocale = null,
aliasedRequire;
// TODO: Find a better way to register and load all the locales in Node
if (
locales[name] === undefined &&
typeof module !== 'undefined' &&
module &&
module.exports &&
isLocaleNameSane(name)
) {
try {
oldLocale = globalLocale._abbr;
aliasedRequire = require;
!(function webpackMissingModule() { var e = new Error("Cannot find module 'undefined'"); e.code = 'MODULE_NOT_FOUND'; throw e; }());
getSetGlobalLocale(oldLocale);
} catch (e) {
// mark as not found to avoid repeating expensive file require call causing high CPU
// when trying to find en-US, en_US, en-us for every format call
locales[name] = null; // null means not found
}
}
return locales[name];
}
// This function will load locale and then set the global locale. If
// no arguments are passed in, it will simply return the current global
// locale key.
function getSetGlobalLocale(key, values) {
var data;
if (key) {
if (isUndefined(values)) {
data = getLocale(key);
} else {
data = defineLocale(key, values);
}
if (data) {
// moment.duration._locale = moment._locale = data;
globalLocale = data;
} else {
if (typeof console !== 'undefined' && console.warn) {
//warn user if arguments are passed but the locale could not be set
console.warn(
'Locale ' + key + ' not found. Did you forget to load it?'
);
}
}
}
return globalLocale._abbr;
}
function defineLocale(name, config) {
if (config !== null) {
var locale,
parentConfig = baseConfig;
config.abbr = name;
if (locales[name] != null) {
deprecateSimple(
'defineLocaleOverride',
'use moment.updateLocale(localeName, config) to change ' +
'an existing locale. moment.defineLocale(localeName, ' +
'config) should only be used for creating a new locale ' +
'See http://momentjs.com/guides/#/warnings/define-locale/ for more info.'
);
parentConfig = locales[name]._config;
} else if (config.parentLocale != null) {
if (locales[config.parentLocale] != null) {
parentConfig = locales[config.parentLocale]._config;
} else {
locale = loadLocale(config.parentLocale);
if (locale != null) {
parentConfig = locale._config;
} else {
if (!localeFamilies[config.parentLocale]) {
localeFamilies[config.parentLocale] = [];
}
localeFamilies[config.parentLocale].push({
name: name,
config: config,
});
return null;
}
}
}
locales[name] = new Locale(mergeConfigs(parentConfig, config));
if (localeFamilies[name]) {
localeFamilies[name].forEach(function (x) {
defineLocale(x.name, x.config);
});
}
// backwards compat for now: also set the locale
// make sure we set the locale AFTER all child locales have been
// created, so we won't end up with the child locale set.
getSetGlobalLocale(name);
return locales[name];
} else {
// useful for testing
delete locales[name];
return null;
}
}
function updateLocale(name, config) {
if (config != null) {
var locale,
tmpLocale,
parentConfig = baseConfig;
if (locales[name] != null && locales[name].parentLocale != null) {
// Update existing child locale in-place to avoid memory-leaks
locales[name].set(mergeConfigs(locales[name]._config, config));
} else {
// MERGE
tmpLocale = loadLocale(name);
if (tmpLocale != null) {
parentConfig = tmpLocale._config;
}
config = mergeConfigs(parentConfig, config);
if (tmpLocale == null) {
// updateLocale is called for creating a new locale
// Set abbr so it will have a name (getters return
// undefined otherwise).
config.abbr = name;
}
locale = new Locale(config);
locale.parentLocale = locales[name];
locales[name] = locale;
}
// backwards compat for now: also set the locale
getSetGlobalLocale(name);
} else {
// pass null for config to unupdate, useful for tests
if (locales[name] != null) {
if (locales[name].parentLocale != null) {
locales[name] = locales[name].parentLocale;
if (name === getSetGlobalLocale()) {
getSetGlobalLocale(name);
}
} else if (locales[name] != null) {
delete locales[name];
}
}
}
return locales[name];
}
// returns locale data
function getLocale(key) {
var locale;
if (key && key._locale && key._locale._abbr) {
key = key._locale._abbr;
}
if (!key) {
return globalLocale;
}
if (!isArray(key)) {
//short-circuit everything else
locale = loadLocale(key);
if (locale) {
return locale;
}
key = [key];
}
return chooseLocale(key);
}
function listLocales() {
return keys(locales);
}
function checkOverflow(m) {
var overflow,
a = m._a;
if (a && getParsingFlags(m).overflow === -2) {
overflow =
a[MONTH] < 0 || a[MONTH] > 11
? MONTH
: a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH])
? DATE
: a[HOUR] < 0 ||
a[HOUR] > 24 ||
(a[HOUR] === 24 &&
(a[MINUTE] !== 0 ||
a[SECOND] !== 0 ||
a[MILLISECOND] !== 0))
? HOUR
: a[MINUTE] < 0 || a[MINUTE] > 59
? MINUTE
: a[SECOND] < 0 || a[SECOND] > 59
? SECOND
: a[MILLISECOND] < 0 || a[MILLISECOND] > 999
? MILLISECOND
: -1;
if (
getParsingFlags(m)._overflowDayOfYear &&
(overflow < YEAR || overflow > DATE)
) {
overflow = DATE;
}
if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
overflow = WEEK;
}
if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
overflow = WEEKDAY;
}
getParsingFlags(m).overflow = overflow;
}
return m;
}
// iso 8601 regex
// 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00)
var extendedIsoRegex =
/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
basicIsoRegex =
/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,
tzRegex = /Z|[+-]\d\d(?::?\d\d)?/,
isoDates = [
['YYYYYY-MM-DD', /[+-]\d{6}-\d\d-\d\d/],
['YYYY-MM-DD', /\d{4}-\d\d-\d\d/],
['GGGG-[W]WW-E', /\d{4}-W\d\d-\d/],
['GGGG-[W]WW', /\d{4}-W\d\d/, false],
['YYYY-DDD', /\d{4}-\d{3}/],
['YYYY-MM', /\d{4}-\d\d/, false],
['YYYYYYMMDD', /[+-]\d{10}/],
['YYYYMMDD', /\d{8}/],
['GGGG[W]WWE', /\d{4}W\d{3}/],
['GGGG[W]WW', /\d{4}W\d{2}/, false],
['YYYYDDD', /\d{7}/],
['YYYYMM', /\d{6}/, false],
['YYYY', /\d{4}/, false],
],
// iso time formats and regexes
isoTimes = [
['HH:mm:ss.SSSS', /\d\d:\d\d:\d\d\.\d+/],
['HH:mm:ss,SSSS', /\d\d:\d\d:\d\d,\d+/],
['HH:mm:ss', /\d\d:\d\d:\d\d/],
['HH:mm', /\d\d:\d\d/],
['HHmmss.SSSS', /\d\d\d\d\d\d\.\d+/],
['HHmmss,SSSS', /\d\d\d\d\d\d,\d+/],
['HHmmss', /\d\d\d\d\d\d/],
['HHmm', /\d\d\d\d/],
['HH', /\d\d/],
],
aspNetJsonRegex = /^\/?Date\((-?\d+)/i,
// RFC 2822 regex: For details see https://tools.ietf.org/html/rfc2822#section-3.3
rfc2822 =
/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,
obsOffsets = {
UT: 0,
GMT: 0,
EDT: -4 * 60,
EST: -5 * 60,
CDT: -5 * 60,
CST: -6 * 60,
MDT: -6 * 60,
MST: -7 * 60,
PDT: -7 * 60,
PST: -8 * 60,
};
// date from iso format
function configFromISO(config) {
var i,
l,
string = config._i,
match = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string),
allowTime,
dateFormat,
timeFormat,
tzFormat,
isoDatesLen = isoDates.length,
isoTimesLen = isoTimes.length;
if (match) {
getParsingFlags(config).iso = true;
for (i = 0, l = isoDatesLen; i < l; i++) {
if (isoDates[i][1].exec(match[1])) {
dateFormat = isoDates[i][0];
allowTime = isoDates[i][2] !== false;
break;
}
}
if (dateFormat == null) {
config._isValid = false;
return;
}
if (match[3]) {
for (i = 0, l = isoTimesLen; i < l; i++) {
if (isoTimes[i][1].exec(match[3])) {
// match[2] should be 'T' or space
timeFormat = (match[2] || ' ') + isoTimes[i][0];
break;
}
}
if (timeFormat == null) {
config._isValid = false;
return;
}
}
if (!allowTime && timeFormat != null) {
config._isValid = false;
return;
}
if (match[4]) {
if (tzRegex.exec(match[4])) {
tzFormat = 'Z';
} else {
config._isValid = false;
return;
}
}
config._f = dateFormat + (timeFormat || '') + (tzFormat || '');
configFromStringAndFormat(config);
} else {
config._isValid = false;
}
}
function extractFromRFC2822Strings(
yearStr,
monthStr,
dayStr,
hourStr,
minuteStr,
secondStr
) {
var result = [
untruncateYear(yearStr),
defaultLocaleMonthsShort.indexOf(monthStr),
parseInt(dayStr, 10),
parseInt(hourStr, 10),
parseInt(minuteStr, 10),
];
if (secondStr) {
result.push(parseInt(secondStr, 10));
}
return result;
}
function untruncateYear(yearStr) {
var year = parseInt(yearStr, 10);
if (year <= 49) {
return 2000 + year;
} else if (year <= 999) {
return 1900 + year;
}
return year;
}
function preprocessRFC2822(s) {
// Remove comments and folding whitespace and replace multiple-spaces with a single space
return s
.replace(/\([^()]*\)|[\n\t]/g, ' ')
.replace(/(\s\s+)/g, ' ')
.replace(/^\s\s*/, '')
.replace(/\s\s*$/, '');
}
function checkWeekday(weekdayStr, parsedInput, config) {
if (weekdayStr) {
// TODO: Replace the vanilla JS Date object with an independent day-of-week check.
var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr),
weekdayActual = new Date(
parsedInput[0],
parsedInput[1],
parsedInput[2]
).getDay();
if (weekdayProvided !== weekdayActual) {
getParsingFlags(config).weekdayMismatch = true;
config._isValid = false;
return false;
}
}
return true;
}
function calculateOffset(obsOffset, militaryOffset, numOffset) {
if (obsOffset) {
return obsOffsets[obsOffset];
} else if (militaryOffset) {
// the only allowed military tz is Z
return 0;
} else {
var hm = parseInt(numOffset, 10),
m = hm % 100,
h = (hm - m) / 100;
return h * 60 + m;
}
}
// date and time from ref 2822 format
function configFromRFC2822(config) {
var match = rfc2822.exec(preprocessRFC2822(config._i)),
parsedArray;
if (match) {
parsedArray = extractFromRFC2822Strings(
match[4],
match[3],
match[2],
match[5],
match[6],
match[7]
);
if (!checkWeekday(match[1], parsedArray, config)) {
return;
}
config._a = parsedArray;
config._tzm = calculateOffset(match[8], match[9], match[10]);
config._d = createUTCDate.apply(null, config._a);
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
getParsingFlags(config).rfc2822 = true;
} else {
config._isValid = false;
}
}
// date from 1) ASP.NET, 2) ISO, 3) RFC 2822 formats, or 4) optional fallback if parsing isn't strict
function configFromString(config) {
var matched = aspNetJsonRegex.exec(config._i);
if (matched !== null) {
config._d = new Date(+matched[1]);
return;
}
configFromISO(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
configFromRFC2822(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
if (config._strict) {
config._isValid = false;
} else {
// Final attempt, use Input Fallback
hooks.createFromInputFallback(config);
}
}
hooks.createFromInputFallback = deprecate(
'value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), ' +
'which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are ' +
'discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.',
function (config) {
config._d = new Date(config._i + (config._useUTC ? ' UTC' : ''));
}
);
// Pick the first defined of two or three arguments.
function defaults(a, b, c) {
if (a != null) {
return a;
}
if (b != null) {
return b;
}
return c;
}
function currentDateArray(config) {
// hooks is actually the exported moment object
var nowValue = new Date(hooks.now());
if (config._useUTC) {
return [
nowValue.getUTCFullYear(),
nowValue.getUTCMonth(),
nowValue.getUTCDate(),
];
}
return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
}
// convert an array to a date.
// the array should mirror the parameters below
// note: all values past the year are optional and will default to the lowest possible value.
// [year, month, day , hour, minute, second, millisecond]
function configFromArray(config) {
var i,
date,
input = [],
currentDate,
expectedWeekday,
yearToUse;
if (config._d) {
return;
}
currentDate = currentDateArray(config);
//compute day of the year from weeks and weekdays
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
dayOfYearFromWeekInfo(config);
}
//if the day of the year is set, figure out what it is
if (config._dayOfYear != null) {
yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
if (
config._dayOfYear > daysInYear(yearToUse) ||
config._dayOfYear === 0
) {
getParsingFlags(config)._overflowDayOfYear = true;
}
date = createUTCDate(yearToUse, 0, config._dayOfYear);
config._a[MONTH] = date.getUTCMonth();
config._a[DATE] = date.getUTCDate();
}
// Default to current date.
// * if no year, month, day of month are given, default to today
// * if day of month is given, default month and year
// * if month is given, default only year
// * if year is given, don't default anything
for (i = 0; i < 3 && config._a[i] == null; ++i) {
config._a[i] = input[i] = currentDate[i];
}
// Zero out whatever was not defaulted, including time
for (; i < 7; i++) {
config._a[i] = input[i] =
config._a[i] == null ? (i === 2 ? 1 : 0) : config._a[i];
}
// Check for 24:00:00.000
if (
config._a[HOUR] === 24 &&
config._a[MINUTE] === 0 &&
config._a[SECOND] === 0 &&
config._a[MILLISECOND] === 0
) {
config._nextDay = true;
config._a[HOUR] = 0;
}
config._d = (config._useUTC ? createUTCDate : createDate).apply(
null,
input
);
expectedWeekday = config._useUTC
? config._d.getUTCDay()
: config._d.getDay();
// Apply timezone offset from input. The actual utcOffset can be changed
// with parseZone.
if (config._tzm != null) {
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
}
if (config._nextDay) {
config._a[HOUR] = 24;
}
// check for mismatching day of week
if (
config._w &&
typeof config._w.d !== 'undefined' &&
config._w.d !== expectedWeekday
) {
getParsingFlags(config).weekdayMismatch = true;
}
}
function dayOfYearFromWeekInfo(config) {
var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
dow = 1;
doy = 4;
// TODO: We need to take the current isoWeekYear, but that depends on
// how we interpret now (local, utc, fixed offset). So create
// a now version of current config (take local/utc/offset flags, and
// create now).
weekYear = defaults(
w.GG,
config._a[YEAR],
weekOfYear(createLocal(), 1, 4).year
);
week = defaults(w.W, 1);
weekday = defaults(w.E, 1);
if (weekday < 1 || weekday > 7) {
weekdayOverflow = true;
}
} else {
dow = config._locale._week.dow;
doy = config._locale._week.doy;
curWeek = weekOfYear(createLocal(), dow, doy);
weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
// Default to current week.
week = defaults(w.w, curWeek.week);
if (w.d != null) {
// weekday -- low day numbers are considered next week
weekday = w.d;
if (weekday < 0 || weekday > 6) {
weekdayOverflow = true;
}
} else if (w.e != null) {
// local weekday -- counting starts from beginning of week
weekday = w.e + dow;
if (w.e < 0 || w.e > 6) {
weekdayOverflow = true;
}
} else {
// default to beginning of week
weekday = dow;
}
}
if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
getParsingFlags(config)._overflowWeeks = true;
} else if (weekdayOverflow != null) {
getParsingFlags(config)._overflowWeekday = true;
} else {
temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
config._a[YEAR] = temp.year;
config._dayOfYear = temp.dayOfYear;
}
}
// constant that refers to the ISO standard
hooks.ISO_8601 = function () {};
// constant that refers to the RFC 2822 form
hooks.RFC_2822 = function () {};
// date from string and format string
function configFromStringAndFormat(config) {
// TODO: Move this to another part of the creation flow to prevent circular deps
if (config._f === hooks.ISO_8601) {
configFromISO(config);
return;
}
if (config._f === hooks.RFC_2822) {
configFromRFC2822(config);
return;
}
config._a = [];
getParsingFlags(config).empty = true;
// This array is used to make a Date, either with `new Date` or `Date.UTC`
var string = '' + config._i,
i,
parsedInput,
tokens,
token,
skipped,
stringLength = string.length,
totalParsedInputLength = 0,
era,
tokenLen;
tokens =
expandFormat(config._f, config._locale).match(formattingTokens) || [];
tokenLen = tokens.length;
for (i = 0; i < tokenLen; i++) {
token = tokens[i];
parsedInput = (string.match(getParseRegexForToken(token, config)) ||
[])[0];
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
getParsingFlags(config).unusedInput.push(skipped);
}
string = string.slice(
string.indexOf(parsedInput) + parsedInput.length
);
totalParsedInputLength += parsedInput.length;
}
// don't parse if it's not a known token
if (formatTokenFunctions[token]) {
if (parsedInput) {
getParsingFlags(config).empty = false;
} else {
getParsingFlags(config).unusedTokens.push(token);
}
addTimeToArrayFromToken(token, parsedInput, config);
} else if (config._strict && !parsedInput) {
getParsingFlags(config).unusedTokens.push(token);
}
}
// add remaining unparsed input length to the string
getParsingFlags(config).charsLeftOver =
stringLength - totalParsedInputLength;
if (string.length > 0) {
getParsingFlags(config).unusedInput.push(string);
}
// clear _12h flag if hour is <= 12
if (
config._a[HOUR] <= 12 &&
getParsingFlags(config).bigHour === true &&
config._a[HOUR] > 0
) {
getParsingFlags(config).bigHour = undefined;
}
getParsingFlags(config).parsedDateParts = config._a.slice(0);
getParsingFlags(config).meridiem = config._meridiem;
// handle meridiem
config._a[HOUR] = meridiemFixWrap(
config._locale,
config._a[HOUR],
config._meridiem
);
// handle era
era = getParsingFlags(config).era;
if (era !== null) {
config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
}
configFromArray(config);
checkOverflow(config);
}
function meridiemFixWrap(locale, hour, meridiem) {
var isPm;
if (meridiem == null) {
// nothing to do
return hour;
}
if (locale.meridiemHour != null) {
return locale.meridiemHour(hour, meridiem);
} else if (locale.isPM != null) {
// Fallback
isPm = locale.isPM(meridiem);
if (isPm && hour < 12) {
hour += 12;
}
if (!isPm && hour === 12) {
hour = 0;
}
return hour;
} else {
// this is not supposed to happen
return hour;
}
}
// date from string and array of format strings
function configFromStringAndArray(config) {
var tempConfig,
bestMoment,
scoreToBeat,
i,
currentScore,
validFormatFound,
bestFormatIsValid = false,
configfLen = config._f.length;
if (configfLen === 0) {
getParsingFlags(config).invalidFormat = true;
config._d = new Date(NaN);
return;
}
for (i = 0; i < configfLen; i++) {
currentScore = 0;
validFormatFound = false;
tempConfig = copyConfig({}, config);
if (config._useUTC != null) {
tempConfig._useUTC = config._useUTC;
}
tempConfig._f = config._f[i];
configFromStringAndFormat(tempConfig);
if (isValid(tempConfig)) {
validFormatFound = true;
}
// if there is any input that was not parsed add a penalty for that format
currentScore += getParsingFlags(tempConfig).charsLeftOver;
//or tokens
currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
getParsingFlags(tempConfig).score = currentScore;
if (!bestFormatIsValid) {
if (
scoreToBeat == null ||
currentScore < scoreToBeat ||
validFormatFound
) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
if (validFormatFound) {
bestFormatIsValid = true;
}
}
} else {
if (currentScore < scoreToBeat) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
}
}
}
extend(config, bestMoment || tempConfig);
}
function configFromObject(config) {
if (config._d) {
return;
}
var i = normalizeObjectUnits(config._i),
dayOrDate = i.day === undefined ? i.date : i.day;
config._a = map(
[i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
function (obj) {
return obj && parseInt(obj, 10);
}
);
configFromArray(config);
}
function createFromConfig(config) {
var res = new Moment(checkOverflow(prepareConfig(config)));
if (res._nextDay) {
// Adding is smart enough around DST
res.add(1, 'd');
res._nextDay = undefined;
}
return res;
}
function prepareConfig(config) {
var input = config._i,
format = config._f;
config._locale = config._locale || getLocale(config._l);
if (input === null || (format === undefined && input === '')) {
return createInvalid({ nullInput: true });
}
if (typeof input === 'string') {
config._i = input = config._locale.preparse(input);
}
if (isMoment(input)) {
return new Moment(checkOverflow(input));
} else if (isDate(input)) {
config._d = input;
} else if (isArray(format)) {
configFromStringAndArray(config);
} else if (format) {
configFromStringAndFormat(config);
} else {
configFromInput(config);
}
if (!isValid(config)) {
config._d = null;
}
return config;
}
function configFromInput(config) {
var input = config._i;
if (isUndefined(input)) {
config._d = new Date(hooks.now());
} else if (isDate(input)) {
config._d = new Date(input.valueOf());
} else if (typeof input === 'string') {
configFromString(config);
} else if (isArray(input)) {
config._a = map(input.slice(0), function (obj) {
return parseInt(obj, 10);
});
configFromArray(config);
} else if (isObject(input)) {
configFromObject(config);
} else if (isNumber(input)) {
// from milliseconds
config._d = new Date(input);
} else {
hooks.createFromInputFallback(config);
}
}
function createLocalOrUTC(input, format, locale, strict, isUTC) {
var c = {};
if (format === true || format === false) {
strict = format;
format = undefined;
}
if (locale === true || locale === false) {
strict = locale;
locale = undefined;
}
if (
(isObject(input) && isObjectEmpty(input)) ||
(isArray(input) && input.length === 0)
) {
input = undefined;
}
// object construction must be done this way.
// https://github.com/moment/moment/issues/1423
c._isAMomentObject = true;
c._useUTC = c._isUTC = isUTC;
c._l = locale;
c._i = input;
c._f = format;
c._strict = strict;
return createFromConfig(c);
}
function createLocal(input, format, locale, strict) {
return createLocalOrUTC(input, format, locale, strict, false);
}
var prototypeMin = deprecate(
'moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other < this ? this : other;
} else {
return createInvalid();
}
}
),
prototypeMax = deprecate(
'moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/',
function () {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other > this ? this : other;
} else {
return createInvalid();
}
}
);
// Pick a moment m from moments so that m[fn](other) is true for all
// other. This relies on the function fn to be transitive.
//
// moments should either be an array of moment objects or an array, whose
// first element is an array of moment objects.
function pickBy(fn, moments) {
var res, i;
if (moments.length === 1 && isArray(moments[0])) {
moments = moments[0];
}
if (!moments.length) {
return createLocal();
}
res = moments[0];
for (i = 1; i < moments.length; ++i) {
if (!moments[i].isValid() || moments[i][fn](res)) {
res = moments[i];
}
}
return res;
}
// TODO: Use [].sort instead?
function min() {
var args = [].slice.call(arguments, 0);
return pickBy('isBefore', args);
}
function max() {
var args = [].slice.call(arguments, 0);
return pickBy('isAfter', args);
}
var now = function () {
return Date.now ? Date.now() : +new Date();
};
var ordering = [
'year',
'quarter',
'month',
'week',
'day',
'hour',
'minute',
'second',
'millisecond',
];
function isDurationValid(m) {
var key,
unitHasDecimal = false,
i,
orderLen = ordering.length;
for (key in m) {
if (
hasOwnProp(m, key) &&
!(
indexOf.call(ordering, key) !== -1 &&
(m[key] == null || !isNaN(m[key]))
)
) {
return false;
}
}
for (i = 0; i < orderLen; ++i) {
if (m[ordering[i]]) {
if (unitHasDecimal) {
return false; // only allow non-integers for smallest unit
}
if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
unitHasDecimal = true;
}
}
}
return true;
}
function isValid$1() {
return this._isValid;
}
function createInvalid$1() {
return createDuration(NaN);
}
function Duration(duration) {
var normalizedInput = normalizeObjectUnits(duration),
years = normalizedInput.year || 0,
quarters = normalizedInput.quarter || 0,
months = normalizedInput.month || 0,
weeks = normalizedInput.week || normalizedInput.isoWeek || 0,
days = normalizedInput.day || 0,
hours = normalizedInput.hour || 0,
minutes = normalizedInput.minute || 0,
seconds = normalizedInput.second || 0,
milliseconds = normalizedInput.millisecond || 0;
this._isValid = isDurationValid(normalizedInput);
// representation for dateAddRemove
this._milliseconds =
+milliseconds +
seconds * 1e3 + // 1000
minutes * 6e4 + // 1000 * 60
hours * 1000 * 60 * 60; //using 1000 * 60 * 60 instead of 36e5 to avoid floating point rounding errors https://github.com/moment/moment/issues/2978
// Because of dateAddRemove treats 24 hours as different from a
// day when working around DST, we need to store them separately
this._days = +days + weeks * 7;
// It is impossible to translate months into days without knowing
// which months you are are talking about, so we have to store
// it separately.
this._months = +months + quarters * 3 + years * 12;
this._data = {};
this._locale = getLocale();
this._bubble();
}
function isDuration(obj) {
return obj instanceof Duration;
}
function absRound(number) {
if (number < 0) {
return Math.round(-1 * number) * -1;
} else {
return Math.round(number);
}
}
// compare two arrays, return the number of differences
function compareArrays(array1, array2, dontConvert) {
var len = Math.min(array1.length, array2.length),
lengthDiff = Math.abs(array1.length - array2.length),
diffs = 0,
i;
for (i = 0; i < len; i++) {
if (
(dontConvert && array1[i] !== array2[i]) ||
(!dontConvert && toInt(array1[i]) !== toInt(array2[i]))
) {
diffs++;
}
}
return diffs + lengthDiff;
}
// FORMATTING
function offset(token, separator) {
addFormatToken(token, 0, 0, function () {
var offset = this.utcOffset(),
sign = '+';
if (offset < 0) {
offset = -offset;
sign = '-';
}
return (
sign +
zeroFill(~~(offset / 60), 2) +
separator +
zeroFill(~~offset % 60, 2)
);
});
}
offset('Z', ':');
offset('ZZ', '');
// PARSING
addRegexToken('Z', matchShortOffset);
addRegexToken('ZZ', matchShortOffset);
addParseToken(['Z', 'ZZ'], function (input, array, config) {
config._useUTC = true;
config._tzm = offsetFromString(matchShortOffset, input);
});
// HELPERS
// timezone chunker
// '+10:00' > ['10', '00']
// '-1530' > ['-15', '30']
var chunkOffset = /([\+\-]|\d\d)/gi;
function offsetFromString(matcher, string) {
var matches = (string || '').match(matcher),
chunk,
parts,
minutes;
if (matches === null) {
return null;
}
chunk = matches[matches.length - 1] || [];
parts = (chunk + '').match(chunkOffset) || ['-', 0, 0];
minutes = +(parts[1] * 60) + toInt(parts[2]);
return minutes === 0 ? 0 : parts[0] === '+' ? minutes : -minutes;
}
// Return a moment from input, that is local/utc/zone equivalent to model.
function cloneWithOffset(input, model) {
var res, diff;
if (model._isUTC) {
res = model.clone();
diff =
(isMoment(input) || isDate(input)
? input.valueOf()
: createLocal(input).valueOf()) - res.valueOf();
// Use low-level api, because this fn is low-level api.
res._d.setTime(res._d.valueOf() + diff);
hooks.updateOffset(res, false);
return res;
} else {
return createLocal(input).local();
}
}
function getDateOffset(m) {
// On Firefox.24 Date#getTimezoneOffset returns a floating point.
// https://github.com/moment/moment/pull/1871
return -Math.round(m._d.getTimezoneOffset());
}
// HOOKS
// This function will be called whenever a moment is mutated.
// It is intended to keep the offset in sync with the timezone.
hooks.updateOffset = function () {};
// MOMENTS
// keepLocalTime = true means only change the timezone, without
// affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]-->
// 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset
// +0200, so we adjust the time as needed, to be valid.
//
// Keeping the time actually adds/subtracts (one hour)
// from the actual represented time. That is why we call updateOffset
// a second time. In case it wants us to change the offset again
// _changeInProgress == true case, then we have to adjust, because
// there is no such time in the given timezone.
function getSetOffset(input, keepLocalTime, keepMinutes) {
var offset = this._offset || 0,
localAdjust;
if (!this.isValid()) {
return input != null ? this : NaN;
}
if (input != null) {
if (typeof input === 'string') {
input = offsetFromString(matchShortOffset, input);
if (input === null) {
return this;
}
} else if (Math.abs(input) < 16 && !keepMinutes) {
input = input * 60;
}
if (!this._isUTC && keepLocalTime) {
localAdjust = getDateOffset(this);
}
this._offset = input;
this._isUTC = true;
if (localAdjust != null) {
this.add(localAdjust, 'm');
}
if (offset !== input) {
if (!keepLocalTime || this._changeInProgress) {
addSubtract(
this,
createDuration(input - offset, 'm'),
1,
false
);
} else if (!this._changeInProgress) {
this._changeInProgress = true;
hooks.updateOffset(this, true);
this._changeInProgress = null;
}
}
return this;
} else {
return this._isUTC ? offset : getDateOffset(this);
}
}
function getSetZone(input, keepLocalTime) {
if (input != null) {
if (typeof input !== 'string') {
input = -input;
}
this.utcOffset(input, keepLocalTime);
return this;
} else {
return -this.utcOffset();
}
}
function setOffsetToUTC(keepLocalTime) {
return this.utcOffset(0, keepLocalTime);
}
function setOffsetToLocal(keepLocalTime) {
if (this._isUTC) {
this.utcOffset(0, keepLocalTime);
this._isUTC = false;
if (keepLocalTime) {
this.subtract(getDateOffset(this), 'm');
}
}
return this;
}
function setOffsetToParsedOffset() {
if (this._tzm != null) {
this.utcOffset(this._tzm, false, true);
} else if (typeof this._i === 'string') {
var tZone = offsetFromString(matchOffset, this._i);
if (tZone != null) {
this.utcOffset(tZone);
} else {
this.utcOffset(0, true);
}
}
return this;
}
function hasAlignedHourOffset(input) {
if (!this.isValid()) {
return false;
}
input = input ? createLocal(input).utcOffset() : 0;
return (this.utcOffset() - input) % 60 === 0;
}
function isDaylightSavingTime() {
return (
this.utcOffset() > this.clone().month(0).utcOffset() ||
this.utcOffset() > this.clone().month(5).utcOffset()
);
}
function isDaylightSavingTimeShifted() {
if (!isUndefined(this._isDSTShifted)) {
return this._isDSTShifted;
}
var c = {},
other;
copyConfig(c, this);
c = prepareConfig(c);
if (c._a) {
other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
this._isDSTShifted =
this.isValid() && compareArrays(c._a, other.toArray()) > 0;
} else {
this._isDSTShifted = false;
}
return this._isDSTShifted;
}
function isLocal() {
return this.isValid() ? !this._isUTC : false;
}
function isUtcOffset() {
return this.isValid() ? this._isUTC : false;
}
function isUtc() {
return this.isValid() ? this._isUTC && this._offset === 0 : false;
}
// ASP.NET json date format regex
var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,
// from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html
// somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere
// and further modified to allow for strings containing both week and day
isoRegex =
/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function createDuration(input, key) {
var duration = input,
// matching against regexp is expensive, do it on demand
match = null,
sign,
ret,
diffRes;
if (isDuration(input)) {
duration = {
ms: input._milliseconds,
d: input._days,
M: input._months,
};
} else if (isNumber(input) || !isNaN(+input)) {
duration = {};
if (key) {
duration[key] = +input;
} else {
duration.milliseconds = +input;
}
} else if ((match = aspNetRegex.exec(input))) {
sign = match[1] === '-' ? -1 : 1;
duration = {
y: 0,
d: toInt(match[DATE]) * sign,
h: toInt(match[HOUR]) * sign,
m: toInt(match[MINUTE]) * sign,
s: toInt(match[SECOND]) * sign,
ms: toInt(absRound(match[MILLISECOND] * 1000)) * sign, // the millisecond decimal point is included in the match
};
} else if ((match = isoRegex.exec(input))) {
sign = match[1] === '-' ? -1 : 1;
duration = {
y: parseIso(match[2], sign),
M: parseIso(match[3], sign),
w: parseIso(match[4], sign),
d: parseIso(match[5], sign),
h: parseIso(match[6], sign),
m: parseIso(match[7], sign),
s: parseIso(match[8], sign),
};
} else if (duration == null) {
// checks for null or undefined
duration = {};
} else if (
typeof duration === 'object' &&
('from' in duration || 'to' in duration)
) {
diffRes = momentsDifference(
createLocal(duration.from),
createLocal(duration.to)
);
duration = {};
duration.ms = diffRes.milliseconds;
duration.M = diffRes.months;
}
ret = new Duration(duration);
if (isDuration(input) && hasOwnProp(input, '_locale')) {
ret._locale = input._locale;
}
if (isDuration(input) && hasOwnProp(input, '_isValid')) {
ret._isValid = input._isValid;
}
return ret;
}
createDuration.fn = Duration.prototype;
createDuration.invalid = createInvalid$1;
function parseIso(inp, sign) {
// We'd normally use ~~inp for this, but unfortunately it also
// converts floats to ints.
// inp may be undefined, so careful calling replace on it.
var res = inp && parseFloat(inp.replace(',', '.'));
// apply sign while we're at it
return (isNaN(res) ? 0 : res) * sign;
}
function positiveMomentsDifference(base, other) {
var res = {};
res.months =
other.month() - base.month() + (other.year() - base.year()) * 12;
if (base.clone().add(res.months, 'M').isAfter(other)) {
--res.months;
}
res.milliseconds = +other - +base.clone().add(res.months, 'M');
return res;
}
function momentsDifference(base, other) {
var res;
if (!(base.isValid() && other.isValid())) {
return { milliseconds: 0, months: 0 };
}
other = cloneWithOffset(other, base);
if (base.isBefore(other)) {
res = positiveMomentsDifference(base, other);
} else {
res = positiveMomentsDifference(other, base);
res.milliseconds = -res.milliseconds;
res.months = -res.months;
}
return res;
}
// TODO: remove 'name' arg after deprecation is removed
function createAdder(direction, name) {
return function (val, period) {
var dur, tmp;
//invert the arguments, but complain about it
if (period !== null && !isNaN(+period)) {
deprecateSimple(
name,
'moment().' +
name +
'(period, number) is deprecated. Please use moment().' +
name +
'(number, period). ' +
'See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.'
);
tmp = val;
val = period;
period = tmp;
}
dur = createDuration(val, period);
addSubtract(this, dur, direction);
return this;
};
}
function addSubtract(mom, duration, isAdding, updateOffset) {
var milliseconds = duration._milliseconds,
days = absRound(duration._days),
months = absRound(duration._months);
if (!mom.isValid()) {
// No op
return;
}
updateOffset = updateOffset == null ? true : updateOffset;
if (months) {
setMonth(mom, get(mom, 'Month') + months * isAdding);
}
if (days) {
set$1(mom, 'Date', get(mom, 'Date') + days * isAdding);
}
if (milliseconds) {
mom._d.setTime(mom._d.valueOf() + milliseconds * isAdding);
}
if (updateOffset) {
hooks.updateOffset(mom, days || months);
}
}
var add = createAdder(1, 'add'),
subtract = createAdder(-1, 'subtract');
function isString(input) {
return typeof input === 'string' || input instanceof String;
}
// type MomentInput = Moment | Date | string | number | (number | string)[] | MomentInputObject | void; // null | undefined
function isMomentInput(input) {
return (
isMoment(input) ||
isDate(input) ||
isString(input) ||
isNumber(input) ||
isNumberOrStringArray(input) ||
isMomentInputObject(input) ||
input === null ||
input === undefined
);
}
function isMomentInputObject(input) {
var objectTest = isObject(input) && !isObjectEmpty(input),
propertyTest = false,
properties = [
'years',
'year',
'y',
'months',
'month',
'M',
'days',
'day',
'd',
'dates',
'date',
'D',
'hours',
'hour',
'h',
'minutes',
'minute',
'm',
'seconds',
'second',
's',
'milliseconds',
'millisecond',
'ms',
],
i,
property,
propertyLen = properties.length;
for (i = 0; i < propertyLen; i += 1) {
property = properties[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function isNumberOrStringArray(input) {
var arrayTest = isArray(input),
dataTypeTest = false;
if (arrayTest) {
dataTypeTest =
input.filter(function (item) {
return !isNumber(item) && isString(input);
}).length === 0;
}
return arrayTest && dataTypeTest;
}
function isCalendarSpec(input) {
var objectTest = isObject(input) && !isObjectEmpty(input),
propertyTest = false,
properties = [
'sameDay',
'nextDay',
'lastDay',
'nextWeek',
'lastWeek',
'sameElse',
],
i,
property;
for (i = 0; i < properties.length; i += 1) {
property = properties[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function getCalendarFormat(myMoment, now) {
var diff = myMoment.diff(now, 'days', true);
return diff < -6
? 'sameElse'
: diff < -1
? 'lastWeek'
: diff < 0
? 'lastDay'
: diff < 1
? 'sameDay'
: diff < 2
? 'nextDay'
: diff < 7
? 'nextWeek'
: 'sameElse';
}
function calendar$1(time, formats) {
// Support for single parameter, formats only overload to the calendar function
if (arguments.length === 1) {
if (!arguments[0]) {
time = undefined;
formats = undefined;
} else if (isMomentInput(arguments[0])) {
time = arguments[0];
formats = undefined;
} else if (isCalendarSpec(arguments[0])) {
formats = arguments[0];
time = undefined;
}
}
// We want to compare the start of today, vs this.
// Getting start-of-today depends on whether we're local/utc/offset or not.
var now = time || createLocal(),
sod = cloneWithOffset(now, this).startOf('day'),
format = hooks.calendarFormat(this, sod) || 'sameElse',
output =
formats &&
(isFunction(formats[format])
? formats[format].call(this, now)
: formats[format]);
return this.format(
output || this.localeData().calendar(format, this, createLocal(now))
);
}
function clone() {
return new Moment(this);
}
function isAfter(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() > localInput.valueOf();
} else {
return localInput.valueOf() < this.clone().startOf(units).valueOf();
}
}
function isBefore(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() < localInput.valueOf();
} else {
return this.clone().endOf(units).valueOf() < localInput.valueOf();
}
}
function isBetween(from, to, units, inclusivity) {
var localFrom = isMoment(from) ? from : createLocal(from),
localTo = isMoment(to) ? to : createLocal(to);
if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
return false;
}
inclusivity = inclusivity || '()';
return (
(inclusivity[0] === '('
? this.isAfter(localFrom, units)
: !this.isBefore(localFrom, units)) &&
(inclusivity[1] === ')'
? this.isBefore(localTo, units)
: !this.isAfter(localTo, units))
);
}
function isSame(input, units) {
var localInput = isMoment(input) ? input : createLocal(input),
inputMs;
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || 'millisecond';
if (units === 'millisecond') {
return this.valueOf() === localInput.valueOf();
} else {
inputMs = localInput.valueOf();
return (
this.clone().startOf(units).valueOf() <= inputMs &&
inputMs <= this.clone().endOf(units).valueOf()
);
}
}
function isSameOrAfter(input, units) {
return this.isSame(input, units) || this.isAfter(input, units);
}
function isSameOrBefore(input, units) {
return this.isSame(input, units) || this.isBefore(input, units);
}
function diff(input, units, asFloat) {
var that, zoneDelta, output;
if (!this.isValid()) {
return NaN;
}
that = cloneWithOffset(input, this);
if (!that.isValid()) {
return NaN;
}
zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
units = normalizeUnits(units);
switch (units) {
case 'year':
output = monthDiff(this, that) / 12;
break;
case 'month':
output = monthDiff(this, that);
break;
case 'quarter':
output = monthDiff(this, that) / 3;
break;
case 'second':
output = (this - that) / 1e3;
break; // 1000
case 'minute':
output = (this - that) / 6e4;
break; // 1000 * 60
case 'hour':
output = (this - that) / 36e5;
break; // 1000 * 60 * 60
case 'day':
output = (this - that - zoneDelta) / 864e5;
break; // 1000 * 60 * 60 * 24, negate dst
case 'week':
output = (this - that - zoneDelta) / 6048e5;
break; // 1000 * 60 * 60 * 24 * 7, negate dst
default:
output = this - that;
}
return asFloat ? output : absFloor(output);
}
function monthDiff(a, b) {
if (a.date() < b.date()) {
// end-of-month calculations work correct when the start month has more
// days than the end month.
return -monthDiff(b, a);
}
// difference in months
var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()),
// b is in (anchor - 1 month, anchor + 1 month)
anchor = a.clone().add(wholeMonthDiff, 'months'),
anchor2,
adjust;
if (b - anchor < 0) {
anchor2 = a.clone().add(wholeMonthDiff - 1, 'months');
// linear across the month
adjust = (b - anchor) / (anchor - anchor2);
} else {
anchor2 = a.clone().add(wholeMonthDiff + 1, 'months');
// linear across the month
adjust = (b - anchor) / (anchor2 - anchor);
}
//check for negative zero, return zero if negative zero
return -(wholeMonthDiff + adjust) || 0;
}
hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ';
hooks.defaultFormatUtc = 'YYYY-MM-DDTHH:mm:ss[Z]';
function toString() {
return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ');
}
function toISOString(keepOffset) {
if (!this.isValid()) {
return null;
}
var utc = keepOffset !== true,
m = utc ? this.clone().utc() : this;
if (m.year() < 0 || m.year() > 9999) {
return formatMoment(
m,
utc
? 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'
: 'YYYYYY-MM-DD[T]HH:mm:ss.SSSZ'
);
}
if (isFunction(Date.prototype.toISOString)) {
// native implementation is ~50x faster, use it when we can
if (utc) {
return this.toDate().toISOString();
} else {
return new Date(this.valueOf() + this.utcOffset() * 60 * 1000)
.toISOString()
.replace('Z', formatMoment(m, 'Z'));
}
}
return formatMoment(
m,
utc ? 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]' : 'YYYY-MM-DD[T]HH:mm:ss.SSSZ'
);
}
/**
* Return a human readable representation of a moment that can
* also be evaluated to get a new moment which is the same
*
* @link https://nodejs.org/dist/latest/docs/api/util.html#util_custom_inspect_function_on_objects
*/
function inspect() {
if (!this.isValid()) {
return 'moment.invalid(/* ' + this._i + ' */)';
}
var func = 'moment',
zone = '',
prefix,
year,
datetime,
suffix;
if (!this.isLocal()) {
func = this.utcOffset() === 0 ? 'moment.utc' : 'moment.parseZone';
zone = 'Z';
}
prefix = '[' + func + '("]';
year = 0 <= this.year() && this.year() <= 9999 ? 'YYYY' : 'YYYYYY';
datetime = '-MM-DD[T]HH:mm:ss.SSS';
suffix = zone + '[")]';
return this.format(prefix + year + datetime + suffix);
}
function format(inputString) {
if (!inputString) {
inputString = this.isUtc()
? hooks.defaultFormatUtc
: hooks.defaultFormat;
}
var output = formatMoment(this, inputString);
return this.localeData().postformat(output);
}
function from(time, withoutSuffix) {
if (
this.isValid() &&
((isMoment(time) && time.isValid()) || createLocal(time).isValid())
) {
return createDuration({ to: this, from: time })
.locale(this.locale())
.humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function fromNow(withoutSuffix) {
return this.from(createLocal(), withoutSuffix);
}
function to(time, withoutSuffix) {
if (
this.isValid() &&
((isMoment(time) && time.isValid()) || createLocal(time).isValid())
) {
return createDuration({ from: this, to: time })
.locale(this.locale())
.humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function toNow(withoutSuffix) {
return this.to(createLocal(), withoutSuffix);
}
// If passed a locale key, it will set the locale for this
// instance. Otherwise, it will return the locale configuration
// variables for this instance.
function locale(key) {
var newLocaleData;
if (key === undefined) {
return this._locale._abbr;
} else {
newLocaleData = getLocale(key);
if (newLocaleData != null) {
this._locale = newLocaleData;
}
return this;
}
}
var lang = deprecate(
'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.',
function (key) {
if (key === undefined) {
return this.localeData();
} else {
return this.locale(key);
}
}
);
function localeData() {
return this._locale;
}
var MS_PER_SECOND = 1000,
MS_PER_MINUTE = 60 * MS_PER_SECOND,
MS_PER_HOUR = 60 * MS_PER_MINUTE,
MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
// actual modulo - handles negative numbers (for dates before 1970):
function mod$1(dividend, divisor) {
return ((dividend % divisor) + divisor) % divisor;
}
function localStartOfDate(y, m, d) {
// the date constructor remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
// preserve leap years using a full 400 year cycle, then reset
return new Date(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return new Date(y, m, d).valueOf();
}
}
function utcStartOfDate(y, m, d) {
// Date.UTC remaps years 0-99 to 1900-1999
if (y < 100 && y >= 0) {
// preserve leap years using a full 400 year cycle, then reset
return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return Date.UTC(y, m, d);
}
}
function startOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond' || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case 'year':
time = startOfDate(this.year(), 0, 1);
break;
case 'quarter':
time = startOfDate(
this.year(),
this.month() - (this.month() % 3),
1
);
break;
case 'month':
time = startOfDate(this.year(), this.month(), 1);
break;
case 'week':
time = startOfDate(
this.year(),
this.month(),
this.date() - this.weekday()
);
break;
case 'isoWeek':
time = startOfDate(
this.year(),
this.month(),
this.date() - (this.isoWeekday() - 1)
);
break;
case 'day':
case 'date':
time = startOfDate(this.year(), this.month(), this.date());
break;
case 'hour':
time = this._d.valueOf();
time -= mod$1(
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
MS_PER_HOUR
);
break;
case 'minute':
time = this._d.valueOf();
time -= mod$1(time, MS_PER_MINUTE);
break;
case 'second':
time = this._d.valueOf();
time -= mod$1(time, MS_PER_SECOND);
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function endOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === undefined || units === 'millisecond' || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case 'year':
time = startOfDate(this.year() + 1, 0, 1) - 1;
break;
case 'quarter':
time =
startOfDate(
this.year(),
this.month() - (this.month() % 3) + 3,
1
) - 1;
break;
case 'month':
time = startOfDate(this.year(), this.month() + 1, 1) - 1;
break;
case 'week':
time =
startOfDate(
this.year(),
this.month(),
this.date() - this.weekday() + 7
) - 1;
break;
case 'isoWeek':
time =
startOfDate(
this.year(),
this.month(),
this.date() - (this.isoWeekday() - 1) + 7
) - 1;
break;
case 'day':
case 'date':
time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
break;
case 'hour':
time = this._d.valueOf();
time +=
MS_PER_HOUR -
mod$1(
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
MS_PER_HOUR
) -
1;
break;
case 'minute':
time = this._d.valueOf();
time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
break;
case 'second':
time = this._d.valueOf();
time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function valueOf() {
return this._d.valueOf() - (this._offset || 0) * 60000;
}
function unix() {
return Math.floor(this.valueOf() / 1000);
}
function toDate() {
return new Date(this.valueOf());
}
function toArray() {
var m = this;
return [
m.year(),
m.month(),
m.date(),
m.hour(),
m.minute(),
m.second(),
m.millisecond(),
];
}
function toObject() {
var m = this;
return {
years: m.year(),
months: m.month(),
date: m.date(),
hours: m.hours(),
minutes: m.minutes(),
seconds: m.seconds(),
milliseconds: m.milliseconds(),
};
}
function toJSON() {
// new Date(NaN).toJSON() === null
return this.isValid() ? this.toISOString() : null;
}
function isValid$2() {
return isValid(this);
}
function parsingFlags() {
return extend({}, getParsingFlags(this));
}
function invalidAt() {
return getParsingFlags(this).overflow;
}
function creationData() {
return {
input: this._i,
format: this._f,
locale: this._locale,
isUTC: this._isUTC,
strict: this._strict,
};
}
addFormatToken('N', 0, 0, 'eraAbbr');
addFormatToken('NN', 0, 0, 'eraAbbr');
addFormatToken('NNN', 0, 0, 'eraAbbr');
addFormatToken('NNNN', 0, 0, 'eraName');
addFormatToken('NNNNN', 0, 0, 'eraNarrow');
addFormatToken('y', ['y', 1], 'yo', 'eraYear');
addFormatToken('y', ['yy', 2], 0, 'eraYear');
addFormatToken('y', ['yyy', 3], 0, 'eraYear');
addFormatToken('y', ['yyyy', 4], 0, 'eraYear');
addRegexToken('N', matchEraAbbr);
addRegexToken('NN', matchEraAbbr);
addRegexToken('NNN', matchEraAbbr);
addRegexToken('NNNN', matchEraName);
addRegexToken('NNNNN', matchEraNarrow);
addParseToken(
['N', 'NN', 'NNN', 'NNNN', 'NNNNN'],
function (input, array, config, token) {
var era = config._locale.erasParse(input, token, config._strict);
if (era) {
getParsingFlags(config).era = era;
} else {
getParsingFlags(config).invalidEra = input;
}
}
);
addRegexToken('y', matchUnsigned);
addRegexToken('yy', matchUnsigned);
addRegexToken('yyy', matchUnsigned);
addRegexToken('yyyy', matchUnsigned);
addRegexToken('yo', matchEraYearOrdinal);
addParseToken(['y', 'yy', 'yyy', 'yyyy'], YEAR);
addParseToken(['yo'], function (input, array, config, token) {
var match;
if (config._locale._eraYearOrdinalRegex) {
match = input.match(config._locale._eraYearOrdinalRegex);
}
if (config._locale.eraYearOrdinalParse) {
array[YEAR] = config._locale.eraYearOrdinalParse(input, match);
} else {
array[YEAR] = parseInt(input, 10);
}
});
function localeEras(m, format) {
var i,
l,
date,
eras = this._eras || getLocale('en')._eras;
for (i = 0, l = eras.length; i < l; ++i) {
switch (typeof eras[i].since) {
case 'string':
// truncate time
date = hooks(eras[i].since).startOf('day');
eras[i].since = date.valueOf();
break;
}
switch (typeof eras[i].until) {
case 'undefined':
eras[i].until = +Infinity;
break;
case 'string':
// truncate time
date = hooks(eras[i].until).startOf('day').valueOf();
eras[i].until = date.valueOf();
break;
}
}
return eras;
}
function localeErasParse(eraName, format, strict) {
var i,
l,
eras = this.eras(),
name,
abbr,
narrow;
eraName = eraName.toUpperCase();
for (i = 0, l = eras.length; i < l; ++i) {
name = eras[i].name.toUpperCase();
abbr = eras[i].abbr.toUpperCase();
narrow = eras[i].narrow.toUpperCase();
if (strict) {
switch (format) {
case 'N':
case 'NN':
case 'NNN':
if (abbr === eraName) {
return eras[i];
}
break;
case 'NNNN':
if (name === eraName) {
return eras[i];
}
break;
case 'NNNNN':
if (narrow === eraName) {
return eras[i];
}
break;
}
} else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
return eras[i];
}
}
}
function localeErasConvertYear(era, year) {
var dir = era.since <= era.until ? +1 : -1;
if (year === undefined) {
return hooks(era.since).year();
} else {
return hooks(era.since).year() + (year - era.offset) * dir;
}
}
function getEraName() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].name;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].name;
}
}
return '';
}
function getEraNarrow() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].narrow;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].narrow;
}
}
return '';
}
function getEraAbbr() {
var i,
l,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
// truncate time
val = this.clone().startOf('day').valueOf();
if (eras[i].since <= val && val <= eras[i].until) {
return eras[i].abbr;
}
if (eras[i].until <= val && val <= eras[i].since) {
return eras[i].abbr;
}
}
return '';
}
function getEraYear() {
var i,
l,
dir,
val,
eras = this.localeData().eras();
for (i = 0, l = eras.length; i < l; ++i) {
dir = eras[i].since <= eras[i].until ? +1 : -1;
// truncate time
val = this.clone().startOf('day').valueOf();
if (
(eras[i].since <= val && val <= eras[i].until) ||
(eras[i].until <= val && val <= eras[i].since)
) {
return (
(this.year() - hooks(eras[i].since).year()) * dir +
eras[i].offset
);
}
}
return this.year();
}
function erasNameRegex(isStrict) {
if (!hasOwnProp(this, '_erasNameRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasNameRegex : this._erasRegex;
}
function erasAbbrRegex(isStrict) {
if (!hasOwnProp(this, '_erasAbbrRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasAbbrRegex : this._erasRegex;
}
function erasNarrowRegex(isStrict) {
if (!hasOwnProp(this, '_erasNarrowRegex')) {
computeErasParse.call(this);
}
return isStrict ? this._erasNarrowRegex : this._erasRegex;
}
function matchEraAbbr(isStrict, locale) {
return locale.erasAbbrRegex(isStrict);
}
function matchEraName(isStrict, locale) {
return locale.erasNameRegex(isStrict);
}
function matchEraNarrow(isStrict, locale) {
return locale.erasNarrowRegex(isStrict);
}
function matchEraYearOrdinal(isStrict, locale) {
return locale._eraYearOrdinalRegex || matchUnsigned;
}
function computeErasParse() {
var abbrPieces = [],
namePieces = [],
narrowPieces = [],
mixedPieces = [],
i,
l,
erasName,
erasAbbr,
erasNarrow,
eras = this.eras();
for (i = 0, l = eras.length; i < l; ++i) {
erasName = regexEscape(eras[i].name);
erasAbbr = regexEscape(eras[i].abbr);
erasNarrow = regexEscape(eras[i].narrow);
namePieces.push(erasName);
abbrPieces.push(erasAbbr);
narrowPieces.push(erasNarrow);
mixedPieces.push(erasName);
mixedPieces.push(erasAbbr);
mixedPieces.push(erasNarrow);
}
this._erasRegex = new RegExp('^(' + mixedPieces.join('|') + ')', 'i');
this._erasNameRegex = new RegExp('^(' + namePieces.join('|') + ')', 'i');
this._erasAbbrRegex = new RegExp('^(' + abbrPieces.join('|') + ')', 'i');
this._erasNarrowRegex = new RegExp(
'^(' + narrowPieces.join('|') + ')',
'i'
);
}
// FORMATTING
addFormatToken(0, ['gg', 2], 0, function () {
return this.weekYear() % 100;
});
addFormatToken(0, ['GG', 2], 0, function () {
return this.isoWeekYear() % 100;
});
function addWeekYearFormatToken(token, getter) {
addFormatToken(0, [token, token.length], 0, getter);
}
addWeekYearFormatToken('gggg', 'weekYear');
addWeekYearFormatToken('ggggg', 'weekYear');
addWeekYearFormatToken('GGGG', 'isoWeekYear');
addWeekYearFormatToken('GGGGG', 'isoWeekYear');
// ALIASES
// PARSING
addRegexToken('G', matchSigned);
addRegexToken('g', matchSigned);
addRegexToken('GG', match1to2, match2);
addRegexToken('gg', match1to2, match2);
addRegexToken('GGGG', match1to4, match4);
addRegexToken('gggg', match1to4, match4);
addRegexToken('GGGGG', match1to6, match6);
addRegexToken('ggggg', match1to6, match6);
addWeekParseToken(
['gggg', 'ggggg', 'GGGG', 'GGGGG'],
function (input, week, config, token) {
week[token.substr(0, 2)] = toInt(input);
}
);
addWeekParseToken(['gg', 'GG'], function (input, week, config, token) {
week[token] = hooks.parseTwoDigitYear(input);
});
// MOMENTS
function getSetWeekYear(input) {
return getSetWeekYearHelper.call(
this,
input,
this.week(),
this.weekday() + this.localeData()._week.dow,
this.localeData()._week.dow,
this.localeData()._week.doy
);
}
function getSetISOWeekYear(input) {
return getSetWeekYearHelper.call(
this,
input,
this.isoWeek(),
this.isoWeekday(),
1,
4
);
}
function getISOWeeksInYear() {
return weeksInYear(this.year(), 1, 4);
}
function getISOWeeksInISOWeekYear() {
return weeksInYear(this.isoWeekYear(), 1, 4);
}
function getWeeksInYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
}
function getWeeksInWeekYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
}
function getSetWeekYearHelper(input, week, weekday, dow, doy) {
var weeksTarget;
if (input == null) {
return weekOfYear(this, dow, doy).year;
} else {
weeksTarget = weeksInYear(input, dow, doy);
if (week > weeksTarget) {
week = weeksTarget;
}
return setWeekAll.call(this, input, week, weekday, dow, doy);
}
}
function setWeekAll(weekYear, week, weekday, dow, doy) {
var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy),
date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
this.year(date.getUTCFullYear());
this.month(date.getUTCMonth());
this.date(date.getUTCDate());
return this;
}
// FORMATTING
addFormatToken('Q', 0, 'Qo', 'quarter');
// PARSING
addRegexToken('Q', match1);
addParseToken('Q', function (input, array) {
array[MONTH] = (toInt(input) - 1) * 3;
});
// MOMENTS
function getSetQuarter(input) {
return input == null
? Math.ceil((this.month() + 1) / 3)
: this.month((input - 1) * 3 + (this.month() % 3));
}
// FORMATTING
addFormatToken('D', ['DD', 2], 'Do', 'date');
// PARSING
addRegexToken('D', match1to2, match1to2NoLeadingZero);
addRegexToken('DD', match1to2, match2);
addRegexToken('Do', function (isStrict, locale) {
// TODO: Remove "ordinalParse" fallback in next major release.
return isStrict
? locale._dayOfMonthOrdinalParse || locale._ordinalParse
: locale._dayOfMonthOrdinalParseLenient;
});
addParseToken(['D', 'DD'], DATE);
addParseToken('Do', function (input, array) {
array[DATE] = toInt(input.match(match1to2)[0]);
});
// MOMENTS
var getSetDayOfMonth = makeGetSet('Date', true);
// FORMATTING
addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear');
// PARSING
addRegexToken('DDD', match1to3);
addRegexToken('DDDD', match3);
addParseToken(['DDD', 'DDDD'], function (input, array, config) {
config._dayOfYear = toInt(input);
});
// HELPERS
// MOMENTS
function getSetDayOfYear(input) {
var dayOfYear =
Math.round(
(this.clone().startOf('day') - this.clone().startOf('year')) / 864e5
) + 1;
return input == null ? dayOfYear : this.add(input - dayOfYear, 'd');
}
// FORMATTING
addFormatToken('m', ['mm', 2], 0, 'minute');
// PARSING
addRegexToken('m', match1to2, match1to2HasZero);
addRegexToken('mm', match1to2, match2);
addParseToken(['m', 'mm'], MINUTE);
// MOMENTS
var getSetMinute = makeGetSet('Minutes', false);
// FORMATTING
addFormatToken('s', ['ss', 2], 0, 'second');
// PARSING
addRegexToken('s', match1to2, match1to2HasZero);
addRegexToken('ss', match1to2, match2);
addParseToken(['s', 'ss'], SECOND);
// MOMENTS
var getSetSecond = makeGetSet('Seconds', false);
// FORMATTING
addFormatToken('S', 0, 0, function () {
return ~~(this.millisecond() / 100);
});
addFormatToken(0, ['SS', 2], 0, function () {
return ~~(this.millisecond() / 10);
});
addFormatToken(0, ['SSS', 3], 0, 'millisecond');
addFormatToken(0, ['SSSS', 4], 0, function () {
return this.millisecond() * 10;
});
addFormatToken(0, ['SSSSS', 5], 0, function () {
return this.millisecond() * 100;
});
addFormatToken(0, ['SSSSSS', 6], 0, function () {
return this.millisecond() * 1000;
});
addFormatToken(0, ['SSSSSSS', 7], 0, function () {
return this.millisecond() * 10000;
});
addFormatToken(0, ['SSSSSSSS', 8], 0, function () {
return this.millisecond() * 100000;
});
addFormatToken(0, ['SSSSSSSSS', 9], 0, function () {
return this.millisecond() * 1000000;
});
// PARSING
addRegexToken('S', match1to3, match1);
addRegexToken('SS', match1to3, match2);
addRegexToken('SSS', match1to3, match3);
var token, getSetMillisecond;
for (token = 'SSSS'; token.length <= 9; token += 'S') {
addRegexToken(token, matchUnsigned);
}
function parseMs(input, array) {
array[MILLISECOND] = toInt(('0.' + input) * 1000);
}
for (token = 'S'; token.length <= 9; token += 'S') {
addParseToken(token, parseMs);
}
getSetMillisecond = makeGetSet('Milliseconds', false);
// FORMATTING
addFormatToken('z', 0, 0, 'zoneAbbr');
addFormatToken('zz', 0, 0, 'zoneName');
// MOMENTS
function getZoneAbbr() {
return this._isUTC ? 'UTC' : '';
}
function getZoneName() {
return this._isUTC ? 'Coordinated Universal Time' : '';
}
var proto = Moment.prototype;
proto.add = add;
proto.calendar = calendar$1;
proto.clone = clone;
proto.diff = diff;
proto.endOf = endOf;
proto.format = format;
proto.from = from;
proto.fromNow = fromNow;
proto.to = to;
proto.toNow = toNow;
proto.get = stringGet;
proto.invalidAt = invalidAt;
proto.isAfter = isAfter;
proto.isBefore = isBefore;
proto.isBetween = isBetween;
proto.isSame = isSame;
proto.isSameOrAfter = isSameOrAfter;
proto.isSameOrBefore = isSameOrBefore;
proto.isValid = isValid$2;
proto.lang = lang;
proto.locale = locale;
proto.localeData = localeData;
proto.max = prototypeMax;
proto.min = prototypeMin;
proto.parsingFlags = parsingFlags;
proto.set = stringSet;
proto.startOf = startOf;
proto.subtract = subtract;
proto.toArray = toArray;
proto.toObject = toObject;
proto.toDate = toDate;
proto.toISOString = toISOString;
proto.inspect = inspect;
if (typeof Symbol !== 'undefined' && Symbol.for != null) {
proto[Symbol.for('nodejs.util.inspect.custom')] = function () {
return 'Moment<' + this.format() + '>';
};
}
proto.toJSON = toJSON;
proto.toString = toString;
proto.unix = unix;
proto.valueOf = valueOf;
proto.creationData = creationData;
proto.eraName = getEraName;
proto.eraNarrow = getEraNarrow;
proto.eraAbbr = getEraAbbr;
proto.eraYear = getEraYear;
proto.year = getSetYear;
proto.isLeapYear = getIsLeapYear;
proto.weekYear = getSetWeekYear;
proto.isoWeekYear = getSetISOWeekYear;
proto.quarter = proto.quarters = getSetQuarter;
proto.month = getSetMonth;
proto.daysInMonth = getDaysInMonth;
proto.week = proto.weeks = getSetWeek;
proto.isoWeek = proto.isoWeeks = getSetISOWeek;
proto.weeksInYear = getWeeksInYear;
proto.weeksInWeekYear = getWeeksInWeekYear;
proto.isoWeeksInYear = getISOWeeksInYear;
proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
proto.date = getSetDayOfMonth;
proto.day = proto.days = getSetDayOfWeek;
proto.weekday = getSetLocaleDayOfWeek;
proto.isoWeekday = getSetISODayOfWeek;
proto.dayOfYear = getSetDayOfYear;
proto.hour = proto.hours = getSetHour;
proto.minute = proto.minutes = getSetMinute;
proto.second = proto.seconds = getSetSecond;
proto.millisecond = proto.milliseconds = getSetMillisecond;
proto.utcOffset = getSetOffset;
proto.utc = setOffsetToUTC;
proto.local = setOffsetToLocal;
proto.parseZone = setOffsetToParsedOffset;
proto.hasAlignedHourOffset = hasAlignedHourOffset;
proto.isDST = isDaylightSavingTime;
proto.isLocal = isLocal;
proto.isUtcOffset = isUtcOffset;
proto.isUtc = isUtc;
proto.isUTC = isUtc;
proto.zoneAbbr = getZoneAbbr;
proto.zoneName = getZoneName;
proto.dates = deprecate(
'dates accessor is deprecated. Use date instead.',
getSetDayOfMonth
);
proto.months = deprecate(
'months accessor is deprecated. Use month instead',
getSetMonth
);
proto.years = deprecate(
'years accessor is deprecated. Use year instead',
getSetYear
);
proto.zone = deprecate(
'moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/',
getSetZone
);
proto.isDSTShifted = deprecate(
'isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information',
isDaylightSavingTimeShifted
);
function createUnix(input) {
return createLocal(input * 1000);
}
function createInZone() {
return createLocal.apply(null, arguments).parseZone();
}
function preParsePostFormat(string) {
return string;
}
var proto$1 = Locale.prototype;
proto$1.calendar = calendar;
proto$1.longDateFormat = longDateFormat;
proto$1.invalidDate = invalidDate;
proto$1.ordinal = ordinal;
proto$1.preparse = preParsePostFormat;
proto$1.postformat = preParsePostFormat;
proto$1.relativeTime = relativeTime;
proto$1.pastFuture = pastFuture;
proto$1.set = set;
proto$1.eras = localeEras;
proto$1.erasParse = localeErasParse;
proto$1.erasConvertYear = localeErasConvertYear;
proto$1.erasAbbrRegex = erasAbbrRegex;
proto$1.erasNameRegex = erasNameRegex;
proto$1.erasNarrowRegex = erasNarrowRegex;
proto$1.months = localeMonths;
proto$1.monthsShort = localeMonthsShort;
proto$1.monthsParse = localeMonthsParse;
proto$1.monthsRegex = monthsRegex;
proto$1.monthsShortRegex = monthsShortRegex;
proto$1.week = localeWeek;
proto$1.firstDayOfYear = localeFirstDayOfYear;
proto$1.firstDayOfWeek = localeFirstDayOfWeek;
proto$1.weekdays = localeWeekdays;
proto$1.weekdaysMin = localeWeekdaysMin;
proto$1.weekdaysShort = localeWeekdaysShort;
proto$1.weekdaysParse = localeWeekdaysParse;
proto$1.weekdaysRegex = weekdaysRegex;
proto$1.weekdaysShortRegex = weekdaysShortRegex;
proto$1.weekdaysMinRegex = weekdaysMinRegex;
proto$1.isPM = localeIsPM;
proto$1.meridiem = localeMeridiem;
function get$1(format, index, field, setter) {
var locale = getLocale(),
utc = createUTC().set(setter, index);
return locale[field](utc, format);
}
function listMonthsImpl(format, index, field) {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
if (index != null) {
return get$1(format, index, field, 'month');
}
var i,
out = [];
for (i = 0; i < 12; i++) {
out[i] = get$1(format, i, field, 'month');
}
return out;
}
// ()
// (5)
// (fmt, 5)
// (fmt)
// (true)
// (true, 5)
// (true, fmt, 5)
// (true, fmt)
function listWeekdaysImpl(localeSorted, format, index, field) {
if (typeof localeSorted === 'boolean') {
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
} else {
format = localeSorted;
index = format;
localeSorted = false;
if (isNumber(format)) {
index = format;
format = undefined;
}
format = format || '';
}
var locale = getLocale(),
shift = localeSorted ? locale._week.dow : 0,
i,
out = [];
if (index != null) {
return get$1(format, (index + shift) % 7, field, 'day');
}
for (i = 0; i < 7; i++) {
out[i] = get$1(format, (i + shift) % 7, field, 'day');
}
return out;
}
function listMonths(format, index) {
return listMonthsImpl(format, index, 'months');
}
function listMonthsShort(format, index) {
return listMonthsImpl(format, index, 'monthsShort');
}
function listWeekdays(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdays');
}
function listWeekdaysShort(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysShort');
}
function listWeekdaysMin(localeSorted, format, index) {
return listWeekdaysImpl(localeSorted, format, index, 'weekdaysMin');
}
getSetGlobalLocale('en', {
eras: [
{
since: '0001-01-01',
until: +Infinity,
offset: 1,
name: 'Anno Domini',
narrow: 'AD',
abbr: 'AD',
},
{
since: '0000-12-31',
until: -Infinity,
offset: 1,
name: 'Before Christ',
narrow: 'BC',
abbr: 'BC',
},
],
dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
ordinal: function (number) {
var b = number % 10,
output =
toInt((number % 100) / 10) === 1
? 'th'
: b === 1
? 'st'
: b === 2
? 'nd'
: b === 3
? 'rd'
: 'th';
return number + output;
},
});
// Side effect imports
hooks.lang = deprecate(
'moment.lang is deprecated. Use moment.locale instead.',
getSetGlobalLocale
);
hooks.langData = deprecate(
'moment.langData is deprecated. Use moment.localeData instead.',
getLocale
);
var mathAbs = Math.abs;
function abs() {
var data = this._data;
this._milliseconds = mathAbs(this._milliseconds);
this._days = mathAbs(this._days);
this._months = mathAbs(this._months);
data.milliseconds = mathAbs(data.milliseconds);
data.seconds = mathAbs(data.seconds);
data.minutes = mathAbs(data.minutes);
data.hours = mathAbs(data.hours);
data.months = mathAbs(data.months);
data.years = mathAbs(data.years);
return this;
}
function addSubtract$1(duration, input, value, direction) {
var other = createDuration(input, value);
duration._milliseconds += direction * other._milliseconds;
duration._days += direction * other._days;
duration._months += direction * other._months;
return duration._bubble();
}
// supports only 2.0-style add(1, 's') or add(duration)
function add$1(input, value) {
return addSubtract$1(this, input, value, 1);
}
// supports only 2.0-style subtract(1, 's') or subtract(duration)
function subtract$1(input, value) {
return addSubtract$1(this, input, value, -1);
}
function absCeil(number) {
if (number < 0) {
return Math.floor(number);
} else {
return Math.ceil(number);
}
}
function bubble() {
var milliseconds = this._milliseconds,
days = this._days,
months = this._months,
data = this._data,
seconds,
minutes,
hours,
years,
monthsFromDays;
// if we have a mix of positive and negative values, bubble down first
// check: https://github.com/moment/moment/issues/2166
if (
!(
(milliseconds >= 0 && days >= 0 && months >= 0) ||
(milliseconds <= 0 && days <= 0 && months <= 0)
)
) {
milliseconds += absCeil(monthsToDays(months) + days) * 864e5;
days = 0;
months = 0;
}
// The following code bubbles up values, see the tests for
// examples of what that means.
data.milliseconds = milliseconds % 1000;
seconds = absFloor(milliseconds / 1000);
data.seconds = seconds % 60;
minutes = absFloor(seconds / 60);
data.minutes = minutes % 60;
hours = absFloor(minutes / 60);
data.hours = hours % 24;
days += absFloor(hours / 24);
// convert days to months
monthsFromDays = absFloor(daysToMonths(days));
months += monthsFromDays;
days -= absCeil(monthsToDays(monthsFromDays));
// 12 months -> 1 year
years = absFloor(months / 12);
months %= 12;
data.days = days;
data.months = months;
data.years = years;
return this;
}
function daysToMonths(days) {
// 400 years have 146097 days (taking into account leap year rules)
// 400 years have 12 months === 4800
return (days * 4800) / 146097;
}
function monthsToDays(months) {
// the reverse of daysToMonths
return (months * 146097) / 4800;
}
function as(units) {
if (!this.isValid()) {
return NaN;
}
var days,
months,
milliseconds = this._milliseconds;
units = normalizeUnits(units);
if (units === 'month' || units === 'quarter' || units === 'year') {
days = this._days + milliseconds / 864e5;
months = this._months + daysToMonths(days);
switch (units) {
case 'month':
return months;
case 'quarter':
return months / 3;
case 'year':
return months / 12;
}
} else {
// handle milliseconds separately because of floating point math errors (issue #1867)
days = this._days + Math.round(monthsToDays(this._months));
switch (units) {
case 'week':
return days / 7 + milliseconds / 6048e5;
case 'day':
return days + milliseconds / 864e5;
case 'hour':
return days * 24 + milliseconds / 36e5;
case 'minute':
return days * 1440 + milliseconds / 6e4;
case 'second':
return days * 86400 + milliseconds / 1000;
// Math.floor prevents floating point math errors here
case 'millisecond':
return Math.floor(days * 864e5) + milliseconds;
default:
throw new Error('Unknown unit ' + units);
}
}
}
function makeAs(alias) {
return function () {
return this.as(alias);
};
}
var asMilliseconds = makeAs('ms'),
asSeconds = makeAs('s'),
asMinutes = makeAs('m'),
asHours = makeAs('h'),
asDays = makeAs('d'),
asWeeks = makeAs('w'),
asMonths = makeAs('M'),
asQuarters = makeAs('Q'),
asYears = makeAs('y'),
valueOf$1 = asMilliseconds;
function clone$1() {
return createDuration(this);
}
function get$2(units) {
units = normalizeUnits(units);
return this.isValid() ? this[units + 's']() : NaN;
}
function makeGetter(name) {
return function () {
return this.isValid() ? this._data[name] : NaN;
};
}
var milliseconds = makeGetter('milliseconds'),
seconds = makeGetter('seconds'),
minutes = makeGetter('minutes'),
hours = makeGetter('hours'),
days = makeGetter('days'),
months = makeGetter('months'),
years = makeGetter('years');
function weeks() {
return absFloor(this.days() / 7);
}
var round = Math.round,
thresholds = {
ss: 44, // a few seconds to seconds
s: 45, // seconds to minute
m: 45, // minutes to hour
h: 22, // hours to day
d: 26, // days to month/week
w: null, // weeks to month
M: 11, // months to year
};
// helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) {
return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
}
function relativeTime$1(posNegDuration, withoutSuffix, thresholds, locale) {
var duration = createDuration(posNegDuration).abs(),
seconds = round(duration.as('s')),
minutes = round(duration.as('m')),
hours = round(duration.as('h')),
days = round(duration.as('d')),
months = round(duration.as('M')),
weeks = round(duration.as('w')),
years = round(duration.as('y')),
a =
(seconds <= thresholds.ss && ['s', seconds]) ||
(seconds < thresholds.s && ['ss', seconds]) ||
(minutes <= 1 && ['m']) ||
(minutes < thresholds.m && ['mm', minutes]) ||
(hours <= 1 && ['h']) ||
(hours < thresholds.h && ['hh', hours]) ||
(days <= 1 && ['d']) ||
(days < thresholds.d && ['dd', days]);
if (thresholds.w != null) {
a =
a ||
(weeks <= 1 && ['w']) ||
(weeks < thresholds.w && ['ww', weeks]);
}
a = a ||
(months <= 1 && ['M']) ||
(months < thresholds.M && ['MM', months]) ||
(years <= 1 && ['y']) || ['yy', years];
a[2] = withoutSuffix;
a[3] = +posNegDuration > 0;
a[4] = locale;
return substituteTimeAgo.apply(null, a);
}
// This function allows you to set the rounding function for relative time strings
function getSetRelativeTimeRounding(roundingFunction) {
if (roundingFunction === undefined) {
return round;
}
if (typeof roundingFunction === 'function') {
round = roundingFunction;
return true;
}
return false;
}
// This function allows you to set a threshold for relative time strings
function getSetRelativeTimeThreshold(threshold, limit) {
if (thresholds[threshold] === undefined) {
return false;
}
if (limit === undefined) {
return thresholds[threshold];
}
thresholds[threshold] = limit;
if (threshold === 's') {
thresholds.ss = limit - 1;
}
return true;
}
function humanize(argWithSuffix, argThresholds) {
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var withSuffix = false,
th = thresholds,
locale,
output;
if (typeof argWithSuffix === 'object') {
argThresholds = argWithSuffix;
argWithSuffix = false;
}
if (typeof argWithSuffix === 'boolean') {
withSuffix = argWithSuffix;
}
if (typeof argThresholds === 'object') {
th = Object.assign({}, thresholds, argThresholds);
if (argThresholds.s != null && argThresholds.ss == null) {
th.ss = argThresholds.s - 1;
}
}
locale = this.localeData();
output = relativeTime$1(this, !withSuffix, th, locale);
if (withSuffix) {
output = locale.pastFuture(+this, output);
}
return locale.postformat(output);
}
var abs$1 = Math.abs;
function sign(x) {
return (x > 0) - (x < 0) || +x;
}
function toISOString$1() {
// for ISO strings we do not use the normal bubbling rules:
// * milliseconds bubble up until they become hours
// * days do not bubble at all
// * months bubble up until they become years
// This is because there is no context-free conversion between hours and days
// (think of clock changes)
// and also not between days and months (28-31 days per month)
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var seconds = abs$1(this._milliseconds) / 1000,
days = abs$1(this._days),
months = abs$1(this._months),
minutes,
hours,
years,
s,
total = this.asSeconds(),
totalSign,
ymSign,
daysSign,
hmsSign;
if (!total) {
// this is the same as C#'s (Noda) and python (isodate)...
// but not other JS (goog.date)
return 'P0D';
}
// 3600 seconds -> 60 minutes -> 1 hour
minutes = absFloor(seconds / 60);
hours = absFloor(minutes / 60);
seconds %= 60;
minutes %= 60;
// 12 months -> 1 year
years = absFloor(months / 12);
months %= 12;
// inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js
s = seconds ? seconds.toFixed(3).replace(/\.?0+$/, '') : '';
totalSign = total < 0 ? '-' : '';
ymSign = sign(this._months) !== sign(total) ? '-' : '';
daysSign = sign(this._days) !== sign(total) ? '-' : '';
hmsSign = sign(this._milliseconds) !== sign(total) ? '-' : '';
return (
totalSign +
'P' +
(years ? ymSign + years + 'Y' : '') +
(months ? ymSign + months + 'M' : '') +
(days ? daysSign + days + 'D' : '') +
(hours || minutes || seconds ? 'T' : '') +
(hours ? hmsSign + hours + 'H' : '') +
(minutes ? hmsSign + minutes + 'M' : '') +
(seconds ? hmsSign + s + 'S' : '')
);
}
var proto$2 = Duration.prototype;
proto$2.isValid = isValid$1;
proto$2.abs = abs;
proto$2.add = add$1;
proto$2.subtract = subtract$1;
proto$2.as = as;
proto$2.asMilliseconds = asMilliseconds;
proto$2.asSeconds = asSeconds;
proto$2.asMinutes = asMinutes;
proto$2.asHours = asHours;
proto$2.asDays = asDays;
proto$2.asWeeks = asWeeks;
proto$2.asMonths = asMonths;
proto$2.asQuarters = asQuarters;
proto$2.asYears = asYears;
proto$2.valueOf = valueOf$1;
proto$2._bubble = bubble;
proto$2.clone = clone$1;
proto$2.get = get$2;
proto$2.milliseconds = milliseconds;
proto$2.seconds = seconds;
proto$2.minutes = minutes;
proto$2.hours = hours;
proto$2.days = days;
proto$2.weeks = weeks;
proto$2.months = months;
proto$2.years = years;
proto$2.humanize = humanize;
proto$2.toISOString = toISOString$1;
proto$2.toString = toISOString$1;
proto$2.toJSON = toISOString$1;
proto$2.locale = locale;
proto$2.localeData = localeData;
proto$2.toIsoString = deprecate(
'toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)',
toISOString$1
);
proto$2.lang = lang;
// FORMATTING
addFormatToken('X', 0, 0, 'unix');
addFormatToken('x', 0, 0, 'valueOf');
// PARSING
addRegexToken('x', matchSigned);
addRegexToken('X', matchTimestamp);
addParseToken('X', function (input, array, config) {
config._d = new Date(parseFloat(input) * 1000);
});
addParseToken('x', function (input, array, config) {
config._d = new Date(toInt(input));
});
//! moment.js
hooks.version = '2.30.1';
setHookCallback(createLocal);
hooks.fn = proto;
hooks.min = min;
hooks.max = max;
hooks.now = now;
hooks.utc = createUTC;
hooks.unix = createUnix;
hooks.months = listMonths;
hooks.isDate = isDate;
hooks.locale = getSetGlobalLocale;
hooks.invalid = createInvalid;
hooks.duration = createDuration;
hooks.isMoment = isMoment;
hooks.weekdays = listWeekdays;
hooks.parseZone = createInZone;
hooks.localeData = getLocale;
hooks.isDuration = isDuration;
hooks.monthsShort = listMonthsShort;
hooks.weekdaysMin = listWeekdaysMin;
hooks.defineLocale = defineLocale;
hooks.updateLocale = updateLocale;
hooks.locales = listLocales;
hooks.weekdaysShort = listWeekdaysShort;
hooks.normalizeUnits = normalizeUnits;
hooks.relativeTimeRounding = getSetRelativeTimeRounding;
hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
hooks.calendarFormat = getCalendarFormat;
hooks.prototype = proto;
// currently HTML5 input type only supports 24-hour formats
hooks.HTML5_FMT = {
DATETIME_LOCAL: 'YYYY-MM-DDTHH:mm', // <input type="datetime-local" />
DATETIME_LOCAL_SECONDS: 'YYYY-MM-DDTHH:mm:ss', // <input type="datetime-local" step="1" />
DATETIME_LOCAL_MS: 'YYYY-MM-DDTHH:mm:ss.SSS', // <input type="datetime-local" step="0.001" />
DATE: 'YYYY-MM-DD', // <input type="date" />
TIME: 'HH:mm', // <input type="time" />
TIME_SECONDS: 'HH:mm:ss', // <input type="time" step="1" />
TIME_MS: 'HH:mm:ss.SSS', // <input type="time" step="0.001" />
WEEK: 'GGGG-[W]WW', // <input type="week" />
MONTH: 'YYYY-MM', // <input type="month" />
};
return hooks;
})));
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "YuTi")(module)))
/***/ }),
/***/ "wfmh":
/*!****************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.from-entries.js ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var iterate = __webpack_require__(/*! ../internals/iterate */ "ImZN");
var createProperty = __webpack_require__(/*! ../internals/create-property */ "hBjN");
// `Object.fromEntries` method
// https://github.com/tc39/proposal-object-from-entries
$({ target: 'Object', stat: true }, {
fromEntries: function fromEntries(iterable) {
var obj = {};
iterate(iterable, function (k, v) {
createProperty(obj, k, v);
}, undefined, true);
return obj;
}
});
/***/ }),
/***/ "wg0c":
/*!************************************************************!*\
!*** ./node_modules/core-js/internals/number-parse-int.js ***!
\************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var trim = __webpack_require__(/*! ../internals/string-trim */ "WKiH").trim;
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "WJkJ");
var $parseInt = global.parseInt;
var hex = /^[+-]?0[Xx]/;
var FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;
// `parseInt` method
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
module.exports = FORCED ? function parseInt(string, radix) {
var S = trim(String(string));
return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));
} : $parseInt;
/***/ }),
/***/ "wgJM":
/*!****************************************!*\
!*** ./node_modules/rc-util/es/raf.js ***!
\****************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
var raf = function raf(callback) {
return +setTimeout(callback, 16);
};
var caf = function caf(num) {
return clearTimeout(num);
};
if (typeof window !== 'undefined' && 'requestAnimationFrame' in window) {
raf = function raf(callback) {
return window.requestAnimationFrame(callback);
};
caf = function caf(handle) {
return window.cancelAnimationFrame(handle);
};
}
var rafUUID = 0;
var rafIds = new Map();
function cleanup(id) {
rafIds.delete(id);
}
var wrapperRaf = function wrapperRaf(callback) {
var times = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
rafUUID += 1;
var id = rafUUID;
function callRef(leftTimes) {
if (leftTimes === 0) {
// Clean up
cleanup(id);
// Trigger
callback();
} else {
// Next raf
var realId = raf(function () {
callRef(leftTimes - 1);
});
// Bind real raf id
rafIds.set(id, realId);
}
}
callRef(times);
return id;
};
wrapperRaf.cancel = function (id) {
var realId = rafIds.get(id);
cleanup(id);
return caf(realId);
};
if (false) {}
/* harmony default export */ __webpack_exports__["a"] = (wrapperRaf);
/***/ }),
/***/ "wgYD":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.delete-all.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "xDBR");
var collectionDeleteAll = __webpack_require__(/*! ../internals/collection-delete-all */ "Cg3G");
// `Map.prototype.deleteAll` method
// https://github.com/tc39/proposal-collection-methods
$({ target: 'Map', proto: true, real: true, forced: IS_PURE }, {
deleteAll: function deleteAll(/* ...elements */) {
return collectionDeleteAll.apply(this, arguments);
}
});
/***/ }),
/***/ "wkBT":
/*!****************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/nonIterableRest.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
module.exports = _nonIterableRest, module.exports.__esModule = true, module.exports["default"] = module.exports;
/***/ }),
/***/ "wx14":
/*!************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***!
\************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _extends; });
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
/***/ }),
/***/ "wy8a":
/*!*******************************************!*\
!*** ./node_modules/lodash/_castSlice.js ***!
\*******************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var baseSlice = __webpack_require__(/*! ./_baseSlice */ "KxBF");
/**
* Casts `array` to a slice if it's needed.
*
* @private
* @param {Array} array The array to inspect.
* @param {number} start The start position.
* @param {number} [end=array.length] The end position.
* @returns {Array} Returns the cast slice.
*/
function castSlice(array, start, end) {
var length = array.length;
end = end === undefined ? length : end;
return (!start && end >= length) ? array : baseSlice(array, start, end);
}
module.exports = castSlice;
/***/ }),
/***/ "x0AG":
/*!*************************************************************!*\
!*** ./node_modules/core-js/modules/es.array.find-index.js ***!
\*************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $findIndex = __webpack_require__(/*! ../internals/array-iteration */ "tycR").findIndex;
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var FIND_INDEX = 'findIndex';
var SKIPS_HOLES = true;
var USES_TO_LENGTH = arrayMethodUsesToLength(FIND_INDEX);
// Shouldn't skip holes
if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
// `Array.prototype.findIndex` method
// https://tc39.github.io/ecma262/#sec-array.prototype.findindex
$({ target: 'Array', proto: true, forced: SKIPS_HOLES || !USES_TO_LENGTH }, {
findIndex: function findIndex(callbackfn /* , that = undefined */) {
return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
}
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables(FIND_INDEX);
/***/ }),
/***/ "x1Ya":
/*!**********************************************!*\
!*** ./node_modules/rc-checkbox/es/index.js ***!
\**********************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ "wx14");
/* harmony import */ var _babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/esm/defineProperty */ "rePB");
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectWithoutProperties */ "Ff2n");
/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @babel/runtime/helpers/esm/objectSpread2 */ "VTBJ");
/* harmony import */ var _babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @babel/runtime/helpers/esm/classCallCheck */ "1OyB");
/* harmony import */ var _babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createClass */ "vuIU");
/* harmony import */ var _babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inherits */ "Ji7U");
/* harmony import */ var _babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @babel/runtime/helpers/esm/createSuper */ "LK+K");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! react */ "q1tI");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_8__);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! classnames */ "TSYQ");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_9__);
// eslint-disable-next-line import/no-extraneous-dependencies
var Checkbox = /*#__PURE__*/function (_Component) {
Object(_babel_runtime_helpers_esm_inherits__WEBPACK_IMPORTED_MODULE_6__[/* default */ "a"])(Checkbox, _Component);
var _super = Object(_babel_runtime_helpers_esm_createSuper__WEBPACK_IMPORTED_MODULE_7__[/* default */ "a"])(Checkbox);
function Checkbox(props) {
var _this;
Object(_babel_runtime_helpers_esm_classCallCheck__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(this, Checkbox);
_this = _super.call(this, props);
_this.handleChange = function (e) {
var _this$props = _this.props,
disabled = _this$props.disabled,
onChange = _this$props.onChange;
if (disabled) {
return;
}
if (!('checked' in _this.props)) {
_this.setState({
checked: e.target.checked
});
}
if (onChange) {
onChange({
target: Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, _this.props), {}, {
checked: e.target.checked
}),
stopPropagation: function stopPropagation() {
e.stopPropagation();
},
preventDefault: function preventDefault() {
e.preventDefault();
},
nativeEvent: e.nativeEvent
});
}
};
_this.saveInput = function (node) {
_this.input = node;
};
var checked = 'checked' in props ? props.checked : props.defaultChecked;
_this.state = {
checked: checked
};
return _this;
}
Object(_babel_runtime_helpers_esm_createClass__WEBPACK_IMPORTED_MODULE_5__[/* default */ "a"])(Checkbox, [{
key: "focus",
value: function focus() {
this.input.focus();
}
}, {
key: "blur",
value: function blur() {
this.input.blur();
}
}, {
key: "render",
value: function render() {
var _classNames;
var _this$props2 = this.props,
prefixCls = _this$props2.prefixCls,
className = _this$props2.className,
style = _this$props2.style,
name = _this$props2.name,
id = _this$props2.id,
type = _this$props2.type,
disabled = _this$props2.disabled,
readOnly = _this$props2.readOnly,
tabIndex = _this$props2.tabIndex,
onClick = _this$props2.onClick,
onFocus = _this$props2.onFocus,
onBlur = _this$props2.onBlur,
onKeyDown = _this$props2.onKeyDown,
onKeyPress = _this$props2.onKeyPress,
onKeyUp = _this$props2.onKeyUp,
autoFocus = _this$props2.autoFocus,
value = _this$props2.value,
required = _this$props2.required,
others = Object(_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(_this$props2, ["prefixCls", "className", "style", "name", "id", "type", "disabled", "readOnly", "tabIndex", "onClick", "onFocus", "onBlur", "onKeyDown", "onKeyPress", "onKeyUp", "autoFocus", "value", "required"]);
var globalProps = Object.keys(others).reduce(function (prev, key) {
if (key.substr(0, 5) === 'aria-' || key.substr(0, 5) === 'data-' || key === 'role') {
// eslint-disable-next-line no-param-reassign
prev[key] = others[key];
}
return prev;
}, {});
var checked = this.state.checked;
var classString = classnames__WEBPACK_IMPORTED_MODULE_9___default()(prefixCls, className, (_classNames = {}, Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-checked"), checked), Object(_babel_runtime_helpers_esm_defineProperty__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(_classNames, "".concat(prefixCls, "-disabled"), disabled), _classNames));
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("span", {
className: classString,
style: style
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("input", Object(_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({
name: name,
id: id,
type: type,
required: required,
readOnly: readOnly,
disabled: disabled,
tabIndex: tabIndex,
className: "".concat(prefixCls, "-input"),
checked: !!checked,
onClick: onClick,
onFocus: onFocus,
onBlur: onBlur,
onKeyUp: onKeyUp,
onKeyDown: onKeyDown,
onKeyPress: onKeyPress,
onChange: this.handleChange,
autoFocus: autoFocus,
ref: this.saveInput,
value: value
}, globalProps)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_8___default.a.createElement("span", {
className: "".concat(prefixCls, "-inner")
}));
}
}], [{
key: "getDerivedStateFromProps",
value: function getDerivedStateFromProps(props, state) {
if ('checked' in props) {
return Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])(Object(_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])({}, state), {}, {
checked: props.checked
});
}
return null;
}
}]);
return Checkbox;
}(react__WEBPACK_IMPORTED_MODULE_8__["Component"]);
Checkbox.defaultProps = {
prefixCls: 'rc-checkbox',
className: '',
style: {},
type: 'checkbox',
defaultChecked: false,
onFocus: function onFocus() {},
onBlur: function onBlur() {},
onChange: function onChange() {},
onKeyDown: function onKeyDown() {},
onKeyPress: function onKeyPress() {},
onKeyUp: function onKeyUp() {}
};
/* harmony default export */ __webpack_exports__["a"] = (Checkbox);
/***/ }),
/***/ "x2An":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.reflect.has.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
// `Reflect.has` method
// https://tc39.github.io/ecma262/#sec-reflect.has
$({ target: 'Reflect', stat: true }, {
has: function has(target, propertyKey) {
return propertyKey in target;
}
});
/***/ }),
/***/ "x83w":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.fixed.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.fixed` method
// https://tc39.github.io/ecma262/#sec-string.prototype.fixed
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('fixed') }, {
fixed: function fixed() {
return createHTML(this, 'tt', '', '');
}
});
/***/ }),
/***/ "xDBR":
/*!***************************************************!*\
!*** ./node_modules/core-js/internals/is-pure.js ***!
\***************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
module.exports = false;
/***/ }),
/***/ "xEkU":
/*!***********************************!*\
!*** ./node_modules/raf/index.js ***!
\***********************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
/* WEBPACK VAR INJECTION */(function(global) {var now = __webpack_require__(/*! performance-now */ "bQgK")
, root = typeof window === 'undefined' ? global : window
, vendors = ['moz', 'webkit']
, suffix = 'AnimationFrame'
, raf = root['request' + suffix]
, caf = root['cancel' + suffix] || root['cancelRequest' + suffix]
for(var i = 0; !raf && i < vendors.length; i++) {
raf = root[vendors[i] + 'Request' + suffix]
caf = root[vendors[i] + 'Cancel' + suffix]
|| root[vendors[i] + 'CancelRequest' + suffix]
}
// Some versions of FF have rAF but not cAF
if(!raf || !caf) {
var last = 0
, id = 0
, queue = []
, frameDuration = 1000 / 60
raf = function(callback) {
if(queue.length === 0) {
var _now = now()
, next = Math.max(0, frameDuration - (_now - last))
last = next + _now
setTimeout(function() {
var cp = queue.slice(0)
// Clear queue here to prevent
// callbacks from appending listeners
// to the current frame's queue
queue.length = 0
for(var i = 0; i < cp.length; i++) {
if(!cp[i].cancelled) {
try{
cp[i].callback(last)
} catch(e) {
setTimeout(function() { throw e }, 0)
}
}
}
}, Math.round(next))
}
queue.push({
handle: ++id,
callback: callback,
cancelled: false
})
return id
}
caf = function(handle) {
for(var i = 0; i < queue.length; i++) {
if(queue[i].handle === handle) {
queue[i].cancelled = true
}
}
}
}
module.exports = function(fn) {
// Wrap in a new function to prevent
// `cancel` potentially being assigned
// to the native rAF function
return raf.call(root, fn)
}
module.exports.cancel = function() {
caf.apply(root, arguments)
}
module.exports.polyfill = function(object) {
if (!object) {
object = root;
}
object.requestAnimationFrame = raf
object.cancelAnimationFrame = caf
}
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "xKgJ":
/*!********************************!*\
!*** ./src/utils/authority.ts ***!
\********************************/
/*! exports provided: getRoleAuth, isMainSite, courseIsEnd, getAuthentication, isAdmin, isAdminOrAssistant, isAdminOrAuthor, isSuperAdmin, isAdminOrCreator, isSuperAdmins, isAdminAndCreator, isAdminOrTeacher, isAssistant, isTeacher, isStudent, isAdminOrStudent, isAdmins, isNotMember, canCommonAdd, canCommonDelete, canCommonUpdate, isStudents, canCommonView, canCommonDownload, canShixunAdd, canShixunDelete, canShixunUpdate, canShixunView, canShixunSendToClassroom, canShixunViewAnswer, canShixunCancelPublic, canProblemsetAdd, canProblemsetDelete, canProblemsetUpdate, canProblemsetView, canProblemsetGroup, canProblemsetCancelPublic, canProblemsetCorrection, canProblemsetCollect, canProblemsetViewAnalysis, canPaperlibraryAdd, canPaperlibraryDelete, canPaperlibraryUpdate, canPaperlibraryView, canPaperlibraryCancelPublic, canPaperlibrarySendToClassroom, authentication, isCommonSuperAdmin, isCommonSuperAdminOrOperation, isCommonStudent, isCommonAdminOrCreator, isLogin, userInfo */
/*! exports used: canShixunAdd, isLogin, isStudents, isSuperAdmin, isSuperAdmins, userInfo */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* unused harmony export getRoleAuth */
/* unused harmony export isMainSite */
/* unused harmony export courseIsEnd */
/* unused harmony export getAuthentication */
/* unused harmony export isAdmin */
/* unused harmony export isAdminOrAssistant */
/* unused harmony export isAdminOrAuthor */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isSuperAdmin; });
/* unused harmony export isAdminOrCreator */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isSuperAdmins; });
/* unused harmony export isAdminAndCreator */
/* unused harmony export isAdminOrTeacher */
/* unused harmony export isAssistant */
/* unused harmony export isTeacher */
/* unused harmony export isStudent */
/* unused harmony export isAdminOrStudent */
/* unused harmony export isAdmins */
/* unused harmony export isNotMember */
/* unused harmony export canCommonAdd */
/* unused harmony export canCommonDelete */
/* unused harmony export canCommonUpdate */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isStudents; });
/* unused harmony export canCommonView */
/* unused harmony export canCommonDownload */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return canShixunAdd; });
/* unused harmony export canShixunDelete */
/* unused harmony export canShixunUpdate */
/* unused harmony export canShixunView */
/* unused harmony export canShixunSendToClassroom */
/* unused harmony export canShixunViewAnswer */
/* unused harmony export canShixunCancelPublic */
/* unused harmony export canProblemsetAdd */
/* unused harmony export canProblemsetDelete */
/* unused harmony export canProblemsetUpdate */
/* unused harmony export canProblemsetView */
/* unused harmony export canProblemsetGroup */
/* unused harmony export canProblemsetCancelPublic */
/* unused harmony export canProblemsetCorrection */
/* unused harmony export canProblemsetCollect */
/* unused harmony export canProblemsetViewAnalysis */
/* unused harmony export canPaperlibraryAdd */
/* unused harmony export canPaperlibraryDelete */
/* unused harmony export canPaperlibraryUpdate */
/* unused harmony export canPaperlibraryView */
/* unused harmony export canPaperlibraryCancelPublic */
/* unused harmony export canPaperlibrarySendToClassroom */
/* unused harmony export authentication */
/* unused harmony export isCommonSuperAdmin */
/* unused harmony export isCommonSuperAdminOrOperation */
/* unused harmony export isCommonStudent */
/* unused harmony export isCommonAdminOrCreator */
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return isLogin; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return userInfo; });
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! umi */ "9kvl");
// 公共资源
var RoleType = /*#__PURE__*/function (RoleType) {
RoleType[RoleType["SuperAdmin"] = 1] = "SuperAdmin";
RoleType[RoleType["Operation"] = 2] = "Operation";
RoleType[RoleType["CertifiedTeacher"] = 5] = "CertifiedTeacher";
RoleType[RoleType["TrainingProduction"] = 8] = "TrainingProduction";
RoleType[RoleType["UncertifiedTeacher"] = 12] = "UncertifiedTeacher";
RoleType[RoleType["Student"] = 15] = "Student";
return RoleType;
}(RoleType || {}); // 学生
// 课堂资源
var CourseRoleType = /*#__PURE__*/function (CourseRoleType) {
CourseRoleType[CourseRoleType["SuperAdmin"] = 1] = "SuperAdmin";
CourseRoleType[CourseRoleType["Operation"] = 2] = "Operation";
CourseRoleType[CourseRoleType["Admin"] = 5] = "Admin";
CourseRoleType[CourseRoleType["Teacher"] = 8] = "Teacher";
CourseRoleType[CourseRoleType["Assistant"] = 12] = "Assistant";
CourseRoleType[CourseRoleType["Student"] = 15] = "Student";
return CourseRoleType;
}(CourseRoleType || {}); // 学生
var getRoleAuth = function getRoleAuth(auth) {
var _getDvaApp$_store$get = Object(umi__WEBPACK_IMPORTED_MODULE_0__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get.user;
var userInfo = user.userInfo;
return auth.some(function (v) {
return v == (userInfo === null || userInfo === void 0 ? void 0 : userInfo.role);
});
};
var getCourseAuth = function getCourseAuth(auth) {
var _getDvaApp$_store$get2 = Object(umi__WEBPACK_IMPORTED_MODULE_0__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get2.user;
var userInfo = user.userInfo;
if (userInfo === null || userInfo === void 0 ? void 0 : userInfo.own) return true;
return auth.some(function (v) {
var _userInfo$course;
return v == (userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$course = userInfo.course) === null || _userInfo$course === void 0 ? void 0 : _userInfo$course.course_role);
});
};
var isMainSite = function isMainSite() {
var _getDvaApp$_store$get3 = Object(umi__WEBPACK_IMPORTED_MODULE_0__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get3.user;
var userInfo = user.userInfo;
return userInfo.main_site;
};
var courseIsEnd = function courseIsEnd() {
var _userInfo$course2;
var _getDvaApp$_store$get4 = Object(umi__WEBPACK_IMPORTED_MODULE_0__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get4.user;
var userInfo = user.userInfo;
return userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$course2 = userInfo.course) === null || _userInfo$course2 === void 0 ? void 0 : _userInfo$course2.course_is_end;
};
var getAuthentication = function getAuthentication() {
var _getDvaApp$_store$get5 = Object(umi__WEBPACK_IMPORTED_MODULE_0__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get5.user;
var userInfo = user.userInfo;
return userInfo.authentication;
};
var isAdmin = function isAdmin() {
return getCourseAuth([CourseRoleType.SuperAdmin, CourseRoleType.Operation, CourseRoleType.Admin, CourseRoleType.Teacher, CourseRoleType.Assistant]);
};
// 超管、课堂管理员、老师、作者
var isAdminOrAssistant = function isAdminOrAssistant() {
return getCourseAuth([CourseRoleType.SuperAdmin, CourseRoleType.Teacher, CourseRoleType.Admin, CourseRoleType.Assistant, CourseRoleType.Operation]);
};
// 超管、课堂管理员、老师、作者
var isAdminOrAuthor = function isAdminOrAuthor() {
return getCourseAuth([CourseRoleType.SuperAdmin, CourseRoleType.Teacher, CourseRoleType.Admin]);
};
//
//超管0
var isSuperAdmin = function isSuperAdmin() {
return getCourseAuth([CourseRoleType.SuperAdmin]);
};
//超管、运维、课堂管理
var isAdminOrCreator = function isAdminOrCreator() {
return getCourseAuth([CourseRoleType.SuperAdmin, CourseRoleType.Operation, CourseRoleType.Admin]);
};
//超管 运维
var isSuperAdmins = function isSuperAdmins() {
return getRoleAuth([CourseRoleType.SuperAdmin, CourseRoleType.Operation]);
};
//超管 课堂管理
var isAdminAndCreator = function isAdminAndCreator() {
return getCourseAuth([CourseRoleType.SuperAdmin, CourseRoleType.Admin]);
};
//超管、运维、课堂管理、老师
var isAdminOrTeacher = function isAdminOrTeacher() {
return getCourseAuth([CourseRoleType.SuperAdmin, CourseRoleType.Operation, CourseRoleType.Admin, CourseRoleType.Teacher]);
};
// 助教===4
var isAssistant = function isAssistant() {
return getCourseAuth([CourseRoleType.Assistant]);
};
//老师
var isTeacher = function isTeacher() {
return getCourseAuth([CourseRoleType.Teacher]);
};
// 学生5
var isStudent = function isStudent() {
return getCourseAuth([CourseRoleType.Student]);
};
// 超管、运维、课堂管理、老师、助教、学生
var isAdminOrStudent = function isAdminOrStudent() {
return getCourseAuth([CourseRoleType.SuperAdmin, CourseRoleType.Operation, CourseRoleType.Admin, CourseRoleType.Teacher, CourseRoleType.Assistant, CourseRoleType.Student]);
};
// 超管、运维、课堂管理、老师、助教
var isAdmins = function isAdmins() {
return getCourseAuth([CourseRoleType.SuperAdmin, CourseRoleType.Operation, CourseRoleType.Admin, CourseRoleType.Teacher, CourseRoleType.Assistant]);
};
// 游客未登录/非课堂成员6>
var isNotMember = function isNotMember() {
var _userInfo$course3;
var _getDvaApp$_store$get6 = Object(umi__WEBPACK_IMPORTED_MODULE_0__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get6.user;
var userInfo = user.userInfo;
if ((userInfo === null || userInfo === void 0 ? void 0 : (_userInfo$course3 = userInfo.course) === null || _userInfo$course3 === void 0 ? void 0 : _userInfo$course3.course_role) === null) {
return true;
} else {
return false;
}
};
/**
* 通用资源
*/
// 添加
var canCommonAdd = function canCommonAdd() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher, RoleType.Student]);
};
// 删除
var canCommonDelete = function canCommonDelete() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return own || !own && getRoleAuth([RoleType.SuperAdmin]);
};
// 修改
var canCommonUpdate = function canCommonUpdate() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 学生5
var isStudents = function isStudents() {
return getRoleAuth([CourseRoleType.Student]);
};
// 查看/收藏/点赞
var canCommonView = function canCommonView() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher, RoleType.Student]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 下载
var canCommonDownload = function canCommonDownload() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher, RoleType.Student]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
/**
* 实训资源
*/
// 添加
var canShixunAdd = function canShixunAdd() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction]);
};
// 删除
var canShixunDelete = function canShixunDelete() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin]) : own || !own && getRoleAuth([RoleType.SuperAdmin]);
};
// 修改
var canShixunUpdate = function canShixunUpdate() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 查看/收藏/点赞
var canShixunView = function canShixunView() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher, RoleType.Student]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 发送至课堂
var canShixunSendToClassroom = function canShixunSendToClassroom() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 免金币查看答案/测试集
var canShixunViewAnswer = function canShixunViewAnswer() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 撤销公开
var canShixunCancelPublic = function canShixunCancelPublic() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin]) : false;
};
/**
* 试题资源
*/
// 添加
var canProblemsetAdd = function canProblemsetAdd() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher, RoleType.Student]);
};
// 删除
var canProblemsetDelete = function canProblemsetDelete() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin]) : own || !own && getRoleAuth([RoleType.SuperAdmin]);
};
// 修改
var canProblemsetUpdate = function canProblemsetUpdate() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 查看
var canProblemsetView = function canProblemsetView() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher, RoleType.Student]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 分组
var canProblemsetGroup = function canProblemsetGroup() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? false : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 撤销公开
var canProblemsetCancelPublic = function canProblemsetCancelPublic() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]) : false;
};
// 纠错
var canProblemsetCorrection = function canProblemsetCorrection() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher]) : false;
};
// 收藏
var canProblemsetCollect = function canProblemsetCollect() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher]) : false;
};
// 查看解析
var canProblemsetViewAnalysis = function canProblemsetViewAnalysis() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
/**
* 试卷资源
*/
// 添加
var canPaperlibraryAdd = function canPaperlibraryAdd() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher]);
};
// 删除
var canPaperlibraryDelete = function canPaperlibraryDelete() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin]) : own || !own && getRoleAuth([RoleType.SuperAdmin]);
};
// 修改
var canPaperlibraryUpdate = function canPaperlibraryUpdate() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 查看
var canPaperlibraryView = function canPaperlibraryView() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
// 撤销公开
var canPaperlibraryCancelPublic = function canPaperlibraryCancelPublic() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]) : false;
};
// 发送至课堂
var canPaperlibrarySendToClassroom = function canPaperlibrarySendToClassroom() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return isPublic ? getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher, RoleType.TrainingProduction, RoleType.UncertifiedTeacher]) : own || !own && getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
//老师就能上传视频
var authentication = function authentication() {
var isPublic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
var own = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
return getCourseAuth([CourseRoleType.Teacher]);
};
var isCommonSuperAdmin = function isCommonSuperAdmin() {
return getRoleAuth([RoleType.SuperAdmin]);
};
var isCommonSuperAdminOrOperation = function isCommonSuperAdminOrOperation() {
return getRoleAuth([RoleType.SuperAdmin, RoleType.Operation]);
};
var isCommonStudent = function isCommonStudent() {
return getRoleAuth([RoleType.Student]);
};
var isCommonAdminOrCreator = function isCommonAdminOrCreator() {
return getRoleAuth([RoleType.SuperAdmin, RoleType.Operation, RoleType.CertifiedTeacher]);
};
/**
*@@是否登录
*true登录 false未登录
*/
var isLogin = function isLogin() {
var _user$userInfo;
var _getDvaApp$_store$get7 = Object(umi__WEBPACK_IMPORTED_MODULE_0__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get7.user;
return !!((_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login);
};
/**
*@@获取用户登录信息
*/
var userInfo = function userInfo() {
var _getDvaApp$_store$get8 = Object(umi__WEBPACK_IMPORTED_MODULE_0__[/* getDvaApp */ "b"])()._store.getState(),
user = _getDvaApp$_store$get8.user;
return user.userInfo;
};
/***/ }),
/***/ "xTJ+":
/*!*****************************************!*\
!*** ./node_modules/axios/lib/utils.js ***!
\*****************************************/
/*! exports provided: default */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module uses injected variables (global) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* WEBPACK VAR INJECTION */(function(global) {/* harmony import */ var _helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers/bind.js */ "HSsa");
// utils is a library of generic helper functions non-specific to axios
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const kindOf = (cache => thing => {
const str = toString.call(thing);
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
})(Object.create(null));
const kindOfTest = (type) => {
type = type.toLowerCase();
return (thing) => kindOf(thing) === type
}
const typeOfTest = type => thing => typeof thing === type;
/**
* Determine if a value is an Array
*
* @param {Object} val The value to test
*
* @returns {boolean} True if value is an Array, otherwise false
*/
const {isArray} = Array;
/**
* Determine if a value is undefined
*
* @param {*} val The value to test
*
* @returns {boolean} True if the value is undefined, otherwise false
*/
const isUndefined = typeOfTest('undefined');
/**
* Determine if a value is a Buffer
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Buffer, otherwise false
*/
function isBuffer(val) {
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
&& isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
}
/**
* Determine if a value is an ArrayBuffer
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
*/
const isArrayBuffer = kindOfTest('ArrayBuffer');
/**
* Determine if a value is a view on an ArrayBuffer
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
*/
function isArrayBufferView(val) {
let result;
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
result = ArrayBuffer.isView(val);
} else {
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
}
return result;
}
/**
* Determine if a value is a String
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a String, otherwise false
*/
const isString = typeOfTest('string');
/**
* Determine if a value is a Function
*
* @param {*} val The value to test
* @returns {boolean} True if value is a Function, otherwise false
*/
const isFunction = typeOfTest('function');
/**
* Determine if a value is a Number
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Number, otherwise false
*/
const isNumber = typeOfTest('number');
/**
* Determine if a value is an Object
*
* @param {*} thing The value to test
*
* @returns {boolean} True if value is an Object, otherwise false
*/
const isObject = (thing) => thing !== null && typeof thing === 'object';
/**
* Determine if a value is a Boolean
*
* @param {*} thing The value to test
* @returns {boolean} True if value is a Boolean, otherwise false
*/
const isBoolean = thing => thing === true || thing === false;
/**
* Determine if a value is a plain Object
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a plain Object, otherwise false
*/
const isPlainObject = (val) => {
if (kindOf(val) !== 'object') {
return false;
}
const prototype = getPrototypeOf(val);
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
}
/**
* Determine if a value is a Date
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Date, otherwise false
*/
const isDate = kindOfTest('Date');
/**
* Determine if a value is a File
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFile = kindOfTest('File');
/**
* Determine if a value is a Blob
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Blob, otherwise false
*/
const isBlob = kindOfTest('Blob');
/**
* Determine if a value is a FileList
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a File, otherwise false
*/
const isFileList = kindOfTest('FileList');
/**
* Determine if a value is a Stream
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a Stream, otherwise false
*/
const isStream = (val) => isObject(val) && isFunction(val.pipe);
/**
* Determine if a value is a FormData
*
* @param {*} thing The value to test
*
* @returns {boolean} True if value is an FormData, otherwise false
*/
const isFormData = (thing) => {
let kind;
return thing && (
(typeof FormData === 'function' && thing instanceof FormData) || (
isFunction(thing.append) && (
(kind = kindOf(thing)) === 'formdata' ||
// detect form-data instance
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
)
)
)
}
/**
* Determine if a value is a URLSearchParams object
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
*/
const isURLSearchParams = kindOfTest('URLSearchParams');
/**
* Trim excess whitespace off the beginning and end of a string
*
* @param {String} str The String to trim
*
* @returns {String} The String freed of excess whitespace
*/
const trim = (str) => str.trim ?
str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
/**
* Iterate over an Array or an Object invoking a function for each item.
*
* If `obj` is an Array callback will be called passing
* the value, index, and complete array for each item.
*
* If 'obj' is an Object callback will be called passing
* the value, key, and complete object for each property.
*
* @param {Object|Array} obj The object to iterate
* @param {Function} fn The callback to invoke for each item
*
* @param {Boolean} [allOwnKeys = false]
* @returns {any}
*/
function forEach(obj, fn, {allOwnKeys = false} = {}) {
// Don't bother if no value provided
if (obj === null || typeof obj === 'undefined') {
return;
}
let i;
let l;
// Force an array if not already something iterable
if (typeof obj !== 'object') {
/*eslint no-param-reassign:0*/
obj = [obj];
}
if (isArray(obj)) {
// Iterate over array values
for (i = 0, l = obj.length; i < l; i++) {
fn.call(null, obj[i], i, obj);
}
} else {
// Iterate over object keys
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
const len = keys.length;
let key;
for (i = 0; i < len; i++) {
key = keys[i];
fn.call(null, obj[key], key, obj);
}
}
}
function findKey(obj, key) {
key = key.toLowerCase();
const keys = Object.keys(obj);
let i = keys.length;
let _key;
while (i-- > 0) {
_key = keys[i];
if (key === _key.toLowerCase()) {
return _key;
}
}
return null;
}
const _global = (() => {
/*eslint no-undef:0*/
if (typeof globalThis !== "undefined") return globalThis;
return typeof self !== "undefined" ? self : (typeof window !== 'undefined' ? window : global)
})();
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
/**
* Accepts varargs expecting each argument to be an object, then
* immutably merges the properties of each object and returns result.
*
* When multiple objects contain the same key the later object in
* the arguments list will take precedence.
*
* Example:
*
* ```js
* var result = merge({foo: 123}, {foo: 456});
* console.log(result.foo); // outputs 456
* ```
*
* @param {Object} obj1 Object to merge
*
* @returns {Object} Result of all merge properties
*/
function merge(/* obj1, obj2, obj3, ... */) {
const {caseless} = isContextDefined(this) && this || {};
const result = {};
const assignValue = (val, key) => {
const targetKey = caseless && findKey(result, key) || key;
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
result[targetKey] = merge(result[targetKey], val);
} else if (isPlainObject(val)) {
result[targetKey] = merge({}, val);
} else if (isArray(val)) {
result[targetKey] = val.slice();
} else {
result[targetKey] = val;
}
}
for (let i = 0, l = arguments.length; i < l; i++) {
arguments[i] && forEach(arguments[i], assignValue);
}
return result;
}
/**
* Extends object a by mutably adding to it the properties of object b.
*
* @param {Object} a The object to be extended
* @param {Object} b The object to copy properties from
* @param {Object} thisArg The object to bind function to
*
* @param {Boolean} [allOwnKeys]
* @returns {Object} The resulting value of object a
*/
const extend = (a, b, thisArg, {allOwnKeys}= {}) => {
forEach(b, (val, key) => {
if (thisArg && isFunction(val)) {
a[key] = Object(_helpers_bind_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(val, thisArg);
} else {
a[key] = val;
}
}, {allOwnKeys});
return a;
}
/**
* Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
*
* @param {string} content with BOM
*
* @returns {string} content value without BOM
*/
const stripBOM = (content) => {
if (content.charCodeAt(0) === 0xFEFF) {
content = content.slice(1);
}
return content;
}
/**
* Inherit the prototype methods from one constructor into another
* @param {function} constructor
* @param {function} superConstructor
* @param {object} [props]
* @param {object} [descriptors]
*
* @returns {void}
*/
const inherits = (constructor, superConstructor, props, descriptors) => {
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
constructor.prototype.constructor = constructor;
Object.defineProperty(constructor, 'super', {
value: superConstructor.prototype
});
props && Object.assign(constructor.prototype, props);
}
/**
* Resolve object with deep prototype chain to a flat object
* @param {Object} sourceObj source object
* @param {Object} [destObj]
* @param {Function|Boolean} [filter]
* @param {Function} [propFilter]
*
* @returns {Object}
*/
const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
let props;
let i;
let prop;
const merged = {};
destObj = destObj || {};
// eslint-disable-next-line no-eq-null,eqeqeq
if (sourceObj == null) return destObj;
do {
props = Object.getOwnPropertyNames(sourceObj);
i = props.length;
while (i-- > 0) {
prop = props[i];
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
destObj[prop] = sourceObj[prop];
merged[prop] = true;
}
}
sourceObj = filter !== false && getPrototypeOf(sourceObj);
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
return destObj;
}
/**
* Determines whether a string ends with the characters of a specified string
*
* @param {String} str
* @param {String} searchString
* @param {Number} [position= 0]
*
* @returns {boolean}
*/
const endsWith = (str, searchString, position) => {
str = String(str);
if (position === undefined || position > str.length) {
position = str.length;
}
position -= searchString.length;
const lastIndex = str.indexOf(searchString, position);
return lastIndex !== -1 && lastIndex === position;
}
/**
* Returns new array from array like object or null if failed
*
* @param {*} [thing]
*
* @returns {?Array}
*/
const toArray = (thing) => {
if (!thing) return null;
if (isArray(thing)) return thing;
let i = thing.length;
if (!isNumber(i)) return null;
const arr = new Array(i);
while (i-- > 0) {
arr[i] = thing[i];
}
return arr;
}
/**
* Checking if the Uint8Array exists and if it does, it returns a function that checks if the
* thing passed in is an instance of Uint8Array
*
* @param {TypedArray}
*
* @returns {Array}
*/
// eslint-disable-next-line func-names
const isTypedArray = (TypedArray => {
// eslint-disable-next-line func-names
return thing => {
return TypedArray && thing instanceof TypedArray;
};
})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));
/**
* For each entry in the object, call the function with the key and value.
*
* @param {Object<any, any>} obj - The object to iterate over.
* @param {Function} fn - The function to call for each entry.
*
* @returns {void}
*/
const forEachEntry = (obj, fn) => {
const generator = obj && obj[Symbol.iterator];
const iterator = generator.call(obj);
let result;
while ((result = iterator.next()) && !result.done) {
const pair = result.value;
fn.call(obj, pair[0], pair[1]);
}
}
/**
* It takes a regular expression and a string, and returns an array of all the matches
*
* @param {string} regExp - The regular expression to match against.
* @param {string} str - The string to search.
*
* @returns {Array<boolean>}
*/
const matchAll = (regExp, str) => {
let matches;
const arr = [];
while ((matches = regExp.exec(str)) !== null) {
arr.push(matches);
}
return arr;
}
/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */
const isHTMLForm = kindOfTest('HTMLFormElement');
const toCamelCase = str => {
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
function replacer(m, p1, p2) {
return p1.toUpperCase() + p2;
}
);
};
/* Creating a function that will check if an object has a property. */
const hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);
/**
* Determine if a value is a RegExp object
*
* @param {*} val The value to test
*
* @returns {boolean} True if value is a RegExp object, otherwise false
*/
const isRegExp = kindOfTest('RegExp');
const reduceDescriptors = (obj, reducer) => {
const descriptors = Object.getOwnPropertyDescriptors(obj);
const reducedDescriptors = {};
forEach(descriptors, (descriptor, name) => {
let ret;
if ((ret = reducer(descriptor, name, obj)) !== false) {
reducedDescriptors[name] = ret || descriptor;
}
});
Object.defineProperties(obj, reducedDescriptors);
}
/**
* Makes all methods read-only
* @param {Object} obj
*/
const freezeMethods = (obj) => {
reduceDescriptors(obj, (descriptor, name) => {
// skip restricted props in strict mode
if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {
return false;
}
const value = obj[name];
if (!isFunction(value)) return;
descriptor.enumerable = false;
if ('writable' in descriptor) {
descriptor.writable = false;
return;
}
if (!descriptor.set) {
descriptor.set = () => {
throw Error('Can not rewrite read-only method \'' + name + '\'');
};
}
});
}
const toObjectSet = (arrayOrString, delimiter) => {
const obj = {};
const define = (arr) => {
arr.forEach(value => {
obj[value] = true;
});
}
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
return obj;
}
const noop = () => {}
const toFiniteNumber = (value, defaultValue) => {
value = +value;
return Number.isFinite(value) ? value : defaultValue;
}
const ALPHA = 'abcdefghijklmnopqrstuvwxyz'
const DIGIT = '0123456789';
const ALPHABET = {
DIGIT,
ALPHA,
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
}
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
let str = '';
const {length} = alphabet;
while (size--) {
str += alphabet[Math.random() * length|0]
}
return str;
}
/**
* If the thing is a FormData object, return true, otherwise return false.
*
* @param {unknown} thing - The thing to check.
*
* @returns {boolean}
*/
function isSpecCompliantForm(thing) {
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
}
const toJSONObject = (obj) => {
const stack = new Array(10);
const visit = (source, i) => {
if (isObject(source)) {
if (stack.indexOf(source) >= 0) {
return;
}
if(!('toJSON' in source)) {
stack[i] = source;
const target = isArray(source) ? [] : {};
forEach(source, (value, key) => {
const reducedValue = visit(value, i + 1);
!isUndefined(reducedValue) && (target[key] = reducedValue);
});
stack[i] = undefined;
return target;
}
}
return source;
}
return visit(obj, 0);
}
const isAsyncFn = kindOfTest('AsyncFunction');
const isThenable = (thing) =>
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
/* harmony default export */ __webpack_exports__["a"] = ({
isArray,
isArrayBuffer,
isBuffer,
isFormData,
isArrayBufferView,
isString,
isNumber,
isBoolean,
isObject,
isPlainObject,
isUndefined,
isDate,
isFile,
isBlob,
isRegExp,
isFunction,
isStream,
isURLSearchParams,
isTypedArray,
isFileList,
forEach,
merge,
extend,
trim,
stripBOM,
inherits,
toFlatObject,
kindOf,
kindOfTest,
endsWith,
toArray,
forEachEntry,
matchAll,
isHTMLForm,
hasOwnProperty,
hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection
reduceDescriptors,
freezeMethods,
toObjectSet,
toCamelCase,
noop,
toFiniteNumber,
findKey,
global: _global,
isContextDefined,
ALPHABET,
generateString,
isSpecCompliantForm,
toJSONObject,
isAsyncFn,
isThenable
});
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../webpack/buildin/global.js */ "yLpj")))
/***/ }),
/***/ "xdBZ":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.italics.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.italics` method
// https://tc39.github.io/ecma262/#sec-string.prototype.italics
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, {
italics: function italics() {
return createHTML(this, 'i', '', '');
}
});
/***/ }),
/***/ "xddM":
/*!*********************************************************************!*\
!*** ./node_modules/@ant-design/icons/ExclamationCircleOutlined.js ***!
\*********************************************************************/
/*! no static exports found */
/*! exports used: default */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _ExclamationCircleOutlined = _interopRequireDefault(__webpack_require__(/*! ./lib/icons/ExclamationCircleOutlined */ "sxS5"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
var _default = _ExclamationCircleOutlined;
exports.default = _default;
module.exports = _default;
/***/ }),
/***/ "xrYK":
/*!*******************************************************!*\
!*** ./node_modules/core-js/internals/classof-raw.js ***!
\*******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
var toString = {}.toString;
module.exports = function (it) {
return toString.call(it).slice(8, -1);
};
/***/ }),
/***/ "xs3f":
/*!********************************************************!*\
!*** ./node_modules/core-js/internals/shared-store.js ***!
\********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var setGlobal = __webpack_require__(/*! ../internals/set-global */ "zk60");
var SHARED = '__core-js_shared__';
var store = global[SHARED] || setGlobal(SHARED, {});
module.exports = store;
/***/ }),
/***/ "yKVA":
/*!**************************************************************************************************************!*\
!*** ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules ***!
\**************************************************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _inherits; });
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
// CONCATENATED MODULE: ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/inherits.js
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
if (superClass) _setPrototypeOf(subClass, superClass);
}
/***/ }),
/***/ "yLpj":
/*!***********************************!*\
!*** (webpack)/buildin/global.js ***!
\***********************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || new Function("return this")();
} catch (e) {
// This works if the window reference is available
if (typeof window === "object") g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/***/ "yNLB":
/*!**************************************************************!*\
!*** ./node_modules/core-js/internals/string-trim-forced.js ***!
\**************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var whitespaces = __webpack_require__(/*! ../internals/whitespaces */ "WJkJ");
var non = '\u200B\u0085\u180E';
// check that a method works with the correct list
// of whitespaces and has a correct name
module.exports = function (METHOD_NAME) {
return fails(function () {
return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() != non || whitespaces[METHOD_NAME].name !== METHOD_NAME;
});
};
/***/ }),
/***/ "yQYn":
/*!*****************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.is-extensible.js ***!
\*****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var nativeIsExtensible = Object.isExtensible;
var FAILS_ON_PRIMITIVES = fails(function () { nativeIsExtensible(1); });
// `Object.isExtensible` method
// https://tc39.github.io/ecma262/#sec-object.isextensible
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
isExtensible: function isExtensible(it) {
return isObject(it) ? nativeIsExtensible ? nativeIsExtensible(it) : true : false;
}
});
/***/ }),
/***/ "yWo2":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.small.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.small` method
// https://tc39.github.io/ecma262/#sec-string.prototype.small
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('small') }, {
small: function small() {
return createHTML(this, 'small', '', '');
}
});
/***/ }),
/***/ "yiG3":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.math.log1p.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var log1p = __webpack_require__(/*! ../internals/math-log1p */ "HsHA");
// `Math.log1p` method
// https://tc39.github.io/ecma262/#sec-math.log1p
$({ target: 'Math', stat: true }, { log1p: log1p });
/***/ }),
/***/ "yl30":
/*!****************************************************************!*\
!*** ./node_modules/react-dom/cjs/react-dom.production.min.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
/** @license React v16.12.0
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/*
Modernizr 3.0.0pre (Custom Build) | MIT
*/
var aa=__webpack_require__(/*! react */ "q1tI"),n=__webpack_require__(/*! object-assign */ "MgzW"),q=__webpack_require__(/*! scheduler */ "QCnb");function u(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;c<arguments.length;c++)b+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+a+"; visit "+b+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!aa)throw Error(u(227));var ba=null,ca={};
function da(){if(ba)for(var a in ca){var b=ca[a],c=ba.indexOf(a);if(!(-1<c))throw Error(u(96,a));if(!ea[c]){if(!b.extractEvents)throw Error(u(97,a));ea[c]=b;c=b.eventTypes;for(var d in c){var e=void 0;var f=c[d],g=b,h=d;if(fa.hasOwnProperty(h))throw Error(u(99,h));fa[h]=f;var k=f.phasedRegistrationNames;if(k){for(e in k)k.hasOwnProperty(e)&&ha(k[e],g,h);e=!0}else f.registrationName?(ha(f.registrationName,g,h),e=!0):e=!1;if(!e)throw Error(u(98,d,a));}}}}
function ha(a,b,c){if(ia[a])throw Error(u(100,a));ia[a]=b;ja[a]=b.eventTypes[c].dependencies}var ea=[],fa={},ia={},ja={};function ka(a,b,c,d,e,f,g,h,k){var l=Array.prototype.slice.call(arguments,3);try{b.apply(c,l)}catch(m){this.onError(m)}}var la=!1,ma=null,na=!1,oa=null,pa={onError:function(a){la=!0;ma=a}};function qa(a,b,c,d,e,f,g,h,k){la=!1;ma=null;ka.apply(pa,arguments)}
function ra(a,b,c,d,e,f,g,h,k){qa.apply(this,arguments);if(la){if(la){var l=ma;la=!1;ma=null}else throw Error(u(198));na||(na=!0,oa=l)}}var sa=null,ua=null,va=null;function wa(a,b,c){var d=a.type||"unknown-event";a.currentTarget=va(c);ra(d,b,void 0,a);a.currentTarget=null}function xa(a,b){if(null==b)throw Error(u(30));if(null==a)return b;if(Array.isArray(a)){if(Array.isArray(b))return a.push.apply(a,b),a;a.push(b);return a}return Array.isArray(b)?[a].concat(b):[a,b]}
function ya(a,b,c){Array.isArray(a)?a.forEach(b,c):a&&b.call(c,a)}var za=null;function Aa(a){if(a){var b=a._dispatchListeners,c=a._dispatchInstances;if(Array.isArray(b))for(var d=0;d<b.length&&!a.isPropagationStopped();d++)wa(a,b[d],c[d]);else b&&wa(a,b,c);a._dispatchListeners=null;a._dispatchInstances=null;a.isPersistent()||a.constructor.release(a)}}function Ba(a){null!==a&&(za=xa(za,a));a=za;za=null;if(a){ya(a,Aa);if(za)throw Error(u(95));if(na)throw a=oa,na=!1,oa=null,a;}}
var Ca={injectEventPluginOrder:function(a){if(ba)throw Error(u(101));ba=Array.prototype.slice.call(a);da()},injectEventPluginsByName:function(a){var b=!1,c;for(c in a)if(a.hasOwnProperty(c)){var d=a[c];if(!ca.hasOwnProperty(c)||ca[c]!==d){if(ca[c])throw Error(u(102,c));ca[c]=d;b=!0}}b&&da()}};
function Da(a,b){var c=a.stateNode;if(!c)return null;var d=sa(c);if(!d)return null;c=d[b];a:switch(b){case "onClick":case "onClickCapture":case "onDoubleClick":case "onDoubleClickCapture":case "onMouseDown":case "onMouseDownCapture":case "onMouseMove":case "onMouseMoveCapture":case "onMouseUp":case "onMouseUpCapture":(d=!d.disabled)||(a=a.type,d=!("button"===a||"input"===a||"select"===a||"textarea"===a));a=!d;break a;default:a=!1}if(a)return null;if(c&&"function"!==typeof c)throw Error(u(231,b,typeof c));
return c}var Ea=aa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;Ea.hasOwnProperty("ReactCurrentDispatcher")||(Ea.ReactCurrentDispatcher={current:null});Ea.hasOwnProperty("ReactCurrentBatchConfig")||(Ea.ReactCurrentBatchConfig={suspense:null});
var Fa=/^(.*)[\\\/]/,w="function"===typeof Symbol&&Symbol.for,Ga=w?Symbol.for("react.element"):60103,Ha=w?Symbol.for("react.portal"):60106,Ia=w?Symbol.for("react.fragment"):60107,Ja=w?Symbol.for("react.strict_mode"):60108,Ka=w?Symbol.for("react.profiler"):60114,La=w?Symbol.for("react.provider"):60109,Ma=w?Symbol.for("react.context"):60110,Na=w?Symbol.for("react.concurrent_mode"):60111,Oa=w?Symbol.for("react.forward_ref"):60112,Pa=w?Symbol.for("react.suspense"):60113,Qa=w?Symbol.for("react.suspense_list"):
60120,Ra=w?Symbol.for("react.memo"):60115,Sa=w?Symbol.for("react.lazy"):60116;w&&Symbol.for("react.fundamental");w&&Symbol.for("react.responder");w&&Symbol.for("react.scope");var Ta="function"===typeof Symbol&&Symbol.iterator;function Ua(a){if(null===a||"object"!==typeof a)return null;a=Ta&&a[Ta]||a["@@iterator"];return"function"===typeof a?a:null}
function Va(a){if(-1===a._status){a._status=0;var b=a._ctor;b=b();a._result=b;b.then(function(b){0===a._status&&(b=b.default,a._status=1,a._result=b)},function(b){0===a._status&&(a._status=2,a._result=b)})}}
function Wa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case Ia:return"Fragment";case Ha:return"Portal";case Ka:return"Profiler";case Ja:return"StrictMode";case Pa:return"Suspense";case Qa:return"SuspenseList"}if("object"===typeof a)switch(a.$$typeof){case Ma:return"Context.Consumer";case La:return"Context.Provider";case Oa:var b=a.render;b=b.displayName||b.name||"";return a.displayName||(""!==b?"ForwardRef("+b+")":
"ForwardRef");case Ra:return Wa(a.type);case Sa:if(a=1===a._status?a._result:null)return Wa(a)}return null}function Xa(a){var b="";do{a:switch(a.tag){case 3:case 4:case 6:case 7:case 10:case 9:var c="";break a;default:var d=a._debugOwner,e=a._debugSource,f=Wa(a.type);c=null;d&&(c=Wa(d.type));d=f;f="";e?f=" (at "+e.fileName.replace(Fa,"")+":"+e.lineNumber+")":c&&(f=" (created by "+c+")");c="\n in "+(d||"Unknown")+f}b+=c;a=a.return}while(a);return b}
var Ya=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Za=null,$a=null,ab=null;function bb(a){if(a=ua(a)){if("function"!==typeof Za)throw Error(u(280));var b=sa(a.stateNode);Za(a.stateNode,a.type,b)}}function cb(a){$a?ab?ab.push(a):ab=[a]:$a=a}function db(){if($a){var a=$a,b=ab;ab=$a=null;bb(a);if(b)for(a=0;a<b.length;a++)bb(b[a])}}function eb(a,b){return a(b)}function fb(a,b,c,d){return a(b,c,d)}function gb(){}
var hb=eb,ib=!1,jb=!1;function kb(){if(null!==$a||null!==ab)gb(),db()}new Map;var lb=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,mb=Object.prototype.hasOwnProperty,nb={},ob={};
function pb(a){if(mb.call(ob,a))return!0;if(mb.call(nb,a))return!1;if(lb.test(a))return ob[a]=!0;nb[a]=!0;return!1}function qb(a,b,c,d){if(null!==c&&0===c.type)return!1;switch(typeof b){case "function":case "symbol":return!0;case "boolean":if(d)return!1;if(null!==c)return!c.acceptsBooleans;a=a.toLowerCase().slice(0,5);return"data-"!==a&&"aria-"!==a;default:return!1}}
function rb(a,b,c,d){if(null===b||"undefined"===typeof b||qb(a,b,c,d))return!0;if(d)return!1;if(null!==c)switch(c.type){case 3:return!b;case 4:return!1===b;case 5:return isNaN(b);case 6:return isNaN(b)||1>b}return!1}function B(a,b,c,d,e,f){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f}var D={};
"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){D[a]=new B(a,0,!1,a,null,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];D[b]=new B(b,1,!1,a[1],null,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(a){D[a]=new B(a,2,!1,a.toLowerCase(),null,!1)});
["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){D[a]=new B(a,2,!1,a,null,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){D[a]=new B(a,3,!1,a.toLowerCase(),null,!1)});
["checked","multiple","muted","selected"].forEach(function(a){D[a]=new B(a,3,!0,a,null,!1)});["capture","download"].forEach(function(a){D[a]=new B(a,4,!1,a,null,!1)});["cols","rows","size","span"].forEach(function(a){D[a]=new B(a,6,!1,a,null,!1)});["rowSpan","start"].forEach(function(a){D[a]=new B(a,5,!1,a.toLowerCase(),null,!1)});var sb=/[\-:]([a-z])/g;function tb(a){return a[1].toUpperCase()}
"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(sb,
tb);D[b]=new B(b,1,!1,a,null,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(sb,tb);D[b]=new B(b,1,!1,a,"http://www.w3.org/1999/xlink",!1)});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(sb,tb);D[b]=new B(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1)});["tabIndex","crossOrigin"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!1)});
D.xlinkHref=new B("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0);["src","href","action","formAction"].forEach(function(a){D[a]=new B(a,1,!1,a.toLowerCase(),null,!0)});function ub(a){switch(typeof a){case "boolean":case "number":case "object":case "string":case "undefined":return a;default:return""}}
function vb(a,b,c,d){var e=D.hasOwnProperty(b)?D[b]:null;var f=null!==e?0===e.type:d?!1:!(2<b.length)||"o"!==b[0]&&"O"!==b[0]||"n"!==b[1]&&"N"!==b[1]?!1:!0;f||(rb(b,c,e,d)&&(c=null),d||null===e?pb(b)&&(null===c?a.removeAttribute(b):a.setAttribute(b,""+c)):e.mustUseProperty?a[e.propertyName]=null===c?3===e.type?!1:"":c:(b=e.attributeName,d=e.attributeNamespace,null===c?a.removeAttribute(b):(e=e.type,c=3===e||4===e&&!0===c?"":""+c,d?a.setAttributeNS(d,b,c):a.setAttribute(b,c))))}
function wb(a){var b=a.type;return(a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b)}
function xb(a){var b=wb(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=""+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=""+a},stopTracking:function(){a._valueTracker=
null;delete a[b]}}}}function yb(a){a._valueTracker||(a._valueTracker=xb(a))}function zb(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d="";a&&(d=wb(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Ab(a,b){var c=b.checked;return n({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}
function Bb(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=ub(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value}}function Cb(a,b){b=b.checked;null!=b&&vb(a,"checked",b,!1)}
function Eb(a,b){Cb(a,b);var c=ub(b.value),d=b.type;if(null!=c)if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c}else a.value!==""+c&&(a.value=""+c);else if("submit"===d||"reset"===d){a.removeAttribute("value");return}b.hasOwnProperty("value")?Fb(a,b.type,c):b.hasOwnProperty("defaultValue")&&Fb(a,b.type,ub(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}
function Gb(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;""!==c&&(a.name="");a.defaultChecked=!a.defaultChecked;a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c)}
function Fb(a,b,c){if("number"!==b||a.ownerDocument.activeElement!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c)}function Hb(a){var b="";aa.Children.forEach(a,function(a){null!=a&&(b+=a)});return b}function Ib(a,b){a=n({children:void 0},b);if(b=Hb(b.children))a.children=b;return a}
function Jb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e<c.length;e++)b["$"+c[e]]=!0;for(c=0;c<a.length;c++)e=b.hasOwnProperty("$"+a[c].value),a[c].selected!==e&&(a[c].selected=e),e&&d&&(a[c].defaultSelected=!0)}else{c=""+ub(c);b=null;for(e=0;e<a.length;e++){if(a[e].value===c){a[e].selected=!0;d&&(a[e].defaultSelected=!0);return}null!==b||a[e].disabled||(b=a[e])}null!==b&&(b.selected=!0)}}
function Kb(a,b){if(null!=b.dangerouslySetInnerHTML)throw Error(u(91));return n({},b,{value:void 0,defaultValue:void 0,children:""+a._wrapperState.initialValue})}function Lb(a,b){var c=b.value;if(null==c){c=b.defaultValue;b=b.children;if(null!=b){if(null!=c)throw Error(u(92));if(Array.isArray(b)){if(!(1>=b.length))throw Error(u(93));b=b[0]}c=b}null==c&&(c="")}a._wrapperState={initialValue:ub(c)}}
function Mb(a,b){var c=ub(b.value),d=ub(b.defaultValue);null!=c&&(c=""+c,c!==a.value&&(a.value=c),null==b.defaultValue&&a.defaultValue!==c&&(a.defaultValue=c));null!=d&&(a.defaultValue=""+d)}function Nb(a){var b=a.textContent;b===a._wrapperState.initialValue&&""!==b&&null!==b&&(a.value=b)}var Ob={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg"};
function Pb(a){switch(a){case "svg":return"http://www.w3.org/2000/svg";case "math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Qb(a,b){return null==a||"http://www.w3.org/1999/xhtml"===a?Pb(b):"http://www.w3.org/2000/svg"===a&&"foreignObject"===b?"http://www.w3.org/1999/xhtml":a}
var Rb,Sb=function(a){return"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(b,c,d,e){MSApp.execUnsafeLocalFunction(function(){return a(b,c,d,e)})}:a}(function(a,b){if(a.namespaceURI!==Ob.svg||"innerHTML"in a)a.innerHTML=b;else{Rb=Rb||document.createElement("div");Rb.innerHTML="<svg>"+b.valueOf().toString()+"</svg>";for(b=Rb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});
function Tb(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}function Ub(a,b){var c={};c[a.toLowerCase()]=b.toLowerCase();c["Webkit"+a]="webkit"+b;c["Moz"+a]="moz"+b;return c}var Vb={animationend:Ub("Animation","AnimationEnd"),animationiteration:Ub("Animation","AnimationIteration"),animationstart:Ub("Animation","AnimationStart"),transitionend:Ub("Transition","TransitionEnd")},Wb={},Xb={};
Ya&&(Xb=document.createElement("div").style,"AnimationEvent"in window||(delete Vb.animationend.animation,delete Vb.animationiteration.animation,delete Vb.animationstart.animation),"TransitionEvent"in window||delete Vb.transitionend.transition);function Yb(a){if(Wb[a])return Wb[a];if(!Vb[a])return a;var b=Vb[a],c;for(c in b)if(b.hasOwnProperty(c)&&c in Xb)return Wb[a]=b[c];return a}var Zb=Yb("animationend"),$b=Yb("animationiteration"),ac=Yb("animationstart"),bc=Yb("transitionend"),cc="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" ");
function ec(a){var b=a,c=a;if(a.alternate)for(;b.return;)b=b.return;else{a=b;do b=a,0!==(b.effectTag&1026)&&(c=b.return),a=b.return;while(a)}return 3===b.tag?c:null}function fc(a){if(13===a.tag){var b=a.memoizedState;null===b&&(a=a.alternate,null!==a&&(b=a.memoizedState));if(null!==b)return b.dehydrated}return null}function gc(a){if(ec(a)!==a)throw Error(u(188));}
function hc(a){var b=a.alternate;if(!b){b=ec(a);if(null===b)throw Error(u(188));return b!==a?null:a}for(var c=a,d=b;;){var e=c.return;if(null===e)break;var f=e.alternate;if(null===f){d=e.return;if(null!==d){c=d;continue}break}if(e.child===f.child){for(f=e.child;f;){if(f===c)return gc(e),a;if(f===d)return gc(e),b;f=f.sibling}throw Error(u(188));}if(c.return!==d.return)c=e,d=f;else{for(var g=!1,h=e.child;h;){if(h===c){g=!0;c=e;d=f;break}if(h===d){g=!0;d=e;c=f;break}h=h.sibling}if(!g){for(h=f.child;h;){if(h===
c){g=!0;c=f;d=e;break}if(h===d){g=!0;d=f;c=e;break}h=h.sibling}if(!g)throw Error(u(189));}}if(c.alternate!==d)throw Error(u(190));}if(3!==c.tag)throw Error(u(188));return c.stateNode.current===c?a:b}function ic(a){a=hc(a);if(!a)return null;for(var b=a;;){if(5===b.tag||6===b.tag)return b;if(b.child)b.child.return=b,b=b.child;else{if(b===a)break;for(;!b.sibling;){if(!b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}}return null}
var jc,kc,lc,mc=!1,nc=[],oc=null,pc=null,qc=null,rc=new Map,sc=new Map,tc=[],uc="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),vc="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");
function wc(a){var b=xc(a);uc.forEach(function(c){yc(c,a,b)});vc.forEach(function(c){yc(c,a,b)})}function zc(a,b,c,d){return{blockedOn:a,topLevelType:b,eventSystemFlags:c|32,nativeEvent:d}}function Ac(a,b){switch(a){case "focus":case "blur":oc=null;break;case "dragenter":case "dragleave":pc=null;break;case "mouseover":case "mouseout":qc=null;break;case "pointerover":case "pointerout":rc.delete(b.pointerId);break;case "gotpointercapture":case "lostpointercapture":sc.delete(b.pointerId)}}
function Bc(a,b,c,d,e){if(null===a||a.nativeEvent!==e)return a=zc(b,c,d,e),null!==b&&(b=Cc(b),null!==b&&kc(b)),a;a.eventSystemFlags|=d;return a}function Dc(a,b,c,d){switch(b){case "focus":return oc=Bc(oc,a,b,c,d),!0;case "dragenter":return pc=Bc(pc,a,b,c,d),!0;case "mouseover":return qc=Bc(qc,a,b,c,d),!0;case "pointerover":var e=d.pointerId;rc.set(e,Bc(rc.get(e)||null,a,b,c,d));return!0;case "gotpointercapture":return e=d.pointerId,sc.set(e,Bc(sc.get(e)||null,a,b,c,d)),!0}return!1}
function Ec(a){var b=Fc(a.target);if(null!==b){var c=ec(b);if(null!==c)if(b=c.tag,13===b){if(b=fc(c),null!==b){a.blockedOn=b;q.unstable_runWithPriority(a.priority,function(){lc(c)});return}}else if(3===b&&c.stateNode.hydrate){a.blockedOn=3===c.tag?c.stateNode.containerInfo:null;return}}a.blockedOn=null}function Gc(a){if(null!==a.blockedOn)return!1;var b=Hc(a.topLevelType,a.eventSystemFlags,a.nativeEvent);if(null!==b){var c=Cc(b);null!==c&&kc(c);a.blockedOn=b;return!1}return!0}
function Ic(a,b,c){Gc(a)&&c.delete(b)}function Jc(){for(mc=!1;0<nc.length;){var a=nc[0];if(null!==a.blockedOn){a=Cc(a.blockedOn);null!==a&&jc(a);break}var b=Hc(a.topLevelType,a.eventSystemFlags,a.nativeEvent);null!==b?a.blockedOn=b:nc.shift()}null!==oc&&Gc(oc)&&(oc=null);null!==pc&&Gc(pc)&&(pc=null);null!==qc&&Gc(qc)&&(qc=null);rc.forEach(Ic);sc.forEach(Ic)}function Kc(a,b){a.blockedOn===b&&(a.blockedOn=null,mc||(mc=!0,q.unstable_scheduleCallback(q.unstable_NormalPriority,Jc)))}
function Lc(a){function b(b){return Kc(b,a)}if(0<nc.length){Kc(nc[0],a);for(var c=1;c<nc.length;c++){var d=nc[c];d.blockedOn===a&&(d.blockedOn=null)}}null!==oc&&Kc(oc,a);null!==pc&&Kc(pc,a);null!==qc&&Kc(qc,a);rc.forEach(b);sc.forEach(b);for(c=0;c<tc.length;c++)d=tc[c],d.blockedOn===a&&(d.blockedOn=null);for(;0<tc.length&&(c=tc[0],null===c.blockedOn);)Ec(c),null===c.blockedOn&&tc.shift()}
function Mc(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}function Nc(a){do a=a.return;while(a&&5!==a.tag);return a?a:null}function Oc(a,b,c){if(b=Da(a,c.dispatchConfig.phasedRegistrationNames[b]))c._dispatchListeners=xa(c._dispatchListeners,b),c._dispatchInstances=xa(c._dispatchInstances,a)}
function Pc(a){if(a&&a.dispatchConfig.phasedRegistrationNames){for(var b=a._targetInst,c=[];b;)c.push(b),b=Nc(b);for(b=c.length;0<b--;)Oc(c[b],"captured",a);for(b=0;b<c.length;b++)Oc(c[b],"bubbled",a)}}function Qc(a,b,c){a&&c&&c.dispatchConfig.registrationName&&(b=Da(a,c.dispatchConfig.registrationName))&&(c._dispatchListeners=xa(c._dispatchListeners,b),c._dispatchInstances=xa(c._dispatchInstances,a))}function Rc(a){a&&a.dispatchConfig.registrationName&&Qc(a._targetInst,null,a)}
function Sc(a){ya(a,Pc)}function Tc(){return!0}function Uc(){return!1}function E(a,b,c,d){this.dispatchConfig=a;this._targetInst=b;this.nativeEvent=c;a=this.constructor.Interface;for(var e in a)a.hasOwnProperty(e)&&((b=a[e])?this[e]=b(c):"target"===e?this.target=d:this[e]=c[e]);this.isDefaultPrevented=(null!=c.defaultPrevented?c.defaultPrevented:!1===c.returnValue)?Tc:Uc;this.isPropagationStopped=Uc;return this}
n(E.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():"unknown"!==typeof a.returnValue&&(a.returnValue=!1),this.isDefaultPrevented=Tc)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():"unknown"!==typeof a.cancelBubble&&(a.cancelBubble=!0),this.isPropagationStopped=Tc)},persist:function(){this.isPersistent=Tc},isPersistent:Uc,destructor:function(){var a=this.constructor.Interface,
b;for(b in a)this[b]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null;this.isPropagationStopped=this.isDefaultPrevented=Uc;this._dispatchInstances=this._dispatchListeners=null}});E.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null};
E.extend=function(a){function b(){}function c(){return d.apply(this,arguments)}var d=this;b.prototype=d.prototype;var e=new b;n(e,c.prototype);c.prototype=e;c.prototype.constructor=c;c.Interface=n({},d.Interface,a);c.extend=d.extend;Vc(c);return c};Vc(E);function Wc(a,b,c,d){if(this.eventPool.length){var e=this.eventPool.pop();this.call(e,a,b,c,d);return e}return new this(a,b,c,d)}
function Xc(a){if(!(a instanceof this))throw Error(u(279));a.destructor();10>this.eventPool.length&&this.eventPool.push(a)}function Vc(a){a.eventPool=[];a.getPooled=Wc;a.release=Xc}var Yc=E.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Zc=E.extend({clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),$c=E.extend({view:null,detail:null}),ad=$c.extend({relatedTarget:null});
function bd(a){var b=a.keyCode;"charCode"in a?(a=a.charCode,0===a&&13===b&&(a=13)):a=b;10===a&&(a=13);return 32<=a||13===a?a:0}
var cd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",
116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ed={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gd(a){var b=this.nativeEvent;return b.getModifierState?b.getModifierState(a):(a=ed[a])?!!b[a]:!1}function hd(){return gd}
var id=$c.extend({key:function(a){if(a.key){var b=cd[a.key]||a.key;if("Unidentified"!==b)return b}return"keypress"===a.type?(a=bd(a),13===a?"Enter":String.fromCharCode(a)):"keydown"===a.type||"keyup"===a.type?dd[a.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:hd,charCode:function(a){return"keypress"===a.type?bd(a):0},keyCode:function(a){return"keydown"===a.type||"keyup"===a.type?a.keyCode:0},which:function(a){return"keypress"===
a.type?bd(a):"keydown"===a.type||"keyup"===a.type?a.keyCode:0}}),jd=0,kd=0,ld=!1,md=!1,nd=$c.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:hd,button:null,buttons:null,relatedTarget:function(a){return a.relatedTarget||(a.fromElement===a.srcElement?a.toElement:a.fromElement)},movementX:function(a){if("movementX"in a)return a.movementX;var b=jd;jd=a.screenX;return ld?"mousemove"===a.type?a.screenX-
b:0:(ld=!0,0)},movementY:function(a){if("movementY"in a)return a.movementY;var b=kd;kd=a.screenY;return md?"mousemove"===a.type?a.screenY-b:0:(md=!0,0)}}),od=nd.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),pd=nd.extend({dataTransfer:null}),qd=$c.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:hd}),rd=E.extend({propertyName:null,
elapsedTime:null,pseudoElement:null}),sd=nd.extend({deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:null,deltaMode:null}),td=[["blur","blur",0],["cancel","cancel",0],["click","click",0],["close","close",0],["contextmenu","contextMenu",0],["copy","copy",0],["cut","cut",0],["auxclick","auxClick",0],["dblclick","doubleClick",0],["dragend","dragEnd",
0],["dragstart","dragStart",0],["drop","drop",0],["focus","focus",0],["input","input",0],["invalid","invalid",0],["keydown","keyDown",0],["keypress","keyPress",0],["keyup","keyUp",0],["mousedown","mouseDown",0],["mouseup","mouseUp",0],["paste","paste",0],["pause","pause",0],["play","play",0],["pointercancel","pointerCancel",0],["pointerdown","pointerDown",0],["pointerup","pointerUp",0],["ratechange","rateChange",0],["reset","reset",0],["seeked","seeked",0],["submit","submit",0],["touchcancel","touchCancel",
0],["touchend","touchEnd",0],["touchstart","touchStart",0],["volumechange","volumeChange",0],["drag","drag",1],["dragenter","dragEnter",1],["dragexit","dragExit",1],["dragleave","dragLeave",1],["dragover","dragOver",1],["mousemove","mouseMove",1],["mouseout","mouseOut",1],["mouseover","mouseOver",1],["pointermove","pointerMove",1],["pointerout","pointerOut",1],["pointerover","pointerOver",1],["scroll","scroll",1],["toggle","toggle",1],["touchmove","touchMove",1],["wheel","wheel",1],["abort","abort",
2],[Zb,"animationEnd",2],[$b,"animationIteration",2],[ac,"animationStart",2],["canplay","canPlay",2],["canplaythrough","canPlayThrough",2],["durationchange","durationChange",2],["emptied","emptied",2],["encrypted","encrypted",2],["ended","ended",2],["error","error",2],["gotpointercapture","gotPointerCapture",2],["load","load",2],["loadeddata","loadedData",2],["loadedmetadata","loadedMetadata",2],["loadstart","loadStart",2],["lostpointercapture","lostPointerCapture",2],["playing","playing",2],["progress",
"progress",2],["seeking","seeking",2],["stalled","stalled",2],["suspend","suspend",2],["timeupdate","timeUpdate",2],[bc,"transitionEnd",2],["waiting","waiting",2]],ud={},vd={},wd=0;for(;wd<td.length;wd++){var yd=td[wd],zd=yd[0],Ad=yd[1],Bd=yd[2],Cd="on"+(Ad[0].toUpperCase()+Ad.slice(1)),Dd={phasedRegistrationNames:{bubbled:Cd,captured:Cd+"Capture"},dependencies:[zd],eventPriority:Bd};ud[Ad]=Dd;vd[zd]=Dd}
var Ed={eventTypes:ud,getEventPriority:function(a){a=vd[a];return void 0!==a?a.eventPriority:2},extractEvents:function(a,b,c,d){var e=vd[a];if(!e)return null;switch(a){case "keypress":if(0===bd(c))return null;case "keydown":case "keyup":a=id;break;case "blur":case "focus":a=ad;break;case "click":if(2===c.button)return null;case "auxclick":case "dblclick":case "mousedown":case "mousemove":case "mouseup":case "mouseout":case "mouseover":case "contextmenu":a=nd;break;case "drag":case "dragend":case "dragenter":case "dragexit":case "dragleave":case "dragover":case "dragstart":case "drop":a=
pd;break;case "touchcancel":case "touchend":case "touchmove":case "touchstart":a=qd;break;case Zb:case $b:case ac:a=Yc;break;case bc:a=rd;break;case "scroll":a=$c;break;case "wheel":a=sd;break;case "copy":case "cut":case "paste":a=Zc;break;case "gotpointercapture":case "lostpointercapture":case "pointercancel":case "pointerdown":case "pointermove":case "pointerout":case "pointerover":case "pointerup":a=od;break;default:a=E}b=a.getPooled(e,b,c,d);Sc(b);return b}},Fd=q.unstable_UserBlockingPriority,
Gd=q.unstable_runWithPriority,Hd=Ed.getEventPriority,Id=10,Jd=[];
function Kd(a){var b=a.targetInst,c=b;do{if(!c){a.ancestors.push(c);break}var d=c;if(3===d.tag)d=d.stateNode.containerInfo;else{for(;d.return;)d=d.return;d=3!==d.tag?null:d.stateNode.containerInfo}if(!d)break;b=c.tag;5!==b&&6!==b||a.ancestors.push(c);c=Fc(d)}while(c);for(c=0;c<a.ancestors.length;c++){b=a.ancestors[c];var e=Mc(a.nativeEvent);d=a.topLevelType;for(var f=a.nativeEvent,g=a.eventSystemFlags,h=null,k=0;k<ea.length;k++){var l=ea[k];l&&(l=l.extractEvents(d,b,f,e,g))&&(h=xa(h,l))}Ba(h)}}
var Ld=!0;function F(a,b){Md(b,a,!1)}function Md(a,b,c){switch(Hd(b)){case 0:var d=Nd.bind(null,b,1);break;case 1:d=Od.bind(null,b,1);break;default:d=Pd.bind(null,b,1)}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1)}function Nd(a,b,c){ib||gb();var d=Pd,e=ib;ib=!0;try{fb(d,a,b,c)}finally{(ib=e)||kb()}}function Od(a,b,c){Gd(Fd,Pd.bind(null,a,b,c))}
function Qd(a,b,c,d){if(Jd.length){var e=Jd.pop();e.topLevelType=a;e.eventSystemFlags=b;e.nativeEvent=c;e.targetInst=d;a=e}else a={topLevelType:a,eventSystemFlags:b,nativeEvent:c,targetInst:d,ancestors:[]};try{if(b=Kd,c=a,jb)b(c,void 0);else{jb=!0;try{hb(b,c,void 0)}finally{jb=!1,kb()}}}finally{a.topLevelType=null,a.nativeEvent=null,a.targetInst=null,a.ancestors.length=0,Jd.length<Id&&Jd.push(a)}}
function Pd(a,b,c){if(Ld)if(0<nc.length&&-1<uc.indexOf(a))a=zc(null,a,b,c),nc.push(a);else{var d=Hc(a,b,c);null===d?Ac(a,c):-1<uc.indexOf(a)?(a=zc(d,a,b,c),nc.push(a)):Dc(d,a,b,c)||(Ac(a,c),Qd(a,b,c,null))}}function Hc(a,b,c){var d=Mc(c);d=Fc(d);if(null!==d){var e=ec(d);if(null===e)d=null;else{var f=e.tag;if(13===f){d=fc(e);if(null!==d)return d;d=null}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;d=null}else e!==d&&(d=null)}}Qd(a,b,c,d);return null}
function Rd(a){if(!Ya)return!1;a="on"+a;var b=a in document;b||(b=document.createElement("div"),b.setAttribute(a,"return;"),b="function"===typeof b[a]);return b}var Sd=new ("function"===typeof WeakMap?WeakMap:Map);function xc(a){var b=Sd.get(a);void 0===b&&(b=new Set,Sd.set(a,b));return b}
function yc(a,b,c){if(!c.has(a)){switch(a){case "scroll":Md(b,"scroll",!0);break;case "focus":case "blur":Md(b,"focus",!0);Md(b,"blur",!0);c.add("blur");c.add("focus");break;case "cancel":case "close":Rd(a)&&Md(b,a,!0);break;case "invalid":case "submit":case "reset":break;default:-1===cc.indexOf(a)&&F(a,b)}c.add(a)}}
var Td={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ud=["Webkit","ms","Moz","O"];Object.keys(Td).forEach(function(a){Ud.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);Td[b]=Td[a]})});function Vd(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||Td.hasOwnProperty(a)&&Td[a]?(""+b).trim():b+"px"}
function Wd(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=Vd(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e}}var Xd=n({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});
function Yd(a,b){if(b){if(Xd[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(u(137,a,""));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(u(60));if(!("object"===typeof b.dangerouslySetInnerHTML&&"__html"in b.dangerouslySetInnerHTML))throw Error(u(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(u(62,""));}}
function Zd(a,b){if(-1===a.indexOf("-"))return"string"===typeof b.is;switch(a){case "annotation-xml":case "color-profile":case "font-face":case "font-face-src":case "font-face-uri":case "font-face-format":case "font-face-name":case "missing-glyph":return!1;default:return!0}}function $d(a,b){a=9===a.nodeType||11===a.nodeType?a:a.ownerDocument;var c=xc(a);b=ja[b];for(var d=0;d<b.length;d++)yc(b[d],a,c)}function ae(){}
function be(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}function ce(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function de(a,b){var c=ce(a);a=0;for(var d;c;){if(3===c.nodeType){d=a+c.textContent.length;if(a<=b&&d>=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=ce(c)}}
function ee(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?ee(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}function fe(){for(var a=window,b=be();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=be(a.document)}return b}
function ge(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable)}var he="$",ie="/$",je="$?",ke="$!",le=null,me=null;function ne(a,b){switch(a){case "button":case "input":case "select":case "textarea":return!!b.autoFocus}return!1}
function oe(a,b){return"textarea"===a||"option"===a||"noscript"===a||"string"===typeof b.children||"number"===typeof b.children||"object"===typeof b.dangerouslySetInnerHTML&&null!==b.dangerouslySetInnerHTML&&null!=b.dangerouslySetInnerHTML.__html}var pe="function"===typeof setTimeout?setTimeout:void 0,qe="function"===typeof clearTimeout?clearTimeout:void 0;function re(a){for(;null!=a;a=a.nextSibling){var b=a.nodeType;if(1===b||3===b)break}return a}
function se(a){a=a.previousSibling;for(var b=0;a;){if(8===a.nodeType){var c=a.data;if(c===he||c===ke||c===je){if(0===b)return a;b--}else c===ie&&b++}a=a.previousSibling}return null}var te=Math.random().toString(36).slice(2),ue="__reactInternalInstance$"+te,ve="__reactEventHandlers$"+te,we="__reactContainere$"+te;
function Fc(a){var b=a[ue];if(b)return b;for(var c=a.parentNode;c;){if(b=c[we]||c[ue]){c=b.alternate;if(null!==b.child||null!==c&&null!==c.child)for(a=se(a);null!==a;){if(c=a[ue])return c;a=se(a)}return b}a=c;c=a.parentNode}return null}function Cc(a){a=a[ue]||a[we];return!a||5!==a.tag&&6!==a.tag&&13!==a.tag&&3!==a.tag?null:a}function xe(a){if(5===a.tag||6===a.tag)return a.stateNode;throw Error(u(33));}function ye(a){return a[ve]||null}var ze=null,Ae=null,Be=null;
function Ce(){if(Be)return Be;var a,b=Ae,c=b.length,d,e="value"in ze?ze.value:ze.textContent,f=e.length;for(a=0;a<c&&b[a]===e[a];a++);var g=c-a;for(d=1;d<=g&&b[c-d]===e[f-d];d++);return Be=e.slice(a,1<d?1-d:void 0)}var De=E.extend({data:null}),Ee=E.extend({data:null}),Fe=[9,13,27,32],Ge=Ya&&"CompositionEvent"in window,He=null;Ya&&"documentMode"in document&&(He=document.documentMode);
var Ie=Ya&&"TextEvent"in window&&!He,Je=Ya&&(!Ge||He&&8<He&&11>=He),Ke=String.fromCharCode(32),Le={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",
captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},Me=!1;
function Ne(a,b){switch(a){case "keyup":return-1!==Fe.indexOf(b.keyCode);case "keydown":return 229!==b.keyCode;case "keypress":case "mousedown":case "blur":return!0;default:return!1}}function Oe(a){a=a.detail;return"object"===typeof a&&"data"in a?a.data:null}var Pe=!1;function Qe(a,b){switch(a){case "compositionend":return Oe(b);case "keypress":if(32!==b.which)return null;Me=!0;return Ke;case "textInput":return a=b.data,a===Ke&&Me?null:a;default:return null}}
function Re(a,b){if(Pe)return"compositionend"===a||!Ge&&Ne(a,b)?(a=Ce(),Be=Ae=ze=null,Pe=!1,a):null;switch(a){case "paste":return null;case "keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1<b.char.length)return b.char;if(b.which)return String.fromCharCode(b.which)}return null;case "compositionend":return Je&&"ko"!==b.locale?null:b.data;default:return null}}
var Se={eventTypes:Le,extractEvents:function(a,b,c,d){var e;if(Ge)b:{switch(a){case "compositionstart":var f=Le.compositionStart;break b;case "compositionend":f=Le.compositionEnd;break b;case "compositionupdate":f=Le.compositionUpdate;break b}f=void 0}else Pe?Ne(a,c)&&(f=Le.compositionEnd):"keydown"===a&&229===c.keyCode&&(f=Le.compositionStart);f?(Je&&"ko"!==c.locale&&(Pe||f!==Le.compositionStart?f===Le.compositionEnd&&Pe&&(e=Ce()):(ze=d,Ae="value"in ze?ze.value:ze.textContent,Pe=!0)),f=De.getPooled(f,
b,c,d),e?f.data=e:(e=Oe(c),null!==e&&(f.data=e)),Sc(f),e=f):e=null;(a=Ie?Qe(a,c):Re(a,c))?(b=Ee.getPooled(Le.beforeInput,b,c,d),b.data=a,Sc(b)):b=null;return null===e?b:null===b?e:[e,b]}},Te={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ue(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return"input"===b?!!Te[a.type]:"textarea"===b?!0:!1}
var Ve={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function We(a,b,c){a=E.getPooled(Ve.change,a,b,c);a.type="change";cb(c);Sc(a);return a}var Xe=null,Ye=null;function Ze(a){Ba(a)}function $e(a){var b=xe(a);if(zb(b))return a}function af(a,b){if("change"===a)return b}var bf=!1;Ya&&(bf=Rd("input")&&(!document.documentMode||9<document.documentMode));
function cf(){Xe&&(Xe.detachEvent("onpropertychange",df),Ye=Xe=null)}function df(a){if("value"===a.propertyName&&$e(Ye))if(a=We(Ye,a,Mc(a)),ib)Ba(a);else{ib=!0;try{eb(Ze,a)}finally{ib=!1,kb()}}}function ef(a,b,c){"focus"===a?(cf(),Xe=b,Ye=c,Xe.attachEvent("onpropertychange",df)):"blur"===a&&cf()}function ff(a){if("selectionchange"===a||"keyup"===a||"keydown"===a)return $e(Ye)}function gf(a,b){if("click"===a)return $e(b)}function hf(a,b){if("input"===a||"change"===a)return $e(b)}
var jf={eventTypes:Ve,_isInputEventSupported:bf,extractEvents:function(a,b,c,d){var e=b?xe(b):window,f=e.nodeName&&e.nodeName.toLowerCase();if("select"===f||"input"===f&&"file"===e.type)var g=af;else if(Ue(e))if(bf)g=hf;else{g=ff;var h=ef}else(f=e.nodeName)&&"input"===f.toLowerCase()&&("checkbox"===e.type||"radio"===e.type)&&(g=gf);if(g&&(g=g(a,b)))return We(g,c,d);h&&h(a,e,b);"blur"===a&&(a=e._wrapperState)&&a.controlled&&"number"===e.type&&Fb(e,"number",e.value)}},kf={mouseEnter:{registrationName:"onMouseEnter",
dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},lf,mf={eventTypes:kf,extractEvents:function(a,b,c,d,e){var f="mouseover"===a||"pointerover"===a,g="mouseout"===a||"pointerout"===a;if(f&&0===(e&32)&&(c.relatedTarget||c.fromElement)||!g&&!f)return null;
e=d.window===d?d:(e=d.ownerDocument)?e.defaultView||e.parentWindow:window;if(g){if(g=b,b=(b=c.relatedTarget||c.toElement)?Fc(b):null,null!==b&&(f=ec(b),b!==f||5!==b.tag&&6!==b.tag))b=null}else g=null;if(g===b)return null;if("mouseout"===a||"mouseover"===a){var h=nd;var k=kf.mouseLeave;var l=kf.mouseEnter;var m="mouse"}else if("pointerout"===a||"pointerover"===a)h=od,k=kf.pointerLeave,l=kf.pointerEnter,m="pointer";a=null==g?e:xe(g);e=null==b?e:xe(b);k=h.getPooled(k,g,c,d);k.type=m+"leave";k.target=
a;k.relatedTarget=e;d=h.getPooled(l,b,c,d);d.type=m+"enter";d.target=e;d.relatedTarget=a;h=g;m=b;if(h&&m)a:{l=h;a=m;g=0;for(b=l;b;b=Nc(b))g++;b=0;for(e=a;e;e=Nc(e))b++;for(;0<g-b;)l=Nc(l),g--;for(;0<b-g;)a=Nc(a),b--;for(;g--;){if(l===a||l===a.alternate)break a;l=Nc(l);a=Nc(a)}l=null}else l=null;a=l;for(l=[];h&&h!==a;){g=h.alternate;if(null!==g&&g===a)break;l.push(h);h=Nc(h)}for(h=[];m&&m!==a;){g=m.alternate;if(null!==g&&g===a)break;h.push(m);m=Nc(m)}for(m=0;m<l.length;m++)Qc(l[m],"bubbled",k);for(m=
h.length;0<m--;)Qc(h[m],"captured",d);if(c===lf)return lf=null,[k];lf=c;return[k,d]}};function nf(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var of="function"===typeof Object.is?Object.is:nf,pf=Object.prototype.hasOwnProperty;function qf(a,b){if(of(a,b))return!0;if("object"!==typeof a||null===a||"object"!==typeof b||null===b)return!1;var c=Object.keys(a),d=Object.keys(b);if(c.length!==d.length)return!1;for(d=0;d<c.length;d++)if(!pf.call(b,c[d])||!of(a[c[d]],b[c[d]]))return!1;return!0}
var rf=Ya&&"documentMode"in document&&11>=document.documentMode,sf={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},tf=null,uf=null,vf=null,wf=!1;
function xf(a,b){var c=b.window===b?b.document:9===b.nodeType?b:b.ownerDocument;if(wf||null==tf||tf!==be(c))return null;c=tf;"selectionStart"in c&&ge(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset});return vf&&qf(vf,c)?null:(vf=c,a=E.getPooled(sf.select,uf,a,b),a.type="select",a.target=tf,Sc(a),a)}
var yf={eventTypes:sf,extractEvents:function(a,b,c,d){var e=d.window===d?d.document:9===d.nodeType?d:d.ownerDocument,f;if(!(f=!e)){a:{e=xc(e);f=ja.onSelect;for(var g=0;g<f.length;g++)if(!e.has(f[g])){e=!1;break a}e=!0}f=!e}if(f)return null;e=b?xe(b):window;switch(a){case "focus":if(Ue(e)||"true"===e.contentEditable)tf=e,uf=b,vf=null;break;case "blur":vf=uf=tf=null;break;case "mousedown":wf=!0;break;case "contextmenu":case "mouseup":case "dragend":return wf=!1,xf(c,d);case "selectionchange":if(rf)break;
case "keydown":case "keyup":return xf(c,d)}return null}};Ca.injectEventPluginOrder("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" "));var zf=Cc;sa=ye;ua=zf;va=xe;Ca.injectEventPluginsByName({SimpleEventPlugin:Ed,EnterLeaveEventPlugin:mf,ChangeEventPlugin:jf,SelectEventPlugin:yf,BeforeInputEventPlugin:Se});new Set;var Af=[],Bf=-1;function G(a){0>Bf||(a.current=Af[Bf],Af[Bf]=null,Bf--)}
function I(a,b){Bf++;Af[Bf]=a.current;a.current=b}var Cf={},J={current:Cf},K={current:!1},Df=Cf;function Ef(a,b){var c=a.type.contextTypes;if(!c)return Cf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}function L(a){a=a.childContextTypes;return null!==a&&void 0!==a}
function Ff(a){G(K,a);G(J,a)}function Gf(a){G(K,a);G(J,a)}function Hf(a,b,c){if(J.current!==Cf)throw Error(u(168));I(J,b,a);I(K,c,a)}function If(a,b,c){var d=a.stateNode;a=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in a))throw Error(u(108,Wa(b)||"Unknown",e));return n({},c,{},d)}function Jf(a){var b=a.stateNode;b=b&&b.__reactInternalMemoizedMergedChildContext||Cf;Df=J.current;I(J,b,a);I(K,K.current,a);return!0}
function Kf(a,b,c){var d=a.stateNode;if(!d)throw Error(u(169));c?(b=If(a,b,Df),d.__reactInternalMemoizedMergedChildContext=b,G(K,a),G(J,a),I(J,b,a)):G(K,a);I(K,c,a)}
var Lf=q.unstable_runWithPriority,Mf=q.unstable_scheduleCallback,Nf=q.unstable_cancelCallback,Of=q.unstable_shouldYield,Pf=q.unstable_requestPaint,Qf=q.unstable_now,Rf=q.unstable_getCurrentPriorityLevel,Sf=q.unstable_ImmediatePriority,Tf=q.unstable_UserBlockingPriority,Uf=q.unstable_NormalPriority,Vf=q.unstable_LowPriority,Wf=q.unstable_IdlePriority,Xf={},Yf=void 0!==Pf?Pf:function(){},Zf=null,$f=null,ag=!1,bg=Qf(),cg=1E4>bg?Qf:function(){return Qf()-bg};
function dg(){switch(Rf()){case Sf:return 99;case Tf:return 98;case Uf:return 97;case Vf:return 96;case Wf:return 95;default:throw Error(u(332));}}function eg(a){switch(a){case 99:return Sf;case 98:return Tf;case 97:return Uf;case 96:return Vf;case 95:return Wf;default:throw Error(u(332));}}function fg(a,b){a=eg(a);return Lf(a,b)}function gg(a,b,c){a=eg(a);return Mf(a,b,c)}function hg(a){null===Zf?(Zf=[a],$f=Mf(Sf,ig)):Zf.push(a);return Xf}function jg(){if(null!==$f){var a=$f;$f=null;Nf(a)}ig()}
function ig(){if(!ag&&null!==Zf){ag=!0;var a=0;try{var b=Zf;fg(99,function(){for(;a<b.length;a++){var c=b[a];do c=c(!0);while(null!==c)}});Zf=null}catch(c){throw null!==Zf&&(Zf=Zf.slice(a+1)),Mf(Sf,jg),c;}finally{ag=!1}}}var kg=3;function lg(a,b,c){c/=10;return 1073741821-(((1073741821-a+b/10)/c|0)+1)*c}function mg(a,b){if(a&&a.defaultProps){b=n({},b);a=a.defaultProps;for(var c in a)void 0===b[c]&&(b[c]=a[c])}return b}var ng={current:null},og=null,pg=null,qg=null;function rg(){qg=pg=og=null}
function sg(a,b){var c=a.type._context;I(ng,c._currentValue,a);c._currentValue=b}function tg(a){var b=ng.current;G(ng,a);a.type._context._currentValue=b}function ug(a,b){for(;null!==a;){var c=a.alternate;if(a.childExpirationTime<b)a.childExpirationTime=b,null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);else if(null!==c&&c.childExpirationTime<b)c.childExpirationTime=b;else break;a=a.return}}
function vg(a,b){og=a;qg=pg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(a.expirationTime>=b&&(wg=!0),a.firstContext=null)}function xg(a,b){if(qg!==a&&!1!==b&&0!==b){if("number"!==typeof b||1073741823===b)qg=a,b=1073741823;b={context:a,observedBits:b,next:null};if(null===pg){if(null===og)throw Error(u(308));pg=b;og.dependencies={expirationTime:0,firstContext:b,responders:null}}else pg=pg.next=b}return a._currentValue}var yg=!1;
function zg(a){return{baseState:a,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Ag(a){return{baseState:a.baseState,firstUpdate:a.firstUpdate,lastUpdate:a.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}
function Bg(a,b){return{expirationTime:a,suspenseConfig:b,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function Cg(a,b){null===a.lastUpdate?a.firstUpdate=a.lastUpdate=b:(a.lastUpdate.next=b,a.lastUpdate=b)}
function Dg(a,b){var c=a.alternate;if(null===c){var d=a.updateQueue;var e=null;null===d&&(d=a.updateQueue=zg(a.memoizedState))}else d=a.updateQueue,e=c.updateQueue,null===d?null===e?(d=a.updateQueue=zg(a.memoizedState),e=c.updateQueue=zg(c.memoizedState)):d=a.updateQueue=Ag(e):null===e&&(e=c.updateQueue=Ag(d));null===e||d===e?Cg(d,b):null===d.lastUpdate||null===e.lastUpdate?(Cg(d,b),Cg(e,b)):(Cg(d,b),e.lastUpdate=b)}
function Eg(a,b){var c=a.updateQueue;c=null===c?a.updateQueue=zg(a.memoizedState):Fg(a,c);null===c.lastCapturedUpdate?c.firstCapturedUpdate=c.lastCapturedUpdate=b:(c.lastCapturedUpdate.next=b,c.lastCapturedUpdate=b)}function Fg(a,b){var c=a.alternate;null!==c&&b===c.updateQueue&&(b=a.updateQueue=Ag(b));return b}
function Gg(a,b,c,d,e,f){switch(c.tag){case 1:return a=c.payload,"function"===typeof a?a.call(f,d,e):a;case 3:a.effectTag=a.effectTag&-4097|64;case 0:a=c.payload;e="function"===typeof a?a.call(f,d,e):a;if(null===e||void 0===e)break;return n({},d,e);case 2:yg=!0}return d}
function Hg(a,b,c,d,e){yg=!1;b=Fg(a,b);for(var f=b.baseState,g=null,h=0,k=b.firstUpdate,l=f;null!==k;){var m=k.expirationTime;m<e?(null===g&&(g=k,f=l),h<m&&(h=m)):(Ig(m,k.suspenseConfig),l=Gg(a,b,k,l,c,d),null!==k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastEffect?b.firstEffect=b.lastEffect=k:(b.lastEffect.nextEffect=k,b.lastEffect=k)));k=k.next}m=null;for(k=b.firstCapturedUpdate;null!==k;){var C=k.expirationTime;C<e?(null===m&&(m=k,null===g&&(f=l)),h<C&&(h=C)):(l=Gg(a,b,k,l,c,d),null!==
k.callback&&(a.effectTag|=32,k.nextEffect=null,null===b.lastCapturedEffect?b.firstCapturedEffect=b.lastCapturedEffect=k:(b.lastCapturedEffect.nextEffect=k,b.lastCapturedEffect=k)));k=k.next}null===g&&(b.lastUpdate=null);null===m?b.lastCapturedUpdate=null:a.effectTag|=32;null===g&&null===m&&(f=l);b.baseState=f;b.firstUpdate=g;b.firstCapturedUpdate=m;Jg(h);a.expirationTime=h;a.memoizedState=l}
function Kg(a,b,c){null!==b.firstCapturedUpdate&&(null!==b.lastUpdate&&(b.lastUpdate.next=b.firstCapturedUpdate,b.lastUpdate=b.lastCapturedUpdate),b.firstCapturedUpdate=b.lastCapturedUpdate=null);Lg(b.firstEffect,c);b.firstEffect=b.lastEffect=null;Lg(b.firstCapturedEffect,c);b.firstCapturedEffect=b.lastCapturedEffect=null}function Lg(a,b){for(;null!==a;){var c=a.callback;if(null!==c){a.callback=null;var d=b;if("function"!==typeof c)throw Error(u(191,c));c.call(d)}a=a.nextEffect}}
var Mg=Ea.ReactCurrentBatchConfig,Ng=(new aa.Component).refs;function Og(a,b,c,d){b=a.memoizedState;c=c(d,b);c=null===c||void 0===c?b:n({},b,c);a.memoizedState=c;d=a.updateQueue;null!==d&&0===a.expirationTime&&(d.baseState=c)}
var Sg={isMounted:function(a){return(a=a._reactInternalFiber)?ec(a)===a:!1},enqueueSetState:function(a,b,c){a=a._reactInternalFiber;var d=Pg(),e=Mg.suspense;d=Qg(d,a,e);e=Bg(d,e);e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Dg(a,e);Rg(a,d)},enqueueReplaceState:function(a,b,c){a=a._reactInternalFiber;var d=Pg(),e=Mg.suspense;d=Qg(d,a,e);e=Bg(d,e);e.tag=1;e.payload=b;void 0!==c&&null!==c&&(e.callback=c);Dg(a,e);Rg(a,d)},enqueueForceUpdate:function(a,b){a=a._reactInternalFiber;var c=Pg(),d=Mg.suspense;
c=Qg(c,a,d);d=Bg(c,d);d.tag=2;void 0!==b&&null!==b&&(d.callback=b);Dg(a,d);Rg(a,c)}};function Tg(a,b,c,d,e,f,g){a=a.stateNode;return"function"===typeof a.shouldComponentUpdate?a.shouldComponentUpdate(d,f,g):b.prototype&&b.prototype.isPureReactComponent?!qf(c,d)||!qf(e,f):!0}
function Ug(a,b,c){var d=!1,e=Cf;var f=b.contextType;"object"===typeof f&&null!==f?f=xg(f):(e=L(b)?Df:J.current,d=b.contextTypes,f=(d=null!==d&&void 0!==d)?Ef(a,e):Cf);b=new b(c,f);a.memoizedState=null!==b.state&&void 0!==b.state?b.state:null;b.updater=Sg;a.stateNode=b;b._reactInternalFiber=a;d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=e,a.__reactInternalMemoizedMaskedChildContext=f);return b}
function Vg(a,b,c,d){a=b.state;"function"===typeof b.componentWillReceiveProps&&b.componentWillReceiveProps(c,d);"function"===typeof b.UNSAFE_componentWillReceiveProps&&b.UNSAFE_componentWillReceiveProps(c,d);b.state!==a&&Sg.enqueueReplaceState(b,b.state,null)}
function Wg(a,b,c,d){var e=a.stateNode;e.props=c;e.state=a.memoizedState;e.refs=Ng;var f=b.contextType;"object"===typeof f&&null!==f?e.context=xg(f):(f=L(b)?Df:J.current,e.context=Ef(a,f));f=a.updateQueue;null!==f&&(Hg(a,f,c,e,d),e.state=a.memoizedState);f=b.getDerivedStateFromProps;"function"===typeof f&&(Og(a,b,f,c),e.state=a.memoizedState);"function"===typeof b.getDerivedStateFromProps||"function"===typeof e.getSnapshotBeforeUpdate||"function"!==typeof e.UNSAFE_componentWillMount&&"function"!==
typeof e.componentWillMount||(b=e.state,"function"===typeof e.componentWillMount&&e.componentWillMount(),"function"===typeof e.UNSAFE_componentWillMount&&e.UNSAFE_componentWillMount(),b!==e.state&&Sg.enqueueReplaceState(e,e.state,null),f=a.updateQueue,null!==f&&(Hg(a,f,c,e,d),e.state=a.memoizedState));"function"===typeof e.componentDidMount&&(a.effectTag|=4)}var Xg=Array.isArray;
function Yg(a,b,c){a=c.ref;if(null!==a&&"function"!==typeof a&&"object"!==typeof a){if(c._owner){c=c._owner;if(c){if(1!==c.tag)throw Error(u(309));var d=c.stateNode}if(!d)throw Error(u(147,a));var e=""+a;if(null!==b&&null!==b.ref&&"function"===typeof b.ref&&b.ref._stringRef===e)return b.ref;b=function(a){var b=d.refs;b===Ng&&(b=d.refs={});null===a?delete b[e]:b[e]=a};b._stringRef=e;return b}if("string"!==typeof a)throw Error(u(284));if(!c._owner)throw Error(u(290,a));}return a}
function Zg(a,b){if("textarea"!==a.type)throw Error(u(31,"[object Object]"===Object.prototype.toString.call(b)?"object with keys {"+Object.keys(b).join(", ")+"}":b,""));}
function $g(a){function b(b,c){if(a){var d=b.lastEffect;null!==d?(d.nextEffect=c,b.lastEffect=c):b.firstEffect=b.lastEffect=c;c.nextEffect=null;c.effectTag=8}}function c(c,d){if(!a)return null;for(;null!==d;)b(c,d),d=d.sibling;return null}function d(a,b){for(a=new Map;null!==b;)null!==b.key?a.set(b.key,b):a.set(b.index,b),b=b.sibling;return a}function e(a,b,c){a=ah(a,b,c);a.index=0;a.sibling=null;return a}function f(b,c,d){b.index=d;if(!a)return c;d=b.alternate;if(null!==d)return d=d.index,d<c?(b.effectTag=
2,c):d;b.effectTag=2;return c}function g(b){a&&null===b.alternate&&(b.effectTag=2);return b}function h(a,b,c,d){if(null===b||6!==b.tag)return b=bh(c,a.mode,d),b.return=a,b;b=e(b,c,d);b.return=a;return b}function k(a,b,c,d){if(null!==b&&b.elementType===c.type)return d=e(b,c.props,d),d.ref=Yg(a,b,c),d.return=a,d;d=ch(c.type,c.key,c.props,null,a.mode,d);d.ref=Yg(a,b,c);d.return=a;return d}function l(a,b,c,d){if(null===b||4!==b.tag||b.stateNode.containerInfo!==c.containerInfo||b.stateNode.implementation!==
c.implementation)return b=dh(c,a.mode,d),b.return=a,b;b=e(b,c.children||[],d);b.return=a;return b}function m(a,b,c,d,f){if(null===b||7!==b.tag)return b=eh(c,a.mode,d,f),b.return=a,b;b=e(b,c,d);b.return=a;return b}function C(a,b,c){if("string"===typeof b||"number"===typeof b)return b=bh(""+b,a.mode,c),b.return=a,b;if("object"===typeof b&&null!==b){switch(b.$$typeof){case Ga:return c=ch(b.type,b.key,b.props,null,a.mode,c),c.ref=Yg(a,null,b),c.return=a,c;case Ha:return b=dh(b,a.mode,c),b.return=a,b}if(Xg(b)||
Ua(b))return b=eh(b,a.mode,c,null),b.return=a,b;Zg(a,b)}return null}function y(a,b,c,d){var e=null!==b?b.key:null;if("string"===typeof c||"number"===typeof c)return null!==e?null:h(a,b,""+c,d);if("object"===typeof c&&null!==c){switch(c.$$typeof){case Ga:return c.key===e?c.type===Ia?m(a,b,c.props.children,d,e):k(a,b,c,d):null;case Ha:return c.key===e?l(a,b,c,d):null}if(Xg(c)||Ua(c))return null!==e?null:m(a,b,c,d,null);Zg(a,c)}return null}function H(a,b,c,d,e){if("string"===typeof d||"number"===typeof d)return a=
a.get(c)||null,h(b,a,""+d,e);if("object"===typeof d&&null!==d){switch(d.$$typeof){case Ga:return a=a.get(null===d.key?c:d.key)||null,d.type===Ia?m(b,a,d.props.children,e,d.key):k(b,a,d,e);case Ha:return a=a.get(null===d.key?c:d.key)||null,l(b,a,d,e)}if(Xg(d)||Ua(d))return a=a.get(c)||null,m(b,a,d,e,null);Zg(b,d)}return null}function z(e,g,h,k){for(var l=null,m=null,r=g,x=g=0,A=null;null!==r&&x<h.length;x++){r.index>x?(A=r,r=null):A=r.sibling;var p=y(e,r,h[x],k);if(null===p){null===r&&(r=A);break}a&&
r&&null===p.alternate&&b(e,r);g=f(p,g,x);null===m?l=p:m.sibling=p;m=p;r=A}if(x===h.length)return c(e,r),l;if(null===r){for(;x<h.length;x++)r=C(e,h[x],k),null!==r&&(g=f(r,g,x),null===m?l=r:m.sibling=r,m=r);return l}for(r=d(e,r);x<h.length;x++)A=H(r,e,x,h[x],k),null!==A&&(a&&null!==A.alternate&&r.delete(null===A.key?x:A.key),g=f(A,g,x),null===m?l=A:m.sibling=A,m=A);a&&r.forEach(function(a){return b(e,a)});return l}function ta(e,g,h,k){var l=Ua(h);if("function"!==typeof l)throw Error(u(150));h=l.call(h);
if(null==h)throw Error(u(151));for(var m=l=null,r=g,x=g=0,A=null,p=h.next();null!==r&&!p.done;x++,p=h.next()){r.index>x?(A=r,r=null):A=r.sibling;var z=y(e,r,p.value,k);if(null===z){null===r&&(r=A);break}a&&r&&null===z.alternate&&b(e,r);g=f(z,g,x);null===m?l=z:m.sibling=z;m=z;r=A}if(p.done)return c(e,r),l;if(null===r){for(;!p.done;x++,p=h.next())p=C(e,p.value,k),null!==p&&(g=f(p,g,x),null===m?l=p:m.sibling=p,m=p);return l}for(r=d(e,r);!p.done;x++,p=h.next())p=H(r,e,x,p.value,k),null!==p&&(a&&null!==
p.alternate&&r.delete(null===p.key?x:p.key),g=f(p,g,x),null===m?l=p:m.sibling=p,m=p);a&&r.forEach(function(a){return b(e,a)});return l}return function(a,d,f,h){var k="object"===typeof f&&null!==f&&f.type===Ia&&null===f.key;k&&(f=f.props.children);var l="object"===typeof f&&null!==f;if(l)switch(f.$$typeof){case Ga:a:{l=f.key;for(k=d;null!==k;){if(k.key===l)if(7===k.tag?f.type===Ia:k.elementType===f.type){c(a,k.sibling);d=e(k,f.type===Ia?f.props.children:f.props,h);d.ref=Yg(a,k,f);d.return=a;a=d;break a}else{c(a,
k);break}else b(a,k);k=k.sibling}f.type===Ia?(d=eh(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=ch(f.type,f.key,f.props,null,a.mode,h),h.ref=Yg(a,d,f),h.return=a,a=h)}return g(a);case Ha:a:{for(k=f.key;null!==d;){if(d.key===k)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[],h);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=dh(f,a.mode,h);d.return=a;a=d}return g(a)}if("string"===
typeof f||"number"===typeof f)return f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f,h),d.return=a,a=d):(c(a,d),d=bh(f,a.mode,h),d.return=a,a=d),g(a);if(Xg(f))return z(a,d,f,h);if(Ua(f))return ta(a,d,f,h);l&&Zg(a,f);if("undefined"===typeof f&&!k)switch(a.tag){case 1:case 0:throw a=a.type,Error(u(152,a.displayName||a.name||"Component"));}return c(a,d)}}var fh=$g(!0),gh=$g(!1),hh={},ih={current:hh},jh={current:hh},kh={current:hh};function lh(a){if(a===hh)throw Error(u(174));return a}
function mh(a,b){I(kh,b,a);I(jh,a,a);I(ih,hh,a);var c=b.nodeType;switch(c){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:Qb(null,"");break;default:c=8===c?b.parentNode:b,b=c.namespaceURI||null,c=c.tagName,b=Qb(b,c)}G(ih,a);I(ih,b,a)}function nh(a){G(ih,a);G(jh,a);G(kh,a)}function oh(a){lh(kh.current);var b=lh(ih.current);var c=Qb(b,a.type);b!==c&&(I(jh,a,a),I(ih,c,a))}function ph(a){jh.current===a&&(G(ih,a),G(jh,a))}var M={current:0};
function qh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||c.data===je||c.data===ke))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.effectTag&64))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}function rh(a,b){return{responder:a,props:b}}
var sh=Ea.ReactCurrentDispatcher,N=Ea.ReactCurrentBatchConfig,th=0,uh=null,O=null,vh=null,wh=null,P=null,xh=null,yh=0,zh=null,Ah=0,Bh=!1,Ch=null,Gh=0;function Q(){throw Error(u(321));}function Hh(a,b){if(null===b)return!1;for(var c=0;c<b.length&&c<a.length;c++)if(!of(a[c],b[c]))return!1;return!0}
function Ih(a,b,c,d,e,f){th=f;uh=b;vh=null!==a?a.memoizedState:null;sh.current=null===vh?Jh:Kh;b=c(d,e);if(Bh){do Bh=!1,Gh+=1,vh=null!==a?a.memoizedState:null,xh=wh,zh=P=O=null,sh.current=Kh,b=c(d,e);while(Bh);Ch=null;Gh=0}sh.current=Lh;a=uh;a.memoizedState=wh;a.expirationTime=yh;a.updateQueue=zh;a.effectTag|=Ah;a=null!==O&&null!==O.next;th=0;xh=P=wh=vh=O=uh=null;yh=0;zh=null;Ah=0;if(a)throw Error(u(300));return b}
function Mh(){sh.current=Lh;th=0;xh=P=wh=vh=O=uh=null;yh=0;zh=null;Ah=0;Bh=!1;Ch=null;Gh=0}function Nh(){var a={memoizedState:null,baseState:null,queue:null,baseUpdate:null,next:null};null===P?wh=P=a:P=P.next=a;return P}function Oh(){if(null!==xh)P=xh,xh=P.next,O=vh,vh=null!==O?O.next:null;else{if(null===vh)throw Error(u(310));O=vh;var a={memoizedState:O.memoizedState,baseState:O.baseState,queue:O.queue,baseUpdate:O.baseUpdate,next:null};P=null===P?wh=a:P.next=a;vh=O.next}return P}
function Ph(a,b){return"function"===typeof b?b(a):b}
function Qh(a){var b=Oh(),c=b.queue;if(null===c)throw Error(u(311));c.lastRenderedReducer=a;if(0<Gh){var d=c.dispatch;if(null!==Ch){var e=Ch.get(c);if(void 0!==e){Ch.delete(c);var f=b.memoizedState;do f=a(f,e.action),e=e.next;while(null!==e);of(f,b.memoizedState)||(wg=!0);b.memoizedState=f;b.baseUpdate===c.last&&(b.baseState=f);c.lastRenderedState=f;return[f,d]}}return[b.memoizedState,d]}d=c.last;var g=b.baseUpdate;f=b.baseState;null!==g?(null!==d&&(d.next=null),d=g.next):d=null!==d?d.next:null;if(null!==
d){var h=e=null,k=d,l=!1;do{var m=k.expirationTime;m<th?(l||(l=!0,h=g,e=f),m>yh&&(yh=m,Jg(yh))):(Ig(m,k.suspenseConfig),f=k.eagerReducer===a?k.eagerState:a(f,k.action));g=k;k=k.next}while(null!==k&&k!==d);l||(h=g,e=f);of(f,b.memoizedState)||(wg=!0);b.memoizedState=f;b.baseUpdate=h;b.baseState=e;c.lastRenderedState=f}return[b.memoizedState,c.dispatch]}
function Rh(a){var b=Nh();"function"===typeof a&&(a=a());b.memoizedState=b.baseState=a;a=b.queue={last:null,dispatch:null,lastRenderedReducer:Ph,lastRenderedState:a};a=a.dispatch=Sh.bind(null,uh,a);return[b.memoizedState,a]}function Th(a){return Qh(Ph,a)}function Uh(a,b,c,d){a={tag:a,create:b,destroy:c,deps:d,next:null};null===zh?(zh={lastEffect:null},zh.lastEffect=a.next=a):(b=zh.lastEffect,null===b?zh.lastEffect=a.next=a:(c=b.next,b.next=a,a.next=c,zh.lastEffect=a));return a}
function Vh(a,b,c,d){var e=Nh();Ah|=a;e.memoizedState=Uh(b,c,void 0,void 0===d?null:d)}function Wh(a,b,c,d){var e=Oh();d=void 0===d?null:d;var f=void 0;if(null!==O){var g=O.memoizedState;f=g.destroy;if(null!==d&&Hh(d,g.deps)){Uh(0,c,f,d);return}}Ah|=a;e.memoizedState=Uh(b,c,f,d)}function Xh(a,b){return Vh(516,192,a,b)}function Yh(a,b){return Wh(516,192,a,b)}
function Zh(a,b){if("function"===typeof b)return a=a(),b(a),function(){b(null)};if(null!==b&&void 0!==b)return a=a(),b.current=a,function(){b.current=null}}function $h(){}function ai(a,b){Nh().memoizedState=[a,void 0===b?null:b];return a}function bi(a,b){var c=Oh();b=void 0===b?null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Hh(b,d[1]))return d[0];c.memoizedState=[a,b];return a}
function Sh(a,b,c){if(!(25>Gh))throw Error(u(301));var d=a.alternate;if(a===uh||null!==d&&d===uh)if(Bh=!0,a={expirationTime:th,suspenseConfig:null,action:c,eagerReducer:null,eagerState:null,next:null},null===Ch&&(Ch=new Map),c=Ch.get(b),void 0===c)Ch.set(b,a);else{for(b=c;null!==b.next;)b=b.next;b.next=a}else{var e=Pg(),f=Mg.suspense;e=Qg(e,a,f);f={expirationTime:e,suspenseConfig:f,action:c,eagerReducer:null,eagerState:null,next:null};var g=b.last;if(null===g)f.next=f;else{var h=g.next;null!==h&&
(f.next=h);g.next=f}b.last=f;if(0===a.expirationTime&&(null===d||0===d.expirationTime)&&(d=b.lastRenderedReducer,null!==d))try{var k=b.lastRenderedState,l=d(k,c);f.eagerReducer=d;f.eagerState=l;if(of(l,k))return}catch(m){}finally{}Rg(a,e)}}
var Lh={readContext:xg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useResponder:Q,useDeferredValue:Q,useTransition:Q},Jh={readContext:xg,useCallback:ai,useContext:xg,useEffect:Xh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Vh(4,36,Zh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Vh(4,36,a,b)},useMemo:function(a,b){var c=Nh();b=void 0===b?null:b;a=a();c.memoizedState=
[a,b];return a},useReducer:function(a,b,c){var d=Nh();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a=d.queue={last:null,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};a=a.dispatch=Sh.bind(null,uh,a);return[d.memoizedState,a]},useRef:function(a){var b=Nh();a={current:a};return b.memoizedState=a},useState:Rh,useDebugValue:$h,useResponder:rh,useDeferredValue:function(a,b){var c=Rh(a),d=c[0],e=c[1];Xh(function(){q.unstable_next(function(){var c=N.suspense;N.suspense=void 0===b?null:b;try{e(a)}finally{N.suspense=
c}})},[a,b]);return d},useTransition:function(a){var b=Rh(!1),c=b[0],d=b[1];return[ai(function(b){d(!0);q.unstable_next(function(){var c=N.suspense;N.suspense=void 0===a?null:a;try{d(!1),b()}finally{N.suspense=c}})},[a,c]),c]}},Kh={readContext:xg,useCallback:bi,useContext:xg,useEffect:Yh,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return Wh(4,36,Zh.bind(null,b,a),c)},useLayoutEffect:function(a,b){return Wh(4,36,a,b)},useMemo:function(a,b){var c=Oh();b=void 0===b?
null:b;var d=c.memoizedState;if(null!==d&&null!==b&&Hh(b,d[1]))return d[0];a=a();c.memoizedState=[a,b];return a},useReducer:Qh,useRef:function(){return Oh().memoizedState},useState:Th,useDebugValue:$h,useResponder:rh,useDeferredValue:function(a,b){var c=Th(a),d=c[0],e=c[1];Yh(function(){q.unstable_next(function(){var c=N.suspense;N.suspense=void 0===b?null:b;try{e(a)}finally{N.suspense=c}})},[a,b]);return d},useTransition:function(a){var b=Th(!1),c=b[0],d=b[1];return[bi(function(b){d(!0);q.unstable_next(function(){var c=
N.suspense;N.suspense=void 0===a?null:a;try{d(!1),b()}finally{N.suspense=c}})},[a,c]),c]}},ci=null,di=null,ei=!1;function fi(a,b){var c=gi(5,null,null,0);c.elementType="DELETED";c.type="DELETED";c.stateNode=b;c.return=a;c.effectTag=8;null!==a.lastEffect?(a.lastEffect.nextEffect=c,a.lastEffect=c):a.firstEffect=a.lastEffect=c}
function hi(a,b){switch(a.tag){case 5:var c=a.type;b=1!==b.nodeType||c.toLowerCase()!==b.nodeName.toLowerCase()?null:b;return null!==b?(a.stateNode=b,!0):!1;case 6:return b=""===a.pendingProps||3!==b.nodeType?null:b,null!==b?(a.stateNode=b,!0):!1;case 13:return!1;default:return!1}}
function ii(a){if(ei){var b=di;if(b){var c=b;if(!hi(a,b)){b=re(c.nextSibling);if(!b||!hi(a,b)){a.effectTag=a.effectTag&-1025|2;ei=!1;ci=a;return}fi(ci,c)}ci=a;di=re(b.firstChild)}else a.effectTag=a.effectTag&-1025|2,ei=!1,ci=a}}function ji(a){for(a=a.return;null!==a&&5!==a.tag&&3!==a.tag&&13!==a.tag;)a=a.return;ci=a}
function ki(a){if(a!==ci)return!1;if(!ei)return ji(a),ei=!0,!1;var b=a.type;if(5!==a.tag||"head"!==b&&"body"!==b&&!oe(b,a.memoizedProps))for(b=di;b;)fi(a,b),b=re(b.nextSibling);ji(a);if(13===a.tag){a=a.memoizedState;a=null!==a?a.dehydrated:null;if(!a)throw Error(u(317));a:{a=a.nextSibling;for(b=0;a;){if(8===a.nodeType){var c=a.data;if(c===ie){if(0===b){di=re(a.nextSibling);break a}b--}else c!==he&&c!==ke&&c!==je||b++}a=a.nextSibling}di=null}}else di=ci?re(a.stateNode.nextSibling):null;return!0}
function li(){di=ci=null;ei=!1}var mi=Ea.ReactCurrentOwner,wg=!1;function R(a,b,c,d){b.child=null===a?gh(b,null,c,d):fh(b,a.child,c,d)}function ni(a,b,c,d,e){c=c.render;var f=b.ref;vg(b,e);d=Ih(a,b,c,d,f,e);if(null!==a&&!wg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),oi(a,b,e);b.effectTag|=1;R(a,b,d,e);return b.child}
function pi(a,b,c,d,e,f){if(null===a){var g=c.type;if("function"===typeof g&&!qi(g)&&void 0===g.defaultProps&&null===c.compare&&void 0===c.defaultProps)return b.tag=15,b.type=g,ri(a,b,g,d,e,f);a=ch(c.type,null,d,null,b.mode,f);a.ref=b.ref;a.return=b;return b.child=a}g=a.child;if(e<f&&(e=g.memoizedProps,c=c.compare,c=null!==c?c:qf,c(e,d)&&a.ref===b.ref))return oi(a,b,f);b.effectTag|=1;a=ah(g,d,f);a.ref=b.ref;a.return=b;return b.child=a}
function ri(a,b,c,d,e,f){return null!==a&&qf(a.memoizedProps,d)&&a.ref===b.ref&&(wg=!1,e<f)?oi(a,b,f):si(a,b,c,d,f)}function ti(a,b){var c=b.ref;if(null===a&&null!==c||null!==a&&a.ref!==c)b.effectTag|=128}function si(a,b,c,d,e){var f=L(c)?Df:J.current;f=Ef(b,f);vg(b,e);c=Ih(a,b,c,d,f,e);if(null!==a&&!wg)return b.updateQueue=a.updateQueue,b.effectTag&=-517,a.expirationTime<=e&&(a.expirationTime=0),oi(a,b,e);b.effectTag|=1;R(a,b,c,e);return b.child}
function ui(a,b,c,d,e){if(L(c)){var f=!0;Jf(b)}else f=!1;vg(b,e);if(null===b.stateNode)null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),Ug(b,c,d,e),Wg(b,c,d,e),d=!0;else if(null===a){var g=b.stateNode,h=b.memoizedProps;g.props=h;var k=g.context,l=c.contextType;"object"===typeof l&&null!==l?l=xg(l):(l=L(c)?Df:J.current,l=Ef(b,l));var m=c.getDerivedStateFromProps,C="function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate;C||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&
"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Vg(b,g,d,l);yg=!1;var y=b.memoizedState;k=g.state=y;var H=b.updateQueue;null!==H&&(Hg(b,H,d,g,e),k=b.memoizedState);h!==d||y!==k||K.current||yg?("function"===typeof m&&(Og(b,c,m,d),k=b.memoizedState),(h=yg||Tg(b,c,h,d,y,k,l))?(C||"function"!==typeof g.UNSAFE_componentWillMount&&"function"!==typeof g.componentWillMount||("function"===typeof g.componentWillMount&&g.componentWillMount(),"function"===typeof g.UNSAFE_componentWillMount&&
g.UNSAFE_componentWillMount()),"function"===typeof g.componentDidMount&&(b.effectTag|=4)):("function"===typeof g.componentDidMount&&(b.effectTag|=4),b.memoizedProps=d,b.memoizedState=k),g.props=d,g.state=k,g.context=l,d=h):("function"===typeof g.componentDidMount&&(b.effectTag|=4),d=!1)}else g=b.stateNode,h=b.memoizedProps,g.props=b.type===b.elementType?h:mg(b.type,h),k=g.context,l=c.contextType,"object"===typeof l&&null!==l?l=xg(l):(l=L(c)?Df:J.current,l=Ef(b,l)),m=c.getDerivedStateFromProps,(C=
"function"===typeof m||"function"===typeof g.getSnapshotBeforeUpdate)||"function"!==typeof g.UNSAFE_componentWillReceiveProps&&"function"!==typeof g.componentWillReceiveProps||(h!==d||k!==l)&&Vg(b,g,d,l),yg=!1,k=b.memoizedState,y=g.state=k,H=b.updateQueue,null!==H&&(Hg(b,H,d,g,e),y=b.memoizedState),h!==d||k!==y||K.current||yg?("function"===typeof m&&(Og(b,c,m,d),y=b.memoizedState),(m=yg||Tg(b,c,h,d,k,y,l))?(C||"function"!==typeof g.UNSAFE_componentWillUpdate&&"function"!==typeof g.componentWillUpdate||
("function"===typeof g.componentWillUpdate&&g.componentWillUpdate(d,y,l),"function"===typeof g.UNSAFE_componentWillUpdate&&g.UNSAFE_componentWillUpdate(d,y,l)),"function"===typeof g.componentDidUpdate&&(b.effectTag|=4),"function"===typeof g.getSnapshotBeforeUpdate&&(b.effectTag|=256)):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),b.memoizedProps=
d,b.memoizedState=y),g.props=d,g.state=y,g.context=l,d=m):("function"!==typeof g.componentDidUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=4),"function"!==typeof g.getSnapshotBeforeUpdate||h===a.memoizedProps&&k===a.memoizedState||(b.effectTag|=256),d=!1);return vi(a,b,c,d,f,e)}
function vi(a,b,c,d,e,f){ti(a,b);var g=0!==(b.effectTag&64);if(!d&&!g)return e&&Kf(b,c,!1),oi(a,b,f);d=b.stateNode;mi.current=b;var h=g&&"function"!==typeof c.getDerivedStateFromError?null:d.render();b.effectTag|=1;null!==a&&g?(b.child=fh(b,a.child,null,f),b.child=fh(b,null,h,f)):R(a,b,h,f);b.memoizedState=d.state;e&&Kf(b,c,!0);return b.child}function wi(a){var b=a.stateNode;b.pendingContext?Hf(a,b.pendingContext,b.pendingContext!==b.context):b.context&&Hf(a,b.context,!1);mh(a,b.containerInfo)}
var xi={dehydrated:null,retryTime:0};
function yi(a,b,c){var d=b.mode,e=b.pendingProps,f=M.current,g=!1,h;(h=0!==(b.effectTag&64))||(h=0!==(f&2)&&(null===a||null!==a.memoizedState));h?(g=!0,b.effectTag&=-65):null!==a&&null===a.memoizedState||void 0===e.fallback||!0===e.unstable_avoidThisFallback||(f|=1);I(M,f&1,b);if(null===a){void 0!==e.fallback&&ii(b);if(g){g=e.fallback;e=eh(null,d,0,null);e.return=b;if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=eh(g,d,c,null);c.return=
b;e.sibling=c;b.memoizedState=xi;b.child=e;return c}d=e.children;b.memoizedState=null;return b.child=gh(b,null,d,c)}if(null!==a.memoizedState){a=a.child;d=a.sibling;if(g){e=e.fallback;c=ah(a,a.pendingProps,0);c.return=b;if(0===(b.mode&2)&&(g=null!==b.memoizedState?b.child.child:b.child,g!==a.child))for(c.child=g;null!==g;)g.return=c,g=g.sibling;d=ah(d,e,d.expirationTime);d.return=b;c.sibling=d;c.childExpirationTime=0;b.memoizedState=xi;b.child=c;return d}c=fh(b,a.child,e.children,c);b.memoizedState=
null;return b.child=c}a=a.child;if(g){g=e.fallback;e=eh(null,d,0,null);e.return=b;e.child=a;null!==a&&(a.return=e);if(0===(b.mode&2))for(a=null!==b.memoizedState?b.child.child:b.child,e.child=a;null!==a;)a.return=e,a=a.sibling;c=eh(g,d,c,null);c.return=b;e.sibling=c;c.effectTag|=2;e.childExpirationTime=0;b.memoizedState=xi;b.child=e;return c}b.memoizedState=null;return b.child=fh(b,a,e.children,c)}
function zi(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);ug(a.return,b)}function Ai(a,b,c,d,e,f){var g=a.memoizedState;null===g?a.memoizedState={isBackwards:b,rendering:null,last:d,tail:c,tailExpiration:0,tailMode:e,lastEffect:f}:(g.isBackwards=b,g.rendering=null,g.last=d,g.tail=c,g.tailExpiration=0,g.tailMode=e,g.lastEffect=f)}
function Bi(a,b,c){var d=b.pendingProps,e=d.revealOrder,f=d.tail;R(a,b,d.children,c);d=M.current;if(0!==(d&2))d=d&1|2,b.effectTag|=64;else{if(null!==a&&0!==(a.effectTag&64))a:for(a=b.child;null!==a;){if(13===a.tag)null!==a.memoizedState&&zi(a,c);else if(19===a.tag)zi(a,c);else if(null!==a.child){a.child.return=a;a=a.child;continue}if(a===b)break a;for(;null===a.sibling;){if(null===a.return||a.return===b)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}d&=1}I(M,d,b);if(0===(b.mode&2))b.memoizedState=
null;else switch(e){case "forwards":c=b.child;for(e=null;null!==c;)a=c.alternate,null!==a&&null===qh(a)&&(e=c),c=c.sibling;c=e;null===c?(e=b.child,b.child=null):(e=c.sibling,c.sibling=null);Ai(b,!1,e,c,f,b.lastEffect);break;case "backwards":c=null;e=b.child;for(b.child=null;null!==e;){a=e.alternate;if(null!==a&&null===qh(a)){b.child=e;break}a=e.sibling;e.sibling=c;c=e;e=a}Ai(b,!0,c,null,f,b.lastEffect);break;case "together":Ai(b,!1,null,null,void 0,b.lastEffect);break;default:b.memoizedState=null}return b.child}
function oi(a,b,c){null!==a&&(b.dependencies=a.dependencies);var d=b.expirationTime;0!==d&&Jg(d);if(b.childExpirationTime<c)return null;if(null!==a&&b.child!==a.child)throw Error(u(153));if(null!==b.child){a=b.child;c=ah(a,a.pendingProps,a.expirationTime);b.child=c;for(c.return=b;null!==a.sibling;)a=a.sibling,c=c.sibling=ah(a,a.pendingProps,a.expirationTime),c.return=b;c.sibling=null}return b.child}function Ci(a){a.effectTag|=4}var Hi,Ii,Ji,Ki;
Hi=function(a,b){for(var c=b.child;null!==c;){if(5===c.tag||6===c.tag)a.appendChild(c.stateNode);else if(4!==c.tag&&null!==c.child){c.child.return=c;c=c.child;continue}if(c===b)break;for(;null===c.sibling;){if(null===c.return||c.return===b)return;c=c.return}c.sibling.return=c.return;c=c.sibling}};Ii=function(){};
Ji=function(a,b,c,d,e){var f=a.memoizedProps;if(f!==d){var g=b.stateNode;lh(ih.current);a=null;switch(c){case "input":f=Ab(g,f);d=Ab(g,d);a=[];break;case "option":f=Ib(g,f);d=Ib(g,d);a=[];break;case "select":f=n({},f,{value:void 0});d=n({},d,{value:void 0});a=[];break;case "textarea":f=Kb(g,f);d=Kb(g,d);a=[];break;default:"function"!==typeof f.onClick&&"function"===typeof d.onClick&&(g.onclick=ae)}Yd(c,d);var h,k;c=null;for(h in f)if(!d.hasOwnProperty(h)&&f.hasOwnProperty(h)&&null!=f[h])if("style"===
h)for(k in g=f[h],g)g.hasOwnProperty(k)&&(c||(c={}),c[k]="");else"dangerouslySetInnerHTML"!==h&&"children"!==h&&"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(ia.hasOwnProperty(h)?a||(a=[]):(a=a||[]).push(h,null));for(h in d){var l=d[h];g=null!=f?f[h]:void 0;if(d.hasOwnProperty(h)&&l!==g&&(null!=l||null!=g))if("style"===h)if(g){for(k in g)!g.hasOwnProperty(k)||l&&l.hasOwnProperty(k)||(c||(c={}),c[k]="");for(k in l)l.hasOwnProperty(k)&&g[k]!==l[k]&&(c||(c={}),
c[k]=l[k])}else c||(a||(a=[]),a.push(h,c)),c=l;else"dangerouslySetInnerHTML"===h?(l=l?l.__html:void 0,g=g?g.__html:void 0,null!=l&&g!==l&&(a=a||[]).push(h,""+l)):"children"===h?g===l||"string"!==typeof l&&"number"!==typeof l||(a=a||[]).push(h,""+l):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&(ia.hasOwnProperty(h)?(null!=l&&$d(e,h),a||g===l||(a=[])):(a=a||[]).push(h,l))}c&&(a=a||[]).push("style",c);e=a;(b.updateQueue=e)&&Ci(b)}};Ki=function(a,b,c,d){c!==d&&Ci(b)};
function Li(a,b){switch(a.tailMode){case "hidden":b=a.tail;for(var c=null;null!==b;)null!==b.alternate&&(c=b),b=b.sibling;null===c?a.tail=null:c.sibling=null;break;case "collapsed":c=a.tail;for(var d=null;null!==c;)null!==c.alternate&&(d=c),c=c.sibling;null===d?b||null===a.tail?a.tail=null:a.tail.sibling=null:d.sibling=null}}
function Mi(a){switch(a.tag){case 1:L(a.type)&&Ff(a);var b=a.effectTag;return b&4096?(a.effectTag=b&-4097|64,a):null;case 3:nh(a);Gf(a);b=a.effectTag;if(0!==(b&64))throw Error(u(285));a.effectTag=b&-4097|64;return a;case 5:return ph(a),null;case 13:return G(M,a),b=a.effectTag,b&4096?(a.effectTag=b&-4097|64,a):null;case 19:return G(M,a),null;case 4:return nh(a),null;case 10:return tg(a),null;default:return null}}function Ni(a,b){return{value:a,source:b,stack:Xa(b)}}
var Oi="function"===typeof WeakSet?WeakSet:Set;function Pi(a,b){var c=b.source,d=b.stack;null===d&&null!==c&&(d=Xa(c));null!==c&&Wa(c.type);b=b.value;null!==a&&1===a.tag&&Wa(a.type);try{console.error(b)}catch(e){setTimeout(function(){throw e;})}}function Qi(a,b){try{b.props=a.memoizedProps,b.state=a.memoizedState,b.componentWillUnmount()}catch(c){Ri(a,c)}}function Si(a){var b=a.ref;if(null!==b)if("function"===typeof b)try{b(null)}catch(c){Ri(a,c)}else b.current=null}
function Ti(a,b){switch(b.tag){case 0:case 11:case 15:Ui(2,0,b);break;case 1:if(b.effectTag&256&&null!==a){var c=a.memoizedProps,d=a.memoizedState;a=b.stateNode;b=a.getSnapshotBeforeUpdate(b.elementType===b.type?c:mg(b.type,c),d);a.__reactInternalSnapshotBeforeUpdate=b}break;case 3:case 5:case 6:case 4:case 17:break;default:throw Error(u(163));}}
function Ui(a,b,c){c=c.updateQueue;c=null!==c?c.lastEffect:null;if(null!==c){var d=c=c.next;do{if(0!==(d.tag&a)){var e=d.destroy;d.destroy=void 0;void 0!==e&&e()}0!==(d.tag&b)&&(e=d.create,d.destroy=e());d=d.next}while(d!==c)}}
function Vi(a,b,c){"function"===typeof Wi&&Wi(b);switch(b.tag){case 0:case 11:case 14:case 15:a=b.updateQueue;if(null!==a&&(a=a.lastEffect,null!==a)){var d=a.next;fg(97<c?97:c,function(){var a=d;do{var c=a.destroy;if(void 0!==c){var g=b;try{c()}catch(h){Ri(g,h)}}a=a.next}while(a!==d)})}break;case 1:Si(b);c=b.stateNode;"function"===typeof c.componentWillUnmount&&Qi(b,c);break;case 5:Si(b);break;case 4:Xi(a,b,c)}}
function Yi(a){var b=a.alternate;a.return=null;a.child=null;a.memoizedState=null;a.updateQueue=null;a.dependencies=null;a.alternate=null;a.firstEffect=null;a.lastEffect=null;a.pendingProps=null;a.memoizedProps=null;null!==b&&Yi(b)}function Zi(a){return 5===a.tag||3===a.tag||4===a.tag}
function $i(a){a:{for(var b=a.return;null!==b;){if(Zi(b)){var c=b;break a}b=b.return}throw Error(u(160));}b=c.stateNode;switch(c.tag){case 5:var d=!1;break;case 3:b=b.containerInfo;d=!0;break;case 4:b=b.containerInfo;d=!0;break;default:throw Error(u(161));}c.effectTag&16&&(Tb(b,""),c.effectTag&=-17);a:b:for(c=a;;){for(;null===c.sibling;){if(null===c.return||Zi(c.return)){c=null;break a}c=c.return}c.sibling.return=c.return;for(c=c.sibling;5!==c.tag&&6!==c.tag&&18!==c.tag;){if(c.effectTag&2)continue b;
if(null===c.child||4===c.tag)continue b;else c.child.return=c,c=c.child}if(!(c.effectTag&2)){c=c.stateNode;break a}}for(var e=a;;){var f=5===e.tag||6===e.tag;if(f){var g=f?e.stateNode:e.stateNode.instance;if(c)if(d){f=b;var h=g;g=c;8===f.nodeType?f.parentNode.insertBefore(h,g):f.insertBefore(h,g)}else b.insertBefore(g,c);else d?(h=b,8===h.nodeType?(f=h.parentNode,f.insertBefore(g,h)):(f=h,f.appendChild(g)),h=h._reactRootContainer,null!==h&&void 0!==h||null!==f.onclick||(f.onclick=ae)):b.appendChild(g)}else if(4!==
e.tag&&null!==e.child){e.child.return=e;e=e.child;continue}if(e===a)break;for(;null===e.sibling;){if(null===e.return||e.return===a)return;e=e.return}e.sibling.return=e.return;e=e.sibling}}
function Xi(a,b,c){for(var d=b,e=!1,f,g;;){if(!e){e=d.return;a:for(;;){if(null===e)throw Error(u(160));f=e.stateNode;switch(e.tag){case 5:g=!1;break a;case 3:f=f.containerInfo;g=!0;break a;case 4:f=f.containerInfo;g=!0;break a}e=e.return}e=!0}if(5===d.tag||6===d.tag){a:for(var h=a,k=d,l=c,m=k;;)if(Vi(h,m,l),null!==m.child&&4!==m.tag)m.child.return=m,m=m.child;else{if(m===k)break;for(;null===m.sibling;){if(null===m.return||m.return===k)break a;m=m.return}m.sibling.return=m.return;m=m.sibling}g?(h=
f,k=d.stateNode,8===h.nodeType?h.parentNode.removeChild(k):h.removeChild(k)):f.removeChild(d.stateNode)}else if(4===d.tag){if(null!==d.child){f=d.stateNode.containerInfo;g=!0;d.child.return=d;d=d.child;continue}}else if(Vi(a,d,c),null!==d.child){d.child.return=d;d=d.child;continue}if(d===b)break;for(;null===d.sibling;){if(null===d.return||d.return===b)return;d=d.return;4===d.tag&&(e=!1)}d.sibling.return=d.return;d=d.sibling}}
function aj(a,b){switch(b.tag){case 0:case 11:case 14:case 15:Ui(4,8,b);break;case 1:break;case 5:var c=b.stateNode;if(null!=c){var d=b.memoizedProps,e=null!==a?a.memoizedProps:d;a=b.type;var f=b.updateQueue;b.updateQueue=null;if(null!==f){c[ve]=d;"input"===a&&"radio"===d.type&&null!=d.name&&Cb(c,d);Zd(a,e);b=Zd(a,d);for(e=0;e<f.length;e+=2){var g=f[e],h=f[e+1];"style"===g?Wd(c,h):"dangerouslySetInnerHTML"===g?Sb(c,h):"children"===g?Tb(c,h):vb(c,g,h,b)}switch(a){case "input":Eb(c,d);break;case "textarea":Mb(c,
d);break;case "select":b=c._wrapperState.wasMultiple,c._wrapperState.wasMultiple=!!d.multiple,a=d.value,null!=a?Jb(c,!!d.multiple,a,!1):b!==!!d.multiple&&(null!=d.defaultValue?Jb(c,!!d.multiple,d.defaultValue,!0):Jb(c,!!d.multiple,d.multiple?[]:"",!1))}}}break;case 6:if(null===b.stateNode)throw Error(u(162));b.stateNode.nodeValue=b.memoizedProps;break;case 3:b=b.stateNode;b.hydrate&&(b.hydrate=!1,Lc(b.containerInfo));break;case 12:break;case 13:c=b;null===b.memoizedState?d=!1:(d=!0,c=b.child,bj=cg());
if(null!==c)a:for(a=c;;){if(5===a.tag)f=a.stateNode,d?(f=f.style,"function"===typeof f.setProperty?f.setProperty("display","none","important"):f.display="none"):(f=a.stateNode,e=a.memoizedProps.style,e=void 0!==e&&null!==e&&e.hasOwnProperty("display")?e.display:null,f.style.display=Vd("display",e));else if(6===a.tag)a.stateNode.nodeValue=d?"":a.memoizedProps;else if(13===a.tag&&null!==a.memoizedState&&null===a.memoizedState.dehydrated){f=a.child.sibling;f.return=a;a=f;continue}else if(null!==a.child){a.child.return=
a;a=a.child;continue}if(a===c)break a;for(;null===a.sibling;){if(null===a.return||a.return===c)break a;a=a.return}a.sibling.return=a.return;a=a.sibling}cj(b);break;case 19:cj(b);break;case 17:break;case 20:break;case 21:break;default:throw Error(u(163));}}function cj(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Oi);b.forEach(function(b){var d=dj.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}var ej="function"===typeof WeakMap?WeakMap:Map;
function fj(a,b,c){c=Bg(c,null);c.tag=3;c.payload={element:null};var d=b.value;c.callback=function(){gj||(gj=!0,hj=d);Pi(a,b)};return c}
function ij(a,b,c){c=Bg(c,null);c.tag=3;var d=a.type.getDerivedStateFromError;if("function"===typeof d){var e=b.value;c.payload=function(){Pi(a,b);return d(e)}}var f=a.stateNode;null!==f&&"function"===typeof f.componentDidCatch&&(c.callback=function(){"function"!==typeof d&&(null===jj?jj=new Set([this]):jj.add(this),Pi(a,b));var c=b.stack;this.componentDidCatch(b.value,{componentStack:null!==c?c:""})});return c}
var kj=Math.ceil,lj=Ea.ReactCurrentDispatcher,mj=Ea.ReactCurrentOwner,S=0,nj=8,oj=16,pj=32,qj=0,rj=1,sj=2,tj=3,uj=4,vj=5,T=S,U=null,V=null,W=0,X=qj,wj=null,xj=1073741823,yj=1073741823,zj=null,Aj=0,Bj=!1,bj=0,Cj=500,Y=null,gj=!1,hj=null,jj=null,Dj=!1,Ej=null,Fj=90,Gj=null,Hj=0,Ij=null,Jj=0;function Pg(){return(T&(oj|pj))!==S?1073741821-(cg()/10|0):0!==Jj?Jj:Jj=1073741821-(cg()/10|0)}
function Qg(a,b,c){b=b.mode;if(0===(b&2))return 1073741823;var d=dg();if(0===(b&4))return 99===d?1073741823:1073741822;if((T&oj)!==S)return W;if(null!==c)a=lg(a,c.timeoutMs|0||5E3,250);else switch(d){case 99:a=1073741823;break;case 98:a=lg(a,150,100);break;case 97:case 96:a=lg(a,5E3,250);break;case 95:a=2;break;default:throw Error(u(326));}null!==U&&a===W&&--a;return a}
function Rg(a,b){if(50<Hj)throw Hj=0,Ij=null,Error(u(185));a=Kj(a,b);if(null!==a){var c=dg();1073741823===b?(T&nj)!==S&&(T&(oj|pj))===S?Lj(a):(Z(a),T===S&&jg()):Z(a);(T&4)===S||98!==c&&99!==c||(null===Gj?Gj=new Map([[a,b]]):(c=Gj.get(a),(void 0===c||c>b)&&Gj.set(a,b)))}}
function Kj(a,b){a.expirationTime<b&&(a.expirationTime=b);var c=a.alternate;null!==c&&c.expirationTime<b&&(c.expirationTime=b);var d=a.return,e=null;if(null===d&&3===a.tag)e=a.stateNode;else for(;null!==d;){c=d.alternate;d.childExpirationTime<b&&(d.childExpirationTime=b);null!==c&&c.childExpirationTime<b&&(c.childExpirationTime=b);if(null===d.return&&3===d.tag){e=d.stateNode;break}d=d.return}null!==e&&(U===e&&(Jg(b),X===uj&&Mj(e,W)),Nj(e,b));return e}
function Oj(a){var b=a.lastExpiredTime;if(0!==b)return b;b=a.firstPendingTime;if(!Pj(a,b))return b;b=a.lastPingedTime;a=a.nextKnownPendingLevel;return b>a?b:a}
function Z(a){if(0!==a.lastExpiredTime)a.callbackExpirationTime=1073741823,a.callbackPriority=99,a.callbackNode=hg(Lj.bind(null,a));else{var b=Oj(a),c=a.callbackNode;if(0===b)null!==c&&(a.callbackNode=null,a.callbackExpirationTime=0,a.callbackPriority=90);else{var d=Pg();1073741823===b?d=99:1===b||2===b?d=95:(d=10*(1073741821-b)-10*(1073741821-d),d=0>=d?99:250>=d?98:5250>=d?97:95);if(null!==c){var e=a.callbackPriority;if(a.callbackExpirationTime===b&&e>=d)return;c!==Xf&&Nf(c)}a.callbackExpirationTime=
b;a.callbackPriority=d;b=1073741823===b?hg(Lj.bind(null,a)):gg(d,Qj.bind(null,a),{timeout:10*(1073741821-b)-cg()});a.callbackNode=b}}}
function Qj(a,b){Jj=0;if(b)return b=Pg(),Rj(a,b),Z(a),null;var c=Oj(a);if(0!==c){b=a.callbackNode;if((T&(oj|pj))!==S)throw Error(u(327));Sj();a===U&&c===W||Tj(a,c);if(null!==V){var d=T;T|=oj;var e=Uj(a);do try{Vj();break}catch(h){Wj(a,h)}while(1);rg();T=d;lj.current=e;if(X===rj)throw b=wj,Tj(a,c),Mj(a,c),Z(a),b;if(null===V)switch(e=a.finishedWork=a.current.alternate,a.finishedExpirationTime=c,d=X,U=null,d){case qj:case rj:throw Error(u(345));case sj:Rj(a,2<c?2:c);break;case tj:Mj(a,c);d=a.lastSuspendedTime;
c===d&&(a.nextKnownPendingLevel=Xj(e));if(1073741823===xj&&(e=bj+Cj-cg(),10<e)){if(Bj){var f=a.lastPingedTime;if(0===f||f>=c){a.lastPingedTime=c;Tj(a,c);break}}f=Oj(a);if(0!==f&&f!==c)break;if(0!==d&&d!==c){a.lastPingedTime=d;break}a.timeoutHandle=pe(Yj.bind(null,a),e);break}Yj(a);break;case uj:Mj(a,c);d=a.lastSuspendedTime;c===d&&(a.nextKnownPendingLevel=Xj(e));if(Bj&&(e=a.lastPingedTime,0===e||e>=c)){a.lastPingedTime=c;Tj(a,c);break}e=Oj(a);if(0!==e&&e!==c)break;if(0!==d&&d!==c){a.lastPingedTime=
d;break}1073741823!==yj?d=10*(1073741821-yj)-cg():1073741823===xj?d=0:(d=10*(1073741821-xj)-5E3,e=cg(),c=10*(1073741821-c)-e,d=e-d,0>d&&(d=0),d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*kj(d/1960))-d,c<d&&(d=c));if(10<d){a.timeoutHandle=pe(Yj.bind(null,a),d);break}Yj(a);break;case vj:if(1073741823!==xj&&null!==zj){f=xj;var g=zj;d=g.busyMinDurationMs|0;0>=d?d=0:(e=g.busyDelayMs|0,f=cg()-(10*(1073741821-f)-(g.timeoutMs|0||5E3)),d=f<=e?0:e+d-f);if(10<d){Mj(a,c);a.timeoutHandle=
pe(Yj.bind(null,a),d);break}}Yj(a);break;default:throw Error(u(329));}Z(a);if(a.callbackNode===b)return Qj.bind(null,a)}}return null}
function Lj(a){var b=a.lastExpiredTime;b=0!==b?b:1073741823;if(a.finishedExpirationTime===b)Yj(a);else{if((T&(oj|pj))!==S)throw Error(u(327));Sj();a===U&&b===W||Tj(a,b);if(null!==V){var c=T;T|=oj;var d=Uj(a);do try{Zj();break}catch(e){Wj(a,e)}while(1);rg();T=c;lj.current=d;if(X===rj)throw c=wj,Tj(a,b),Mj(a,b),Z(a),c;if(null!==V)throw Error(u(261));a.finishedWork=a.current.alternate;a.finishedExpirationTime=b;U=null;Yj(a);Z(a)}}return null}
function ak(){if(null!==Gj){var a=Gj;Gj=null;a.forEach(function(a,c){Rj(c,a);Z(c)});jg()}}function bk(a,b){var c=T;T|=1;try{return a(b)}finally{T=c,T===S&&jg()}}function ck(a,b){var c=T;T&=-2;T|=nj;try{return a(b)}finally{T=c,T===S&&jg()}}
function Tj(a,b){a.finishedWork=null;a.finishedExpirationTime=0;var c=a.timeoutHandle;-1!==c&&(a.timeoutHandle=-1,qe(c));if(null!==V)for(c=V.return;null!==c;){var d=c;switch(d.tag){case 1:var e=d.type.childContextTypes;null!==e&&void 0!==e&&Ff(d);break;case 3:nh(d);Gf(d);break;case 5:ph(d);break;case 4:nh(d);break;case 13:G(M,d);break;case 19:G(M,d);break;case 10:tg(d)}c=c.return}U=a;V=ah(a.current,null,b);W=b;X=qj;wj=null;yj=xj=1073741823;zj=null;Aj=0;Bj=!1}
function Wj(a,b){do{try{rg();Mh();if(null===V||null===V.return)return X=rj,wj=b,null;a:{var c=a,d=V.return,e=V,f=b;b=W;e.effectTag|=2048;e.firstEffect=e.lastEffect=null;if(null!==f&&"object"===typeof f&&"function"===typeof f.then){var g=f,h=0!==(M.current&1),k=d;do{var l;if(l=13===k.tag){var m=k.memoizedState;if(null!==m)l=null!==m.dehydrated?!0:!1;else{var C=k.memoizedProps;l=void 0===C.fallback?!1:!0!==C.unstable_avoidThisFallback?!0:h?!1:!0}}if(l){var y=k.updateQueue;if(null===y){var H=new Set;
H.add(g);k.updateQueue=H}else y.add(g);if(0===(k.mode&2)){k.effectTag|=64;e.effectTag&=-2981;if(1===e.tag)if(null===e.alternate)e.tag=17;else{var z=Bg(1073741823,null);z.tag=2;Dg(e,z)}e.expirationTime=1073741823;break a}f=void 0;e=b;var ta=c.pingCache;null===ta?(ta=c.pingCache=new ej,f=new Set,ta.set(g,f)):(f=ta.get(g),void 0===f&&(f=new Set,ta.set(g,f)));if(!f.has(e)){f.add(e);var r=dk.bind(null,c,g,e);g.then(r,r)}k.effectTag|=4096;k.expirationTime=b;break a}k=k.return}while(null!==k);f=Error((Wa(e.type)||
"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+Xa(e))}X!==vj&&(X=sj);f=Ni(f,e);k=d;do{switch(k.tag){case 3:g=f;k.effectTag|=4096;k.expirationTime=b;var x=fj(k,g,b);Eg(k,x);break a;case 1:g=f;var A=k.type,p=k.stateNode;if(0===(k.effectTag&64)&&("function"===typeof A.getDerivedStateFromError||null!==p&&"function"===typeof p.componentDidCatch&&
(null===jj||!jj.has(p)))){k.effectTag|=4096;k.expirationTime=b;var t=ij(k,g,b);Eg(k,t);break a}}k=k.return}while(null!==k)}V=ek(V)}catch(v){b=v;continue}break}while(1)}function Uj(){var a=lj.current;lj.current=Lh;return null===a?Lh:a}function Ig(a,b){a<xj&&2<a&&(xj=a);null!==b&&a<yj&&2<a&&(yj=a,zj=b)}function Jg(a){a>Aj&&(Aj=a)}function Zj(){for(;null!==V;)V=fk(V)}function Vj(){for(;null!==V&&!Of();)V=fk(V)}
function fk(a){var b=gk(a.alternate,a,W);a.memoizedProps=a.pendingProps;null===b&&(b=ek(a));mj.current=null;return b}
function ek(a){V=a;do{var b=V.alternate;a=V.return;if(0===(V.effectTag&2048)){a:{var c=b;b=V;var d=W;var e=b.pendingProps;switch(b.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:L(b.type)&&Ff(b);break;case 3:nh(b);Gf(b);e=b.stateNode;e.pendingContext&&(e.context=e.pendingContext,e.pendingContext=null);(null===c||null===c.child)&&ki(b)&&Ci(b);Ii(b);break;case 5:ph(b);d=lh(kh.current);var f=b.type;if(null!==c&&null!=b.stateNode)Ji(c,b,f,e,d),c.ref!==b.ref&&(b.effectTag|=128);else if(e){var g=
lh(ih.current);if(ki(b)){e=b;var h=e.stateNode;c=e.type;var k=e.memoizedProps,l=d;h[ue]=e;h[ve]=k;f=void 0;d=h;switch(c){case "iframe":case "object":case "embed":F("load",d);break;case "video":case "audio":for(h=0;h<cc.length;h++)F(cc[h],d);break;case "source":F("error",d);break;case "img":case "image":case "link":F("error",d);F("load",d);break;case "form":F("reset",d);F("submit",d);break;case "details":F("toggle",d);break;case "input":Bb(d,k);F("invalid",d);$d(l,"onChange");break;case "select":d._wrapperState=
{wasMultiple:!!k.multiple};F("invalid",d);$d(l,"onChange");break;case "textarea":Lb(d,k),F("invalid",d),$d(l,"onChange")}Yd(c,k);h=null;for(f in k)k.hasOwnProperty(f)&&(g=k[f],"children"===f?"string"===typeof g?d.textContent!==g&&(h=["children",g]):"number"===typeof g&&d.textContent!==""+g&&(h=["children",""+g]):ia.hasOwnProperty(f)&&null!=g&&$d(l,f));switch(c){case "input":yb(d);Gb(d,k,!0);break;case "textarea":yb(d);Nb(d,k);break;case "select":case "option":break;default:"function"===typeof k.onClick&&
(d.onclick=ae)}f=h;e.updateQueue=f;e=null!==f?!0:!1;e&&Ci(b)}else{c=b;l=f;k=e;h=9===d.nodeType?d:d.ownerDocument;g===Ob.html&&(g=Pb(l));g===Ob.html?"script"===l?(k=h.createElement("div"),k.innerHTML="<script>\x3c/script>",h=k.removeChild(k.firstChild)):"string"===typeof k.is?h=h.createElement(l,{is:k.is}):(h=h.createElement(l),"select"===l&&(l=h,k.multiple?l.multiple=!0:k.size&&(l.size=k.size))):h=h.createElementNS(g,l);k=h;k[ue]=c;k[ve]=e;Hi(k,b,!1,!1);b.stateNode=k;l=f;c=e;var m=d,C=Zd(l,c);switch(l){case "iframe":case "object":case "embed":F("load",
k);d=c;break;case "video":case "audio":for(d=0;d<cc.length;d++)F(cc[d],k);d=c;break;case "source":F("error",k);d=c;break;case "img":case "image":case "link":F("error",k);F("load",k);d=c;break;case "form":F("reset",k);F("submit",k);d=c;break;case "details":F("toggle",k);d=c;break;case "input":Bb(k,c);d=Ab(k,c);F("invalid",k);$d(m,"onChange");break;case "option":d=Ib(k,c);break;case "select":k._wrapperState={wasMultiple:!!c.multiple};d=n({},c,{value:void 0});F("invalid",k);$d(m,"onChange");break;case "textarea":Lb(k,
c);d=Kb(k,c);F("invalid",k);$d(m,"onChange");break;default:d=c}Yd(l,d);h=void 0;g=l;var y=k,H=d;for(h in H)if(H.hasOwnProperty(h)){var z=H[h];"style"===h?Wd(y,z):"dangerouslySetInnerHTML"===h?(z=z?z.__html:void 0,null!=z&&Sb(y,z)):"children"===h?"string"===typeof z?("textarea"!==g||""!==z)&&Tb(y,z):"number"===typeof z&&Tb(y,""+z):"suppressContentEditableWarning"!==h&&"suppressHydrationWarning"!==h&&"autoFocus"!==h&&(ia.hasOwnProperty(h)?null!=z&&$d(m,h):null!=z&&vb(y,h,z,C))}switch(l){case "input":yb(k);
Gb(k,c,!1);break;case "textarea":yb(k);Nb(k,c);break;case "option":null!=c.value&&k.setAttribute("value",""+ub(c.value));break;case "select":d=k;d.multiple=!!c.multiple;k=c.value;null!=k?Jb(d,!!c.multiple,k,!1):null!=c.defaultValue&&Jb(d,!!c.multiple,c.defaultValue,!0);break;default:"function"===typeof d.onClick&&(k.onclick=ae)}(e=ne(f,e))&&Ci(b)}null!==b.ref&&(b.effectTag|=128)}else if(null===b.stateNode)throw Error(u(166));break;case 6:if(c&&null!=b.stateNode)Ki(c,b,c.memoizedProps,e);else{if("string"!==
typeof e&&null===b.stateNode)throw Error(u(166));d=lh(kh.current);lh(ih.current);ki(b)?(e=b,f=e.stateNode,d=e.memoizedProps,f[ue]=e,(e=f.nodeValue!==d)&&Ci(b)):(f=b,e=(9===d.nodeType?d:d.ownerDocument).createTextNode(e),e[ue]=f,b.stateNode=e)}break;case 11:break;case 13:G(M,b);e=b.memoizedState;if(0!==(b.effectTag&64)){b.expirationTime=d;break a}e=null!==e;f=!1;null===c?void 0!==b.memoizedProps.fallback&&ki(b):(d=c.memoizedState,f=null!==d,e||null===d||(d=c.child.sibling,null!==d&&(k=b.firstEffect,
null!==k?(b.firstEffect=d,d.nextEffect=k):(b.firstEffect=b.lastEffect=d,d.nextEffect=null),d.effectTag=8)));if(e&&!f&&0!==(b.mode&2))if(null===c&&!0!==b.memoizedProps.unstable_avoidThisFallback||0!==(M.current&1))X===qj&&(X=tj);else{if(X===qj||X===tj)X=uj;0!==Aj&&null!==U&&(Mj(U,W),Nj(U,Aj))}if(e||f)b.effectTag|=4;break;case 7:break;case 8:break;case 12:break;case 4:nh(b);Ii(b);break;case 10:tg(b);break;case 9:break;case 14:break;case 17:L(b.type)&&Ff(b);break;case 19:G(M,b);e=b.memoizedState;if(null===
e)break;f=0!==(b.effectTag&64);k=e.rendering;if(null===k)if(f)Li(e,!1);else{if(X!==qj||null!==c&&0!==(c.effectTag&64))for(c=b.child;null!==c;){k=qh(c);if(null!==k){b.effectTag|=64;Li(e,!1);f=k.updateQueue;null!==f&&(b.updateQueue=f,b.effectTag|=4);null===e.lastEffect&&(b.firstEffect=null);b.lastEffect=e.lastEffect;e=d;for(f=b.child;null!==f;)d=f,c=e,d.effectTag&=2,d.nextEffect=null,d.firstEffect=null,d.lastEffect=null,k=d.alternate,null===k?(d.childExpirationTime=0,d.expirationTime=c,d.child=null,
d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null):(d.childExpirationTime=k.childExpirationTime,d.expirationTime=k.expirationTime,d.child=k.child,d.memoizedProps=k.memoizedProps,d.memoizedState=k.memoizedState,d.updateQueue=k.updateQueue,c=k.dependencies,d.dependencies=null===c?null:{expirationTime:c.expirationTime,firstContext:c.firstContext,responders:c.responders}),f=f.sibling;I(M,M.current&1|2,b);b=b.child;break a}c=c.sibling}}else{if(!f)if(c=qh(k),null!==c){if(b.effectTag|=
64,f=!0,d=c.updateQueue,null!==d&&(b.updateQueue=d,b.effectTag|=4),Li(e,!0),null===e.tail&&"hidden"===e.tailMode&&!k.alternate){b=b.lastEffect=e.lastEffect;null!==b&&(b.nextEffect=null);break}}else cg()>e.tailExpiration&&1<d&&(b.effectTag|=64,f=!0,Li(e,!1),b.expirationTime=b.childExpirationTime=d-1);e.isBackwards?(k.sibling=b.child,b.child=k):(d=e.last,null!==d?d.sibling=k:b.child=k,e.last=k)}if(null!==e.tail){0===e.tailExpiration&&(e.tailExpiration=cg()+500);d=e.tail;e.rendering=d;e.tail=d.sibling;
e.lastEffect=b.lastEffect;d.sibling=null;e=M.current;e=f?e&1|2:e&1;I(M,e,b);b=d;break a}break;case 20:break;case 21:break;default:throw Error(u(156,b.tag));}b=null}e=V;if(1===W||1!==e.childExpirationTime){f=0;for(d=e.child;null!==d;)c=d.expirationTime,k=d.childExpirationTime,c>f&&(f=c),k>f&&(f=k),d=d.sibling;e.childExpirationTime=f}if(null!==b)return b;null!==a&&0===(a.effectTag&2048)&&(null===a.firstEffect&&(a.firstEffect=V.firstEffect),null!==V.lastEffect&&(null!==a.lastEffect&&(a.lastEffect.nextEffect=
V.firstEffect),a.lastEffect=V.lastEffect),1<V.effectTag&&(null!==a.lastEffect?a.lastEffect.nextEffect=V:a.firstEffect=V,a.lastEffect=V))}else{b=Mi(V,W);if(null!==b)return b.effectTag&=2047,b;null!==a&&(a.firstEffect=a.lastEffect=null,a.effectTag|=2048)}b=V.sibling;if(null!==b)return b;V=a}while(null!==V);X===qj&&(X=vj);return null}function Xj(a){var b=a.expirationTime;a=a.childExpirationTime;return b>a?b:a}function Yj(a){var b=dg();fg(99,ik.bind(null,a,b));return null}
function ik(a,b){do Sj();while(null!==Ej);if((T&(oj|pj))!==S)throw Error(u(327));var c=a.finishedWork,d=a.finishedExpirationTime;if(null===c)return null;a.finishedWork=null;a.finishedExpirationTime=0;if(c===a.current)throw Error(u(177));a.callbackNode=null;a.callbackExpirationTime=0;a.callbackPriority=90;a.nextKnownPendingLevel=0;var e=Xj(c);a.firstPendingTime=e;d<=a.lastSuspendedTime?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:d<=a.firstSuspendedTime&&(a.firstSuspendedTime=
d-1);d<=a.lastPingedTime&&(a.lastPingedTime=0);d<=a.lastExpiredTime&&(a.lastExpiredTime=0);a===U&&(V=U=null,W=0);1<c.effectTag?null!==c.lastEffect?(c.lastEffect.nextEffect=c,e=c.firstEffect):e=c:e=c.firstEffect;if(null!==e){var f=T;T|=pj;mj.current=null;le=Ld;var g=fe();if(ge(g)){if("selectionStart"in g)var h={start:g.selectionStart,end:g.selectionEnd};else a:{h=(h=g.ownerDocument)&&h.defaultView||window;var k=h.getSelection&&h.getSelection();if(k&&0!==k.rangeCount){h=k.anchorNode;var l=k.anchorOffset,
m=k.focusNode;k=k.focusOffset;try{h.nodeType,m.nodeType}catch(Db){h=null;break a}var C=0,y=-1,H=-1,z=0,ta=0,r=g,x=null;b:for(;;){for(var A;;){r!==h||0!==l&&3!==r.nodeType||(y=C+l);r!==m||0!==k&&3!==r.nodeType||(H=C+k);3===r.nodeType&&(C+=r.nodeValue.length);if(null===(A=r.firstChild))break;x=r;r=A}for(;;){if(r===g)break b;x===h&&++z===l&&(y=C);x===m&&++ta===k&&(H=C);if(null!==(A=r.nextSibling))break;r=x;x=r.parentNode}r=A}h=-1===y||-1===H?null:{start:y,end:H}}else h=null}h=h||{start:0,end:0}}else h=
null;me={focusedElem:g,selectionRange:h};Ld=!1;Y=e;do try{jk()}catch(Db){if(null===Y)throw Error(u(330));Ri(Y,Db);Y=Y.nextEffect}while(null!==Y);Y=e;do try{for(g=a,h=b;null!==Y;){var p=Y.effectTag;p&16&&Tb(Y.stateNode,"");if(p&128){var t=Y.alternate;if(null!==t){var v=t.ref;null!==v&&("function"===typeof v?v(null):v.current=null)}}switch(p&1038){case 2:$i(Y);Y.effectTag&=-3;break;case 6:$i(Y);Y.effectTag&=-3;aj(Y.alternate,Y);break;case 1024:Y.effectTag&=-1025;break;case 1028:Y.effectTag&=-1025;aj(Y.alternate,
Y);break;case 4:aj(Y.alternate,Y);break;case 8:l=Y,Xi(g,l,h),Yi(l)}Y=Y.nextEffect}}catch(Db){if(null===Y)throw Error(u(330));Ri(Y,Db);Y=Y.nextEffect}while(null!==Y);v=me;t=fe();p=v.focusedElem;h=v.selectionRange;if(t!==p&&p&&p.ownerDocument&&ee(p.ownerDocument.documentElement,p)){null!==h&&ge(p)&&(t=h.start,v=h.end,void 0===v&&(v=t),"selectionStart"in p?(p.selectionStart=t,p.selectionEnd=Math.min(v,p.value.length)):(v=(t=p.ownerDocument||document)&&t.defaultView||window,v.getSelection&&(v=v.getSelection(),
l=p.textContent.length,g=Math.min(h.start,l),h=void 0===h.end?g:Math.min(h.end,l),!v.extend&&g>h&&(l=h,h=g,g=l),l=de(p,g),m=de(p,h),l&&m&&(1!==v.rangeCount||v.anchorNode!==l.node||v.anchorOffset!==l.offset||v.focusNode!==m.node||v.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),v.removeAllRanges(),g>h?(v.addRange(t),v.extend(m.node,m.offset)):(t.setEnd(m.node,m.offset),v.addRange(t))))));t=[];for(v=p;v=v.parentNode;)1===v.nodeType&&t.push({element:v,left:v.scrollLeft,top:v.scrollTop});
"function"===typeof p.focus&&p.focus();for(p=0;p<t.length;p++)v=t[p],v.element.scrollLeft=v.left,v.element.scrollTop=v.top}me=null;Ld=!!le;le=null;a.current=c;Y=e;do try{for(p=d;null!==Y;){var Dh=Y.effectTag;if(Dh&36){var dc=Y.alternate;t=Y;v=p;switch(t.tag){case 0:case 11:case 15:Ui(16,32,t);break;case 1:var fd=t.stateNode;if(t.effectTag&4)if(null===dc)fd.componentDidMount();else{var hk=t.elementType===t.type?dc.memoizedProps:mg(t.type,dc.memoizedProps);fd.componentDidUpdate(hk,dc.memoizedState,
fd.__reactInternalSnapshotBeforeUpdate)}var Eh=t.updateQueue;null!==Eh&&Kg(t,Eh,fd,v);break;case 3:var Fh=t.updateQueue;if(null!==Fh){g=null;if(null!==t.child)switch(t.child.tag){case 5:g=t.child.stateNode;break;case 1:g=t.child.stateNode}Kg(t,Fh,g,v)}break;case 5:var xk=t.stateNode;null===dc&&t.effectTag&4&&ne(t.type,t.memoizedProps)&&xk.focus();break;case 6:break;case 4:break;case 12:break;case 13:if(null===t.memoizedState){var Di=t.alternate;if(null!==Di){var Ei=Di.memoizedState;if(null!==Ei){var Fi=
Ei.dehydrated;null!==Fi&&Lc(Fi)}}}break;case 19:case 17:case 20:case 21:break;default:throw Error(u(163));}}if(Dh&128){t=void 0;var xd=Y.ref;if(null!==xd){var Gi=Y.stateNode;switch(Y.tag){case 5:t=Gi;break;default:t=Gi}"function"===typeof xd?xd(t):xd.current=t}}Y=Y.nextEffect}}catch(Db){if(null===Y)throw Error(u(330));Ri(Y,Db);Y=Y.nextEffect}while(null!==Y);Y=null;Yf();T=f}else a.current=c;if(Dj)Dj=!1,Ej=a,Fj=b;else for(Y=e;null!==Y;)b=Y.nextEffect,Y.nextEffect=null,Y=b;b=a.firstPendingTime;0===b&&
(jj=null);1073741823===b?a===Ij?Hj++:(Hj=0,Ij=a):Hj=0;"function"===typeof kk&&kk(c.stateNode,d);Z(a);if(gj)throw gj=!1,a=hj,hj=null,a;if((T&nj)!==S)return null;jg();return null}function jk(){for(;null!==Y;){var a=Y.effectTag;0!==(a&256)&&Ti(Y.alternate,Y);0===(a&512)||Dj||(Dj=!0,gg(97,function(){Sj();return null}));Y=Y.nextEffect}}function Sj(){if(90!==Fj){var a=97<Fj?97:Fj;Fj=90;return fg(a,lk)}}
function lk(){if(null===Ej)return!1;var a=Ej;Ej=null;if((T&(oj|pj))!==S)throw Error(u(331));var b=T;T|=pj;for(a=a.current.firstEffect;null!==a;){try{var c=a;if(0!==(c.effectTag&512))switch(c.tag){case 0:case 11:case 15:Ui(128,0,c),Ui(0,64,c)}}catch(d){if(null===a)throw Error(u(330));Ri(a,d)}c=a.nextEffect;a.nextEffect=null;a=c}T=b;jg();return!0}function mk(a,b,c){b=Ni(c,b);b=fj(a,b,1073741823);Dg(a,b);a=Kj(a,1073741823);null!==a&&Z(a)}
function Ri(a,b){if(3===a.tag)mk(a,a,b);else for(var c=a.return;null!==c;){if(3===c.tag){mk(c,a,b);break}else if(1===c.tag){var d=c.stateNode;if("function"===typeof c.type.getDerivedStateFromError||"function"===typeof d.componentDidCatch&&(null===jj||!jj.has(d))){a=Ni(b,a);a=ij(c,a,1073741823);Dg(c,a);c=Kj(c,1073741823);null!==c&&Z(c);break}}c=c.return}}
function dk(a,b,c){var d=a.pingCache;null!==d&&d.delete(b);U===a&&W===c?X===uj||X===tj&&1073741823===xj&&cg()-bj<Cj?Tj(a,W):Bj=!0:Pj(a,c)&&(b=a.lastPingedTime,0!==b&&b<c||(a.lastPingedTime=c,a.finishedExpirationTime===c&&(a.finishedExpirationTime=0,a.finishedWork=null),Z(a)))}function dj(a,b){var c=a.stateNode;null!==c&&c.delete(b);b=0;0===b&&(b=Pg(),b=Qg(b,a,null));a=Kj(a,b);null!==a&&Z(a)}var gk;
gk=function(a,b,c){var d=b.expirationTime;if(null!==a){var e=b.pendingProps;if(a.memoizedProps!==e||K.current)wg=!0;else{if(d<c){wg=!1;switch(b.tag){case 3:wi(b);li();break;case 5:oh(b);if(b.mode&4&&1!==c&&e.hidden)return b.expirationTime=b.childExpirationTime=1,null;break;case 1:L(b.type)&&Jf(b);break;case 4:mh(b,b.stateNode.containerInfo);break;case 10:sg(b,b.memoizedProps.value);break;case 13:if(null!==b.memoizedState){d=b.child.childExpirationTime;if(0!==d&&d>=c)return yi(a,b,c);I(M,M.current&
1,b);b=oi(a,b,c);return null!==b?b.sibling:null}I(M,M.current&1,b);break;case 19:d=b.childExpirationTime>=c;if(0!==(a.effectTag&64)){if(d)return Bi(a,b,c);b.effectTag|=64}e=b.memoizedState;null!==e&&(e.rendering=null,e.tail=null);I(M,M.current,b);if(!d)return null}return oi(a,b,c)}wg=!1}}else wg=!1;b.expirationTime=0;switch(b.tag){case 2:d=b.type;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;e=Ef(b,J.current);vg(b,c);e=Ih(null,b,d,a,e,c);b.effectTag|=1;if("object"===
typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof){b.tag=1;Mh();if(L(d)){var f=!0;Jf(b)}else f=!1;b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null;var g=d.getDerivedStateFromProps;"function"===typeof g&&Og(b,d,g,a);e.updater=Sg;b.stateNode=e;e._reactInternalFiber=b;Wg(b,d,a,c);b=vi(null,b,d,!0,f,c)}else b.tag=0,R(null,b,e,c),b=b.child;return b;case 16:e=b.elementType;null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2);a=b.pendingProps;Va(e);if(1!==e._status)throw e._result;
e=e._result;b.type=e;f=b.tag=nk(e);a=mg(e,a);switch(f){case 0:b=si(null,b,e,a,c);break;case 1:b=ui(null,b,e,a,c);break;case 11:b=ni(null,b,e,a,c);break;case 14:b=pi(null,b,e,mg(e.type,a),d,c);break;default:throw Error(u(306,e,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:mg(d,e),si(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:mg(d,e),ui(a,b,d,e,c);case 3:wi(b);d=b.updateQueue;if(null===d)throw Error(u(282));e=b.memoizedState;e=null!==e?e.element:
null;Hg(b,d,b.pendingProps,null,c);d=b.memoizedState.element;if(d===e)li(),b=oi(a,b,c);else{if(e=b.stateNode.hydrate)di=re(b.stateNode.containerInfo.firstChild),ci=b,e=ei=!0;if(e)for(c=gh(b,null,d,c),b.child=c;c;)c.effectTag=c.effectTag&-3|1024,c=c.sibling;else R(a,b,d,c),li();b=b.child}return b;case 5:return oh(b),null===a&&ii(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,oe(d,e)?g=null:null!==f&&oe(d,f)&&(b.effectTag|=16),ti(a,b),b.mode&4&&1!==c&&e.hidden?(b.expirationTime=
b.childExpirationTime=1,b=null):(R(a,b,g,c),b=b.child),b;case 6:return null===a&&ii(b),null;case 13:return yi(a,b,c);case 4:return mh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=fh(b,null,d,c):R(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:mg(d,e),ni(a,b,d,e,c);case 7:return R(a,b,b.pendingProps,c),b.child;case 8:return R(a,b,b.pendingProps.children,c),b.child;case 12:return R(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;
e=b.pendingProps;g=b.memoizedProps;f=e.value;sg(b,f);if(null!==g){var h=g.value;f=of(h,f)?0:("function"===typeof d._calculateChangedBits?d._calculateChangedBits(h,f):1073741823)|0;if(0===f){if(g.children===e.children&&!K.current){b=oi(a,b,c);break a}}else for(h=b.child,null!==h&&(h.return=b);null!==h;){var k=h.dependencies;if(null!==k){g=h.child;for(var l=k.firstContext;null!==l;){if(l.context===d&&0!==(l.observedBits&f)){1===h.tag&&(l=Bg(c,null),l.tag=2,Dg(h,l));h.expirationTime<c&&(h.expirationTime=
c);l=h.alternate;null!==l&&l.expirationTime<c&&(l.expirationTime=c);ug(h.return,c);k.expirationTime<c&&(k.expirationTime=c);break}l=l.next}}else g=10===h.tag?h.type===b.type?null:h.child:h.child;if(null!==g)g.return=h;else for(g=h;null!==g;){if(g===b){g=null;break}h=g.sibling;if(null!==h){h.return=g.return;g=h;break}g=g.return}h=g}}R(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,f=b.pendingProps,d=f.children,vg(b,c),e=xg(e,f.unstable_observedBits),d=d(e),b.effectTag|=1,R(a,b,d,c),b.child;
case 14:return e=b.type,f=mg(e,b.pendingProps),f=mg(e.type,f),pi(a,b,e,f,d,c);case 15:return ri(a,b,b.type,b.pendingProps,d,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:mg(d,e),null!==a&&(a.alternate=null,b.alternate=null,b.effectTag|=2),b.tag=1,L(d)?(a=!0,Jf(b)):a=!1,vg(b,c),Ug(b,d,e,c),Wg(b,d,e,c),vi(null,b,d,!0,a,c);case 19:return Bi(a,b,c)}throw Error(u(156,b.tag));};var kk=null,Wi=null;
function ok(a){if("undefined"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)return!0;try{var c=b.inject(a);kk=function(a){try{b.onCommitFiberRoot(c,a,void 0,64===(a.current.effectTag&64))}catch(e){}};Wi=function(a){try{b.onCommitFiberUnmount(c,a)}catch(e){}}}catch(d){}return!0}
function pk(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.effectTag=0;this.lastEffect=this.firstEffect=this.nextEffect=null;this.childExpirationTime=this.expirationTime=0;this.alternate=null}function gi(a,b,c,d){return new pk(a,b,c,d)}
function qi(a){a=a.prototype;return!(!a||!a.isReactComponent)}function nk(a){if("function"===typeof a)return qi(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Oa)return 11;if(a===Ra)return 14}return 2}
function ah(a,b){var c=a.alternate;null===c?(c=gi(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.effectTag=0,c.nextEffect=null,c.firstEffect=null,c.lastEffect=null);c.childExpirationTime=a.childExpirationTime;c.expirationTime=a.expirationTime;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{expirationTime:b.expirationTime,
firstContext:b.firstContext,responders:b.responders};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}
function ch(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)qi(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case Ia:return eh(c.children,e,f,b);case Na:g=8;e|=7;break;case Ja:g=8;e|=1;break;case Ka:return a=gi(12,c,b,e|8),a.elementType=Ka,a.type=Ka,a.expirationTime=f,a;case Pa:return a=gi(13,c,b,e),a.type=Pa,a.elementType=Pa,a.expirationTime=f,a;case Qa:return a=gi(19,c,b,e),a.elementType=Qa,a.expirationTime=f,a;default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case La:g=
10;break a;case Ma:g=9;break a;case Oa:g=11;break a;case Ra:g=14;break a;case Sa:g=16;d=null;break a}throw Error(u(130,null==a?a:typeof a,""));}b=gi(g,c,b,e);b.elementType=a;b.type=d;b.expirationTime=f;return b}function eh(a,b,c,d){a=gi(7,a,d,b);a.expirationTime=c;return a}function bh(a,b,c){a=gi(6,a,null,b);a.expirationTime=c;return a}
function dh(a,b,c){b=gi(4,null!==a.children?a.children:[],a.key,b);b.expirationTime=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}
function qk(a,b,c){this.tag=b;this.current=null;this.containerInfo=a;this.pingCache=this.pendingChildren=null;this.finishedExpirationTime=0;this.finishedWork=null;this.timeoutHandle=-1;this.pendingContext=this.context=null;this.hydrate=c;this.callbackNode=null;this.callbackPriority=90;this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}
function Pj(a,b){var c=a.firstSuspendedTime;a=a.lastSuspendedTime;return 0!==c&&c>=b&&a<=b}function Mj(a,b){var c=a.firstSuspendedTime,d=a.lastSuspendedTime;c<b&&(a.firstSuspendedTime=b);if(d>b||0===c)a.lastSuspendedTime=b;b<=a.lastPingedTime&&(a.lastPingedTime=0);b<=a.lastExpiredTime&&(a.lastExpiredTime=0)}
function Nj(a,b){b>a.firstPendingTime&&(a.firstPendingTime=b);var c=a.firstSuspendedTime;0!==c&&(b>=c?a.firstSuspendedTime=a.lastSuspendedTime=a.nextKnownPendingLevel=0:b>=a.lastSuspendedTime&&(a.lastSuspendedTime=b+1),b>a.nextKnownPendingLevel&&(a.nextKnownPendingLevel=b))}function Rj(a,b){var c=a.lastExpiredTime;if(0===c||c>b)a.lastExpiredTime=b}
function rk(a,b,c,d){var e=b.current,f=Pg(),g=Mg.suspense;f=Qg(f,e,g);a:if(c){c=c._reactInternalFiber;b:{if(ec(c)!==c||1!==c.tag)throw Error(u(170));var h=c;do{switch(h.tag){case 3:h=h.stateNode.context;break b;case 1:if(L(h.type)){h=h.stateNode.__reactInternalMemoizedMergedChildContext;break b}}h=h.return}while(null!==h);throw Error(u(171));}if(1===c.tag){var k=c.type;if(L(k)){c=If(c,k,h);break a}}c=h}else c=Cf;null===b.context?b.context=c:b.pendingContext=c;b=Bg(f,g);b.payload={element:a};d=void 0===
d?null:d;null!==d&&(b.callback=d);Dg(e,b);Rg(e,f);return f}function sk(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return a.child.stateNode;default:return a.child.stateNode}}function tk(a,b){a=a.memoizedState;null!==a&&null!==a.dehydrated&&a.retryTime<b&&(a.retryTime=b)}function uk(a,b){tk(a,b);(a=a.alternate)&&tk(a,b)}
function vk(a,b,c){c=null!=c&&!0===c.hydrate;var d=new qk(a,b,c),e=gi(3,null,null,2===b?7:1===b?3:0);d.current=e;e.stateNode=d;a[we]=d.current;c&&0!==b&&wc(9===a.nodeType?a:a.ownerDocument);this._internalRoot=d}vk.prototype.render=function(a,b){rk(a,this._internalRoot,null,void 0===b?null:b)};vk.prototype.unmount=function(a){var b=this._internalRoot,c=void 0===a?null:a,d=b.containerInfo;rk(null,b,null,function(){d[we]=null;null!==c&&c()})};
function wk(a){return!(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!==a.nodeType||" react-mount-point-unstable "!==a.nodeValue))}function yk(a,b){b||(b=a?9===a.nodeType?a.documentElement:a.firstChild:null,b=!(!b||1!==b.nodeType||!b.hasAttribute("data-reactroot")));if(!b)for(var c;c=a.lastChild;)a.removeChild(c);return new vk(a,0,b?{hydrate:!0}:void 0)}
function zk(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=sk(g);h.call(a)}}rk(b,g,a,e)}else{f=c._reactRootContainer=yk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=sk(g);k.call(a)}}ck(function(){rk(b,g,a,e)})}return sk(g)}function Ak(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:Ha,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
jc=function(a){if(13===a.tag){var b=lg(Pg(),150,100);Rg(a,b);uk(a,b)}};kc=function(a){if(13===a.tag){Pg();var b=kg++;Rg(a,b);uk(a,b)}};lc=function(a){if(13===a.tag){var b=Pg();b=Qg(b,a,null);Rg(a,b);uk(a,b)}};
Za=function(a,b,c){switch(b){case "input":Eb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=ye(d);if(!e)throw Error(u(90));zb(d);Eb(d,e)}}}break;case "textarea":Mb(a,c);break;case "select":b=c.value,null!=b&&Jb(a,!!c.multiple,b,!1)}};eb=bk;
fb=function(a,b,c,d){var e=T;T|=4;try{return fg(98,a.bind(null,b,c,d))}finally{T=e,T===S&&jg()}};gb=function(){(T&(1|oj|pj))===S&&(ak(),Sj())};hb=function(a,b){var c=T;T|=2;try{return a(b)}finally{T=c,T===S&&jg()}};function Bk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!wk(b))throw Error(u(200));return Ak(a,b,null,c)}
var Ck={createPortal:Bk,findDOMNode:function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===b){if("function"===typeof a.render)throw Error(u(188));throw Error(u(268,Object.keys(a)));}a=ic(b);a=null===a?null:a.stateNode;return a},hydrate:function(a,b,c){if(!wk(b))throw Error(u(200));return zk(null,a,b,!0,c)},render:function(a,b,c){if(!wk(b))throw Error(u(200));return zk(null,a,b,!1,c)},unstable_renderSubtreeIntoContainer:function(a,b,c,d){if(!wk(c))throw Error(u(200));
if(null==a||void 0===a._reactInternalFiber)throw Error(u(38));return zk(a,b,c,!1,d)},unmountComponentAtNode:function(a){if(!wk(a))throw Error(u(40));return a._reactRootContainer?(ck(function(){zk(null,null,a,!1,function(){a._reactRootContainer=null;a[we]=null})}),!0):!1},unstable_createPortal:function(){return Bk.apply(void 0,arguments)},unstable_batchedUpdates:bk,flushSync:function(a,b){if((T&(oj|pj))!==S)throw Error(u(187));var c=T;T|=1;try{return fg(99,a.bind(null,b))}finally{T=c,jg()}},__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{Events:[Cc,
xe,ye,Ca.injectEventPluginsByName,fa,Sc,function(a){ya(a,Rc)},cb,db,Pd,Ba,Sj,{current:!1}]}};
(function(a){var b=a.findFiberByHostInstance;return ok(n({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ea.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=ic(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:Fc,bundleType:0,version:"16.12.0",
rendererPackageName:"react-dom"});var Dk={default:Ck},Ek=Dk&&Ck||Dk;module.exports=Ek.default||Ek;
/***/ }),
/***/ "yoRg":
/*!****************************************************************!*\
!*** ./node_modules/core-js/internals/object-keys-internal.js ***!
\****************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var has = __webpack_require__(/*! ../internals/has */ "UTVS");
var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "/GqU");
var indexOf = __webpack_require__(/*! ../internals/array-includes */ "TWQb").indexOf;
var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "0BK2");
module.exports = function (object, names) {
var O = toIndexedObject(object);
var i = 0;
var result = [];
var key;
for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);
// Don't enum bug & hidden keys
while (names.length > i) if (has(O, key = names[i++])) {
~indexOf(result, key) || result.push(key);
}
return result;
};
/***/ }),
/***/ "ypFw":
/*!***************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.reduce.js ***!
\***************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var $reduce = __webpack_require__(/*! ../internals/array-reduce */ "1Y/n").left;
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
// `%TypedArray%.prototype.reduce` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reduce
exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) {
return $reduce(aTypedArray(this), callbackfn, arguments.length, arguments.length > 1 ? arguments[1] : undefined);
});
/***/ }),
/***/ "yq1k":
/*!***********************************************************!*\
!*** ./node_modules/core-js/modules/es.array.includes.js ***!
\***********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var $includes = __webpack_require__(/*! ../internals/array-includes */ "TWQb").includes;
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "rkAj");
var USES_TO_LENGTH = arrayMethodUsesToLength('indexOf', { ACCESSORS: true, 1: 0 });
// `Array.prototype.includes` method
// https://tc39.github.io/ecma262/#sec-array.prototype.includes
$({ target: 'Array', proto: true, forced: !USES_TO_LENGTH }, {
includes: function includes(el /* , fromIndex = 0 */) {
return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
}
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('includes');
/***/ }),
/***/ "yyme":
/*!*******************************************************!*\
!*** ./node_modules/core-js/modules/es.array.fill.js ***!
\*******************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var fill = __webpack_require__(/*! ../internals/array-fill */ "gdVl");
var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "RNIs");
// `Array.prototype.fill` method
// https://tc39.github.io/ecma262/#sec-array.prototype.fill
$({ target: 'Array', proto: true }, {
fill: fill
});
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
addToUnscopables('fill');
/***/ }),
/***/ "z/XJ":
/*!*************************************************************************!*\
!*** ./node_modules/@ant-design/icons/lib/icons/CloseCircleOutlined.js ***!
\*************************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt");
var _typeof = __webpack_require__(/*! @babel/runtime/helpers/typeof */ "cDf5");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(__webpack_require__(/*! @babel/runtime/helpers/objectSpread2 */ "3tO9"));
var React = _interopRequireWildcard(__webpack_require__(/*! react */ "q1tI"));
var _CloseCircleOutlined = _interopRequireDefault(__webpack_require__(/*! @ant-design/icons-svg/lib/asn/CloseCircleOutlined */ "g4LC"));
var _AntdIcon = _interopRequireDefault(__webpack_require__(/*! ../components/AntdIcon */ "KQxl"));
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var CloseCircleOutlined = function CloseCircleOutlined(props, ref) {
return /*#__PURE__*/React.createElement(_AntdIcon.default, (0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
ref: ref,
icon: _CloseCircleOutlined.default
}));
};
var RefIcon = /*#__PURE__*/React.forwardRef(CloseCircleOutlined);
if (false) {}
var _default = exports.default = RefIcon;
/***/ }),
/***/ "z8NH":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.float32-array.js ***!
\**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var createTypedArrayConstructor = __webpack_require__(/*! ../internals/typed-array-constructor */ "dOgj");
// `Float32Array` constructor
// https://tc39.github.io/ecma262/#sec-typedarray-objects
createTypedArrayConstructor('Float32', function (init) {
return function Float32Array(data, byteOffset, length) {
return init(this, data, byteOffset, length);
};
});
/***/ }),
/***/ "zBJ4":
/*!*******************************************************************!*\
!*** ./node_modules/core-js/internals/document-create-element.js ***!
\*******************************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var document = global.document;
// typeof document.createElement is 'object' in old IE
var EXISTS = isObject(document) && isObject(document.createElement);
module.exports = function (it) {
return EXISTS ? document.createElement(it) : {};
};
/***/ }),
/***/ "zHFu":
/*!********************************************************!*\
!*** ./node_modules/core-js/modules/es.string.bold.js ***!
\********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var createHTML = __webpack_require__(/*! ../internals/create-html */ "hXpO");
var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "rwPt");
// `String.prototype.bold` method
// https://tc39.github.io/ecma262/#sec-string.prototype.bold
$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('bold') }, {
bold: function bold() {
return createHTML(this, 'b', '', '');
}
});
/***/ }),
/***/ "zKZe":
/*!**********************************************************!*\
!*** ./node_modules/core-js/modules/es.object.assign.js ***!
\**********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var assign = __webpack_require__(/*! ../internals/object-assign */ "YNrV");
// `Object.assign` method
// https://tc39.github.io/ecma262/#sec-object.assign
$({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
assign: assign
});
/***/ }),
/***/ "zLVn":
/*!*********************************************************************************!*\
!*** ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js ***!
\*********************************************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return _objectWithoutPropertiesLoose; });
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
/***/ }),
/***/ "zSZm":
/*!****************************************************************!*\
!*** ./node_modules/core-js/modules/es.typed-array.reverse.js ***!
\****************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "67WC");
var aTypedArray = ArrayBufferViewCore.aTypedArray;
var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod;
var floor = Math.floor;
// `%TypedArray%.prototype.reverse` method
// https://tc39.github.io/ecma262/#sec-%typedarray%.prototype.reverse
exportTypedArrayMethod('reverse', function reverse() {
var that = this;
var length = aTypedArray(that).length;
var middle = floor(length / 2);
var index = 0;
var value;
while (index < middle) {
value = that[index];
that[index++] = that[--length];
that[length] = value;
} return that;
});
/***/ }),
/***/ "zT1h":
/*!*********************************************************!*\
!*** ./node_modules/rc-util/es/Dom/addEventListener.js ***!
\*********************************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return addEventListenerWrap; });
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react-dom */ "i8i4");
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react_dom__WEBPACK_IMPORTED_MODULE_0__);
function addEventListenerWrap(target, eventType, cb, option) {
/* eslint camelcase: 2 */
var callback = react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.unstable_batchedUpdates ? function run(e) {
react_dom__WEBPACK_IMPORTED_MODULE_0___default.a.unstable_batchedUpdates(cb, e);
} : cb;
if (target !== null && target !== void 0 && target.addEventListener) {
target.addEventListener(eventType, callback, option);
}
return {
remove: function remove() {
if (target !== null && target !== void 0 && target.removeEventListener) {
target.removeEventListener(eventType, callback, option);
}
}
};
}
/***/ }),
/***/ "zU+Z":
/*!****************************************!*\
!*** ./src/models/problemset/index.ts ***!
\****************************************/
/*! exports provided: default */
/*! exports used: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/babel-preset-umi/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "k1fw");
/* harmony import */ var _service_problemset__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/service/problemset */ "WCUW");
/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./util */ "6fQ5");
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
var ProblemsetModel = {
namespace: 'problemset',
state: {
disciplinesData: undefined,
courseOptions: [],
basketData: undefined,
editData: undefined,
groupData: undefined,
teachGroupData: undefined,
actionTabs: {
key: '',
params: {}
}
},
effects: {
getDisciplines: function getDisciplines(_ref, _ref2) {
var payload = _ref.payload;
var call = _ref2.call,
put = _ref2.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
var response;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* getDisciplines */ "k"], payload);
case 2:
response = _context.sent;
_context.next = 5;
return put({
type: 'save',
payload: {
disciplinesData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context.abrupt("return", response);
case 6:
case "end":
return _context.stop();
}
}, _callee);
})();
},
getEditDisciplines: function getEditDisciplines(_ref3, _ref4) {
var payload = _ref3.payload;
var call = _ref4.call,
put = _ref4.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
var response, disciplines, courseOptions;
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
_context2.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* getDisciplines */ "k"], payload);
case 2:
response = _context2.sent;
disciplines = response === null || response === void 0 ? void 0 : response.disciplines;
courseOptions = Object(_util__WEBPACK_IMPORTED_MODULE_2__[/* formatCourseOptions */ "a"])(disciplines);
_context2.next = 7;
return put({
type: 'save',
payload: {
courseOptions: courseOptions,
disciplinesData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 7:
return _context2.abrupt("return", response);
case 8:
case "end":
return _context2.stop();
}
}, _callee2);
})();
},
getBasketList: function getBasketList(_ref5, _ref6) {
var payload = _ref5.payload;
var call = _ref6.call,
put = _ref6.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
var response;
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
_context3.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* getBasketList */ "j"], payload);
case 2:
response = _context3.sent;
_context3.next = 5;
return put({
type: 'save',
payload: {
basketData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context3.abrupt("return", response);
case 6:
case "end":
return _context3.stop();
}
}, _callee3);
})();
},
getTeachGroupData: function getTeachGroupData(_ref7, _ref8) {
var payload = _ref7.payload;
var call = _ref8.call,
put = _ref8.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
var response;
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
_context4.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* getTeachGroupData */ "p"], payload);
case 2:
response = _context4.sent;
_context4.next = 5;
return put({
type: 'save',
payload: {
teachGroupData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context4.abrupt("return", response);
case 6:
case "end":
return _context4.stop();
}
}, _callee4);
})();
},
getEditData: function getEditData(_ref9, _ref10) {
var payload = _ref9.payload;
var call = _ref10.call,
put = _ref10.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee5() {
var response;
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
_context5.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* getEditData */ "l"], payload);
case 2:
response = _context5.sent;
_context5.next = 5;
return put({
type: 'save',
payload: {
editData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context5.abrupt("return", response);
case 6:
case "end":
return _context5.stop();
}
}, _callee5);
})();
},
getGroupData: function getGroupData(_ref11, _ref12) {
var payload = _ref11.payload;
var call = _ref12.call,
put = _ref12.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
var response;
return _regeneratorRuntime().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
_context6.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* getGroupList */ "m"], payload);
case 2:
response = _context6.sent;
_context6.next = 5;
return put({
type: 'save',
payload: {
groupData: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response)
}
});
case 5:
return _context6.abrupt("return", response);
case 6:
case "end":
return _context6.stop();
}
}, _callee6);
})();
},
getItemBanks: function getItemBanks(_ref13, _ref14) {
var payload = _ref13.payload;
var call = _ref14.call,
put = _ref14.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee7() {
return _regeneratorRuntime().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
_context7.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* getItemBanks */ "n"], payload);
case 2:
return _context7.abrupt("return", _context7.sent);
case 3:
case "end":
return _context7.stop();
}
}, _callee7);
})();
},
setPrivate: function setPrivate(_ref15, _ref16) {
var payload = _ref15.payload;
var call = _ref16.call,
put = _ref16.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee8() {
return _regeneratorRuntime().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
_context8.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* setPrivate */ "u"], payload);
case 2:
return _context8.abrupt("return", _context8.sent);
case 3:
case "end":
return _context8.stop();
}
}, _callee8);
})();
},
setPublic: function setPublic(_ref17, _ref18) {
var payload = _ref17.payload;
var call = _ref18.call,
put = _ref18.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee9() {
return _regeneratorRuntime().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
_context9.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* setPublic */ "v"], payload);
case 2:
return _context9.abrupt("return", _context9.sent);
case 3:
case "end":
return _context9.stop();
}
}, _callee9);
})();
},
handleDelete: function handleDelete(_ref19, _ref20) {
var payload = _ref19.payload;
var call = _ref20.call,
put = _ref20.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee10() {
return _regeneratorRuntime().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
_context10.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* handleDelete */ "q"], payload);
case 2:
return _context10.abrupt("return", _context10.sent);
case 3:
case "end":
return _context10.stop();
}
}, _callee10);
})();
},
startExperience: function startExperience(_ref21, _ref22) {
var payload = _ref21.payload;
var call = _ref22.call,
put = _ref22.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee11() {
return _regeneratorRuntime().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
_context11.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* startExperience */ "x"], payload);
case 2:
return _context11.abrupt("return", _context11.sent);
case 3:
case "end":
return _context11.stop();
}
}, _callee11);
})();
},
cancel: function cancel(_ref23, _ref24) {
var payload = _ref23.payload;
var call = _ref24.call,
put = _ref24.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee12() {
return _regeneratorRuntime().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
_context12.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* cancel */ "g"], payload);
case 2:
return _context12.abrupt("return", _context12.sent);
case 3:
case "end":
return _context12.stop();
}
}, _callee12);
})();
},
select: function select(_ref25, _ref26) {
var payload = _ref25.payload;
var call = _ref26.call,
put = _ref26.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee13() {
return _regeneratorRuntime().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
_context13.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* select */ "t"], payload);
case 2:
return _context13.abrupt("return", _context13.sent);
case 3:
case "end":
return _context13.stop();
}
}, _callee13);
})();
},
examUnselectAll: function examUnselectAll(_ref27, _ref28) {
var payload = _ref27.payload;
var call = _ref28.call,
put = _ref28.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee14() {
return _regeneratorRuntime().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
_context14.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* examUnselectAll */ "i"], payload);
case 2:
return _context14.abrupt("return", _context14.sent);
case 3:
case "end":
return _context14.stop();
}
}, _callee14);
})();
},
basketDelete: function basketDelete(_ref29, _ref30) {
var payload = _ref29.payload;
var call = _ref30.call,
put = _ref30.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee15() {
return _regeneratorRuntime().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
_context15.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* basketDelete */ "d"], payload);
case 2:
return _context15.abrupt("return", _context15.sent);
case 3:
case "end":
return _context15.stop();
}
}, _callee15);
})();
},
unselectAll: function unselectAll(_ref31, _ref32) {
var payload = _ref31.payload;
var call = _ref32.call,
put = _ref32.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee16() {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
_context16.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* unselectAll */ "y"], payload);
case 2:
return _context16.abrupt("return", _context16.sent);
case 3:
case "end":
return _context16.stop();
}
}, _callee16);
})();
},
addKnowledge: function addKnowledge(_ref33, _ref34) {
var payload = _ref33.payload;
var call = _ref34.call,
put = _ref34.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee17() {
return _regeneratorRuntime().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
_context17.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* addKnowledge */ "a"], payload);
case 2:
return _context17.abrupt("return", _context17.sent);
case 3:
case "end":
return _context17.stop();
}
}, _callee17);
})();
},
editProblemset: function editProblemset(_ref35, _ref36) {
var payload = _ref35.payload;
var call = _ref36.call,
put = _ref36.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee18() {
return _regeneratorRuntime().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
_context18.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* editProblemset */ "h"], payload);
case 2:
return _context18.abrupt("return", _context18.sent);
case 3:
case "end":
return _context18.stop();
}
}, _callee18);
})();
},
addProblemset: function addProblemset(_ref37, _ref38) {
var payload = _ref37.payload;
var call = _ref38.call,
put = _ref38.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee19() {
return _regeneratorRuntime().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
_context19.next = 2;
return call(_service_problemset__WEBPACK_IMPORTED_MODULE_1__[/* addProblemset */ "b"], payload);
case 2:
return _context19.abrupt("return", _context19.sent);
case 3:
case "end":
return _context19.stop();
}
}, _callee19);
})();
},
setActionTabs: function setActionTabs(_ref39, _ref40) {
var payload = _ref39.payload;
var call = _ref40.call,
put = _ref40.put;
return /*#__PURE__*/_regeneratorRuntime().mark(function _callee20() {
return _regeneratorRuntime().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
_context20.next = 2;
return put({
type: 'save',
payload: {
actionTabs: Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)
}
});
case 2:
case "end":
return _context20.stop();
}
}, _callee20);
})();
}
},
reducers: {
save: function save(state, action) {
return Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(D_projects_competitions_forgeplus_react_node_modules_umijs_babel_preset_umi_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, state), action.payload);
}
},
subscriptions: {
setup: function setup(_ref41) {
var dispatch = _ref41.dispatch,
history = _ref41.history;
// console.log("subscriptions:", dispatch, history)
return history.listen(function (_ref42) {
var pathname = _ref42.pathname;
if (pathname === '/') {
dispatch({
type: 'query'
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__["a"] = (ProblemsetModel);
/***/ }),
/***/ "zfnd":
/*!***********************************************************!*\
!*** ./node_modules/core-js/internals/promise-resolve.js ***!
\***********************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var anObject = __webpack_require__(/*! ../internals/an-object */ "glrk");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var newPromiseCapability = __webpack_require__(/*! ../internals/new-promise-capability */ "8GlL");
module.exports = function (C, x) {
anObject(C);
if (isObject(x) && x.constructor === C) return x;
var promiseCapability = newPromiseCapability.f(C);
var resolve = promiseCapability.resolve;
resolve(x);
return promiseCapability.promise;
};
/***/ }),
/***/ "zk60":
/*!******************************************************!*\
!*** ./node_modules/core-js/internals/set-global.js ***!
\******************************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var global = __webpack_require__(/*! ../internals/global */ "2oRo");
var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "kRJp");
module.exports = function (key, value) {
try {
createNonEnumerableProperty(global, key, value);
} catch (error) {
global[key] = value;
} return value;
};
/***/ }),
/***/ "zlVK":
/*!**********************************************************!*\
!*** ./node_modules/@umijs/renderer-react/dist/index.js ***!
\**********************************************************/
/*! no static exports found */
/*! exports used: renderClient */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, '__esModule', { value: true });
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
var ReactDOM = __webpack_require__(/*! react-dom */ "i8i4");
var React = __webpack_require__(/*! react */ "q1tI");
var React__default = _interopDefault(React);
var runtime = __webpack_require__(/*! @umijs/runtime */ "Unfr");
var reactRouterConfig = __webpack_require__(/*! react-router-config */ "aztm");
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
try {
var info = gen[key](arg);
var value = info.value;
} catch (error) {
reject(error);
return;
}
if (info.done) {
resolve(value);
} else {
Promise.resolve(value).then(_next, _throw);
}
}
function _asyncToGenerator(fn) {
return function () {
var self = this,
args = arguments;
return new Promise(function (resolve, reject) {
var gen = fn.apply(self, args);
function _next(value) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
}
function _throw(err) {
asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
}
_next(undefined);
});
};
}
function _defineProperty(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function ownKeys(object, enumerableOnly) {
var keys = Object.keys(object);
if (Object.getOwnPropertySymbols) {
var symbols = Object.getOwnPropertySymbols(object);
if (enumerableOnly) symbols = symbols.filter(function (sym) {
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
});
keys.push.apply(keys, symbols);
}
return keys;
}
function _objectSpread2(target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i] != null ? arguments[i] : {};
if (i % 2) {
ownKeys(Object(source), true).forEach(function (key) {
_defineProperty(target, key, source[key]);
});
} else if (Object.getOwnPropertyDescriptors) {
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
} else {
ownKeys(Object(source)).forEach(function (key) {
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
});
}
}
return target;
}
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
function _objectWithoutProperties(source, excluded) {
if (source == null) return {};
var target = _objectWithoutPropertiesLoose(source, excluded);
var key, i;
if (Object.getOwnPropertySymbols) {
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
for (i = 0; i < sourceSymbolKeys.length; i++) {
key = sourceSymbolKeys[i];
if (excluded.indexOf(key) >= 0) continue;
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
target[key] = source[key];
}
}
return target;
}
function _slicedToArray(arr, i) {
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
}
function _arrayWithHoles(arr) {
if (Array.isArray(arr)) return arr;
}
function _iterableToArrayLimit(arr, i) {
if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return;
var _arr = [];
var _n = true;
var _d = false;
var _e = undefined;
try {
for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
_arr.push(_s.value);
if (i && _arr.length === i) break;
}
} catch (err) {
_d = true;
_e = err;
} finally {
try {
if (!_n && _i["return"] != null) _i["return"]();
} finally {
if (_d) throw _e;
}
}
return _arr;
}
function _unsupportedIterableToArray(o, minLen) {
if (!o) return;
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
var n = Object.prototype.toString.call(o).slice(8, -1);
if (n === "Object" && o.constructor) n = o.constructor.name;
if (n === "Map" || n === "Set") return Array.from(n);
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length) len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
return arr2;
}
function _nonIterableRest() {
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
function _createForOfIteratorHelper(o) {
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) {
var i = 0;
var F = function () {};
return {
s: F,
n: function () {
if (i >= o.length) return {
done: true
};
return {
done: false,
value: o[i++]
};
},
e: function (e) {
throw e;
},
f: F
};
}
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
var it,
normalCompletion = true,
didErr = false,
err;
return {
s: function () {
it = o[Symbol.iterator]();
},
n: function () {
var step = it.next();
normalCompletion = step.done;
return step;
},
e: function (e) {
didErr = true;
err = e;
},
f: function () {
try {
if (!normalCompletion && it.return != null) it.return();
} finally {
if (didErr) throw err;
}
}
};
}
function Switch(props) {
return /*#__PURE__*/React__default.createElement(runtime.__RouterContext.Consumer, null, function (context) {
var children = props.children,
extraProps = _objectWithoutProperties(props, ["children"]);
var location = context.location;
var element,
match = null;
React__default.Children.forEach(children, function (child) {
if (match === null && React__default.isValidElement(child)) {
element = child;
var path = child.props.path || child.props.from;
match = path ? runtime.matchPath(location.pathname, _objectSpread2({}, child.props, {
path: path
})) : context.match;
}
});
return match ? React__default.cloneElement(element, {
location: location,
computedMatch: match,
layoutProps: extraProps
}) : null;
});
}
function Route(props) {
return /*#__PURE__*/React__default.createElement(runtime.__RouterContext.Consumer, null, function (context) {
var location = context.location;
var match = props.computedMatch;
var newProps = _objectSpread2({}, context, {
location: location,
match: match
});
var render = props.render;
return /*#__PURE__*/React__default.createElement(runtime.__RouterContext.Provider, {
value: newProps
}, newProps.match ? render(_objectSpread2({}, props.layoutProps, {}, newProps)) : null);
});
}
function wrapInitialPropsFetch(route, opts) {
var component = route.component,
restRouteParams = _objectWithoutProperties(route, ["component"]);
var Component = route.component;
function ComponentWithInitialPropsFetch(props) {
var _useState = React.useState(function () {
return window.g_initialProps;
}),
_useState2 = _slicedToArray(_useState, 2),
initialProps = _useState2[0],
setInitialProps = _useState2[1];
React.useEffect(function () {
/**
* 1. 首次渲染时,此时 window.g_initialProps 变量存在,不需要再走一次 getInitialProps这样一次 SSR 就走了 2 次 getInitialProps
* 2. 但是路由切换时window.getInitialProps 会被赋为 null这时候就走 getInitialProps 逻辑
* 3. 如果任何时候都走 2 次,配置 forceInitial: true这个场景用于静态站点的首屏加载希望走最新数据
* 4. 开启动态加载后,会在执行 getInitialProps 前预加载下
*/
if (!window.g_initialProps) {
_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
var _Component;
var preloadComponent, defaultCtx, ctx, _initialProps;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
if (!Component.preload) {
_context.next = 5;
break;
}
_context.next = 3;
return Component.preload();
case 3:
preloadComponent = _context.sent;
// for test case, really use .default
Component = preloadComponent.default || preloadComponent;
case 5:
defaultCtx = _objectSpread2({
isServer: false,
match: props === null || props === void 0 ? void 0 : props.match,
route: route
}, opts.getInitialPropsCtx || {}, {}, restRouteParams);
if (!((_Component = Component) === null || _Component === void 0 ? void 0 : _Component.getInitialProps)) {
_context.next = 14;
break;
}
_context.next = 9;
return opts.plugin.applyPlugins({
key: 'ssr.modifyGetInitialPropsCtx',
type: runtime.ApplyPluginsType.modify,
initialValue: defaultCtx,
async: true
});
case 9:
ctx = _context.sent;
_context.next = 12;
return Component.getInitialProps(ctx || defaultCtx);
case 12:
_initialProps = _context.sent;
setInitialProps(_initialProps);
case 14:
case "end":
return _context.stop();
}
}
}, _callee);
}))();
}
}, [window.location.pathname, window.location.search]);
return /*#__PURE__*/React__default.createElement(Component, _extends({}, props, initialProps));
} // flag for having wrappered
ComponentWithInitialPropsFetch.wrapInitialPropsLoaded = true;
ComponentWithInitialPropsFetch.displayName = 'ComponentWithInitialPropsFetch';
return ComponentWithInitialPropsFetch;
}
function _render(_ref2) {
var route = _ref2.route,
opts = _ref2.opts,
props = _ref2.props;
var routes = renderRoutes(_objectSpread2({}, opts, {
routes: route.routes || [],
rootRoutes: opts.rootRoutes
}));
var Component = route.component,
wrappers = route.wrappers;
if (Component) {
var defaultPageInitialProps = opts.isServer ? {} : window.g_initialProps;
var newProps = _objectSpread2({}, props, {}, opts.extraProps, {}, opts.pageInitialProps || defaultPageInitialProps, {
route: route,
routes: opts.rootRoutes
}); // @ts-ignore
var ret = /*#__PURE__*/React__default.createElement(Component, newProps, routes); // route.wrappers
if (wrappers) {
var len = wrappers.length - 1;
while (len >= 0) {
ret = React__default.createElement(wrappers[len], newProps, ret);
len -= 1;
}
}
return ret;
} else {
return routes;
}
}
function getRouteElement(_ref3) {
var route = _ref3.route,
index = _ref3.index,
opts = _ref3.opts;
var routeProps = {
key: route.key || index,
exact: route.exact,
strict: route.strict,
sensitive: route.sensitive,
path: route.path
};
if (route.redirect) {
return /*#__PURE__*/React__default.createElement(runtime.Redirect, _extends({}, routeProps, {
from: route.path,
to: route.redirect
}));
} else {
var _route$component, _route$component2, _route$component3;
// avoid mount and unmount with url hash change
if ( // only when SSR config enable
opts.ssrProps && !opts.isServer && // make sure loaded once
!((_route$component = route.component) === null || _route$component === void 0 ? void 0 : _route$component.wrapInitialPropsLoaded) && (((_route$component2 = route.component) === null || _route$component2 === void 0 ? void 0 : _route$component2.getInitialProps) || ((_route$component3 = route.component) === null || _route$component3 === void 0 ? void 0 : _route$component3.preload))) {
// client Render for enable ssr, but not sure SSR success
route.component = wrapInitialPropsFetch(route, opts);
}
return /*#__PURE__*/React__default.createElement(Route, _extends({}, routeProps, {
render: function render(props) {
return _render({
route: route,
opts: opts,
props: props
});
}
}));
}
}
function renderRoutes(opts) {
return opts.routes ? /*#__PURE__*/React__default.createElement(Switch, null, opts.routes.map(function (route, index) {
return getRouteElement({
route: route,
index: index,
opts: _objectSpread2({}, opts, {
rootRoutes: opts.rootRoutes || opts.routes
})
});
})) : null;
}
function RouterComponent(props) {
var history = props.history,
renderRoutesProps = _objectWithoutProperties(props, ["history"]);
React.useEffect(function () {
// first time using window.g_initialProps
// switch route fetching data, if exact route reset window.getInitialProps
if (window.g_initialProps) {
window.g_initialProps = null;
}
function routeChangeHandler(location, action) {
var matchedRoutes = reactRouterConfig.matchRoutes(props.routes, location.pathname); // Set title
if (typeof document !== 'undefined' && renderRoutesProps.defaultTitle !== undefined) {
document.title = matchedRoutes.length && // @ts-ignore
matchedRoutes[matchedRoutes.length - 1].route.title || renderRoutesProps.defaultTitle || '';
}
props.plugin.applyPlugins({
key: 'onRouteChange',
type: runtime.ApplyPluginsType.event,
args: {
routes: props.routes,
matchedRoutes: matchedRoutes,
location: location,
action: action
}
});
}
routeChangeHandler(history.location, 'POP');
return history.listen(routeChangeHandler);
}, [history]);
return /*#__PURE__*/React__default.createElement(runtime.Router, {
history: history
}, renderRoutes(renderRoutesProps));
}
/**
* preload for SSR in dynamicImport
* exec preload Promise function before ReactDOM.hydrate
* @param Routes
*/
function preloadComponent(_x) {
return _preloadComponent.apply(this, arguments);
}
function _preloadComponent() {
_preloadComponent = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(readyRoutes) {
var pathname,
matchedRoutes,
_iterator,
_step,
_route$component,
matchRoute,
route,
_preloadComponent2,
_args = arguments;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
pathname = _args.length > 1 && _args[1] !== undefined ? _args[1] : window.location.pathname;
// using matched routes not load all routes
matchedRoutes = reactRouterConfig.matchRoutes(readyRoutes, pathname);
_iterator = _createForOfIteratorHelper(matchedRoutes);
_context.prev = 3;
_iterator.s();
case 5:
if ((_step = _iterator.n()).done) {
_context.next = 19;
break;
}
matchRoute = _step.value;
route = matchRoute.route; // load all preload function, because of only a chance to load
if (!((_route$component = route.component) === null || _route$component === void 0 ? void 0 : _route$component.preload)) {
_context.next = 13;
break;
}
_context.next = 11;
return route.component.preload();
case 11:
_preloadComponent2 = _context.sent;
route.component = _preloadComponent2.default || _preloadComponent2;
case 13:
if (!route.routes) {
_context.next = 17;
break;
}
_context.next = 16;
return preloadComponent(route.routes, pathname);
case 16:
route.routes = _context.sent;
case 17:
_context.next = 5;
break;
case 19:
_context.next = 24;
break;
case 21:
_context.prev = 21;
_context.t0 = _context["catch"](3);
_iterator.e(_context.t0);
case 24:
_context.prev = 24;
_iterator.f();
return _context.finish(24);
case 27:
return _context.abrupt("return", readyRoutes);
case 28:
case "end":
return _context.stop();
}
}
}, _callee, null, [[3, 21, 24, 27]]);
}));
return _preloadComponent.apply(this, arguments);
}
function renderClient(opts) {
var rootContainer = opts.plugin.applyPlugins({
type: runtime.ApplyPluginsType.modify,
key: 'rootContainer',
initialValue: /*#__PURE__*/React__default.createElement(RouterComponent, {
history: opts.history,
routes: opts.routes,
plugin: opts.plugin,
ssrProps: opts.ssrProps,
defaultTitle: opts.defaultTitle
}),
args: {
history: opts.history,
routes: opts.routes,
plugin: opts.plugin
}
});
if (opts.rootElement) {
var rootElement = typeof opts.rootElement === 'string' ? document.getElementById(opts.rootElement) : opts.rootElement;
var callback = opts.callback || function () {}; // flag showing SSR successed
if (window.g_useSSR) {
if (opts.dynamicImport) {
// dynamicImport should preload current route component
// first loades);
preloadComponent(opts.routes).then(function () {
ReactDOM.hydrate(rootContainer, rootElement, callback);
});
} else {
ReactDOM.hydrate(rootContainer, rootElement, callback);
}
} else {
ReactDOM.render(rootContainer, rootElement, callback);
}
} else {
return rootContainer;
}
}
exports.renderClient = renderClient;
exports.renderRoutes = renderRoutes;
/***/ }),
/***/ "zoYe":
/*!**********************************************!*\
!*** ./node_modules/lodash/_baseToString.js ***!
\**********************************************/
/*! no static exports found */
/*! all exports used */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var Symbol = __webpack_require__(/*! ./_Symbol */ "nmnc"),
arrayMap = __webpack_require__(/*! ./_arrayMap */ "eUgh"),
isArray = __webpack_require__(/*! ./isArray */ "Z0cm"),
isSymbol = __webpack_require__(/*! ./isSymbol */ "/9aa");
/** Used as references for various `Number` constants. */
var INFINITY = 1 / 0;
/** Used to convert symbols to primitives and strings. */
var symbolProto = Symbol ? Symbol.prototype : undefined,
symbolToString = symbolProto ? symbolProto.toString : undefined;
/**
* The base implementation of `_.toString` which doesn't convert nullish
* values to empty strings.
*
* @private
* @param {*} value The value to process.
* @returns {string} Returns the string.
*/
function baseToString(value) {
// Exit early for strings to avoid a performance hit in some environments.
if (typeof value == 'string') {
return value;
}
if (isArray(value)) {
// Recursively convert values (susceptible to call stack limits).
return arrayMap(value, baseToString) + '';
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : '';
}
var result = (value + '');
return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;
}
module.exports = baseToString;
/***/ }),
/***/ "zu+z":
/*!*********************************************************!*\
!*** ./node_modules/core-js/modules/esnext.map.from.js ***!
\*********************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var from = __webpack_require__(/*! ../internals/collection-from */ "qY7S");
// `Map.from` method
// https://tc39.github.io/proposal-setmap-offrom/#sec-map.from
$({ target: 'Map', stat: true }, {
from: from
});
/***/ }),
/***/ "zuhW":
/*!**********************************************************************!*\
!*** ./node_modules/core-js/modules/es.object.prevent-extensions.js ***!
\**********************************************************************/
/*! no static exports found */
/*! ModuleConcatenation bailout: Module is not an ECMAScript module */
/***/ (function(module, exports, __webpack_require__) {
var $ = __webpack_require__(/*! ../internals/export */ "I+eb");
var isObject = __webpack_require__(/*! ../internals/is-object */ "hh1v");
var onFreeze = __webpack_require__(/*! ../internals/internal-metadata */ "8YOa").onFreeze;
var FREEZING = __webpack_require__(/*! ../internals/freezing */ "uy83");
var fails = __webpack_require__(/*! ../internals/fails */ "0Dky");
var nativePreventExtensions = Object.preventExtensions;
var FAILS_ON_PRIMITIVES = fails(function () { nativePreventExtensions(1); });
// `Object.preventExtensions` method
// https://tc39.github.io/ecma262/#sec-object.preventextensions
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, {
preventExtensions: function preventExtensions(it) {
return nativePreventExtensions && isObject(it) ? nativePreventExtensions(onFreeze(it)) : it;
}
});
/***/ }),
/***/ "zvFY":
/*!***********************************************************!*\
!*** ./node_modules/antd/es/button/button.js + 5 modules ***!
\***********************************************************/
/*! exports provided: convertLegacyProps, default */
/*! exports used: convertLegacyProps, default */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/css-animation/es/Event.js because of ./node_modules/antd/es/upload/UploadList.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@ant-design/icons/LoadingOutlined.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/assertThisInitialized.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/classCallCheck.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createClass.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/createSuper.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/defineProperty.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/extends.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/inherits.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/slicedToArray.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/typeof.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/devWarning.js because of ./node_modules/antd/es/breadcrumb/Breadcrumb.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/reactNode.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/_util/type.js because of ./node_modules/antd/es/_util/colors.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/SizeContext.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/config-provider/context.js because of ./node_modules/antd/es/tooltip/index.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/node_modules/rc-motion/es/index.js because of ./node_modules/antd/node_modules/rc-menu/es/SubMenu.js */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/omit.js/es/index.js because of ./src/layouts/index.tsx */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/raf/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react-dom/index.js (<- Module is not an ECMAScript module) */
/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/react/index.js (<- Module is not an ECMAScript module) */
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ convertLegacyProps; });
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/extends.js
var helpers_extends = __webpack_require__("pVnL");
var extends_default = /*#__PURE__*/__webpack_require__.n(helpers_extends);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js
var defineProperty = __webpack_require__("lSNA");
var defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__("J4zp");
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js
var helpers_typeof = __webpack_require__("cDf5");
var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);
// EXTERNAL MODULE: ./node_modules/react/index.js
var react = __webpack_require__("q1tI");
// EXTERNAL MODULE: ./node_modules/classnames/index.js
var classnames = __webpack_require__("TSYQ");
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
// EXTERNAL MODULE: ./node_modules/omit.js/es/index.js
var es = __webpack_require__("BGR+");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/context.js + 1 modules
var context = __webpack_require__("H84U");
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js
var classCallCheck = __webpack_require__("lwsE");
var classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);
// CONCATENATED MODULE: ./node_modules/antd/es/_util/unreachableException.js
var unreachableException_UnreachableException = function UnreachableException(value) {
classCallCheck_default()(this, UnreachableException);
return new Error("unreachable case: ".concat(JSON.stringify(value)));
};
// CONCATENATED MODULE: ./node_modules/antd/es/button/button-group.js
var __rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
var button_group_ButtonGroup = function ButtonGroup(props) {
return /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], null, function (_ref) {
var _classNames;
var getPrefixCls = _ref.getPrefixCls,
direction = _ref.direction;
var customizePrefixCls = props.prefixCls,
size = props.size,
className = props.className,
others = __rest(props, ["prefixCls", "size", "className"]);
var prefixCls = getPrefixCls('btn-group', customizePrefixCls); // large => lg
// small => sm
var sizeCls = '';
switch (size) {
case 'large':
sizeCls = 'lg';
break;
case 'small':
sizeCls = 'sm';
break;
case 'middle':
case undefined:
break;
default:
// eslint-disable-next-line no-console
console.warn(new unreachableException_UnreachableException(size));
}
var classes = classnames_default()(prefixCls, (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-").concat(sizeCls), sizeCls), defineProperty_default()(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames), className);
return /*#__PURE__*/react["createElement"]("div", extends_default()({}, others, {
className: classes
}));
});
};
/* harmony default export */ var button_group = (button_group_ButtonGroup);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js
var createClass = __webpack_require__("W8MJ");
var createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/assertThisInitialized.js
var assertThisInitialized = __webpack_require__("PJYZ");
var assertThisInitialized_default = /*#__PURE__*/__webpack_require__.n(assertThisInitialized);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/inherits.js
var inherits = __webpack_require__("7W2i");
var inherits_default = /*#__PURE__*/__webpack_require__.n(inherits);
// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createSuper.js
var createSuper = __webpack_require__("LQ03");
var createSuper_default = /*#__PURE__*/__webpack_require__.n(createSuper);
// EXTERNAL MODULE: ./node_modules/react-dom/index.js
var react_dom = __webpack_require__("i8i4");
// EXTERNAL MODULE: ./node_modules/@ant-design/css-animation/es/Event.js
var Event = __webpack_require__("KS4O");
// EXTERNAL MODULE: ./node_modules/raf/index.js
var raf = __webpack_require__("xEkU");
var raf_default = /*#__PURE__*/__webpack_require__.n(raf);
// CONCATENATED MODULE: ./node_modules/antd/es/_util/raf.js
var id = 0;
var ids = {}; // Support call raf with delay specified frame
function wrapperRaf(callback) {
var delayFrames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var myId = id++;
var restFrames = delayFrames;
function internalCallback() {
restFrames -= 1;
if (restFrames <= 0) {
callback();
delete ids[myId];
} else {
ids[myId] = raf_default()(internalCallback);
}
}
ids[myId] = raf_default()(internalCallback);
return myId;
}
wrapperRaf.cancel = function cancel(pid) {
if (pid === undefined) return;
raf_default.a.cancel(ids[pid]);
delete ids[pid];
};
wrapperRaf.ids = ids; // export this for test usage
// CONCATENATED MODULE: ./node_modules/antd/es/_util/wave.js
var styleForPesudo; // Where el is the DOM element you'd like to test for visibility
function isHidden(element) {
if (false) {}
return !element || element.offsetParent === null;
}
function isNotGrey(color) {
// eslint-disable-next-line no-useless-escape
var match = (color || '').match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
if (match && match[1] && match[2] && match[3]) {
return !(match[1] === match[2] && match[2] === match[3]);
}
return true;
}
var wave_Wave = /*#__PURE__*/function (_React$Component) {
inherits_default()(Wave, _React$Component);
var _super = createSuper_default()(Wave);
function Wave() {
var _this;
classCallCheck_default()(this, Wave);
_this = _super.apply(this, arguments);
_this.animationStart = false;
_this.destroyed = false;
_this.onClick = function (node, waveColor) {
if (!node || isHidden(node) || node.className.indexOf('-leave') >= 0) {
return;
}
var insertExtraNode = _this.props.insertExtraNode;
_this.extraNode = document.createElement('div');
var _assertThisInitialize = assertThisInitialized_default()(_this),
extraNode = _assertThisInitialize.extraNode;
var getPrefixCls = _this.context.getPrefixCls;
extraNode.className = "".concat(getPrefixCls(''), "-click-animating-node");
var attributeName = _this.getAttributeName();
node.setAttribute(attributeName, 'true'); // Not white or transparnt or grey
styleForPesudo = styleForPesudo || document.createElement('style');
if (waveColor && waveColor !== '#ffffff' && waveColor !== 'rgb(255, 255, 255)' && isNotGrey(waveColor) && !/rgba\((?:\d*, ){3}0\)/.test(waveColor) && // any transparent rgba color
waveColor !== 'transparent') {
// Add nonce if CSP exist
if (_this.csp && _this.csp.nonce) {
styleForPesudo.nonce = _this.csp.nonce;
}
extraNode.style.borderColor = waveColor;
styleForPesudo.innerHTML = "\n [".concat(getPrefixCls(''), "-click-animating-without-extra-node='true']::after, .").concat(getPrefixCls(''), "-click-animating-node {\n --antd-wave-shadow-color: ").concat(waveColor, ";\n }");
if (!document.body.contains(styleForPesudo)) {
document.body.appendChild(styleForPesudo);
}
}
if (insertExtraNode) {
node.appendChild(extraNode);
}
Event["a" /* default */].addStartEventListener(node, _this.onTransitionStart);
Event["a" /* default */].addEndEventListener(node, _this.onTransitionEnd);
};
_this.onTransitionStart = function (e) {
if (_this.destroyed) {
return;
}
var node = Object(react_dom["findDOMNode"])(assertThisInitialized_default()(_this));
if (!e || e.target !== node || _this.animationStart) {
return;
}
_this.resetEffect(node);
};
_this.onTransitionEnd = function (e) {
if (!e || e.animationName !== 'fadeEffect') {
return;
}
_this.resetEffect(e.target);
};
_this.bindAnimationEvent = function (node) {
if (!node || !node.getAttribute || node.getAttribute('disabled') || node.className.indexOf('disabled') >= 0) {
return;
}
var onClick = function onClick(e) {
// Fix radio button click twice
if (e.target.tagName === 'INPUT' || isHidden(e.target)) {
return;
}
_this.resetEffect(node); // Get wave color from target
var waveColor = getComputedStyle(node).getPropertyValue('border-top-color') || // Firefox Compatible
getComputedStyle(node).getPropertyValue('border-color') || getComputedStyle(node).getPropertyValue('background-color');
_this.clickWaveTimeoutId = window.setTimeout(function () {
return _this.onClick(node, waveColor);
}, 0);
wrapperRaf.cancel(_this.animationStartId);
_this.animationStart = true; // Render to trigger transition event cost 3 frames. Let's delay 10 frames to reset this.
_this.animationStartId = wrapperRaf(function () {
_this.animationStart = false;
}, 10);
};
node.addEventListener('click', onClick, true);
return {
cancel: function cancel() {
node.removeEventListener('click', onClick, true);
}
};
};
_this.renderWave = function (_ref) {
var csp = _ref.csp;
var children = _this.props.children;
_this.csp = csp;
return children;
};
return _this;
}
createClass_default()(Wave, [{
key: "componentDidMount",
value: function componentDidMount() {
var node = Object(react_dom["findDOMNode"])(this);
if (!node || node.nodeType !== 1) {
return;
}
this.instance = this.bindAnimationEvent(node);
}
}, {
key: "componentWillUnmount",
value: function componentWillUnmount() {
if (this.instance) {
this.instance.cancel();
}
if (this.clickWaveTimeoutId) {
clearTimeout(this.clickWaveTimeoutId);
}
this.destroyed = true;
}
}, {
key: "getAttributeName",
value: function getAttributeName() {
var getPrefixCls = this.context.getPrefixCls;
var insertExtraNode = this.props.insertExtraNode;
return insertExtraNode ? "".concat(getPrefixCls(''), "-click-animating") : "".concat(getPrefixCls(''), "-click-animating-without-extra-node");
}
}, {
key: "resetEffect",
value: function resetEffect(node) {
if (!node || node === this.extraNode || !(node instanceof Element)) {
return;
}
var insertExtraNode = this.props.insertExtraNode;
var attributeName = this.getAttributeName();
node.setAttribute(attributeName, 'false'); // edge has bug on `removeAttribute` #14466
if (styleForPesudo) {
styleForPesudo.innerHTML = '';
}
if (insertExtraNode && this.extraNode && node.contains(this.extraNode)) {
node.removeChild(this.extraNode);
}
Event["a" /* default */].removeStartEventListener(node, this.onTransitionStart);
Event["a" /* default */].removeEndEventListener(node, this.onTransitionEnd);
}
}, {
key: "render",
value: function render() {
return /*#__PURE__*/react["createElement"](context["a" /* ConfigConsumer */], null, this.renderWave);
}
}]);
return Wave;
}(react["Component"]);
wave_Wave.contextType = context["b" /* ConfigContext */];
// EXTERNAL MODULE: ./node_modules/antd/es/_util/type.js
var _util_type = __webpack_require__("CWQg");
// EXTERNAL MODULE: ./node_modules/antd/es/_util/devWarning.js
var devWarning = __webpack_require__("uaoM");
// EXTERNAL MODULE: ./node_modules/antd/es/config-provider/SizeContext.js
var SizeContext = __webpack_require__("3Nzz");
// EXTERNAL MODULE: ./node_modules/antd/node_modules/rc-motion/es/index.js + 5 modules
var rc_motion_es = __webpack_require__("HTfv");
// EXTERNAL MODULE: ./node_modules/@ant-design/icons/LoadingOutlined.js
var LoadingOutlined = __webpack_require__("gZBC");
var LoadingOutlined_default = /*#__PURE__*/__webpack_require__.n(LoadingOutlined);
// CONCATENATED MODULE: ./node_modules/antd/es/button/LoadingIcon.js
var getCollapsedWidth = function getCollapsedWidth() {
return {
width: 0,
opacity: 0,
transform: 'scale(0)'
};
};
var getRealWidth = function getRealWidth(node) {
return {
width: node.scrollWidth,
opacity: 1,
transform: 'scale(1)'
};
};
function LoadingIcon(_ref) {
var prefixCls = _ref.prefixCls,
loading = _ref.loading,
existIcon = _ref.existIcon;
var visible = !!loading;
if (existIcon) {
return /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-loading-icon")
}, /*#__PURE__*/react["createElement"](LoadingOutlined_default.a, null));
}
return /*#__PURE__*/react["createElement"](rc_motion_es["b" /* default */], {
visible: visible // We do not really use this motionName
,
motionName: "".concat(prefixCls, "-loading-icon-motion"),
removeOnLeave: true,
onAppearStart: getCollapsedWidth,
onAppearActive: getRealWidth,
onEnterStart: getCollapsedWidth,
onEnterActive: getRealWidth,
onLeaveStart: getRealWidth,
onLeaveActive: getCollapsedWidth
}, function (_ref2, ref) {
var className = _ref2.className,
style = _ref2.style;
return /*#__PURE__*/react["createElement"]("span", {
className: "".concat(prefixCls, "-loading-icon"),
style: style,
ref: ref
}, /*#__PURE__*/react["createElement"](LoadingOutlined_default.a, {
className: classnames_default()(className)
}));
});
}
// EXTERNAL MODULE: ./node_modules/antd/es/_util/reactNode.js
var reactNode = __webpack_require__("0n0R");
// CONCATENATED MODULE: ./node_modules/antd/es/button/button.js
var button_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) {
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
}
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
/* eslint-disable react/button-has-type */
var rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
var isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
function isString(str) {
return typeof str === 'string';
}
function isUnborderedButtonType(type) {
return type === 'text' || type === 'link';
} // Insert one space between two chinese characters automatically.
function insertSpace(child, needInserted) {
// Check the child if is undefined or null.
if (child == null) {
return;
}
var SPACE = needInserted ? ' ' : ''; // strictNullChecks oops.
if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {
return Object(reactNode["a" /* cloneElement */])(child, {
children: child.props.children.split('').join(SPACE)
});
}
if (typeof child === 'string') {
if (isTwoCNChar(child)) {
child = child.split('').join(SPACE);
}
return /*#__PURE__*/react["createElement"]("span", null, child);
}
return child;
}
function spaceChildren(children, needInserted) {
var isPrevChildPure = false;
var childList = [];
react["Children"].forEach(children, function (child) {
var type = typeof_default()(child);
var isCurrentChildPure = type === 'string' || type === 'number';
if (isPrevChildPure && isCurrentChildPure) {
var lastIndex = childList.length - 1;
var lastChild = childList[lastIndex];
childList[lastIndex] = "".concat(lastChild).concat(child);
} else {
childList.push(child);
}
isPrevChildPure = isCurrentChildPure;
}); // Pass to React.Children.map to auto fill key
return react["Children"].map(childList, function (child) {
return insertSpace(child, needInserted);
});
}
var ButtonTypes = Object(_util_type["a" /* tuple */])('default', 'primary', 'ghost', 'dashed', 'link', 'text');
var ButtonShapes = Object(_util_type["a" /* tuple */])('circle', 'circle-outline', 'round');
var ButtonHTMLTypes = Object(_util_type["a" /* tuple */])('submit', 'button', 'reset');
function convertLegacyProps(type) {
if (type === 'danger') {
return {
danger: true
};
}
return {
type: type
};
}
var button_InternalButton = function InternalButton(props, ref) {
var _classNames;
var loading = props.loading,
customizePrefixCls = props.prefixCls,
type = props.type,
danger = props.danger,
shape = props.shape,
customizeSize = props.size,
className = props.className,
children = props.children,
icon = props.icon,
ghost = props.ghost,
block = props.block,
rest = button_rest(props, ["loading", "prefixCls", "type", "danger", "shape", "size", "className", "children", "icon", "ghost", "block"]);
var size = react["useContext"](SizeContext["b" /* default */]);
var _React$useState = react["useState"](!!loading),
_React$useState2 = slicedToArray_default()(_React$useState, 2),
innerLoading = _React$useState2[0],
setLoading = _React$useState2[1];
var _React$useState3 = react["useState"](false),
_React$useState4 = slicedToArray_default()(_React$useState3, 2),
hasTwoCNChar = _React$useState4[0],
setHasTwoCNChar = _React$useState4[1];
var _React$useContext = react["useContext"](context["b" /* ConfigContext */]),
getPrefixCls = _React$useContext.getPrefixCls,
autoInsertSpaceInButton = _React$useContext.autoInsertSpaceInButton,
direction = _React$useContext.direction;
var buttonRef = ref || /*#__PURE__*/react["createRef"]();
var delayTimeoutRef = react["useRef"]();
var isNeedInserted = function isNeedInserted() {
return react["Children"].count(children) === 1 && !icon && !isUnborderedButtonType(type);
};
var fixTwoCNChar = function fixTwoCNChar() {
// Fix for HOC usage like <FormatMessage />
if (!buttonRef || !buttonRef.current || autoInsertSpaceInButton === false) {
return;
}
var buttonText = buttonRef.current.textContent;
if (isNeedInserted() && isTwoCNChar(buttonText)) {
if (!hasTwoCNChar) {
setHasTwoCNChar(true);
}
} else if (hasTwoCNChar) {
setHasTwoCNChar(false);
}
}; // =============== Update Loading ===============
var loadingOrDelay;
if (typeof_default()(loading) === 'object' && loading.delay) {
loadingOrDelay = loading.delay || true;
} else {
loadingOrDelay = !!loading;
}
react["useEffect"](function () {
clearTimeout(delayTimeoutRef.current);
if (typeof loadingOrDelay === 'number') {
delayTimeoutRef.current = window.setTimeout(function () {
setLoading(loadingOrDelay);
}, loadingOrDelay);
} else {
setLoading(loadingOrDelay);
}
}, [loadingOrDelay]);
react["useEffect"](function () {
fixTwoCNChar();
}, [buttonRef]);
var handleClick = function handleClick(e) {
var onClick = props.onClick;
if (innerLoading) {
return;
}
if (onClick) {
onClick(e);
}
};
Object(devWarning["a" /* default */])(!(typeof icon === 'string' && icon.length > 2), 'Button', "`icon` is using ReactNode instead of string naming in v4. Please check `".concat(icon, "` at https://ant.design/components/icon"));
Object(devWarning["a" /* default */])(!(ghost && isUnborderedButtonType(type)), 'Button', "`link` or `text` button can't be a `ghost` button.");
var prefixCls = getPrefixCls('btn', customizePrefixCls);
var autoInsertSpace = autoInsertSpaceInButton !== false; // large => lg
// small => sm
var sizeCls = '';
switch (customizeSize || size) {
case 'large':
sizeCls = 'lg';
break;
case 'small':
sizeCls = 'sm';
break;
default:
break;
}
var iconType = innerLoading ? 'loading' : icon;
var classes = classnames_default()(prefixCls, className, (_classNames = {}, defineProperty_default()(_classNames, "".concat(prefixCls, "-").concat(type), type), defineProperty_default()(_classNames, "".concat(prefixCls, "-").concat(shape), shape), defineProperty_default()(_classNames, "".concat(prefixCls, "-").concat(sizeCls), sizeCls), defineProperty_default()(_classNames, "".concat(prefixCls, "-icon-only"), !children && children !== 0 && iconType), defineProperty_default()(_classNames, "".concat(prefixCls, "-background-ghost"), ghost && !isUnborderedButtonType(type)), defineProperty_default()(_classNames, "".concat(prefixCls, "-loading"), innerLoading), defineProperty_default()(_classNames, "".concat(prefixCls, "-two-chinese-chars"), hasTwoCNChar && autoInsertSpace), defineProperty_default()(_classNames, "".concat(prefixCls, "-block"), block), defineProperty_default()(_classNames, "".concat(prefixCls, "-dangerous"), !!danger), defineProperty_default()(_classNames, "".concat(prefixCls, "-rtl"), direction === 'rtl'), _classNames));
var iconNode = icon && !innerLoading ? icon : /*#__PURE__*/react["createElement"](LoadingIcon, {
existIcon: !!icon,
prefixCls: prefixCls,
loading: !!innerLoading
});
var kids = children || children === 0 ? spaceChildren(children, isNeedInserted() && autoInsertSpace) : null;
var linkButtonRestProps = Object(es["a" /* default */])(rest, ['htmlType', 'loading']);
if (linkButtonRestProps.href !== undefined) {
return /*#__PURE__*/react["createElement"]("a", extends_default()({}, linkButtonRestProps, {
className: classes,
onClick: handleClick,
ref: buttonRef
}), iconNode, kids);
} // React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
var _a = rest,
htmlType = _a.htmlType,
otherProps = button_rest(_a, ["htmlType"]);
var buttonNode = /*#__PURE__*/react["createElement"]("button", extends_default()({}, Object(es["a" /* default */])(otherProps, ['loading']), {
type: htmlType,
className: classes,
onClick: handleClick,
ref: buttonRef
}), iconNode, kids);
if (isUnborderedButtonType(type)) {
return buttonNode;
}
return /*#__PURE__*/react["createElement"](wave_Wave, null, buttonNode);
};
var Button = /*#__PURE__*/react["forwardRef"](button_InternalButton);
Button.displayName = 'Button';
Button.defaultProps = {
loading: false,
ghost: false,
block: false,
htmlType: 'button'
};
Button.Group = button_group;
Button.__ANT_BUTTON = true;
/* harmony default export */ var button_button = __webpack_exports__["b"] = (Button);
/***/ })
/******/ });