diff --git a/index.html b/index.html index 82c219dba..9edc42bbb 100644 --- a/index.html +++ b/index.html @@ -93,6 +93,6 @@ gtag('config', 'UA-198293321-1'); --> - + diff --git a/umi.ab5b9d62.js b/umi.ab5b9d62.js new file mode 100644 index 000000000..357a07463 --- /dev/null +++ b/umi.ab5b9d62.js @@ -0,0 +1,138214 @@ +/******/ (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 = { +/******/ 14: 0 +/******/ } +/******/ +/******/ // object to store loaded and loading chunks +/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched +/******/ // Promise = chunk loading, 0 = chunk loaded +/******/ var installedChunks = { +/******/ 14: 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~b6d09846","1":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~09f5c92e","2":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~75b1128a","3":"vendors~p__Competitions__Detail~p__Competitions__Entered~p__Competitions__Entered__Assembly__TeamDat~0ba3ca0c","4":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Index","6":"layouts__SimpleLayouts","7":"layouts__index","8":"p__Competitions__Detail","9":"p__Competitions__Entered","10":"p__Competitions__Entered__Assembly__TeamDateil","11":"p__Competitions__Exports__","12":"p__Competitions__Index","13":"p__Competitions__Update","15":"vendors~monaco-editor","16":"vendors~p__Competitions__Entered__Assembly__TeamDateil","17":"vendors~p__Competitions__Exports__","18":"vendors~p__Competitions__Update"}[chunkId]||chunkId) + "." + {"0":"6b0730bd","1":"aea8ebc0","2":"e0acfbb0","3":"393033db","4":"7b821735","5":"b1988a56","6":"d8392390","7":"95b8dcac","8":"6f34bc28","9":"e3983852","10":"fb3c0c09","11":"03c675d3","12":"78818370","13":"40ed15da","15":"e6eb62db","16":"b948d9fb","17":"ed2c916e","18":"f5baead9","19":"24729045","20":"cc291365","21":"2329b082","22":"ef8b9ab5","23":"2f1b1a41","24":"fb07df7a","25":"a0d109f5","26":"7c7e7071","27":"166a58e7","28":"14f5abf9","29":"1d8bc06c","30":"0ee59578","31":"d5887f1d","32":"1c6f1c5b","33":"21ecd820","34":"86718798","35":"26c1d613","36":"da74844c","37":"116cf847","38":"b1f00a5a","39":"b873d6bc","40":"f9c606df","41":"9b68c58c","42":"0d599b54","43":"0857e569","44":"20714cf8","45":"d8ceb50b","46":"f4f5b960","47":"75071b0c","48":"54c266f1","49":"12456089","50":"3dc853a7","51":"7678861a","52":"e8a9d73d","53":"4ea7154f","54":"90dff04d","55":"7d590261","56":"71f7538d","57":"ac4386ae","58":"ec19ab72","59":"ca985166","60":"d8871b82","61":"2b2b47b1","62":"abc7fdbc","63":"18f4eca2","64":"ed263a8e","65":"7ee1997b","66":"e1af0246","67":"57a1150f","68":"8e7aba91","69":"beaabd0e","70":"e079ddd4","71":"91f85ec9","72":"7628894b","73":"d0496dcc","74":"21aa9877","75":"16c67ba8","76":"c1878604","77":"ca974cf1","78":"04ce4d1b","79":"a7f6af09","80":"ea1e44e5","81":"8f9c49fe","82":"ba554fab","83":"c048402c"}[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,"6":1,"7":1,"8":1,"9":1,"11":1,"12":1,"13":1,"15":1,"16":1,"18":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~b6d09846","1":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~09f5c92e","2":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Detail~p__Competitions__Entered~p__Co~75b1128a","3":"vendors~p__Competitions__Detail~p__Competitions__Entered~p__Competitions__Entered__Assembly__TeamDat~0ba3ca0c","4":"vendors~layouts__SimpleLayouts~layouts__index~p__Competitions__Index","6":"layouts__SimpleLayouts","7":"layouts__index","8":"p__Competitions__Detail","9":"p__Competitions__Entered","10":"p__Competitions__Entered__Assembly__TeamDateil","11":"p__Competitions__Exports__","12":"p__Competitions__Index","13":"p__Competitions__Update","15":"vendors~monaco-editor","16":"vendors~p__Competitions__Entered__Assembly__TeamDateil","17":"vendors~p__Competitions__Exports__","18":"vendors~p__Competitions__Update"}[chunkId]||chunkId) + "." + {"0":"13ee64e7","1":"1d972763","2":"b353f8d2","3":"ccf65a91","4":"c8478cdb","5":"31d6cfe0","6":"9b52bde3","7":"d0da92a7","8":"f5117c86","9":"a6de3df2","10":"31d6cfe0","11":"cecea47e","12":"dc900ad5","13":"d9eeb85a","15":"d82723f9","16":"0945abfe","17":"31d6cfe0","18":"1a55f327","19":"31d6cfe0","20":"31d6cfe0","21":"31d6cfe0","22":"31d6cfe0","23":"31d6cfe0","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"}[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); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "++LI": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "u0id"); + +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); +}); + + +/***/ }), + +/***/ "+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 + * + * 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; +}; + + +/***/ }), + +/***/ "+6XX": +/*!**********************************************!*\ + !*** ./node_modules/lodash/_listCacheHas.js ***! + \**********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ "y1pI"); + +/** + * 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; +} + +module.exports = listCacheHas; + + +/***/ }), + +/***/ "+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__); + + + +/***/ }), + +/***/ "+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 _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "284h"); + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); + +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")); + +// 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 + })); +}; + +CloseOutlined.displayName = 'CloseOutlined'; + +var _default = /*#__PURE__*/React.forwardRef(CloseOutlined); + +exports.default = _default; + +/***/ }), + +/***/ "+Q/t": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "u0id"); +var $some = __webpack_require__(/*! ../internals/array-iteration */ "COy+").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); +}); + + +/***/ }), + +/***/ "+Ywj": +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "56Rm"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); + +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); + } +}); + + +/***/ }), + +/***/ "+e8b": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var fill = __webpack_require__(/*! ../internals/array-fill */ "4obI"); +var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "pWpj"); + +// `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'); + + +/***/ }), + +/***/ "+knb": +/*!****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "3ss7"); + +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; +}; + + +/***/ }), + +/***/ "+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||125K(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&&0d?(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 true + * + * _.isSymbol('abc'); + * // => false + */ +function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); +} + +module.exports = isSymbol; + + +/***/ }), + +/***/ "/A/0": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "ZajO"); +var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "pWpj"); +var Iterators = __webpack_require__(/*! ../internals/iterators */ "88+L"); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "tY+O"); +var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "C5dw"); + +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'); + + +/***/ }), + +/***/ "/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 + +/***/ }), + +/***/ "/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 ./node_modules/@umijs/runtime/dist/index.esm.js */ +/*! 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); + +// EXTERNAL MODULE: ./node_modules/prop-types/index.js +var prop_types = __webpack_require__("17x9"); + +// 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); + subscription.onStateChange = subscription.notifyNestedSubs; + return { + store: store, + subscription: subscription + }; + }, [store]); + var previousState = Object(react["useMemo"])(function () { + return store.getState(); + }, [store]); + useIsomorphicLayoutEffect(function () { + var subscription = contextValue.subscription; + 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); + 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
{store.getState()}
+ * } + */ + +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 ``. + * @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
{store.getState()}
+ * } + */ + +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 ``. + * @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 ( + *
+ * {value} + * + *
+ * ) + * } + */ + +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 ``. + * @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
{counter}
+ * } + */ + +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 _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "284h"); + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); + +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")); + +// 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 + })); +}; + +CloseCircleFilled.displayName = 'CloseCircleFilled'; + +var _default = /*#__PURE__*/React.forwardRef(CloseCircleFilled); + +exports.default = _default; + +/***/ }), + +/***/ "/SPZ": +/*!******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "3ss7"); +var onFreeze = __webpack_require__(/*! ../internals/internal-metadata */ "v+BB").onFreeze; +var FREEZING = __webpack_require__(/*! ../internals/freezing */ "Osee"); +var fails = __webpack_require__(/*! ../internals/fails */ "U+Zv"); + +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; + } +}); + + +/***/ }), + +/***/ "/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 = IconBase; +exports.default = _default; + +/***/ }), + +/***/ "/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__(/*! /Users/caishi/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/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! 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/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/graduation.ts + + + + +function graduation_getTasksDetail(_x) { + return _getTasksDetail.apply(this, arguments); +} + +function _getTasksDetail() { + _getTasksDetail = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee2(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee3(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee4(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee5(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee6(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee7(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee8(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee9(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee10(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee11(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee12(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee13(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee14(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee15(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee16(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee17(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee18(params) { + return regenerator_default.a.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 + + + +var GraduationModel = { + namespace: 'graduation', + state: { + name: '毕业设计', + loading: true, + // 题库 + actionTabs: {}, + detailList: {}, + detailTaskList: {}, + replyList: {}, + detail: {}, + addTopicData: {}, + editTopicData: {}, + editTasksData: {} + }, + effects: { + // 选题列表 + getTopisDetailList: /*#__PURE__*/regenerator_default.a.mark(function getTopisDetailList(_ref, _ref2) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getTopisDetailList$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload, callback = _ref.callback; + call = _ref2.call, put = _ref2.put; + _context.next = 4; + return call(graduation_getTopisDetailList, payload); + + case 4: + response = _context.sent; + _context.next = 7; + return put({ + type: 'save', + payload: { + detailList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context.abrupt("return", response); + + case 8: + case "end": + return _context.stop(); + } + } + }, getTopisDetailList); + }), + getTasksListDetail: /*#__PURE__*/regenerator_default.a.mark(function getTasksListDetail(_ref3, _ref4) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getTasksListDetail$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload, callback = _ref3.callback; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(graduation_getTasksListDetail, payload); + + case 4: + response = _context2.sent; + _context2.next = 7; + return put({ + type: 'save', + payload: { + detailTaskList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context2.abrupt("return", response); + + case 8: + case "end": + return _context2.stop(); + } + } + }, getTasksListDetail); + }), + // 选题详情 + getTopisDetail: /*#__PURE__*/regenerator_default.a.mark(function getTopisDetail(_ref5, _ref6) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getTopisDetail$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload, callback = _ref5.callback; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return call(graduation_getTopisDetail, payload); + + case 4: + response = _context3.sent; + _context3.next = 7; + return put({ + type: 'save', + payload: { + detail: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context3.abrupt("return", response); + + case 8: + case "end": + return _context3.stop(); + } + } + }, getTopisDetail); + }), + // 任务详情 + getTasksDetail: /*#__PURE__*/regenerator_default.a.mark(function getTasksDetail(_ref7, _ref8) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getTasksDetail$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload, callback = _ref7.callback; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return call(graduation_getTasksDetail, payload); + + case 4: + response = _context4.sent; + _context4.next = 7; + return put({ + type: 'save', + payload: { + tasksDetail: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context4.abrupt("return", response); + + case 8: + case "end": + return _context4.stop(); + } + } + }, getTasksDetail); + }), + // 拒绝 + refuseTopic: /*#__PURE__*/regenerator_default.a.mark(function refuseTopic(_ref9, _ref10) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function refuseTopic$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload, callback = _ref9.callback; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return call(graduation_refuseTopic, payload); + + case 4: + response = _context5.sent; + return _context5.abrupt("return", response); + + case 6: + case "end": + return _context5.stop(); + } + } + }, refuseTopic); + }), + agreeTopic: /*#__PURE__*/regenerator_default.a.mark(function agreeTopic(_ref11, _ref12) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function agreeTopic$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + payload = _ref11.payload, callback = _ref11.callback; + call = _ref12.call, put = _ref12.put; + _context6.next = 4; + return call(graduation_agreeTopic, payload); + + case 4: + response = _context6.sent; + return _context6.abrupt("return", response); + + case 6: + case "end": + return _context6.stop(); + } + } + }, agreeTopic); + }), + // 讨论回复列表 + getReplyList: /*#__PURE__*/regenerator_default.a.mark(function getReplyList(_ref13, _ref14) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getReplyList$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + payload = _ref13.payload, callback = _ref13.callback; + call = _ref14.call, put = _ref14.put; + _context7.next = 4; + return call(graduation_getReplyList, payload); + + case 4: + response = _context7.sent; + _context7.next = 7; + return put({ + type: 'save', + payload: { + replyList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + case "end": + return _context7.stop(); + } + } + }, getReplyList); + }), + // 讨论创建回复 + createReply: /*#__PURE__*/regenerator_default.a.mark(function createReply(_ref15, _ref16) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function createReply$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + payload = _ref15.payload, callback = _ref15.callback; + call = _ref16.call, put = _ref16.put; + _context8.next = 4; + return call(graduation_createReply, payload); + + case 4: + return _context8.abrupt("return", _context8.sent); + + case 5: + case "end": + return _context8.stop(); + } + } + }, createReply); + }), + // 讨论回复点赞 + replyLike: /*#__PURE__*/regenerator_default.a.mark(function replyLike(_ref17, _ref18) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function replyLike$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + payload = _ref17.payload, callback = _ref17.callback; + call = _ref18.call, put = _ref18.put; + _context9.next = 4; + return call(graduation_replyLike, payload); + + case 4: + return _context9.abrupt("return", _context9.sent); + + case 5: + case "end": + return _context9.stop(); + } + } + }, replyLike); + }), + // 讨论回复取消点赞 + replyUnLike: /*#__PURE__*/regenerator_default.a.mark(function replyUnLike(_ref19, _ref20) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function replyUnLike$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + payload = _ref19.payload, callback = _ref19.callback; + call = _ref20.call, put = _ref20.put; + _context10.next = 4; + return call(graduation_replyUnLike, payload); + + case 4: + return _context10.abrupt("return", _context10.sent); + + case 5: + case "end": + return _context10.stop(); + } + } + }, replyUnLike); + }), + // 讨论回复删除 + deleteReply: /*#__PURE__*/regenerator_default.a.mark(function deleteReply(_ref21, _ref22) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function deleteReply$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + payload = _ref21.payload, callback = _ref21.callback; + call = _ref22.call, put = _ref22.put; + _context11.next = 4; + return call(graduation_deleteReply, payload); + + case 4: + return _context11.abrupt("return", _context11.sent); + + case 5: + case "end": + return _context11.stop(); + } + } + }, deleteReply); + }), + // 新建默认数据 + addTopicDefaultData: /*#__PURE__*/regenerator_default.a.mark(function addTopicDefaultData(_ref23, _ref24) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function addTopicDefaultData$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + payload = _ref23.payload, callback = _ref23.callback; + call = _ref24.call, put = _ref24.put; + _context12.next = 4; + return call(graduation_addTopicDefaultData, payload); + + case 4: + response = _context12.sent; + _context12.next = 7; + return put({ + type: 'save', + payload: { + addTopicData: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + case "end": + return _context12.stop(); + } + } + }, addTopicDefaultData); + }), + // 编辑默认数据 + editTopicDefaultData: /*#__PURE__*/regenerator_default.a.mark(function editTopicDefaultData(_ref25, _ref26) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function editTopicDefaultData$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + payload = _ref25.payload, callback = _ref25.callback; + call = _ref26.call, put = _ref26.put; + _context13.next = 4; + return call(graduation_editTopicDefaultData, payload); + + case 4: + response = _context13.sent; + _context13.next = 7; + return put({ + type: 'save', + payload: { + editTopicData: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context13.abrupt("return", response); + + case 8: + case "end": + return _context13.stop(); + } + } + }, editTopicDefaultData); + }), + editTasksDefaultData: /*#__PURE__*/regenerator_default.a.mark(function editTasksDefaultData(_ref27, _ref28) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function editTasksDefaultData$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + payload = _ref27.payload, callback = _ref27.callback; + call = _ref28.call, put = _ref28.put; + _context14.next = 4; + return call(graduation_editTasksDefaultData, payload); + + case 4: + response = _context14.sent; + _context14.next = 7; + return put({ + type: 'save', + payload: { + editTasksData: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context14.abrupt("return", response); + + case 8: + case "end": + return _context14.stop(); + } + } + }, editTasksDefaultData); + }), + // 新增毕设选题 + addTopic: /*#__PURE__*/regenerator_default.a.mark(function addTopic(_ref29, _ref30) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function addTopic$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + payload = _ref29.payload, callback = _ref29.callback; + call = _ref30.call, put = _ref30.put; + _context15.next = 4; + return call(graduation_addTopic, payload); + + case 4: + response = _context15.sent; + return _context15.abrupt("return", response); + + case 6: + case "end": + return _context15.stop(); + } + } + }, addTopic); + }), + // 编辑毕设选题 + editTopic: /*#__PURE__*/regenerator_default.a.mark(function editTopic(_ref31, _ref32) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function editTopic$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + payload = _ref31.payload, callback = _ref31.callback; + call = _ref32.call, put = _ref32.put; + _context16.next = 4; + return call(graduation_editTopic, payload); + + case 4: + response = _context16.sent; + return _context16.abrupt("return", response); + + case 6: + case "end": + return _context16.stop(); + } + } + }, editTopic); + }), + // 新增毕设任务 + addTasks: /*#__PURE__*/regenerator_default.a.mark(function addTasks(_ref33, _ref34) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function addTasks$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + payload = _ref33.payload, callback = _ref33.callback; + call = _ref34.call, put = _ref34.put; + _context17.next = 4; + return call(graduation_addTasks, payload); + + case 4: + response = _context17.sent; + return _context17.abrupt("return", response); + + case 6: + case "end": + return _context17.stop(); + } + } + }, addTasks); + }), + // 编辑毕设任务 + editTasks: /*#__PURE__*/regenerator_default.a.mark(function editTasks(_ref35, _ref36) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function editTasks$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + payload = _ref35.payload, callback = _ref35.callback; + call = _ref36.call, put = _ref36.put; + _context18.next = 4; + return call(graduation_editTasks, payload); + + case 4: + response = _context18.sent; + return _context18.abrupt("return", response); + + case 6: + case "end": + return _context18.stop(); + } + } + }, editTasks); + }), + // 设置操做action + setActionTabs: /*#__PURE__*/regenerator_default.a.mark(function setActionTabs(_ref37, _ref38) { + var payload, call, put; + return regenerator_default.a.wrap(function setActionTabs$(_context19) { + while (1) { + switch (_context19.prev = _context19.next) { + case 0: + payload = _ref37.payload; + call = _ref38.call, put = _ref38.put; + _context19.next = 4; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + + case 4: + case "end": + return _context19.stop(); + } + } + }, setActionTabs); + }) + }, + 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); + +/***/ }), + +/***/ "03A+": +/*!********************************************!*\ + !*** ./node_modules/lodash/isArguments.js ***! + \********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ "JTzB"), + isObjectLike = __webpack_require__(/*! ./isObjectLike */ "ExA7"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** Built-in value references. */ +var propertyIsEnumerable = objectProto.propertyIsEnumerable; + +/** + * 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'); +}; + +module.exports = isArguments; + + +/***/ }), + +/***/ "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.setTwoToneColor = setTwoToneColor; +exports.getTwoToneColor = getTwoToneColor; + +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]; +} + +/***/ }), + +/***/ "0BeC": +/*!*********************************************************!*\ + !*** ./src/models/classrooms/attachment.ts + 1 modules ***! + \*********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! 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/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/attachment.ts + + + + // 公告上移 + +function attachment_allAttachment(_x) { + return _allAttachment.apply(this, arguments); +} // 公告下移 + +function _allAttachment() { + _allAttachment = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee2(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee3(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee4(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee5(params) { + var id; + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee6(params) { + return regenerator_default.a.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 + + + +var AnnouncementModel = { + namespace: 'attachment', + state: { + name: '资源', + loading: true, + detail: {}, + // 题库 + actionTabs: {} + }, + effects: { + // 全部资源 + allAttachment: /*#__PURE__*/regenerator_default.a.mark(function allAttachment(_ref, _ref2) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function allAttachment$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload, callback = _ref.callback; + call = _ref2.call, put = _ref2.put; + _context.next = 4; + return call(attachment_allAttachment, payload); + + case 4: + response = _context.sent; + _context.next = 7; + return put({ + type: 'save', + payload: { + allList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context.abrupt("return", response); + + case 8: + case "end": + return _context.stop(); + } + } + }, allAttachment); + }), + // 我的资源 + mineAttachment: /*#__PURE__*/regenerator_default.a.mark(function mineAttachment(_ref3, _ref4) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function mineAttachment$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload, callback = _ref3.callback; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(attachment_mineAttachment, payload); + + case 4: + response = _context2.sent; + _context2.next = 7; + return put({ + type: 'save', + payload: { + mineList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context2.abrupt("return", response); + + case 8: + case "end": + return _context2.stop(); + } + } + }, mineAttachment); + }), + // 导入资源 + fileImport: /*#__PURE__*/regenerator_default.a.mark(function fileImport(_ref5, _ref6) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function fileImport$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload, callback = _ref5.callback; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return call(attachment_fileImport, payload); + + case 4: + response = _context3.sent; + return _context3.abrupt("return", response); + + case 6: + case "end": + return _context3.stop(); + } + } + }, fileImport); + }), + // 资源详情 + getDetail: /*#__PURE__*/regenerator_default.a.mark(function getDetail(_ref7, _ref8) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getDetail$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload, callback = _ref7.callback; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return call(attachment_getDetail, payload); + + case 4: + response = _context4.sent; + _context4.next = 7; + return put({ + type: 'save', + payload: { + detail: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context4.abrupt("return", response); + + case 8: + case "end": + return _context4.stop(); + } + } + }, getDetail); + }), + updateVisits: /*#__PURE__*/regenerator_default.a.mark(function updateVisits(_ref9, _ref10) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function updateVisits$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload, callback = _ref9.callback; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return call(attachment_updateVisits, payload); + + case 4: + response = _context5.sent; + return _context5.abrupt("return", response); + + case 6: + case "end": + return _context5.stop(); + } + } + }, updateVisits); + }), + // 设置操做action + setActionTabs: /*#__PURE__*/regenerator_default.a.mark(function setActionTabs(_ref11, _ref12) { + var payload, call, put; + return regenerator_default.a.wrap(function setActionTabs$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + payload = _ref11.payload; + call = _ref12.call, put = _ref12.put; + _context6.next = 4; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + + case 4: + case "end": + return _context6.stop(); + } + } + }, setActionTabs); + }) + }, + 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); + +/***/ }), + +/***/ "0Cz8": +/*!******************************************!*\ + !*** ./node_modules/lodash/_stackSet.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var ListCache = __webpack_require__(/*! ./_ListCache */ "Xi7e"), + Map = __webpack_require__(/*! ./_Map */ "ebwN"), + MapCache = __webpack_require__(/*! ./_MapCache */ "e4Nc"); + +/** Used as the size to enable large array optimizations. */ +var LARGE_ARRAY_SIZE = 200; + +/** + * 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; +} + +module.exports = stackSet; + + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "0HTW": +/*!*****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qM61"); + +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); +} + +/***/ }), + +/***/ "0IDy": +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "958M"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "3ss7"); + +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) : {}; +}; + + +/***/ }), + +/***/ "0LvV": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "yg/m"); + +// `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); + + +/***/ }), + +/***/ "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 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 i = 0; i < string.length; ++i) { + var c = string.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)) // ( ) + ) { + out += string.charAt(i); + continue; + } + + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } + + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } + + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + /* eslint operator-linebreak: [2, "before"] */ + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + 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); +} + +/***/ }), + +/***/ "0nNH": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); + +// `Number.MIN_SAFE_INTEGER` constant +// https://tc39.github.io/ecma262/#sec-number.min_safe_integer +$({ target: 'Number', stat: true }, { + MIN_SAFE_INTEGER: -0x1FFFFFFFFFFFFF +}); + + +/***/ }), + +/***/ "0nqp": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "u0id"); +var $indexOf = __webpack_require__(/*! ../internals/array-includes */ "J19E").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); +}); + + +/***/ }), + +/***/ "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 {} + + +/***/ }), + +/***/ "0ycA": +/*!******************************************!*\ + !*** ./node_modules/lodash/stubArray.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * 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 []; +} + +module.exports = stubArray; + + +/***/ }), + +/***/ 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) */ + +/***/ }), + +/***/ "1/dy": +/*!***************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "2dSn"); + +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 +}; + + +/***/ }), + +/***/ "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 + + + +/***/ }), + +/***/ "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, + 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")(); +} + + +/***/ }), + +/***/ "19ai": +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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; +} + +/***/ }), + +/***/ "1FR7": +/*!**************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "rzQM"); +var regexpExec = __webpack_require__(/*! ./regexp-exec */ "OhME"); + +// `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); +}; + + + +/***/ }), + +/***/ "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; +}; + + +/***/ }), + +/***/ "1YD2": +/*!********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); + +// `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; + } +}); + + +/***/ }), + +/***/ "1cmj": +/*!***********************************************************!*\ + !*** ./src/models/shixuns/practiceSetting.ts + 1 modules ***! + \***********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! 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/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/practiceSetting.ts + + + //获取test数据 + +function practiceSetting_getTestData(_x) { + return _getTestData.apply(this, arguments); +} //获取页面通用数据 + +function _getTestData() { + _getTestData = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee2(params) { + return regenerator_default.a.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 + + + +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: /*#__PURE__*/regenerator_default.a.mark(function setParams(_ref, _ref2) { + var payload, call, put; + return regenerator_default.a.wrap(function setParams$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload; + call = _ref2.call, put = _ref2.put; + _context.next = 4; + return put({ + type: 'save', + payload: Object(objectSpread2["a" /* default */])({}, payload) + }); + + case 4: + case "end": + return _context.stop(); + } + } + }, setParams); + }), + getTestData: /*#__PURE__*/regenerator_default.a.mark(function getTestData(_ref3, _ref4) { + var payload, call, put, response; + return regenerator_default.a.wrap(function getTestData$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(practiceSetting_getTestData, payload); + + case 4: + response = _context2.sent; + _context2.next = 7; + return put({ + type: 'save', + payload: { + data: response + } + }); + + case 7: + case "end": + return _context2.stop(); + } + } + }, getTestData); + }), + setUpdateIndex: /*#__PURE__*/regenerator_default.a.mark(function setUpdateIndex(_ref5, _ref6) { + var payload, call, put; + return regenerator_default.a.wrap(function setUpdateIndex$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return put({ + type: 'save', + payload: { + updateIndex: Math.random() + } + }); + + case 4: + case "end": + return _context3.stop(); + } + } + }, setUpdateIndex); + }), + getCommonData: /*#__PURE__*/regenerator_default.a.mark(function getCommonData(_ref7, _ref8) { + var payload, call, put, response; + return regenerator_default.a.wrap(function getCommonData$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return call(practiceSetting_getCommonData, payload); + + case 4: + response = _context4.sent; + _context4.next = 7; + return put({ + type: 'save', + payload: Object(objectSpread2["a" /* default */])({}, response.data) + }); + + case 7: + case "end": + return _context4.stop(); + } + } + }, getCommonData); + }), + setSideBarTabs: /*#__PURE__*/regenerator_default.a.mark(function setSideBarTabs(_ref9, _ref10) { + var payload, call, put; + return regenerator_default.a.wrap(function setSideBarTabs$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return put({ + type: 'sideBar', + payload: Object(objectSpread2["a" /* default */])({}, payload) + }); + + case 4: + case "end": + return _context5.stop(); + } + } + }, setSideBarTabs); + }) + }, + 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); + +/***/ }), + +/***/ "1eo0": +/*!************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "WdhL"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "LaBb"); + +// `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; + + +/***/ }), + +/***/ "1hJj": +/*!******************************************!*\ + !*** ./node_modules/lodash/_SetCache.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var MapCache = __webpack_require__(/*! ./_MapCache */ "e4Nc"), + setCacheAdd = __webpack_require__(/*! ./_setCacheAdd */ "ftKO"), + setCacheHas = __webpack_require__(/*! ./_setCacheHas */ "3A9y"); + +/** + * + * 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]); + } +} + +// Add methods to `SetCache`. +SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; +SetCache.prototype.has = setCacheHas; + +module.exports = SetCache; + + +/***/ }), + +/***/ "1oQm": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "g0jA"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "LaBb"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "2SaV"); +var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "8LUj"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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; + } +}); + + +/***/ }), + +/***/ "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, getJsonFromUrl, handleValidatorName, isPc, openNewWindow, setCookie, setDocumentTitle, setUrlQuery, setmiyah, trackEvent */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/checkbox/index.js because of ./src/components/User/PopLoginRegister/components/LoginPanel/LoginForm.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/.umi-production/umi.ts */ +/*! 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/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/modal/style/index.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/index.js because of ./src/components/User/PopLoginRegister/components/LoginPanel/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/row/style/index.js because of ./src/components/User/PopLoginRegister/components/LoginPanel/index.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/pages/Competitions/Detail/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__, "l", 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__, "r", function() { return /* binding */ setmiyah; }); +__webpack_require__.d(__webpack_exports__, "i", function() { return /* binding */ getCookie; }); +__webpack_require__.d(__webpack_exports__, "o", 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__, "q", function() { return /* binding */ setUrlQuery; }); +__webpack_require__.d(__webpack_exports__, "m", function() { return /* binding */ isPc; }); +__webpack_require__.d(__webpack_exports__, "n", function() { return /* binding */ openNewWindow; }); +__webpack_require__.d(__webpack_exports__, "g", function() { return /* binding */ downloadFile; }); +__webpack_require__.d(__webpack_exports__, "s", function() { return /* binding */ util_trackEvent; }); +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ util_bindPhone; }); +__webpack_require__.d(__webpack_exports__, "k", function() { return /* binding */ getJsonFromUrl; }); +__webpack_require__.d(__webpack_exports__, "p", 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, arrTrans + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules +var toConsumableArray = __webpack_require__("3S9h"); + +// 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/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// 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/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("v7Ap"); + +// 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/bundler-utils/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js +var arrayWithHoles = __webpack_require__("19ai"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +var iterableToArray = __webpack_require__("ZHpD"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +var unsupportedIterableToArray = __webpack_require__("0HTW"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js +var nonIterableRest = __webpack_require__("QHF7"); + +// CONCATENATED MODULE: ./node_modules/@umijs/bundler-utils/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 + + + + + + + + + + + + + + + + + + + + + + + + +; +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; + + var mapping = (_mapping = {}, Object(defineProperty["a" /* default */])(_mapping, -1, "重做中"), Object(defineProperty["a" /* default */])(_mapping, 0, "未开启"), Object(defineProperty["a" /* default */])(_mapping, 1, "未通关"), Object(defineProperty["a" /* default */])(_mapping, 2, "按时通关"), _mapping); + return mapping[status] || "迟交通关"; +}; +/** + *@教学课堂-作业列表状态 + *status为 number + */ + +var util_HomeWorkListStatus = function HomeWorkListStatus(props) { + var _wStatus, _wStatus$props$status, _wStatus$props$status2; + + var wStatus = (_wStatus = {}, Object(defineProperty["a" /* default */])(_wStatus, -1, { + name: '重做中', + class: 'c-orange' + }), Object(defineProperty["a" /* default */])(_wStatus, 0, { + name: '未开启', + class: 'c-black' + }), Object(defineProperty["a" /* default */])(_wStatus, 1, { + name: '未通关', + class: 'c-red' + }), Object(defineProperty["a" /* default */])(_wStatus, 2, { + name: '按时通关', + class: 'c-green' + }), Object(defineProperty["a" /* default */])(_wStatus, 3, { + name: '迟交通关', + class: 'c-orange' + }), _wStatus); + 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 _wStatus2, _wStatus$props$status3, _wStatus$props$status4; + + var wStatus = (_wStatus2 = {}, Object(defineProperty["a" /* default */])(_wStatus2, -1, { + name: '重做中', + class: 'c-orange', + color: '#999999' + }), Object(defineProperty["a" /* default */])(_wStatus2, 0, { + name: '未开启', + class: 'c-black', + color: '#999999' + }), Object(defineProperty["a" /* default */])(_wStatus2, 1, { + name: '未通关', + class: 'c-red', + color: '#d4443d' + }), Object(defineProperty["a" /* default */])(_wStatus2, 2, { + name: '按时通关', + class: 'c-green', + color: '#57be40' + }), Object(defineProperty["a" /* default */])(_wStatus2, 3, { + name: '迟交通关', + class: 'c-orange', + color: '#f09143' + }), _wStatus2); + 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 _wStatus3, _wStatus$props$status5, _wStatus$props$status6; + + var wStatus = (_wStatus3 = {}, Object(defineProperty["a" /* default */])(_wStatus3, -1, { + name: '重做中', + class: 'c-orange' + }), Object(defineProperty["a" /* default */])(_wStatus3, 0, { + name: '未提交', + class: 'c-black' + }), Object(defineProperty["a" /* default */])(_wStatus3, 1, { + name: '未通关', + class: 'c-red' + }), Object(defineProperty["a" /* default */])(_wStatus3, 2, { + name: '按时通关', + class: 'c-green' + }), Object(defineProperty["a" /* default */])(_wStatus3, 3, { + name: '迟交通关', + class: 'c-orange' + }), _wStatus3); + 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) { + (function () { + 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; + +(function (Type) { + Type["Number"] = "Number"; + Type["String"] = "String"; + Type["Boolean"] = "Boolean"; + Type["Object"] = "Object"; + Type["Array"] = "Array"; + Type["Function"] = "Function"; +})(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__*/regenerator_default.a.mark(function _callee(resolve, reject) { + var res; + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee2(v) { + var modal; + return regenerator_default.a.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 + +/***/ }), + +/***/ "24g4": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); + +// `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); + } +}); + + +/***/ }), + +/***/ "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); +} + +/***/ }), + +/***/ "26eR": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "Zz2s"); +var FORCED = __webpack_require__(/*! ../internals/object-prototype-accessors-forced */ "j9vu"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "OgNa"); +var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "fOfy"); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "sX0U"); +var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "GMoa").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)); + } + }); +} + + +/***/ }), + +/***/ "284h": +/*!***********************************************************************!*\ + !*** ./node_modules/@babel/runtime/helpers/interopRequireWildcard.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__(/*! @babel/runtime/helpers/typeof */ "cDf5")["default"]; + +function _getRequireWildcardCache(nodeInterop) { + if (typeof WeakMap !== "function") return null; + var cacheBabelInterop = new WeakMap(); + var cacheNodeInterop = new WeakMap(); + return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { + return nodeInterop ? cacheNodeInterop : cacheBabelInterop; + })(nodeInterop); +} + +function _interopRequireWildcard(obj, nodeInterop) { + if (!nodeInterop && obj && obj.__esModule) { + return obj; + } + + if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { + return { + "default": obj + }; + } + + var cache = _getRequireWildcardCache(nodeInterop); + + if (cache && cache.has(obj)) { + return cache.get(obj); + } + + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; + + for (var key in obj) { + if (key !== "default" && 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; +} + +module.exports = _interopRequireWildcard, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "29U/": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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; + +/***/ }), + +/***/ "2ADf": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "OgNa"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); +var getIteratorMethod = __webpack_require__(/*! ../internals/get-iterator-method */ "RMvK"); +var isArrayIteratorMethod = __webpack_require__(/*! ../internals/is-array-iterator-method */ "PD05"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "LaBb"); +var aTypedArrayConstructor = __webpack_require__(/*! ../internals/array-buffer-view-core */ "u0id").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; +}; + + +/***/ }), + +/***/ "2F86": +/*!**********************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "958M"); +var fails = __webpack_require__(/*! ../internals/fails */ "U+Zv"); +var classof = __webpack_require__(/*! ../internals/classof-raw */ "rzQM"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "LaBb"); +var html = __webpack_require__(/*! ../internals/html */ "ET62"); +var createElement = __webpack_require__(/*! ../internals/document-create-element */ "0IDy"); +var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "KmJO"); + +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 +}; + + +/***/ }), + +/***/ "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); + } + } + }; +} + +/***/ }), + +/***/ "2SaV": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "QGpR"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "lCTh"); + +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); +}; + + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "2Zvu": +/*!**************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var newPromiseCapabilityModule = __webpack_require__(/*! ../internals/new-promise-capability */ "mklA"); +var perform = __webpack_require__(/*! ../internals/perform */ "qTCW"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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; + } +}); + + +/***/ }), + +/***/ "2dSn": +/*!****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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); +}; + + +/***/ }), + +/***/ "2fFN": +/*!**************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "2dSn"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); + +// `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; +}; + + +/***/ }), + +/***/ "2gN3": +/*!********************************************!*\ + !*** ./node_modules/lodash/_coreJsData.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"); + +/** Used to detect overreaching core-js shims. */ +var coreJsData = root['__core-js_shared__']; + +module.exports = coreJsData; + + +/***/ }), + +/***/ "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)); +}; + + +/***/ }), + +/***/ "2mGj": +/*!************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "g0jA"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "3ss7"); +var create = __webpack_require__(/*! ../internals/object-create */ "Lb4M"); +var bind = __webpack_require__(/*! ../internals/function-bind */ "XeW7"); +var fails = __webpack_require__(/*! ../internals/fails */ "U+Zv"); + +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; + } +}); + + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "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 + + + +/***/ }), + +/***/ 3: +/*!******************************!*\ + !*** min-document (ignored) ***! + \******************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/* (ignored) */ + +/***/ }), + +/***/ "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"))) + +/***/ }), + +/***/ "3A9y": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_setCacheHas.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * 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); +} + +module.exports = setCacheHas; + + +/***/ }), + +/***/ "3BUn": +/*!****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "Zz2s"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "iiUP"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "fOfy"); + +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; +}; + + +/***/ }), + +/***/ "3Fdi": +/*!******************************************!*\ + !*** ./node_modules/lodash/_toSource.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 funcProto = Function.prototype; + +/** Used to resolve the decompiled source of functions. */ +var funcToString = funcProto.toString; + +/** + * 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 ''; +} + +module.exports = toSource; + + +/***/ }), + +/***/ "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); + +/***/ }), + +/***/ "3S9h": +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules ***! + \********************************************************************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js because of ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js because of ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelper.js */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; + +// EXPORTS +__webpack_require__.d(__webpack_exports__, "a", function() { return /* binding */ _toConsumableArray; }); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js +var arrayLikeToArray = __webpack_require__("qM61"); + +// CONCATENATED MODULE: ./node_modules/@umijs/bundler-utils/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/bundler-utils/node_modules/@babel/runtime/helpers/esm/iterableToArray.js +var iterableToArray = __webpack_require__("ZHpD"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js +var unsupportedIterableToArray = __webpack_require__("0HTW"); + +// CONCATENATED MODULE: ./node_modules/@umijs/bundler-utils/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/bundler-utils/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(); +} + +/***/ }), + +/***/ "3Uc2": +/*!****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); + +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; + } +}); + + +/***/ }), + +/***/ "3blH": +/*!******************************************!*\ + !*** ./src/models/competitions/index.ts ***! + \******************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator */ "c1Ei"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "XEnU"); +/* harmony import */ var _service_competitions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/service/competitions */ "hJwl"); + + + +var CompetitionsModel = { + namespace: 'competitions', + state: { + name: '', + loading: true, + listParams: { + page: 1, + //第一页开始 + per_page: 20, + category: "" + }, + competitions: [], + count: '' + }, + effects: { + // 获取页面数据 + getList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getList(_ref, _ref2) { + var payload, call, put, listParams, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getList$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload; + call = _ref2.call, put = _ref2.put; + listParams = payload; + _context.next = 5; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getCompetitionsList */ "x"], payload); + + case 5: + response = _context.sent; + _context.next = 8; + return put({ + type: "save", + payload: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({ + listParams: listParams + }, response) + }); + + case 8: + return _context.abrupt("return", response); + + case 9: + case "end": + return _context.stop(); + } + } + }, getList); + }), + //提交学生数据 + addApplytojoincourse: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function addApplytojoincourse(_ref3, _ref4) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function addApplytojoincourse$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload, callback = _ref3.callback; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* addApplytojoincourse */ "t"], payload); + + case 4: + response = _context2.sent; + return _context2.abrupt("return", response); + + case 6: + case "end": + return _context2.stop(); + } + } + }, addApplytojoincourse); + }), + //报名 + competitionTeams: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function competitionTeams(_ref5, _ref6) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function competitionTeams$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload, callback = _ref5.callback; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* competitionTeams */ "u"], payload); + + case 4: + response = _context3.sent; + return _context3.abrupt("return", response); + + case 6: + case "end": + return _context3.stop(); + } + } + }, competitionTeams); + }), + //获取限制 + getStaff: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getStaff(_ref7, _ref8) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getStaff$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload, callback = _ref7.callback; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getStaff */ "C"], payload); + + case 4: + response = _context4.sent; + return _context4.abrupt("return", response); + + case 6: + case "end": + return _context4.stop(); + } + } + }, getStaff); + }), + //获取头部信息 + getHeader: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getHeader(_ref9, _ref10) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getHeader$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload, callback = _ref9.callback; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getHeader */ "z"], payload); + + case 4: + response = _context5.sent; + return _context5.abrupt("return", response); + + case 6: + case "end": + return _context5.stop(); + } + } + }, getHeader); + }), + //获取竞赛底部item信息 + getItem: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getItem(_ref11, _ref12) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getItem$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + payload = _ref11.payload, callback = _ref11.callback; + call = _ref12.call, put = _ref12.put; + _context6.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getItem */ "A"], payload); + + case 4: + response = _context6.sent; + return _context6.abrupt("return", response); + + case 6: + case "end": + return _context6.stop(); + } + } + }, getItem); + }), + //修改item updateMdContent + updateMdContent: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function updateMdContent(_ref13, _ref14) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function updateMdContent$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + payload = _ref13.payload, callback = _ref13.callback; + call = _ref14.call, put = _ref14.put; + _context7.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* updateMdContent */ "J"], payload); + + case 4: + response = _context7.sent; + return _context7.abrupt("return", response); + + case 6: + case "end": + return _context7.stop(); + } + } + }, updateMdContent); + }), + //获取战队列表 + getTeamList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getTeamList(_ref15, _ref16) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getTeamList$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + payload = _ref15.payload, callback = _ref15.callback; + call = _ref16.call, put = _ref16.put; + _context8.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getTeamList */ "G"], payload); + + case 4: + response = _context8.sent; + return _context8.abrupt("return", response); + + case 6: + case "end": + return _context8.stop(); + } + } + }, getTeamList); + }), + //获取战队头像 Edit + getTeamDetail: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getTeamDetail(_ref17, _ref18) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getTeamDetail$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + payload = _ref17.payload, callback = _ref17.callback; + call = _ref18.call, put = _ref18.put; + _context9.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getTeamDetail */ "F"], payload); + + case 4: + response = _context9.sent; + return _context9.abrupt("return", response); + + case 6: + case "end": + return _context9.stop(); + } + } + }, getTeamDetail); + }), + //修改战队信息 + UpTeam: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function UpTeam(_ref19, _ref20) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function UpTeam$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + payload = _ref19.payload, callback = _ref19.callback; + call = _ref20.call, put = _ref20.put; + _context10.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* UpTeam */ "s"], payload); + + case 4: + response = _context10.sent; + return _context10.abrupt("return", response); + + case 6: + case "end": + return _context10.stop(); + } + } + }, UpTeam); + }), + //删除战队 + DeleteTeam: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function DeleteTeam(_ref21, _ref22) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function DeleteTeam$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + payload = _ref21.payload, callback = _ref21.callback; + call = _ref22.call, put = _ref22.put; + _context11.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* DeleteTeam */ "f"], payload); + + case 4: + response = _context11.sent; + return _context11.abrupt("return", response); + + case 6: + case "end": + return _context11.stop(); + } + } + }, DeleteTeam); + }), + //退出战队 ExitTeam + ExitTeam: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function ExitTeam(_ref23, _ref24) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function ExitTeam$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + payload = _ref23.payload, callback = _ref23.callback; + call = _ref24.call, put = _ref24.put; + _context12.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* ExitTeam */ "h"], payload); + + case 4: + response = _context12.sent; + return _context12.abrupt("return", response); + + case 6: + case "end": + return _context12.stop(); + } + } + }, ExitTeam); + }), + //新增战队 AddTeam + AddTeam: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function AddTeam(_ref25, _ref26) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function AddTeam$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + payload = _ref25.payload, callback = _ref25.callback; + call = _ref26.call, put = _ref26.put; + _context13.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* AddTeam */ "b"], payload); + + case 4: + response = _context13.sent; + return _context13.abrupt("return", response); + + case 6: + case "end": + return _context13.stop(); + } + } + }, AddTeam); + }), + //加入战队 JoinTeam + JoinTeam: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function JoinTeam(_ref27, _ref28) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function JoinTeam$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + payload = _ref27.payload, callback = _ref27.callback; + call = _ref28.call, put = _ref28.put; + _context14.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* JoinTeam */ "j"], payload); + + case 4: + response = _context14.sent; + return _context14.abrupt("return", response); + + case 6: + case "end": + return _context14.stop(); + } + } + }, JoinTeam); + }), + // 签署CLA协议 + SignCLA: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function SignCLA(_ref29, _ref30) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function SignCLA$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + payload = _ref29.payload, callback = _ref29.callback; + call = _ref30.call, put = _ref30.put; + _context15.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* SignCLA */ "p"], payload); + + case 4: + response = _context15.sent; + return _context15.abrupt("return", response); + + case 6: + case "end": + return _context15.stop(); + } + } + }, SignCLA); + }), + // 获取kylin竞赛ID + GetKylinId: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function GetKylinId(_ref31, _ref32) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function GetKylinId$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + payload = _ref31.payload, callback = _ref31.callback; + call = _ref32.call, put = _ref32.put; + _context16.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* GetKylinId */ "i"], payload); + + case 4: + response = _context16.sent; + return _context16.abrupt("return", response); + + case 6: + case "end": + return _context16.stop(); + } + } + }, GetKylinId); + }), + //查找老师 getTeacher + getTeacher: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getTeacher(_ref33, _ref34) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getTeacher$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + payload = _ref33.payload, callback = _ref33.callback; + call = _ref34.call, put = _ref34.put; + _context17.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getTeacher */ "E"], payload); + + case 4: + response = _context17.sent; + return _context17.abrupt("return", response); + + case 6: + case "end": + return _context17.stop(); + } + } + }, getTeacher); + }), + //查找学生 getStudents + getStudents: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getStudents(_ref35, _ref36) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getStudents$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + payload = _ref35.payload, callback = _ref35.callback; + call = _ref36.call, put = _ref36.put; + _context18.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getStudents */ "D"], payload); + + case 4: + response = _context18.sent; + return _context18.abrupt("return", response); + + case 6: + case "end": + return _context18.stop(); + } + } + }, getStudents); + }), + //提交战队成员 SubmitTeam + SubmitTeam: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function SubmitTeam(_ref37, _ref38) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function SubmitTeam$(_context19) { + while (1) { + switch (_context19.prev = _context19.next) { + case 0: + payload = _ref37.payload, callback = _ref37.callback; + call = _ref38.call, put = _ref38.put; + _context19.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* SubmitTeam */ "q"], payload); + + case 4: + response = _context19.sent; + return _context19.abrupt("return", response); + + case 6: + case "end": + return _context19.stop(); + } + } + }, SubmitTeam); + }), + //领取代金劵 Reward + Reward: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function Reward(_ref39, _ref40) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function Reward$(_context20) { + while (1) { + switch (_context20.prev = _context20.next) { + case 0: + payload = _ref39.payload, callback = _ref39.callback; + call = _ref40.call, put = _ref40.put; + _context20.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* Reward */ "o"], payload); + + case 4: + response = _context20.sent; + return _context20.abrupt("return", response); + + case 6: + case "end": + return _context20.stop(); + } + } + }, Reward); + }), + //获取排行榜头部 ChartRules + ChartRules: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function ChartRules(_ref41, _ref42) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function ChartRules$(_context21) { + while (1) { + switch (_context21.prev = _context21.next) { + case 0: + payload = _ref41.payload, callback = _ref41.callback; + call = _ref42.call, put = _ref42.put; + _context21.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* ChartRules */ "d"], payload); + + case 4: + response = _context21.sent; + return _context21.abrupt("return", response); + + case 6: + case "end": + return _context21.stop(); + } + } + }, ChartRules); + }), + //获取战队信息 Charts + Charts: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function Charts(_ref43, _ref44) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function Charts$(_context22) { + while (1) { + switch (_context22.prev = _context22.next) { + case 0: + payload = _ref43.payload, callback = _ref43.callback; + call = _ref44.call, put = _ref44.put; + _context22.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* Charts */ "e"], payload); + + case 4: + response = _context22.sent; + return _context22.abrupt("return", response); + + case 6: + case "end": + return _context22.stop(); + } + } + }, Charts); + }), + //获取战队信息 TabResults + TabResults: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function TabResults(_ref45, _ref46) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function TabResults$(_context23) { + while (1) { + switch (_context23.prev = _context23.next) { + case 0: + payload = _ref45.payload, callback = _ref45.callback; + call = _ref46.call, put = _ref46.put; + _context23.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* TabResults */ "r"], payload); + + case 4: + response = _context23.sent; + return _context23.abrupt("return", response); + + case 6: + case "end": + return _context23.stop(); + } + } + }, TabResults); + }), + //获取战队信息 Results + Results: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function Results(_ref47, _ref48) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function Results$(_context24) { + while (1) { + switch (_context24.prev = _context24.next) { + case 0: + payload = _ref47.payload, callback = _ref47.callback; + call = _ref48.call, put = _ref48.put; + _context24.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* Results */ "n"], payload); + + case 4: + response = _context24.sent; + return _context24.abrupt("return", response); + + case 6: + case "end": + return _context24.stop(); + } + } + }, Results); + }), + //获取获奖证书 Prize + Prize: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function Prize(_ref49, _ref50) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function Prize$(_context25) { + while (1) { + switch (_context25.prev = _context25.next) { + case 0: + payload = _ref49.payload, callback = _ref49.callback; + call = _ref50.call, put = _ref50.put; + _context25.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* Prize */ "l"], payload); + + case 4: + response = _context25.sent; + return _context25.abrupt("return", response); + + case 6: + case "end": + return _context25.stop(); + } + } + }, Prize); + }), + //获取用户信息 Accounts + Accounts: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function Accounts(_ref51, _ref52) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function Accounts$(_context26) { + while (1) { + switch (_context26.prev = _context26.next) { + case 0: + payload = _ref51.payload, callback = _ref51.callback; + call = _ref52.call, put = _ref52.put; + _context26.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* Accounts */ "a"], payload); + + case 4: + response = _context26.sent; + return _context26.abrupt("return", response); + + case 6: + case "end": + return _context26.stop(); + } + } + }, Accounts); + }), + //获取验证码 getVerification + getVerification: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getVerification(_ref53, _ref54) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getVerification$(_context27) { + while (1) { + switch (_context27.prev = _context27.next) { + case 0: + payload = _ref53.payload, callback = _ref53.callback; + call = _ref54.call, put = _ref54.put; + _context27.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getVerification */ "H"], payload); + + case 4: + response = _context27.sent; + return _context27.abrupt("return", response); + + case 6: + case "end": + return _context27.stop(); + } + } + }, getVerification); + }), + //绑定手机 + PhoneBind: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function PhoneBind(_ref55, _ref56) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function PhoneBind$(_context28) { + while (1) { + switch (_context28.prev = _context28.next) { + case 0: + payload = _ref55.payload, callback = _ref55.callback; + call = _ref56.call, put = _ref56.put; + _context28.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* PhoneBind */ "k"], payload); + + case 4: + response = _context28.sent; + return _context28.abrupt("return", response); + + case 6: + case "end": + return _context28.stop(); + } + } + }, PhoneBind); + }), + //绑定邮箱 + EmailBind: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function EmailBind(_ref57, _ref58) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function EmailBind$(_context29) { + while (1) { + switch (_context29.prev = _context29.next) { + case 0: + payload = _ref57.payload, callback = _ref57.callback; + call = _ref58.call, put = _ref58.put; + _context29.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* EmailBind */ "g"], payload); + + case 4: + response = _context29.sent; + return _context29.abrupt("return", response); + + case 6: + case "end": + return _context29.stop(); + } + } + }, EmailBind); + }), + //撤销认证 Authentication, Professional + Authentication: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function Authentication(_ref59, _ref60) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function Authentication$(_context30) { + while (1) { + switch (_context30.prev = _context30.next) { + case 0: + payload = _ref59.payload, callback = _ref59.callback; + call = _ref60.call, put = _ref60.put; + _context30.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* Authentication */ "c"], payload); + + case 4: + response = _context30.sent; + return _context30.abrupt("return", response); + + case 6: + case "end": + return _context30.stop(); + } + } + }, Authentication); + }), + Professional: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function Professional(_ref61, _ref62) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function Professional$(_context31) { + while (1) { + switch (_context31.prev = _context31.next) { + case 0: + payload = _ref61.payload, callback = _ref61.callback; + call = _ref62.call, put = _ref62.put; + _context31.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* Professional */ "m"], payload); + + case 4: + response = _context31.sent; + return _context31.abrupt("return", response); + + case 6: + case "end": + return _context31.stop(); + } + } + }, Professional); + }), + //提交银行卡信息 + setleader: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function setleader(_ref63, _ref64) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function setleader$(_context32) { + while (1) { + switch (_context32.prev = _context32.next) { + case 0: + payload = _ref63.payload, callback = _ref63.callback; + call = _ref64.call, put = _ref64.put; + _context32.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* setleader */ "I"], payload); + + case 4: + response = _context32.sent; + return _context32.abrupt("return", response); + + case 6: + case "end": + return _context32.stop(); + } + } + }, setleader); + }), + //获取实训 getShixun + getShixun: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getShixun(_ref65, _ref66) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getShixun$(_context33) { + while (1) { + switch (_context33.prev = _context33.next) { + case 0: + payload = _ref65.payload, callback = _ref65.callback; + call = _ref66.call, put = _ref66.put; + _context33.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getShixun */ "B"], payload); + + case 4: + response = _context33.sent; + return _context33.abrupt("return", response); + + case 6: + case "end": + return _context33.stop(); + } + } + }, getShixun); + }), + //获取课堂 getCourse + getCourse: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getCourse(_ref67, _ref68) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getCourse$(_context34) { + while (1) { + switch (_context34.prev = _context34.next) { + case 0: + payload = _ref67.payload, callback = _ref67.callback; + call = _ref68.call, put = _ref68.put; + _context34.next = 4; + return call(_service_competitions__WEBPACK_IMPORTED_MODULE_2__[/* getCourse */ "y"], payload); + + case 4: + response = _context34.sent; + return _context34.abrupt("return", response); + + case 6: + case "end": + return _context34.stop(); + } + } + }, getCourse); + }) + }, + reducers: { + save: function save(state, action) { + // console.log("reducers:",state,action) + return Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, state), action.payload); + } + }, + subscriptions: { + setup: function setup(_ref69) { + var dispatch = _ref69.dispatch, + history = _ref69.history; + // console.log("subscriptions:", dispatch, history) + return history.listen(function (_ref70) { + var pathname = _ref70.pathname; + + if (pathname === '/') { + dispatch({ + type: 'query' + }); + } + }); + } + } +}; +/* harmony default export */ __webpack_exports__["a"] = (CompetitionsModel); + +/***/ }), + +/***/ "3c9i": +/*!****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "VP+0"); +var uid = __webpack_require__(/*! ../internals/uid */ "zfw1"); + +var keys = shared('keys'); + +module.exports = function (key) { + return keys[key] || (keys[key] = uid(key)); +}; + + +/***/ }), + +/***/ "3ss7": +/*!***************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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'; +}; + + +/***/ }), + +/***/ "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(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; +} + +module.exports = _objectSpread2, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "3w5w": +/*!******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "OgNa"); +var nativeKeys = __webpack_require__(/*! ../internals/object-keys */ "S9I0"); +var fails = __webpack_require__(/*! ../internals/fails */ "U+Zv"); + +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)); + } +}); + + +/***/ }), + +/***/ "47nA": +/*!************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "z1My"); + +var iterableToArrayLimit = __webpack_require__(/*! ./iterableToArrayLimit */ "vFg2"); + +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "rJ5X"); + +var nonIterableRest = __webpack_require__(/*! ./nonIterableRest */ "cWUD"); + +function _slicedToArray(arr, i) { + return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); +} + +module.exports = _slicedToArray; + +/***/ }), + +/***/ "49sm": +/*!***************************************!*\ + !*** ./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]'; +}; + + +/***/ }), + +/***/ "4II6": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "VLVd"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "AF8d"); +var advanceStringIndex = __webpack_require__(/*! ../internals/advance-string-index */ "nP4m"); +var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "1FR7"); + +// @@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; + } + ]; +}); + + +/***/ }), + +/***/ "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, + + /** + * 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, + + /** + * PAGE_DOWN + */ + PAGE_DOWN: 34, + + /** + * END + */ + END: 35, + + /** + * HOME + */ + HOME: 36, + + /** + * LEFT + */ + LEFT: 37, + + /** + * UP + */ + UP: 38, + + /** + * RIGHT + */ + RIGHT: 39, + + /** + * DOWN + */ + DOWN: 40, + + /** + * PRINT_SCREEN + */ + PRINT_SCREEN: 44, + + /** + * INSERT + */ + INSERT: 45, + + /** + * DELETE + */ + DELETE: 46, + + /** + * 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, + + /** + * 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_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, + + /** + * DASH + */ + DASH: 189, + + /** + * EQUALS + */ + EQUALS: 187, + + /** + * COMMA + */ + COMMA: 188, + + /** + * PERIOD + */ + PERIOD: 190, + + /** + * SLASH + */ + SLASH: 191, + + /** + * APOSTROPHE + */ + APOSTROPHE: 192, + + /** + * SINGLE_QUOTE + */ + SINGLE_QUOTE: 222, + + /** + * OPEN_SQUARE_BRACKET + */ + OPEN_SQUARE_BRACKET: 219, + + /** + * BACKSLASH + */ + BACKSLASH: 220, + + /** + * CLOSE_SQUARE_BRACKET + */ + CLOSE_SQUARE_BRACKET: 221, + + /** + * WIN_KEY + */ + WIN_KEY: 224, + + /** + * MAC_FF_META + */ + MAC_FF_META: 224, + + /** + * 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 || 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 + +/***/ }), + +/***/ "4Qem": +/*!****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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; + +/***/ }), + +/***/ "4QhF": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "Zz2s"); +var FORCED = __webpack_require__(/*! ../internals/object-prototype-accessors-forced */ "j9vu"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "OgNa"); +var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "fOfy"); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "sX0U"); +var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "GMoa").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)); + } + }); +} + + +/***/ }), + +/***/ "4R4O": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "LaBb"); +var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "vFgh"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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; + } +}); + + +/***/ }), + +/***/ "4jIl": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/createSuper.js + 5 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 */ _createSuper; }); + +// CONCATENATED MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js +function _getPrototypeOf(o) { + _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { + return o.__proto__ || Object.getPrototypeOf(o); + }; + return _getPrototypeOf(o); +} +// CONCATENATED MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js +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; + } +} +// CONCATENATED MODULE: ./node_modules/@umijs/bundler-utils/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/bundler-utils/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/bundler-utils/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); +} +// CONCATENATED MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/createSuper.js + + + +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); + }; +} + +/***/ }), + +/***/ "4kuk": +/*!**************************************!*\ + !*** ./node_modules/lodash/_Hash.js ***! + \**************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var hashClear = __webpack_require__(/*! ./_hashClear */ "SfRM"), + hashDelete = __webpack_require__(/*! ./_hashDelete */ "Hvzi"), + hashGet = __webpack_require__(/*! ./_hashGet */ "u8Dt"), + hashHas = __webpack_require__(/*! ./_hashHas */ "ekgI"), + hashSet = __webpack_require__(/*! ./_hashSet */ "JSQU"); + +/** + * 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]); + } +} + +// Add methods to `Hash`. +Hash.prototype.clear = hashClear; +Hash.prototype['delete'] = hashDelete; +Hash.prototype.get = hashGet; +Hash.prototype.has = hashHas; +Hash.prototype.set = hashSet; + +module.exports = Hash; + + +/***/ }), + +/***/ "4obI": +/*!****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "OgNa"); +var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "bLU8"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); + +// `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; +}; + + +/***/ }), + +/***/ "4otd": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "2Zvu"); + + +/***/ }), + +/***/ "4ozY": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qVUr"); + + +/***/ }), + +/***/ "4rco": +/*!**************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "958M"); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "ewN9"); +var has = __webpack_require__(/*! ../internals/has */ "O29V"); +var setGlobal = __webpack_require__(/*! ../internals/set-global */ "Wd9i"); +var inspectSource = __webpack_require__(/*! ../internals/inspect-source */ "hTvs"); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "tY+O"); + +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); +}); + + +/***/ }), + +/***/ "54ty": +/*!********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var $values = __webpack_require__(/*! ../internals/object-to-array */ "sLr6").values; + +// `Object.values` method +// https://tc39.github.io/ecma262/#sec-object.values +$({ target: 'Object', stat: true }, { + values: function values(O) { + return $values(O); + } +}); + + +/***/ }), + +/***/ "56Rm": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "PxuC"); +var WeakMap = __webpack_require__(/*! ../modules/es.weak-map */ "LMWd"); +var shared = __webpack_require__(/*! ../internals/shared */ "VP+0"); + +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 +}; + + +/***/ }), + +/***/ "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 + +/***/ }), + +/***/ "5FVT": +/*!*************************************!*\ + !*** ./src/models/forums/detail.ts ***! + \*************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator */ "c1Ei"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "XEnU"); +/* harmony import */ var _service_forums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/service/forums */ "h+Ho"); + + + +var ForumsDetailModal = { + namespace: 'forumsDetail', + state: { + forumsDetailData: {} + }, + effects: { + getForumsDetailData: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function getForumsDetailData(_ref, _ref2) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function getForumsDetailData$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload; + call = _ref2.call, put = _ref2.put; + _context.next = 4; + return call(_service_forums__WEBPACK_IMPORTED_MODULE_2__[/* getForumsDetailData */ "b"], payload); + + case 4: + response = _context.sent; + _context.next = 7; + return put({ + type: "save", + payload: { + forumsDetailData: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context.abrupt("return", response); + + case 8: + case "end": + return _context.stop(); + } + } + }, getForumsDetailData); + }), + setForumsDetailData: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function setForumsDetailData(_ref3, _ref4) { + var payload, call, put; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function setForumsDetailData$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return put({ + type: "save", + payload: { + forumsDetailData: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, payload) + } + }); + + case 4: + case "end": + return _context2.stop(); + } + } + }, setForumsDetailData); + }) + }, + reducers: { + save: function save(state, action) { + return Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])(Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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); + +/***/ }), + +/***/ "5Tp6": +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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); + }); + }; +} + +/***/ }), + +/***/ "5e1S": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var $includes = __webpack_require__(/*! ../internals/array-includes */ "J19E").includes; +var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "pWpj"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "MRyO"); + +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'); + + +/***/ }), + +/***/ "5eJQ": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); + +// `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; + } +}); + + +/***/ }), + +/***/ "5mCs": +/*!****************************************!*\ + !*** ./src/models/classrooms/index.ts ***! + \****************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/toConsumableArray */ "3S9h"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator */ "c1Ei"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "XEnU"); +/* harmony import */ var _service_classrooms__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/service/classrooms */ "oUNq"); + + + + +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: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroom(_ref, _ref2) { + var payload, call, put, listParams, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroom$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload; + call = _ref2.call, put = _ref2.put; + listParams = payload; + _context.next = 5; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomList */ "B"], payload); + + case 5: + response = _context.sent; + _context.next = 8; + return put({ + type: 'save', + payload: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({ + listParams: listParams + }, response) + }); + + case 8: + return _context.abrupt("return", response); + + case 9: + case "end": + return _context.stop(); + } + } + }, getClassroom); + }), + // 教学课堂详情头部信息 + getClassroomTopBanner: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomTopBanner(_ref3, _ref4) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomTopBanner$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomTopBanner */ "F"], payload); + + case 4: + response = _context2.sent; + _context2.next = 7; + return put({ + type: 'save', + payload: { + detailTopBanner: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context2.stop(); + } + } + }, getClassroomTopBanner); + }), + // 教学客堂详情左侧banner + getClassroomLeftMenus: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomLeftMenus(_ref5, _ref6) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomLeftMenus$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomLeftMenus */ "A"], payload); + + case 4: + response = _context3.sent; + _context3.next = 7; + return put({ + type: 'save', + payload: { + detailLeftMenus: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context3.abrupt("return", response); + + case 8: + case "end": + return _context3.stop(); + } + } + }, getClassroomLeftMenus); + }), + //教学课堂详情-实训列表 + getClassroomShixunsList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomShixunsList(_ref7, _ref8) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomShixunsList$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomShixunsList */ "D"], payload); + + case 4: + response = _context4.sent; + _context4.next = 7; + return put({ + type: 'save', + payload: { + detailShixunsList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context4.stop(); + } + } + }, getClassroomShixunsList); + }), + //教学课堂详情-实训列表老师 + getClassroomTeacherShixunsList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomTeacherShixunsList(_ref9, _ref10) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomTeacherShixunsList$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomTeacherShixunsList */ "E"], payload); + + case 4: + response = _context5.sent; + _context5.next = 7; + return put({ + type: 'save', + payload: { + detailShixunsList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context5.abrupt("return", response); + + case 8: + case "end": + return _context5.stop(); + } + } + }, getClassroomTeacherShixunsList); + }), + //教学课堂详情-普通作业列表 + getClassroomCommonList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomCommonList(_ref11, _ref12) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomCommonList$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + payload = _ref11.payload; + call = _ref12.call, put = _ref12.put; + _context6.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomShixunsList */ "D"], payload); + + case 4: + response = _context6.sent; + _context6.next = 7; + return put({ + type: 'save', + payload: { + detailCommonHomeworksList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context6.stop(); + } + } + }, getClassroomCommonList); + }), + //教学课堂详情-普通作业列表老师 + getClassroomTeacherCommonList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomTeacherCommonList(_ref13, _ref14) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomTeacherCommonList$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + payload = _ref13.payload; + call = _ref14.call, put = _ref14.put; + _context7.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomTeacherShixunsList */ "E"], payload); + + case 4: + response = _context7.sent; + _context7.next = 7; + return put({ + type: 'save', + payload: { + detailCommonHomeworksList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context7.abrupt("return", response); + + case 8: + case "end": + return _context7.stop(); + } + } + }, getClassroomTeacherCommonList); + }), + //教学课堂详情-毕业设计-毕设选题 + getClassroomGraduationTopicsList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomGraduationTopicsList(_ref15, _ref16) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomGraduationTopicsList$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + payload = _ref15.payload; + call = _ref16.call, put = _ref16.put; + _context8.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomGraduationTopicsList */ "z"], payload); + + case 4: + response = _context8.sent; + _context8.next = 7; + return put({ + type: 'save', + payload: { + detailGraduationTopicsList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context8.stop(); + } + } + }, getClassroomGraduationTopicsList); + }), + //教学课堂详情-毕业设计-毕设任务 + getClassroomGraduationTaskList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomGraduationTaskList(_ref17, _ref18) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomGraduationTaskList$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + payload = _ref17.payload; + call = _ref18.call, put = _ref18.put; + _context9.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomGraduationTaskList */ "y"], payload); + + case 4: + response = _context9.sent; + _context9.next = 7; + return put({ + type: 'save', + payload: { + detailGraduationTaskList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context9.stop(); + } + } + }, getClassroomGraduationTaskList); + }), + //教学课堂详情-试卷 + getClassroomExercisesList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomExercisesList(_ref19, _ref20) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomExercisesList$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + payload = _ref19.payload; + call = _ref20.call, put = _ref20.put; + _context10.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomExercisesList */ "x"], payload); + + case 4: + response = _context10.sent; + _context10.next = 7; + return put({ + type: 'save', + payload: { + detailExerciseList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context10.stop(); + } + } + }, getClassroomExercisesList); + }), + //教学课堂详情-问卷 + getClassroomPollsList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomPollsList(_ref21, _ref22) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomPollsList$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + payload = _ref21.payload; + call = _ref22.call, put = _ref22.put; + _context11.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomPollsList */ "C"], payload); + + case 4: + response = _context11.sent; + _context11.next = 7; + return put({ + type: 'save', + payload: { + detailPollsList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context11.stop(); + } + } + }, getClassroomPollsList); + }), + // 教学课堂-获取课堂班级 + getCourseGroups: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getCourseGroups(_ref23, _ref24) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getCourseGroups$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + payload = _ref23.payload; + call = _ref24.call, put = _ref24.put; + _context12.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getCourseGroups */ "H"], payload); + + case 4: + response = _context12.sent; + _context12.next = 7; + return put({ + type: 'save', + payload: { + courseGroups: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context12.stop(); + } + } + }, getCourseGroups); + }), + // 教学课堂-获取课堂班级 + getAllCourseGroup: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getAllCourseGroup(_ref25, _ref26) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getAllCourseGroup$(_context13) { + while (1) { + switch (_context13.prev = _context13.next) { + case 0: + payload = _ref25.payload; + call = _ref26.call, put = _ref26.put; + _context13.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getAllCourseGroup */ "o"], payload); + + case 4: + response = _context13.sent; + _context13.next = 7; + return put({ + type: 'save', + payload: { + allCourseGroups: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context13.stop(); + } + } + }, getAllCourseGroup); + }), + // 教学课堂 - 普通作业 + getClassroomCommonHomeworksList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomCommonHomeworksList(_ref27, _ref28) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomCommonHomeworksList$(_context14) { + while (1) { + switch (_context14.prev = _context14.next) { + case 0: + payload = _ref27.payload; + call = _ref28.call, put = _ref28.put; + _context14.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomCommonHomeworksList */ "w"], payload); + + case 4: + response = _context14.sent; + _context14.next = 7; + return put({ + type: 'save', + payload: { + detailCommonHomeworksList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context14.stop(); + } + } + }, getClassroomCommonHomeworksList); + }), + // 教学课堂 - 签到 + getClassroomAttendancesList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomAttendancesList(_ref29, _ref30) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomAttendancesList$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + payload = _ref29.payload; + call = _ref30.call, put = _ref30.put; + _context15.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomAttendancesList */ "u"], payload); + + case 4: + response = _context15.sent; + _context15.next = 7; + return put({ + type: 'save', + payload: { + detailAttendancesList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context15.stop(); + } + } + }, getClassroomAttendancesList); + }), + // 教学课堂 - 签到统计 + getClassroomAttendancesStatistic: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getClassroomAttendancesStatistic(_ref31, _ref32) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getClassroomAttendancesStatistic$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + payload = _ref31.payload; + call = _ref32.call, put = _ref32.put; + _context16.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getClassroomAttendancesStatistic */ "v"], payload); + + case 4: + response = _context16.sent; + _context16.next = 7; + return put({ + type: 'save', + payload: { + detailAttendancesStatistic: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context16.stop(); + } + } + }, getClassroomAttendancesStatistic); + }), + // 教学课堂 - 签到详情 + getAttendanceDetail: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getAttendanceDetail(_ref33, _ref34) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getAttendanceDetail$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + payload = _ref33.payload; + call = _ref34.call, put = _ref34.put; + _context17.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getAttendanceDetail */ "s"], payload); + + case 4: + response = _context17.sent; + _context17.next = 7; + return put({ + type: 'save', + payload: { + detailAttendancesDetail: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context17.abrupt("return", response); + + case 8: + case "end": + return _context17.stop(); + } + } + }, getAttendanceDetail); + }), + // 教学课堂 - 公告列表 + getAnnouncementList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getAnnouncementList(_ref35, _ref36) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getAnnouncementList$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + payload = _ref35.payload; + call = _ref36.call, put = _ref36.put; + _context18.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getAnnouncementList */ "q"], payload); + + case 4: + response = _context18.sent; + _context18.next = 7; + return put({ + type: 'save', + payload: { + detailAnnouncementList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context18.stop(); + } + } + }, getAnnouncementList); + }), + //教学课堂 - 资源 + getAttachmentList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getAttachmentList(_ref37, _ref38) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getAttachmentList$(_context19) { + while (1) { + switch (_context19.prev = _context19.next) { + case 0: + payload = _ref37.payload; + call = _ref38.call, put = _ref38.put; + _context19.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getAttachmentList */ "r"], payload); + + case 4: + response = _context19.sent; + _context19.next = 7; + return put({ + type: 'save', + payload: { + detailAttachmentList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response.data) + } + }); + + case 7: + case "end": + return _context19.stop(); + } + } + }, getAttachmentList); + }), + //教学课堂 - 资源 需求回滚 + getCourseware: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getCourseware(_ref39, _ref40) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getCourseware$(_context20) { + while (1) { + switch (_context20.prev = _context20.next) { + case 0: + payload = _ref39.payload; + call = _ref40.call, put = _ref40.put; + _context20.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getCourseware */ "O"], payload); + + case 4: + response = _context20.sent; + _context20.next = 7; + return put({ + type: 'save', + payload: { + detailCourseware: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response.data) + } + }); + + case 7: + case "end": + return _context20.stop(); + } + } + }, getCourseware); + }), + //教学课堂 - 视频 + getVideoList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getVideoList(_ref41, _ref42) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getVideoList$(_context21) { + while (1) { + switch (_context21.prev = _context21.next) { + case 0: + payload = _ref41.payload; + call = _ref42.call, put = _ref42.put; + _context21.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getVideoList */ "V"], payload); + + case 4: + response = _context21.sent; + _context21.next = 7; + return put({ + type: 'save', + payload: { + detailVideoList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context21.stop(); + } + } + }, getVideoList); + }), + //教学课堂 - 直播 + getLiveVideoList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getLiveVideoList(_ref43, _ref44) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getLiveVideoList$(_context22) { + while (1) { + switch (_context22.prev = _context22.next) { + case 0: + payload = _ref43.payload; + call = _ref44.call, put = _ref44.put; + _context22.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getLiveVideoList */ "Q"], payload); + + case 4: + response = _context22.sent; + _context22.next = 7; + return put({ + type: 'save', + payload: { + detailLiveVideoList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context22.stop(); + } + } + }, getLiveVideoList); + }), + // 教学课堂 我的课堂 + getCoursesMine: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getCoursesMine(_ref45, _ref46) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getCoursesMine$(_context23) { + while (1) { + switch (_context23.prev = _context23.next) { + case 0: + payload = _ref45.payload, callback = _ref45.callback; + call = _ref46.call, put = _ref46.put; + _context23.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getCoursesMine */ "N"], payload); + + case 4: + response = _context23.sent; + _context23.next = 7; + return put({ + type: 'save', + payload: { + courseMine: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context23.abrupt("return", response.data); + + case 8: + case "end": + return _context23.stop(); + } + } + }, getCoursesMine); + }), + // 教学课堂 讨论 + getBoardList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getBoardList(_ref47, _ref48) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getBoardList$(_context24) { + while (1) { + switch (_context24.prev = _context24.next) { + case 0: + payload = _ref47.payload, callback = _ref47.callback; + call = _ref48.call, put = _ref48.put; + _context24.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getBoardList */ "t"], payload); + + case 4: + response = _context24.sent; + _context24.next = 7; + return put({ + type: 'save', + payload: { + detailBoardList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response.data) + } + }); + + case 7: + return _context24.abrupt("return", response.data); + + case 8: + case "end": + return _context24.stop(); + } + } + }, getBoardList); + }), + // 教学课堂 分班 + getCourseGroupsList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getCourseGroupsList(_ref49, _ref50) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getCourseGroupsList$(_context25) { + while (1) { + switch (_context25.prev = _context25.next) { + case 0: + payload = _ref49.payload, callback = _ref49.callback; + call = _ref50.call, put = _ref50.put; + _context25.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getCourseGroupsList */ "I"], payload); + + case 4: + response = _context25.sent; + _context25.next = 7; + return put({ + type: 'save', + payload: { + detailCourseGroupsList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context25.abrupt("return", response); + + case 8: + case "end": + return _context25.stop(); + } + } + }, getCourseGroupsList); + }), + // 教学课堂- 学生列表 + getCourseStudentsList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getCourseStudentsList(_ref51, _ref52) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getCourseStudentsList$(_context26) { + while (1) { + switch (_context26.prev = _context26.next) { + case 0: + payload = _ref51.payload, callback = _ref51.callback; + call = _ref52.call, put = _ref52.put; + _context26.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getCourseStudentsList */ "K"], payload); + + case 4: + response = _context26.sent; + _context26.next = 7; + return put({ + type: 'save', + payload: { + detailCoursStudentsList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context26.abrupt("return", response.data); + + case 8: + case "end": + return _context26.stop(); + } + } + }, getCourseStudentsList); + }), + // 教学课堂 - 统计 + getCourseStatistics: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getCourseStatistics(_ref53, _ref54) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getCourseStatistics$(_context27) { + while (1) { + switch (_context27.prev = _context27.next) { + case 0: + payload = _ref53.payload, callback = _ref53.callback; + call = _ref54.call, put = _ref54.put; + _context27.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getCourseStatistics */ "J"], payload); + + case 4: + response = _context27.sent; + _context27.next = 7; + return put({ + type: 'save', + payload: { + detailCourseStatisticsList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context27.abrupt("return", response); + + case 8: + case "end": + return _context27.stop(); + } + } + }, getCourseStatistics); + }), + // 教学课堂 - 课堂活跃度 + getCourseActscore: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getCourseActscore(_ref55, _ref56) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getCourseActscore$(_context28) { + while (1) { + switch (_context28.prev = _context28.next) { + case 0: + payload = _ref55.payload, callback = _ref55.callback; + call = _ref56.call, put = _ref56.put; + _context28.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getCourseActscore */ "G"], payload); + + case 4: + response = _context28.sent; + _context28.next = 7; + return put({ + type: 'save', + payload: { + detailCourseActscore: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context28.abrupt("return", response); + + case 8: + case "end": + return _context28.stop(); + } + } + }, getCourseActscore); + }), + // 教学课堂 - 学生成绩 + getCourseWorkscore: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getCourseWorkscore(_ref57, _ref58) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getCourseWorkscore$(_context29) { + while (1) { + switch (_context29.prev = _context29.next) { + case 0: + payload = _ref57.payload, callback = _ref57.callback; + call = _ref58.call, put = _ref58.put; + _context29.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getCourseWorkscore */ "L"], payload); + + case 4: + response = _context29.sent; + _context29.next = 7; + return put({ + type: 'save', + payload: { + detailCourseWorkscore: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context29.abrupt("return", response); + + case 8: + case "end": + return _context29.stop(); + } + } + }, getCourseWorkscore); + }), + // 教学课堂 全部实训列表 + getShixunLists: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getShixunLists(_ref59, _ref60) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getShixunLists$(_context30) { + while (1) { + switch (_context30.prev = _context30.next) { + case 0: + payload = _ref59.payload, callback = _ref59.callback; + call = _ref60.call, put = _ref60.put; + _context30.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getShixunLists */ "U"], payload); + + case 4: + response = _context30.sent; + _context30.next = 7; + return put({ + type: 'save', + payload: { + shixunLists: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context30.abrupt("return", response); + + case 8: + case "end": + return _context30.stop(); + } + } + }, getShixunLists); + }), + // 从课堂实验添加 + getExperimentLists: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getExperimentLists(_ref61, _ref62) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getExperimentLists$(_context31) { + while (1) { + switch (_context31.prev = _context31.next) { + case 0: + payload = _ref61.payload, callback = _ref61.callback; + call = _ref62.call, put = _ref62.put; + _context31.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getExperimentLists */ "P"], payload); + + case 4: + response = _context31.sent; + _context31.next = 7; + return put({ + type: 'save', + payload: { + shixunLists: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context31.abrupt("return", response); + + case 8: + case "end": + return _context31.stop(); + } + } + }, getExperimentLists); + }), + getShixunAiRecommendLists: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getShixunAiRecommendLists(_ref63, _ref64) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getShixunAiRecommendLists$(_context32) { + while (1) { + switch (_context32.prev = _context32.next) { + case 0: + payload = _ref63.payload, callback = _ref63.callback; + call = _ref64.call, put = _ref64.put; + _context32.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getShixunAiRecommendLists */ "T"], payload); + + case 4: + response = _context32.sent; + _context32.next = 7; + return put({ + type: 'save', + payload: { + shixunAiRecommendLists: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context32.abrupt("return", response); + + case 8: + case "end": + return _context32.stop(); + } + } + }, getShixunAiRecommendLists); + }), + // 教学课堂 全部课程列表 + getCoursesLists: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getCoursesLists(_ref65, _ref66) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getCoursesLists$(_context33) { + while (1) { + switch (_context33.prev = _context33.next) { + case 0: + payload = _ref65.payload, callback = _ref65.callback; + call = _ref66.call, put = _ref66.put; + _context33.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getCoursesLists */ "M"], payload); + + case 4: + response = _context33.sent; + _context33.next = 7; + return put({ + type: 'save', + payload: { + coursesLists: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context33.abrupt("return", response); + + case 8: + case "end": + return _context33.stop(); + } + } + }, getCoursesLists); + }), + // 教学课堂 创建课程 + createCoursesHomework: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function createCoursesHomework(_ref67, _ref68) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function createCoursesHomework$(_context34) { + while (1) { + switch (_context34.prev = _context34.next) { + case 0: + payload = _ref67.payload, callback = _ref67.callback; + call = _ref68.call, put = _ref68.put; + _context34.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* createCoursesHomework */ "b"], payload); + + case 4: + response = _context34.sent; + return _context34.abrupt("return", response); + + case 6: + case "end": + return _context34.stop(); + } + } + }, createCoursesHomework); + }), + // 教学课堂 创建实训作业 + createShixunHomework: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function createShixunHomework(_ref69, _ref70) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function createShixunHomework$(_context35) { + while (1) { + switch (_context35.prev = _context35.next) { + case 0: + payload = _ref69.payload, callback = _ref69.callback; + call = _ref70.call, put = _ref70.put; + _context35.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* createShixunHomework */ "d"], payload); + + case 4: + response = _context35.sent; + return _context35.abrupt("return", response); + + case 6: + case "end": + return _context35.stop(); + } + } + }, createShixunHomework); + }), + // 教学课堂 创建实训作业 + createExperiment: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function createExperiment(_ref71, _ref72) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function createExperiment$(_context36) { + while (1) { + switch (_context36.prev = _context36.next) { + case 0: + payload = _ref71.payload, callback = _ref71.callback; + call = _ref72.call, put = _ref72.put; + _context36.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* createExperiment */ "c"], payload); + + case 4: + response = _context36.sent; + return _context36.abrupt("return", response); + + case 6: + case "end": + return _context36.stop(); + } + } + }, createExperiment); + }), + getSchoolList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getSchoolList(_ref73, _ref74) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getSchoolList$(_context37) { + while (1) { + switch (_context37.prev = _context37.next) { + case 0: + payload = _ref73.payload, callback = _ref73.callback; + call = _ref74.call, put = _ref74.put; + _context37.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getSchoolList */ "R"], payload); + + case 4: + response = _context37.sent; + _context37.next = 7; + return put({ + type: 'save', + payload: { + schoolList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response.school_names) + } + }); + + case 7: + return _context37.abrupt("return", response.school_names); + + case 8: + case "end": + return _context37.stop(); + } + } + }, getSchoolList); + }), + searchSchoolTeacherList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function searchSchoolTeacherList(_ref75, _ref76) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function searchSchoolTeacherList$(_context38) { + while (1) { + switch (_context38.prev = _context38.next) { + case 0: + payload = _ref75.payload, callback = _ref75.callback; + call = _ref76.call, put = _ref76.put; + _context38.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* searchSchoolTeacherList */ "X"], payload); + + case 4: + response = _context38.sent; + _context38.next = 7; + return put({ + type: 'save', + payload: { + searchMemberList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, response) + } + }); + + case 7: + return _context38.abrupt("return", response); + + case 8: + case "end": + return _context38.stop(); + } + } + }, searchSchoolTeacherList); + }), + // 教学课堂 全部课程列表 + getAllTaskList: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getAllTaskList(_ref77, _ref78) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getAllTaskList$(_context39) { + while (1) { + switch (_context39.prev = _context39.next) { + case 0: + payload = _ref77.payload, callback = _ref77.callback; + call = _ref78.call, put = _ref78.put; + _context39.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* getAllTasks */ "p"], payload); + + case 4: + response = _context39.sent; + _context39.next = 7; + return put({ + type: 'save', + payload: { + taskList: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_toConsumableArray__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(response.tasks) + } + }); + + case 7: + return _context39.abrupt("return", response); + + case 8: + case "end": + return _context39.stop(); + } + } + }, getAllTaskList); + }), + updateTaskPosition: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function updateTaskPosition(_ref79, _ref80) { + var payload, callback, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function updateTaskPosition$(_context40) { + while (1) { + switch (_context40.prev = _context40.next) { + case 0: + payload = _ref79.payload, callback = _ref79.callback; + call = _ref80.call, put = _ref80.put; + _context40.next = 4; + return call(_service_classrooms__WEBPACK_IMPORTED_MODULE_3__[/* updateTaskPosition */ "Z"], payload); + + case 4: + response = _context40.sent; + _context40.next = 7; + return put({ + type: 'save', + payload: { + actionTabs: { + key: '' + } + } + }); + + case 7: + return _context40.abrupt("return", response); + + case 8: + case "end": + return _context40.stop(); + } + } + }, updateTaskPosition); + }), + // 设置操做action + setActionTabs: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function setActionTabs(_ref81, _ref82) { + var payload, call, put; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function setActionTabs$(_context41) { + while (1) { + switch (_context41.prev = _context41.next) { + case 0: + payload = _ref81.payload; + call = _ref82.call, put = _ref82.put; + _context41.next = 4; + return put({ + type: 'save', + payload: { + actionTabs: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])({}, payload) + } + }); + + case 4: + case "end": + return _context41.stop(); + } + } + }, setActionTabs); + }) + }, + reducers: { + save: function save(state, action) { + return Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_2__[/* 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); + +/***/ }), + +/***/ "6CAe": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var collectionAddAll = __webpack_require__(/*! ../internals/collection-add-all */ "QYsF"); + +// `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); + } +}); + + +/***/ }), + +/***/ "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 _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator */ "c1Ei"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "5Tp6"); +/* 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 HomeIndex() { + return _HomeIndex.apply(this, arguments); +} + +function _HomeIndex() { + _HomeIndex = Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee() { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.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/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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.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/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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.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/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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee4(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.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/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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee5(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.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/users/view_notice.json', { + method: 'post', + body: params + })); + + case 1: + case "end": + return _context5.stop(); + } + } + }, _callee5); + })); + return _UploadNotice.apply(this, arguments); +} + +/***/ }), + +/***/ "6UAK": +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var isInteger = __webpack_require__(/*! ../internals/is-integer */ "+knb"); + +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; + } +}); + + +/***/ }), + +/***/ "6Wqr": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "g0jA"); + +module.exports = getBuiltIn('navigator', 'userAgent') || ''; + + +/***/ }), + +/***/ "6YAi": +/*!***********************************************************!*\ + !*** ./src/models/classrooms/announcement.ts + 1 modules ***! + \***********************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! 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/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/announcement.ts + + + + // 公告上移 + +function announcement_informUp(_x) { + return _informUp.apply(this, arguments); +} // 公告下移 + +function _informUp() { + _informUp = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee2(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee3(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee4(params) { + return regenerator_default.a.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 + + + +var AnnouncementModel = { + namespace: 'announcement', + state: { + name: '普通试卷,随机试卷详情页面', + loading: true, + // 题库 + actionTabs: {} + }, + effects: { + // 公告 下移 + informDown: /*#__PURE__*/regenerator_default.a.mark(function informDown(_ref, _ref2) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function informDown$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload, callback = _ref.callback; + call = _ref2.call, put = _ref2.put; + _context.next = 4; + return call(announcement_informDown, payload); + + case 4: + response = _context.sent; + return _context.abrupt("return", response); + + case 6: + case "end": + return _context.stop(); + } + } + }, informDown); + }), + // 公告 上移 + informUp: /*#__PURE__*/regenerator_default.a.mark(function informUp(_ref3, _ref4) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function informUp$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload, callback = _ref3.callback; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(announcement_informUp, payload); + + case 4: + response = _context2.sent; + return _context2.abrupt("return", response); + + case 6: + case "end": + return _context2.stop(); + } + } + }, informUp); + }), + // 设置操做action + setActionTabs: /*#__PURE__*/regenerator_default.a.mark(function setActionTabs(_ref5, _ref6) { + var payload, call, put; + return regenerator_default.a.wrap(function setActionTabs$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + + case 4: + case "end": + return _context3.stop(); + } + } + }, setActionTabs); + }) + }, + 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); + +/***/ }), + +/***/ "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 _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "XEnU"); + +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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'SINGLE', + name: '单选题' + }, single_questions), Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'MULTIPLE', + name: '多选题' + }, multiple_questions), Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'COMPLETION', + name: '填空题' + }, completion_questions), Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'JUDGMENT', + name: '判断题' + }, judgement_questions), Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'SUBJECTIVE', + name: '简答题' + }, subjective_questions), Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({ + type: 'PROGRAM', + name: '编程题' + }, program_questions), Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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 + }; +}; + +/***/ }), + +/***/ "6h5d": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "BXT5"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "Z7je"); + +// `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', '', ''); + } +}); + + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "6sVZ": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_isPrototype.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; + +/** + * 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; +} + +module.exports = isPrototype; + + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "77Zs": +/*!********************************************!*\ + !*** ./node_modules/lodash/_stackClear.js ***! + \********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var ListCache = __webpack_require__(/*! ./_ListCache */ "Xi7e"); + +/** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ +function stackClear() { + this.__data__ = new ListCache; + this.size = 0; +} + +module.exports = stackClear; + + +/***/ }), + +/***/ "7GkX": +/*!*************************************!*\ + !*** ./node_modules/lodash/keys.js ***! + \*************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ "b80T"), + baseKeys = __webpack_require__(/*! ./_baseKeys */ "A90E"), + isArrayLike = __webpack_require__(/*! ./isArrayLike */ "MMmD"); + +/** + * 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); +} + +module.exports = keys; + + +/***/ }), + +/***/ "7Gst": +/*!********************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "ZajO"); +var nativeGetOwnPropertyNames = __webpack_require__(/*! ../internals/object-get-own-property-names */ "mE1a").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)); +}; + + +/***/ }), + +/***/ "7Ku3": +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +// 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 */ "KfFf"); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "56Rm"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "sX0U"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +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); + } +}); + + +/***/ }), + +/***/ "7T+W": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var collectionDeleteAll = __webpack_require__(/*! ../internals/collection-delete-all */ "9wQr"); + +// `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); + } +}); + + +/***/ }), + +/***/ "7VZV": +/*!*************************************************!*\ + !*** ./src/models/globalSetting.ts + 1 modules ***! + \*************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./src/utils/env.ts because of ./src/pages/Competitions/Detail/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/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// 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 + + + + // console.log('-------123213-',window.location.hostname); +//获取所有频道 + +function getGlobalSetting() { + return _getGlobalSetting.apply(this, arguments); +} + +function _getGlobalSetting() { + _getGlobalSetting = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee() { + return regenerator_default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + console.log("env:", env["a" /* default */].FORGE_SERVER); + return _context.abrupt("return", Object(fetch["a" /* default */])("".concat(env["a" /* default */].FORGE_SERVER, "/api/setting.json"), { + method: 'Get' + })); + + case 2: + 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__*/regenerator_default.a.mark(function _callee2() { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee3(params) { + return regenerator_default.a.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 + + + + +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: /*#__PURE__*/regenerator_default.a.mark(function query(_ref, _ref2) { + var payload, call, put, response; + return regenerator_default.a.wrap(function query$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload; + call = _ref2.call, put = _ref2.put; + _context.next = 4; + return call(getGlobalSetting, payload); + + case 4: + response = _context.sent; + // 获取页面数据 + globalSetting_handleDynamicFavicon(response); + _context.next = 8; + return put({ + type: 'save', + payload: Object(objectSpread2["a" /* default */])({}, response) + }); + + case 8: + case "end": + return _context.stop(); + } + } + }, query); + }), + getSystemUpdate: /*#__PURE__*/regenerator_default.a.mark(function getSystemUpdate(_ref3, _ref4) { + var payload, call, put, response; + return regenerator_default.a.wrap(function getSystemUpdate$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(global_getSystemUpdate, payload); + + case 4: + response = _context2.sent; + _context2.next = 7; + return put({ + type: 'save', + payload: { + updateData: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + case "end": + return _context2.stop(); + } + } + }, getSystemUpdate); + }), + setGlobalLoading: /*#__PURE__*/regenerator_default.a.mark(function setGlobalLoading(_ref5, _ref6) { + var payload, call, put; + return regenerator_default.a.wrap(function setGlobalLoading$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return put({ + type: 'save', + payload: { + globalLoading: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + + case 4: + case "end": + return _context3.stop(); + } + } + }, setGlobalLoading); + }), + // 显示隐藏头部 true显示 hide隐藏 + headerToggle: /*#__PURE__*/regenerator_default.a.mark(function headerToggle(_ref7, _ref8) { + var payload, call, put; + return regenerator_default.a.wrap(function headerToggle$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return put({ + type: 'save', + payload: { + showHeader: payload + } + }); + + case 4: + case "end": + return _context4.stop(); + } + } + }, headerToggle); + }), + // 显示隐藏尾部 true显示 hide隐藏 + footerToggle: /*#__PURE__*/regenerator_default.a.mark(function footerToggle(_ref9, _ref10) { + var payload, call, put; + return regenerator_default.a.wrap(function footerToggle$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return put({ + type: 'save', + payload: { + showFooter: payload + } + }); + + case 4: + case "end": + return _context5.stop(); + } + } + }, footerToggle); + }), + // 显示隐藏头部尾部 true显示 hide隐藏 + headerFooterToggle: /*#__PURE__*/regenerator_default.a.mark(function headerFooterToggle(_ref11, _ref12) { + var payload, call, put; + return regenerator_default.a.wrap(function headerFooterToggle$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + payload = _ref11.payload; + call = _ref12.call, put = _ref12.put; + _context6.next = 4; + return put({ + type: 'save', + payload: { + showHeaderFooter: payload + } + }); + + case 4: + case "end": + return _context6.stop(); + } + } + }, headerFooterToggle); + }), + // 显示隐藏头部 Fixed 布局 true显示 hide隐藏 + headerFixedToggle: /*#__PURE__*/regenerator_default.a.mark(function headerFixedToggle(_ref13, _ref14) { + var payload, call, put; + return regenerator_default.a.wrap(function headerFixedToggle$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + payload = _ref13.payload; + call = _ref14.call, put = _ref14.put; + _context7.next = 4; + return put({ + type: 'save', + payload: { + showHeaderFixed: payload + } + }); + + case 4: + case "end": + return _context7.stop(); + } + } + }, headerFixedToggle); + }), + // 只显示隐藏侧边返回顶部操作 true显示 hide隐藏 + onlyShowBackTopToggle: /*#__PURE__*/regenerator_default.a.mark(function onlyShowBackTopToggle(_ref15, _ref16) { + var payload, call, put; + return regenerator_default.a.wrap(function onlyShowBackTopToggle$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + payload = _ref15.payload; + call = _ref16.call, put = _ref16.put; + _context8.next = 4; + return put({ + type: 'save', + payload: { + onlyShowBackTop: payload + } + }); + + case 4: + case "end": + return _context8.stop(); + } + } + }, onlyShowBackTopToggle); + }), + // 只显示隐藏侧边返回顶部操作 true显示 false隐藏 + onlyShowBackTopIconToggle: /*#__PURE__*/regenerator_default.a.mark(function onlyShowBackTopIconToggle(_ref17, _ref18) { + var payload, call, put; + return regenerator_default.a.wrap(function onlyShowBackTopIconToggle$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + payload = _ref17.payload; + call = _ref18.call, put = _ref18.put; + _context9.next = 4; + return put({ + type: 'save', + payload: { + onlyShowBackTopIcons: payload + } + }); + + case 4: + case "end": + return _context9.stop(); + } + } + }, onlyShowBackTopIconToggle); + }), + // 运营弹框 true显示 false隐藏 + setOperateModel: /*#__PURE__*/regenerator_default.a.mark(function setOperateModel(_ref19, _ref20) { + var payload, call, put; + return regenerator_default.a.wrap(function setOperateModel$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + payload = _ref19.payload; + call = _ref20.call, put = _ref20.put; + _context10.next = 4; + return put({ + type: 'save', + payload: { + operateModel: payload + } + }); + + case 4: + case "end": + return _context10.stop(); + } + } + }, setOperateModel); + }), + // 运营弹框地址 + setOperateModelPath: /*#__PURE__*/regenerator_default.a.mark(function setOperateModelPath(_ref21, _ref22) { + var payload, call, put; + return regenerator_default.a.wrap(function setOperateModelPath$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + payload = _ref21.payload; + call = _ref22.call, put = _ref22.put; + _context11.next = 4; + return put({ + type: 'save', + payload: { + operateModelPath: payload + } + }); + + case 4: + case "end": + return _context11.stop(); + } + } + }, setOperateModelPath); + }), + // 刷题 + setShowQuestionBackTop: /*#__PURE__*/regenerator_default.a.mark(function setShowQuestionBackTop(_ref23, _ref24) { + var payload, call, put; + return regenerator_default.a.wrap(function setShowQuestionBackTop$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + payload = _ref23.payload; + call = _ref24.call, put = _ref24.put; + _context12.next = 4; + return put({ + type: 'save', + payload: { + showQuestionBackTop: payload + } + }); + + case 4: + case "end": + return _context12.stop(); + } + } + }, setShowQuestionBackTop); + }) + }, + 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"); + } + + Object.defineProperty(subClass, "prototype", { + value: Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }), + writable: false + }); + if (superClass) setPrototypeOf(subClass, superClass); +} + +module.exports = _inherits, module.exports.__esModule = true, module.exports["default"] = module.exports; + +/***/ }), + +/***/ "7alH": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "3BUn").f; +var create = __webpack_require__(/*! ../internals/object-create */ "Lb4M"); +var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "SdaD"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "LaBb"); +var anInstance = __webpack_require__(/*! ../internals/an-instance */ "8ZSo"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); +var defineIterator = __webpack_require__(/*! ../internals/define-iterator */ "C5dw"); +var setSpecies = __webpack_require__(/*! ../internals/set-species */ "7wTY"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "Zz2s"); +var fastKey = __webpack_require__(/*! ../internals/internal-metadata */ "v+BB").fastKey; +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "tY+O"); + +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); + } +}; + + +/***/ }), + +/***/ "7cCA": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "56Rm"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); + +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); + } +}); + + +/***/ }), + +/***/ "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; +}; + + +/***/ }), + +/***/ "7fqy": +/*!********************************************!*\ + !*** ./node_modules/lodash/_mapToArray.js ***! + \********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * 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; +} + +module.exports = mapToArray; + + +/***/ }), + +/***/ "7hhn": +/*!********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "Zz2s"); +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "3BUn").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 ''; + } + } + }); +} + + +/***/ }), + +/***/ "7uW1": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "BXT5"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "Z7je"); + +// `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', '', ''); + } +}); + + +/***/ }), + +/***/ "7wTY": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "g0jA"); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "3BUn"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "lCTh"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "Zz2s"); + +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; } + }); + } +}; + + +/***/ }), + +/***/ "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 /*#__PURE__*/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 + 13 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-tabs/node_modules/rc-trigger/es/Popup/useVisibleStatus.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/pages/Competitions/Detail/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/.umi-production/umi.ts */ +/*! 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 ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toArray.js because of ./node_modules/rc-select/es/utils/valueUtil.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./node_modules/antd/es/form/FormItem.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/menu/MenuItem.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/warning.js because of ./src/.umi-production/umi.ts */ +/*! 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"); + +// CONCATENATED MODULE: ./node_modules/rc-util/es/utils/get.js +function get_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; +} +// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toArray.js +var esm_toArray = __webpack_require__("T5bk"); + +// CONCATENATED MODULE: ./node_modules/rc-util/es/utils/set.js + + + + + +function internalSet(entity, paths, value, removeIfUndefined) { + if (!paths.length) { + return value; + } + + var _paths = Object(esm_toArray["a" /* default */])(paths), + path = _paths[0], + restPath = _paths.slice(1); + + var clone; + + if (!entity && typeof path === 'number') { + clone = []; + } else if (Array.isArray(entity)) { + clone = Object(toConsumableArray["a" /* default */])(entity); + } else { + clone = Object(objectSpread2["a" /* default */])({}, 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_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 && !get_get(entity, paths.slice(0, -1))) { + return entity; + } + + return internalSet(entity, paths, value, removeIfUndefined); +} +// 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 = get_get(store, namePath); + return value; +} +function setValue(store, namePath, value) { + var newStore = set_set(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 + // 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); + +/***/ }), + +/***/ "88+L": +/*!***************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 = {}; + + +/***/ }), + +/***/ "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 _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "284h"); + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); + +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")); + +// 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 + })); +}; + +InfoCircleFilled.displayName = 'InfoCircleFilled'; + +var _default = /*#__PURE__*/React.forwardRef(InfoCircleFilled); + +exports.default = _default; + +/***/ }), + +/***/ "8L3h": +/*!************************************************!*\ + !*** ./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 */ "f/k9"); +} else {} + + +/***/ }), + +/***/ "8LUj": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "A6dR"); +var getIterator = __webpack_require__(/*! ../internals/get-iterator */ "bL2w"); + +module.exports = IS_PURE ? getIterator : function (it) { + // eslint-disable-next-line no-undef + return Set.prototype.values.call(it); +}; + + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "8P1j": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "3BUn").f; +var has = __webpack_require__(/*! ../internals/has */ "O29V"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "lCTh"); + +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 }); + } +}; + + +/***/ }), + +/***/ "8XRh": +/*!********************************************************!*\ + !*** ./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/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./src/.umi-production/umi.ts */ +/*! 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-menu/es/SubMenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js because of ./node_modules/antd/es/form/FormItem.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/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/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/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/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/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/rc-motion/es/index.js + + + +/* harmony default export */ var es = __webpack_exports__["b"] = (es_CSSMotion); + +/***/ }), + +/***/ "8ZMI": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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; +}; + + +/***/ }), + +/***/ "8ZSo": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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; +}; + + +/***/ }), + +/***/ "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); + } +}; + + +/***/ }), + +/***/ "8nMP": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var $filter = __webpack_require__(/*! ../internals/array-iteration */ "COy+").filter; +var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "IWfS"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "MRyO"); + +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); + } +}); + + +/***/ }), + +/***/ "8tx+": +/*!**************************************************************!*\ + !*** ./node_modules/rc-notification/es/index.js + 1 modules ***! + \**************************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/classnames/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-animate/es/Animate.js because of ./node_modules/antd/es/badge/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/Notice.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-notification/es/useNotification.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/createChainedFunction.js because of ./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); + +// EXTERNAL MODULE: ./node_modules/rc-animate/es/Animate.js + 5 modules +var Animate = __webpack_require__("MFj2"); + +// 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(Animate["a" /* default */], { + 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 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) + * Build: `lodash modularize exports="npm" -o ./` + * Copyright jQuery Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * 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"))) + +/***/ }), + +/***/ "927e": +/*!**********************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var ReflectMetadataModule = __webpack_require__(/*! ../internals/reflect-metadata */ "56Rm"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); + +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); + } +}); + + +/***/ }), + +/***/ "958M": +/*!************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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"))) + +/***/ }), + +/***/ "9Irk": +/*!********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var assign = __webpack_require__(/*! ../internals/object-assign */ "TbL2"); + +// `Object.assign` method +// https://tc39.github.io/ecma262/#sec-object.assign +$({ target: 'Object', stat: true, forced: Object.assign !== assign }, { + assign: assign +}); + + +/***/ }), + +/***/ "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 _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "284h"); + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); + +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")); + +// 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 + })); +}; + +RightOutlined.displayName = 'RightOutlined'; + +var _default = /*#__PURE__*/React.forwardRef(RightOutlined); + +exports.default = _default; + +/***/ }), + +/***/ "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 ? prefix + ": " + provided : prefix; + throw new Error(value); +} + + + + +/***/ }), + +/***/ "9gtD": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); + +// `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; + } +}); + + +/***/ }), + +/***/ "9hUv": +/*!**************************************************!*\ + !*** ./src/models/messages/index.ts + 1 modules ***! + \**************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! 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/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/messages.ts + + + + +function messages_getTidings(_x) { + return _getTidings.apply(this, arguments); +} + +function _getTidings() { + _getTidings = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee2(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee3(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee4(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee5(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee6(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee7(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee8(params) { + return regenerator_default.a.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 + + + +var MessagesModel = { + namespace: 'messages', + state: { + tidingsList: [], + privateMessage: [], + unreadInfo: [], + recentContacts: {}, + privateMessageDetails: {}, + userPrivateMessage: {}, + actionTabs: { + key: '', + params: {} + } + }, + effects: { + getPrivateMessageDetails: /*#__PURE__*/regenerator_default.a.mark(function getPrivateMessageDetails(_ref, _ref2) { + var payload, call, put, response; + return regenerator_default.a.wrap(function getPrivateMessageDetails$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload; + call = _ref2.call, put = _ref2.put; + _context.next = 4; + return call(messages_getPrivateMessageDetails, payload); + + case 4: + response = _context.sent; + _context.next = 7; + return put({ + type: 'save', + payload: { + privateMessageDetails: response || [] + } + }); + + case 7: + return _context.abrupt("return", response); + + case 8: + case "end": + return _context.stop(); + } + } + }, getPrivateMessageDetails); + }), + getTidings: /*#__PURE__*/regenerator_default.a.mark(function getTidings(_ref3, _ref4) { + var payload, call, put, response; + return regenerator_default.a.wrap(function getTidings$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(messages_getTidings, payload); + + case 4: + response = _context2.sent; + _context2.next = 7; + return put({ + type: 'save', + payload: { + tidingsList: response || [] + } + }); + + case 7: + case "end": + return _context2.stop(); + } + } + }, getTidings); + }), + getPrivateMessages: /*#__PURE__*/regenerator_default.a.mark(function getPrivateMessages(_ref5, _ref6) { + var payload, call, put, response; + return regenerator_default.a.wrap(function getPrivateMessages$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return call(messages_getPrivateMessages, payload); + + case 4: + response = _context3.sent; + _context3.next = 7; + return put({ + type: 'save', + payload: { + privateMessage: response || [] + } + }); + + case 7: + return _context3.abrupt("return", response); + + case 8: + case "end": + return _context3.stop(); + } + } + }, getPrivateMessages); + }), + getUsersForPrivateMessages: /*#__PURE__*/regenerator_default.a.mark(function getUsersForPrivateMessages(_ref7, _ref8) { + var payload, call, put, response; + return regenerator_default.a.wrap(function getUsersForPrivateMessages$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return call(messages_getUsersForPrivateMessages, payload); + + case 4: + response = _context4.sent; + _context4.next = 7; + return put({ + type: 'save', + payload: { + userPrivateMessage: response || [] + } + }); + + case 7: + return _context4.abrupt("return", response); + + case 8: + case "end": + return _context4.stop(); + } + } + }, getUsersForPrivateMessages); + }), + unreadMessageInfo: /*#__PURE__*/regenerator_default.a.mark(function unreadMessageInfo(_ref9, _ref10) { + var payload, call, put, response; + return regenerator_default.a.wrap(function unreadMessageInfo$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return call(messages_unreadMessageInfo, payload); + + case 4: + response = _context5.sent; + _context5.next = 7; + return put({ + type: 'save', + payload: { + unreadInfo: response || [] + } + }); + + case 7: + case "end": + return _context5.stop(); + } + } + }, unreadMessageInfo); + }), + getRecentContacts: /*#__PURE__*/regenerator_default.a.mark(function getRecentContacts(_ref11, _ref12) { + var payload, call, put, response; + return regenerator_default.a.wrap(function getRecentContacts$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + payload = _ref11.payload; + call = _ref12.call, put = _ref12.put; + _context6.next = 4; + return call(messages_getRecentContacts, payload); + + case 4: + response = _context6.sent; + _context6.next = 7; + return put({ + type: 'save', + payload: { + recentContacts: response || [] + } + }); + + case 7: + return _context6.abrupt("return", response); + + case 8: + case "end": + return _context6.stop(); + } + } + }, getRecentContacts); + }), + // 设置操做action + setActionTabs: /*#__PURE__*/regenerator_default.a.mark(function setActionTabs(_ref13, _ref14) { + var payload, call, put; + return regenerator_default.a.wrap(function setActionTabs$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + payload = _ref13.payload; + call = _ref14.call, put = _ref14.put; + _context7.next = 4; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + + case 4: + case "end": + return _context7.stop(); + } + } + }, setActionTabs); + }) + }, + 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 */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/extends.js because of ./src/components/UploadFile/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/runtime/dist/index.esm.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/@umijs/renderer-react/dist/index.js (referenced with cjs require)) */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/index.js because of ./src/components/Header/components/Join/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/dropdown/style/index.js because of ./node_modules/antd/es/breadcrumb/style/index.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/message/index.js because of ./src/.umi-production/umi.ts */ +/*! 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 ./src/.umi-production/umi.ts */ +/*! 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 ./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/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)) */ +/***/ (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 */]; }); + +// 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, useModel, 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +// 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/bundler-utils/node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("v7Ap"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// 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/bundler-utils/node_modules/@babel/runtime/helpers/esm/extends.js +var esm_extends = __webpack_require__("IIKO"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js + 1 modules +var objectWithoutProperties = __webpack_require__("SIvP"); + +// 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/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// 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/@umijs/runtime/dist/index.esm.js +var dist_index_esm = __webpack_require__("LtsZ"); + +// 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 + + + + + + + + +// @ts-nocheck + +/** + * Base on https://github.com/umijs//Users/caishi/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; + +(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"; +})(ErrorShowType || (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["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, _errorInfo4; + + // @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; + + 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__*/regenerator_default.a.mark(function _callee(ctx, next) { + var _req$options; + + var req, res, options, getResponse, resData, errorInfo, error; + return regenerator_default.a.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 + + + + + + + + + + + +/***/ }), + +/***/ "9mu1": +/*!*******************************************************!*\ + !*** ./node_modules/rc-align/es/index.js + 5 modules ***! + \*******************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/lodash/isEqual.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-menu/es/SubMenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/Dom/contains.js because of ./node_modules/rc-menu/es/SubMenu.js */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/rc-util/es/ref.js because of ./node_modules/antd/es/form/FormItem.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"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); +var react_default = /*#__PURE__*/__webpack_require__.n(react); + +// EXTERNAL MODULE: ./node_modules/rc-util/es/ref.js +var es_ref = __webpack_require__("c+Xe"); + +// CONCATENATED MODULE: ./node_modules/rc-util/es/Dom/isVisible.js +/* harmony default export */ var isVisible = (function (element) { + if (!element) { + return false; + } + + if (element.offsetParent) { + return true; + } + + if (element.getBBox) { + var box = element.getBBox(); + + if (box.width || box.height) { + return true; + } + } + + if (element.getBoundingClientRect) { + var _box = element.getBoundingClientRect(); + + if (_box.width || _box.height) { + return true; + } + } + + return false; +}); +// 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); + + 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 _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 = box.left; + y = 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' ? elem.getBoundingClientRect().width : 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 = 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 这个也不是完全可行 + + /* +
+
+ 元素 6 高 100px 宽 50px
+
+
+ */ + // 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 + */ + +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 变了 + // 例如
+ + + 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/Dom/addEventListener.js +var addEventListener = __webpack_require__("zT1h"); + +// EXTERNAL MODULE: ./node_modules/lodash/isEqual.js +var isEqual = __webpack_require__("Y+p1"); +var isEqual_default = /*#__PURE__*/__webpack_require__.n(isEqual); + +// 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/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) { + if (!calledRef.current || force === true) { + if (callback() === false) { + // Not delay since callback cancelled self + return; + } + + calledRef.current = true; + cancelTrigger(); + timeoutRef.current = window.setTimeout(function () { + calledRef.current = false; + }, buffer); + } else { + cancelTrigger(); + timeoutRef.current = window.setTimeout(function () { + calledRef.current = false; + trigger(); + }, buffer); + } + } + + return [trigger, function () { + calledRef.current = false; + cancelTrigger(); + }]; +}); +// 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({}); + 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; + + if (!latestDisabled && latestTarget) { + var source = nodeRef.current; + 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 + + // 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 + + // 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 ===================== + // Listen for target updated + + + var resizeMonitor = react_default.a.useRef({ + cancel: function cancel() {} + }); // Listen for source updated + + var sourceResizeMonitor = react_default.a.useRef({ + cancel: function cancel() {} + }); + react_default.a.useEffect(function () { + var element = getElement(target); + var point = getPoint(target); + + if (nodeRef.current !== sourceResizeMonitor.current.element) { + sourceResizeMonitor.current.cancel(); + sourceResizeMonitor.current.element = nodeRef.current; + sourceResizeMonitor.current.cancel = monitorResize(nodeRef.current, _forceAlign); + } + + if (cacheRef.current.element !== element || !isSamePoint(cacheRef.current.point, point) || !isEqual_default()(cacheRef.current.align, align)) { + _forceAlign(); // Add resize observer + + + if (resizeMonitor.current.element !== element) { + resizeMonitor.current.cancel(); + resizeMonitor.current.element = element; + resizeMonitor.current.cancel = monitorResize(element, _forceAlign); + } + } + }); // Listen for disabled change + + react_default.a.useEffect(function () { + if (!disabled) { + _forceAlign(); + } else { + cancelForceAlign(); + } + }, [disabled]); // Listen for window resize + + var winResizeRef = react_default.a.useRef(null); + react_default.a.useEffect(function () { + if (monitorWindowResize) { + if (!winResizeRef.current) { + winResizeRef.current = Object(addEventListener["a" /* default */])(window, 'resize', _forceAlign); + } + } else if (winResizeRef.current) { + winResizeRef.current.remove(); + winResizeRef.current = null; + } + }, [monitorWindowResize]); // Clear all if unmount + + react_default.a.useEffect(function () { + return function () { + resizeMonitor.current.cancel(); + sourceResizeMonitor.current.cancel(); + if (winResizeRef.current) winResizeRef.current.remove(); + 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); + +/***/ }), + +/***/ "9o8i": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "u0id"); + +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); +}); + + +/***/ }), + +/***/ "9wQr": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "QGpR"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); + +// 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; +}; + + +/***/ }), + +/***/ "A6dR": +/*!*************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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; + + +/***/ }), + +/***/ "A90E": +/*!******************************************!*\ + !*** ./node_modules/lodash/_baseKeys.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var isPrototype = __webpack_require__(/*! ./_isPrototype */ "6sVZ"), + nativeKeys = __webpack_require__(/*! ./_nativeKeys */ "V6Ve"); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * 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; +} + +module.exports = baseKeys; + + +/***/ }), + +/***/ "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); + +/***/ }), + +/***/ "AF8d": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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; +}; + + +/***/ }), + +/***/ "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 $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// 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 getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? 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, + '%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([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? 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 ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? 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 +}; + +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) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%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__(/*! has */ "oNNP"); +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); + +/* 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'); + } + + 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; +})(); + + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "ASJH": +/*!***********************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "u2pd"); +var $ = __webpack_require__(/*! ../internals/export */ "qlSD"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "Zz2s"); +var USE_NATIVE_URL = __webpack_require__(/*! ../internals/native-url */ "h1ST"); +var global = __webpack_require__(/*! ../internals/global */ "958M"); +var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "rLe1"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "4rco"); +var anInstance = __webpack_require__(/*! ../internals/an-instance */ "8ZSo"); +var has = __webpack_require__(/*! ../internals/has */ "O29V"); +var assign = __webpack_require__(/*! ../internals/object-assign */ "TbL2"); +var arrayFrom = __webpack_require__(/*! ../internals/array-from */ "WcIi"); +var codeAt = __webpack_require__(/*! ../internals/string-multibyte */ "KwlI").codeAt; +var toASCII = __webpack_require__(/*! ../internals/string-punycode-to-ascii */ "rffQ"); +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "8P1j"); +var URLSearchParamsModule = __webpack_require__(/*! ../modules/web.url-search-params */ "yMmy"); +var InternalStateModule = __webpack_require__(/*! ../internals/internal-state */ "tY+O"); + +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 +}); + + +/***/ }), + +/***/ "AdV7": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "Zz2s"); +var FORCED = __webpack_require__(/*! ../internals/object-prototype-accessors-forced */ "j9vu"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "OgNa"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "3BUn"); + +// `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 }); + } + }); +} + + +/***/ }), + +/***/ "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'); +}; + + + +/***/ }), + +/***/ "B/Nc": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "vFgh"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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; + } +}); + + +/***/ }), + +/***/ "B3yx": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "958M"); +var userAgent = __webpack_require__(/*! ../internals/engine-user-agent */ "6Wqr"); + +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; + + +/***/ }), + +/***/ "B8du": +/*!******************************************!*\ + !*** ./node_modules/lodash/stubFalse.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * 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; +} + +module.exports = stubFalse; + + +/***/ }), + +/***/ "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 + * @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); + +/***/ }), + +/***/ "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"]); + +/***/ }), + +/***/ "BSqd": +/*!*****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "u0id"); +var $findIndex = __webpack_require__(/*! ../internals/array-iteration */ "COy+").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); +}); + + +/***/ }), + +/***/ "BUUL": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "g0jA"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var FREEZING = __webpack_require__(/*! ../internals/freezing */ "Osee"); + +// `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; + } + } +}); + + +/***/ }), + +/***/ "BXT5": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "AF8d"); + +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, '"') + '"'; + return p1 + '>' + S + ''; +}; + + +/***/ }), + +/***/ "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 = IconContext; +exports.default = _default; + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "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); +} + +/***/ }), + +/***/ "C5dw": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var createIteratorConstructor = __webpack_require__(/*! ../internals/create-iterator-constructor */ "Gj96"); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "sX0U"); +var setPrototypeOf = __webpack_require__(/*! ../internals/object-set-prototype-of */ "kM33"); +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "8P1j"); +var createNonEnumerableProperty = __webpack_require__(/*! ../internals/create-non-enumerable-property */ "ewN9"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "4rco"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "lCTh"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var Iterators = __webpack_require__(/*! ../internals/iterators */ "88+L"); +var IteratorsCore = __webpack_require__(/*! ../internals/iterators-core */ "T6fa"); + +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; +}; + + +/***/ }), + +/***/ "CDWz": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "8LUj"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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); + } +}); + + +/***/ }), + +/***/ "CH3K": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_arrayPush.js ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * 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; +} + +module.exports = arrayPush; + + +/***/ }), + +/***/ "CHj1": +/*!***************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "U+Zv"); + +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; + + +/***/ }), + +/***/ "CI6j": +/*!****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var $map = __webpack_require__(/*! ../internals/array-iteration */ "COy+").map; +var arrayMethodHasSpeciesSupport = __webpack_require__(/*! ../internals/array-method-has-species-support */ "IWfS"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "MRyO"); + +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); + } +}); + + +/***/ }), + +/***/ "COy+": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "LaBb"); +var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "Nna7"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "OgNa"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); +var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "h+LB"); + +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) +}; + + +/***/ }), + +/***/ "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/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! 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/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/polls.ts + + + + //试卷详情答题列表 + +function polls_getPollsList(_x) { + return _getPollsList.apply(this, arguments); +} + +function _getPollsList() { + _getPollsList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee2(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee3(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee4(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee5(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee6(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee7(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee8(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee9(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee10(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee11(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee12(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee13(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee14(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee15(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee16(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee17(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee18(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee19(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee20(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee21(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee22(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee23(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee24(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee25(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee26(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee27(params) { + return regenerator_default.a.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 + + + +var PollsModel = { + namespace: 'polls', + state: { + name: '普通试卷,随机试卷详情页面', + loading: true, + // 试卷作业列表 + pollsList: {}, + // 试卷统计 + statisticsList: {}, + // 试卷班级 + pollsCoursesList: {}, + // 题库 + brankList: {}, + actionTabs: {}, + commonHeader: {}, + pollSetting: {}, + endGroups: {}, + publishGroups: {}, + exerciseBanks: {} + }, + effects: { + // 试卷 - 作业列表 + getPollsList: /*#__PURE__*/regenerator_default.a.mark(function getPollsList(_ref, _ref2) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getPollsList$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload, callback = _ref.callback; + call = _ref2.call, put = _ref2.put; + _context.next = 4; + return call(polls_getPollsList, payload); + + case 4: + response = _context.sent; + _context.next = 7; + return put({ + type: 'save', + payload: { + pollsList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context.abrupt("return", response); + + case 8: + case "end": + return _context.stop(); + } + } + }, getPollsList); + }), + getCommonHeader: /*#__PURE__*/regenerator_default.a.mark(function getCommonHeader(_ref3, _ref4) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getCommonHeader$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload, callback = _ref3.callback; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(polls_getCommonHeader, payload); + + case 4: + response = _context2.sent; + _context2.next = 7; + return put({ + type: 'save', + payload: { + commonHeader: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context2.abrupt("return", response); + + case 8: + case "end": + return _context2.stop(); + } + } + }, getCommonHeader); + }), + // 试卷-统计 + getPollsStatistics: /*#__PURE__*/regenerator_default.a.mark(function getPollsStatistics(_ref5, _ref6) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getPollsStatistics$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload, callback = _ref5.callback; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return call(polls_getPollsStatistics, payload); + + case 4: + response = _context3.sent; + _context3.next = 7; + return put({ + type: 'save', + payload: { + statisticsList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context3.abrupt("return", response); + + case 8: + case "end": + return _context3.stop(); + } + } + }, getPollsStatistics); + }), + // 试卷 题库列表 + getBrankList: /*#__PURE__*/regenerator_default.a.mark(function getBrankList(_ref7, _ref8) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getBrankList$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload, callback = _ref7.callback; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return call(polls_getBrankList, payload); + + case 4: + response = _context4.sent; + _context4.next = 7; + return put({ + type: 'save', + payload: { + brankList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context4.abrupt("return", response); + + case 8: + case "end": + return _context4.stop(); + } + } + }, getBrankList); + }), + // 试卷保存题库 + saveBanks: /*#__PURE__*/regenerator_default.a.mark(function saveBanks(_ref9, _ref10) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function saveBanks$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload, callback = _ref9.callback; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return call(polls_saveBanks, payload); + + case 4: + response = _context5.sent; + return _context5.abrupt("return", response); + + case 6: + case "end": + return _context5.stop(); + } + } + }, saveBanks); + }), + // 试卷课堂列表 + getPollsCourses: /*#__PURE__*/regenerator_default.a.mark(function getPollsCourses(_ref11, _ref12) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getPollsCourses$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + payload = _ref11.payload, callback = _ref11.callback; + call = _ref12.call, put = _ref12.put; + _context6.next = 4; + return call(polls_getPollsCourses, payload); + + case 4: + response = _context6.sent; + _context6.next = 7; + return put({ + type: 'save', + payload: { + pollsCoursesList: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context6.abrupt("return", response); + + case 8: + case "end": + return _context6.stop(); + } + } + }, getPollsCourses); + }), + getPollsSetting: /*#__PURE__*/regenerator_default.a.mark(function getPollsSetting(_ref13, _ref14) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getPollsSetting$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + payload = _ref13.payload, callback = _ref13.callback; + call = _ref14.call, put = _ref14.put; + _context7.next = 4; + return call(polls_getPollsSetting, payload); + + case 4: + response = _context7.sent; + _context7.next = 7; + return put({ + type: 'save', + payload: { + pollSetting: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context7.abrupt("return", response); + + case 8: + case "end": + return _context7.stop(); + } + } + }, getPollsSetting); + }), + editPolls: /*#__PURE__*/regenerator_default.a.mark(function editPolls(_ref15, _ref16) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function editPolls$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + payload = _ref15.payload, callback = _ref15.callback; + call = _ref16.call, put = _ref16.put; + _context8.next = 4; + return call(polls_editPolls, payload); + + case 4: + response = _context8.sent; + _context8.next = 7; + return put({ + type: 'save', + payload: { + editData: Object(objectSpread2["a" /* default */])({}, JSON.parse(JSON.stringify(response))) + } + }); + + case 7: + return _context8.abrupt("return", response); + + case 8: + case "end": + return _context8.stop(); + } + } + }, editPolls); + }), + getEndGroups: /*#__PURE__*/regenerator_default.a.mark(function getEndGroups(_ref17, _ref18) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getEndGroups$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + payload = _ref17.payload, callback = _ref17.callback; + call = _ref18.call, put = _ref18.put; + _context9.next = 4; + return call(polls_getEndGroups, payload); + + case 4: + response = _context9.sent; + _context9.next = 7; + return put({ + type: 'save', + payload: { + endGroups: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context9.abrupt("return", response); + + case 8: + case "end": + return _context9.stop(); + } + } + }, getEndGroups); + }), + getPublishGroups: /*#__PURE__*/regenerator_default.a.mark(function getPublishGroups(_ref19, _ref20) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getPublishGroups$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + payload = _ref19.payload, callback = _ref19.callback; + call = _ref20.call, put = _ref20.put; + _context10.next = 4; + return call(polls_getPublishGroups, payload); + + case 4: + response = _context10.sent; + _context10.next = 7; + return put({ + type: 'save', + payload: { + publishGroups: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context10.abrupt("return", response); + + case 8: + case "end": + return _context10.stop(); + } + } + }, getPublishGroups); + }), + getExerciseBanks: /*#__PURE__*/regenerator_default.a.mark(function getExerciseBanks(_ref21, _ref22) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getExerciseBanks$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + payload = _ref21.payload, callback = _ref21.callback; + call = _ref22.call, put = _ref22.put; + _context11.next = 4; + return call(polls_getExerciseBanks, payload); + + case 4: + response = _context11.sent; + _context11.next = 7; + return put({ + type: 'save', + payload: { + exerciseBanks: Object(objectSpread2["a" /* default */])({}, response) + } + }); + + case 7: + return _context11.abrupt("return", response); + + case 8: + case "end": + return _context11.stop(); + } + } + }, getExerciseBanks); + }), + // 设置操做action + setActionTabs: /*#__PURE__*/regenerator_default.a.mark(function setActionTabs(_ref23, _ref24) { + var payload, call, put; + return regenerator_default.a.wrap(function setActionTabs$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + payload = _ref23.payload; + call = _ref24.call, put = _ref24.put; + _context12.next = 4; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + + case 4: + case "end": + return _context12.stop(); + } + } + }, setActionTabs); + }) + }, + 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); + +/***/ }), + +/***/ "CdG1": +/*!******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "3ss7"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var has = __webpack_require__(/*! ../internals/has */ "O29V"); +var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "GMoa"); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "sX0U"); + +// `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 +}); + + +/***/ }), + +/***/ "Cl06": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var of = __webpack_require__(/*! ../internals/collection-of */ "kD8M"); + +// `WeakSet.of` method +// https://tc39.github.io/proposal-setmap-offrom/#sec-weakset.of +$({ target: 'WeakSet', stat: true }, { + of: of +}); + + +/***/ }), + +/***/ "CoRm": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var toInteger = __webpack_require__(/*! ../internals/to-integer */ "2dSn"); +var thisNumberValue = __webpack_require__(/*! ../internals/this-number-value */ "JlQn"); +var repeat = __webpack_require__(/*! ../internals/string-repeat */ "snhl"); +var fails = __webpack_require__(/*! ../internals/fails */ "U+Zv"); + +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; + } +}); + + +/***/ }), + +/***/ "Ctsp": +/*!****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "DbLG"); + +// `Symbol.asyncIterator` well-known symbol +// https://tc39.github.io/ecma262/#sec-symbol.asynciterator +defineWellKnownSymbol('asyncIterator'); + + +/***/ }), + +/***/ "Cwc5": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_getNative.js ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ "NKxu"), + getValue = __webpack_require__(/*! ./_getValue */ "Npjl"); + +/** + * 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; +} + +module.exports = getNative; + + +/***/ }), + +/***/ "D1NN": +/*!********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "g0jA"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "2SaV"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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; + } +}); + + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "DO64": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "lCTh"); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var test = {}; + +test[TO_STRING_TAG] = 'z'; + +module.exports = String(test) === '[object z]'; + + +/***/ }), + +/***/ "DQCG": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "958M"); + +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); +}; + + +/***/ }), + +/***/ "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; +} + +/***/ }), + +/***/ "DSRE": +/*!*****************************************!*\ + !*** ./node_modules/lodash/isBuffer.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 root = __webpack_require__(/*! ./_root */ "Kz5y"), + stubFalse = __webpack_require__(/*! ./stubFalse */ "B8du"); + +/** 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; + +/** Built-in value references. */ +var Buffer = moduleExports ? root.Buffer : undefined; + +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined; + +/** + * 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; + +module.exports = isBuffer; + +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../webpack/buildin/module.js */ "YuTi")(module))) + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "DbLG": +/*!******************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "JWMi"); +var has = __webpack_require__(/*! ../internals/has */ "O29V"); +var wrappedWellKnownSymbolModule = __webpack_require__(/*! ../internals/well-known-symbol-wrapped */ "vn5G"); +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "3BUn").f; + +module.exports = function (NAME) { + var Symbol = path.Symbol || (path.Symbol = {}); + if (!has(Symbol, NAME)) defineProperty(Symbol, NAME, { + value: wrappedWellKnownSymbolModule.f(NAME) + }); +}; + + +/***/ }), + +/***/ "Dfm5": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "DbLG"); + +// `Symbol.replace` well-known symbol +// https://tc39.github.io/ecma262/#sec-symbol.replace +defineWellKnownSymbol('replace'); + + +/***/ }), + +/***/ "DuqM": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "Zz2s"); +var global = __webpack_require__(/*! ../internals/global */ "958M"); +var has = __webpack_require__(/*! ../internals/has */ "O29V"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "3ss7"); +var defineProperty = __webpack_require__(/*! ../internals/object-define-property */ "3BUn").f; +var copyConstructorProperties = __webpack_require__(/*! ../internals/copy-constructor-properties */ "TnBx"); + +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 + }); +} + + +/***/ }), + +/***/ "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'); +}; + + +/***/ }), + +/***/ "E1g1": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "g0jA"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var getIterator = __webpack_require__(/*! ../internals/get-iterator */ "bL2w"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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; + } +}); + + +/***/ }), + +/***/ "E2jh": +/*!******************************************!*\ + !*** ./node_modules/lodash/_isMasked.js ***! + \******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var coreJsData = __webpack_require__(/*! ./_coreJsData */ "2gN3"); + +/** 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) : ''; +}()); + +/** + * 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); +} + +module.exports = isMasked; + + +/***/ }), + +/***/ "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 ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/antd/es/locale-provider/LocaleReceiver.js because of ./src/.umi-production/umi.ts */ +/*! 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); + +/***/ }), + +/***/ "ECwX": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "WRgv"); +var bind = __webpack_require__(/*! ../internals/function-bind-context */ "LaBb"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +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); +}; + + +/***/ }), + +/***/ "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%' + } +}; + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "ET62": +/*!**********************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "g0jA"); + +module.exports = getBuiltIn('document', 'documentElement'); + + +/***/ }), + +/***/ "EWhT": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); + +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; + } +}); + + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "EpBk": +/*!*******************************************!*\ + !*** ./node_modules/lodash/_isKeyable.js ***! + \*******************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * 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); +} + +module.exports = isKeyable; + + +/***/ }), + +/***/ "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 _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "XEnU"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator */ "c1Ei"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var antd_es_notification_style__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd/es/notification/style */ "/xke"); +/* harmony import */ var antd_es_notification__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd/es/notification */ "TeRw"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "5Tp6"); +/* harmony import */ var dva__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! dva */ "LpSC"); +/* harmony import */ var dva__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(dva__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./env */ "m3rI"); +/* harmony import */ var hash_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! hash.js */ "fZJM"); +/* harmony import */ var hash_js__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(hash_js__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! umi */ "9kvl"); +/* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./util */ "1vsH"); + + + + + + + + + + + + + + +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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee(response, responseData) { + var errortext, text, resJson, error; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.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_12__[/* 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_7__[/* 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) { + !option.method ? option.method = 'get' : ''; + option.method = option.method.toUpperCase(); + option.mode = 'cors'; + + var options = Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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_11___default.a.sha256().update(fingerprint).digest('hex'); + var defaultOptions = { + credentials: 'include', + withCredentials: true + }; + + var newOptions = Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, defaultOptions), options); + + if (newOptions.method === 'POST' || newOptions.method === 'PUT' || newOptions.method === 'PATCH' || newOptions.method === 'DELETE') { + if (!flag) { + newOptions.headers = Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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); + url += '?' + parseParams(options.params); + } + + if (url.indexOf("get_user_info") === -1 && Object(_util__WEBPACK_IMPORTED_MODULE_13__[/* getCookie */ "i"])("logintrustie")) { + newOptions.headers = Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])(Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, newOptions.headers), {}, { + Authorization: Object(_util__WEBPACK_IMPORTED_MODULE_13__[/* getCookie */ "i"])("logintrustie") + }); + } // newOptions.headers.Authorization = + // 'Bearer 09cb06de7874a0cfae0608ba5126b3b30dcb5d2a' + // if (localStorage.getItem('xhr-user-info')) { + // const token = JSON.parse(localStorage.getItem('xhr-user-info')).apiToken + // newOptions.headers.Authorization = 'Bearer ' + token + // } + + + var expirys = options.expirys && 60; + /** + * @description: 枚举出请求数据格式类型 + * @param {type} 枚举类型 + * @return: + */ + + var ContentType; + /** + * @description: 枚举request请求的method方法 + * @param {type} 枚举类型 + * @return: + */ + + (function (ContentType) { + ContentType["json"] = "application/json;charset=UTF-8"; + ContentType["form"] = "application/x-www-form-urlencoded; charset=UTF-8"; + })(ContentType || (ContentType = {})); + + var HttpMethod; + /** + * @description: 声明请求头header的类型 + * @param {type} + * @return: + */ + + (function (HttpMethod) { + HttpMethod["get"] = "GET"; + HttpMethod["post"] = "POST"; + })(HttpMethod || (HttpMethod = {})); + + // 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee2(response) { + var d, fileName, blob, a, url, filename; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.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_10__[/* default */ "a"].API_SERVER; + if (window.ENV === 'dev') prefixUrl = ''; + return dva__WEBPACK_IMPORTED_MODULE_9___default()(url.indexOf("https") > -1 ? url : prefixUrl + url, newOptions).then(function (response) { + return checkStatus(response, Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({ + url: url.indexOf("https") > -1 ? url : _env__WEBPACK_IMPORTED_MODULE_10__[/* default */ "a"].API_SERVER + url + }, newOptions)); + }).then(function (response) { + return cachedSave(response, hashcode); + }).then( /*#__PURE__*/function () { + var _ref3 = Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_8__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.mark(function _callee3(response) { + var d, _newOptions$params, _newOptions$body; + + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_5___default.a.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_12__[/* 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_12__[/* 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_12__[/* 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_12__[/* 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$get = Object(umi__WEBPACK_IMPORTED_MODULE_12__[/* getDvaApp */ "b"])()._store.getState(), + user = _getDvaApp$_store$get.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_12__[/* history */ "c"].replace(mapping[e.status]); + } else { + umi__WEBPACK_IMPORTED_MODULE_12__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_4__[/* default */ "a"])({}, params) + }); +} +function del(url) { + return request("/api/".concat(url), { + method: 'delete' + }); +} + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "F2Bo": +/*!******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "QGpR"); + +// `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; +}; + + +/***/ }), + +/***/ "F6Nw": +/*!**************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "g0jA"); +var getOwnPropertyNamesModule = __webpack_require__(/*! ../internals/object-get-own-property-names */ "mE1a"); +var getOwnPropertySymbolsModule = __webpack_require__(/*! ../internals/object-get-own-property-symbols */ "kmSO"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); + +// 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; +}; + + +/***/ }), + +/***/ "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 + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "FMtN": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "u0id"); +var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(/*! ../internals/typed-array-constructors-require-wrappers */ "gfnB"); + +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); + + +/***/ }), + +/***/ "FcRj": +/*!********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "VLVd"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "AF8d"); +var sameValue = __webpack_require__(/*! ../internals/same-value */ "nZr4"); +var regExpExec = __webpack_require__(/*! ../internals/regexp-exec-abstract */ "1FR7"); + +// @@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; + } + ]; +}); + + +/***/ }), + +/***/ "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 _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "XEnU"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./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(_Users_caishi_forgeplus_react_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(_Users_caishi_forgeplus_react_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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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/bundler-utils/node_modules/@babel/runtime/helpers/esm/classCallCheck.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/createSuper.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/defineProperty.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/components/modal.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/runtime/dist/index.esm.js (<- Module is referenced from these modules with unsupported syntax: ./node_modules/@umijs/renderer-react/dist/index.js (referenced with cjs require)) */ +/*! 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/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/bundler-utils/node_modules/@babel/runtime/helpers/esm/classCallCheck.js +var classCallCheck = __webpack_require__("XKWP"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/createClass.js +var createClass = __webpack_require__("N7Kx"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/inherits.js + 1 modules +var inherits = __webpack_require__("kFHX"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/createSuper.js + 5 modules +var createSuper = __webpack_require__("4jIl"); + +// EXTERNAL MODULE: ./node_modules/react/index.js +var react = __webpack_require__("q1tI"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/defineProperty.js +var defineProperty = __webpack_require__("v7Ap"); + +// 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, [""]); + } + // 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("" + formattedMessage + "", '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 `` 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: '&', + 62: '>', + 60: '<', + 34: '"', + 39: ''' +}; +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. ' + ' 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/bundler-utils/node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules +var toConsumableArray = __webpack_require__("3S9h"); + +// 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 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 + + + + + +/* + * 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 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) { + Object(inherits["a" /* default */])(IntlProvider, _React$PureComponent); + + var _super = Object(createSuper["a" /* default */])(IntlProvider); + + function IntlProvider() { + var _this; + + Object(classCallCheck["a" /* default */])(this, IntlProvider); + + _this = _super.apply(this, arguments); + _this.cache = createIntlCache(); + _this.state = { + cache: _this.cache, + intl: createIntl(processIntlConfig(_this.props), _this.cache), + prevConfig: processIntlConfig(_this.props) + }; + return _this; + } + + 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; + } + }]); + + return IntlProvider; +}(react["PureComponent"]); + + +provider_IntlProvider.displayName = 'IntlProvider'; +provider_IntlProvider.defaultProps = DEFAULT_INTL_CONFIG; +// EXTERNAL MODULE: ./node_modules/@umijs/runtime/dist/index.esm.js +var index_esm = __webpack_require__("LtsZ"); + +// 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["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["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); +}; + +/***/ }), + +/***/ "FgrG": +/*!************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "u0id"); +var $every = __webpack_require__(/*! ../internals/array-iteration */ "COy+").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); +}); + + +/***/ }), + +/***/ "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"))) + +/***/ }), + +/***/ "Fp7p": +/*!***********************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "958M"); +var ArrayBufferViewCore = __webpack_require__(/*! ../internals/array-buffer-view-core */ "u0id"); +var fails = __webpack_require__(/*! ../internals/fails */ "U+Zv"); + +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); + + +/***/ }), + +/***/ "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; +}; + + +/***/ }), + +/***/ "Fwrl": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var numberIsFinite = __webpack_require__(/*! ../internals/number-is-finite */ "DQCG"); + +// `Number.isFinite` method +// https://tc39.github.io/ecma262/#sec-number.isfinite +$({ target: 'Number', stat: true }, { isFinite: numberIsFinite }); + + +/***/ }), + +/***/ "FzKp": +/*!*****************************************************!*\ + !*** ./src/models/classrooms/boards.ts + 1 modules ***! + \*****************************************************/ +/*! exports provided: default */ +/*! exports used: default */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js because of ./src/layouts/index.tsx */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator/index.js (<- Module is not an ECMAScript module) */ +/*! 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/bundler-utils/node_modules/@babel/runtime/regenerator/index.js +var regenerator = __webpack_require__("c1Ei"); +var regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2.js +var objectSpread2 = __webpack_require__("XEnU"); + +// EXTERNAL MODULE: ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js +var asyncToGenerator = __webpack_require__("5Tp6"); + +// EXTERNAL MODULE: ./src/utils/fetch.ts +var fetch = __webpack_require__("ErOA"); + +// CONCATENATED MODULE: ./src/service/boards.ts + + + + +function boards_getBoardsCategoryList(_x) { + return _getBoardsCategoryList.apply(this, arguments); +} + +function _getBoardsCategoryList() { + _getBoardsCategoryList = Object(asyncToGenerator["a" /* default */])( /*#__PURE__*/regenerator_default.a.mark(function _callee(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee2(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee3(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee4(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee5(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee6(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee7(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee8(params) { + return regenerator_default.a.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__*/regenerator_default.a.mark(function _callee9(params) { + return regenerator_default.a.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 + + + +var BoardsModel = { + namespace: 'boards', + state: { + name: '讨论', + loading: true, + // 题库 + actionTabs: {}, + boardsDetail: {}, + boardsCategoryList: {} + }, + effects: { + getBoardsCategoryList: /*#__PURE__*/regenerator_default.a.mark(function getBoardsCategoryList(_ref, _ref2) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getBoardsCategoryList$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload, callback = _ref.callback; + call = _ref2.call, put = _ref2.put; + _context.next = 4; + return call(boards_getBoardsCategoryList, payload); + + case 4: + response = _context.sent; + _context.next = 7; + return put({ + type: 'save', + payload: { + boardsCategoryList: Object(objectSpread2["a" /* default */])({}, response.data) + } + }); + + case 7: + return _context.abrupt("return", response.data); + + case 8: + case "end": + return _context.stop(); + } + } + }, getBoardsCategoryList); + }), + // 讨论详情 + getBoardsDetail: /*#__PURE__*/regenerator_default.a.mark(function getBoardsDetail(_ref3, _ref4) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getBoardsDetail$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload, callback = _ref3.callback; + call = _ref4.call, put = _ref4.put; + _context2.next = 4; + return call(boards_getBoardsDetail, payload); + + case 4: + response = _context2.sent; + _context2.next = 7; + return put({ + type: 'save', + payload: { + boardsDetail: Object(objectSpread2["a" /* default */])({}, response.data) + } + }); + + case 7: + return _context2.abrupt("return", response.data); + + case 8: + case "end": + return _context2.stop(); + } + } + }, getBoardsDetail); + }), + // 讨论置顶 + setTopping: /*#__PURE__*/regenerator_default.a.mark(function setTopping(_ref5, _ref6) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function setTopping$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload, callback = _ref5.callback; + call = _ref6.call, put = _ref6.put; + _context3.next = 4; + return call(boards_setTopping, payload); + + case 4: + return _context3.abrupt("return", _context3.sent); + + case 5: + case "end": + return _context3.stop(); + } + } + }, setTopping); + }), + // 讨论取消置顶 + escTopping: /*#__PURE__*/regenerator_default.a.mark(function escTopping(_ref7, _ref8) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function escTopping$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload, callback = _ref7.callback; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return call(boards_escTopping, payload); + + case 4: + return _context4.abrupt("return", _context4.sent); + + case 5: + case "end": + return _context4.stop(); + } + } + }, escTopping); + }), + // 讨论回复列表 + getReplyList: /*#__PURE__*/regenerator_default.a.mark(function getReplyList(_ref9, _ref10) { + var payload, callback, call, put, response; + return regenerator_default.a.wrap(function getReplyList$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload, callback = _ref9.callback; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return call(boards_getReplyList, payload); + + case 4: + response = _context5.sent; + _context5.next = 7; + return put({ + type: 'save', + payload: { + replyList: Object(objectSpread2["a" /* default */])({}, response.data) + } + }); + + case 7: + case "end": + return _context5.stop(); + } + } + }, getReplyList); + }), + // 讨论创建回复 + createReply: /*#__PURE__*/regenerator_default.a.mark(function createReply(_ref11, _ref12) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function createReply$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + payload = _ref11.payload, callback = _ref11.callback; + call = _ref12.call, put = _ref12.put; + _context6.next = 4; + return call(boards_createReply, payload); + + case 4: + return _context6.abrupt("return", _context6.sent); + + case 5: + case "end": + return _context6.stop(); + } + } + }, createReply); + }), + // 讨论回复点赞 + replyLike: /*#__PURE__*/regenerator_default.a.mark(function replyLike(_ref13, _ref14) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function replyLike$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + payload = _ref13.payload, callback = _ref13.callback; + call = _ref14.call, put = _ref14.put; + _context7.next = 4; + return call(boards_replyLike, payload); + + case 4: + return _context7.abrupt("return", _context7.sent); + + case 5: + case "end": + return _context7.stop(); + } + } + }, replyLike); + }), + // 讨论回复取消点赞 + replyUnLike: /*#__PURE__*/regenerator_default.a.mark(function replyUnLike(_ref15, _ref16) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function replyUnLike$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + payload = _ref15.payload, callback = _ref15.callback; + call = _ref16.call, put = _ref16.put; + _context8.next = 4; + return call(boards_replyUnLike, payload); + + case 4: + return _context8.abrupt("return", _context8.sent); + + case 5: + case "end": + return _context8.stop(); + } + } + }, replyUnLike); + }), + // 讨论回复删除 + deleteReply: /*#__PURE__*/regenerator_default.a.mark(function deleteReply(_ref17, _ref18) { + var payload, callback, call, put; + return regenerator_default.a.wrap(function deleteReply$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + payload = _ref17.payload, callback = _ref17.callback; + call = _ref18.call, put = _ref18.put; + _context9.next = 4; + return call(boards_deleteReply, payload); + + case 4: + return _context9.abrupt("return", _context9.sent); + + case 5: + case "end": + return _context9.stop(); + } + } + }, deleteReply); + }), + // 设置操做action + setActionTabs: /*#__PURE__*/regenerator_default.a.mark(function setActionTabs(_ref19, _ref20) { + var payload, call, put; + return regenerator_default.a.wrap(function setActionTabs$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + payload = _ref19.payload; + call = _ref20.call, put = _ref20.put; + _context10.next = 4; + return put({ + type: 'save', + payload: { + actionTabs: Object(objectSpread2["a" /* default */])({}, payload) + } + }); + + case 4: + case "end": + return _context10.stop(); + } + } + }, setActionTabs); + }) + }, + 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 _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "XEnU"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator */ "c1Ei"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectWithoutProperties */ "SIvP"); +/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! umi */ "9kvl"); +/* harmony import */ var _service_user__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/service/user */ "jb+D"); + + + + + +var UserModel = { + namespace: 'user', + state: { + name: '用户登录模块', + //是否显示登录弹窗,false不显示true显示 + showPopLogin: false, + // 是否显示被关闭按钮 + showClosable: false, + // 用户信息 + userInfo: {}, + navigationInfo: {}, + loading: true, + actionTabs: { + key: '', + params: {}, + phone: '' + } + }, + effects: { + login: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function login(_ref, _ref2) { + var payload, call, put, to, params, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function login$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + payload = _ref.payload; + call = _ref2.call, put = _ref2.put; + to = payload.to, params = Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectWithoutProperties__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])(payload, ["to"]); + _context.next = 5; + return call(_service_user__WEBPACK_IMPORTED_MODULE_4__[/* LoginIn */ "g"], params); + + case 5: + response = _context.sent; + + if (!response.status) { + try { + if (to) { + umi__WEBPACK_IMPORTED_MODULE_3__[/* history */ "c"].replace(to); + } else { + location.reload(); + } + } catch (e) {} + } + + case 7: + case "end": + return _context.stop(); + } + } + }, login); + }), + showPopLogin: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function showPopLogin(_ref3, _ref4) { + var payload, put; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function showPopLogin$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + payload = _ref3.payload; + put = _ref4.put; + _context2.next = 4; + return put({ + type: 'save', + payload: { + showPopLogin: payload.showPopLogin, + showClosable: payload.showClosable + } + }); + + case 4: + case "end": + return _context2.stop(); + } + } + }, showPopLogin); + }), + ForgeLogin: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function ForgeLogin(_ref5, _ref6) { + var payload, call, put, to, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function ForgeLogin$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + payload = _ref5.payload; + call = _ref6.call, put = _ref6.put; + to = payload.to; + _context3.next = 5; + return call(_service_user__WEBPACK_IMPORTED_MODULE_4__[/* ForgeLogin */ "c"], Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + + case 5: + response = _context3.sent; + + if (!response.status) { + try { + if (to) { + umi__WEBPACK_IMPORTED_MODULE_3__[/* history */ "c"].replace(to); + } else { + location.reload(); + } + } catch (e) {} + } + + return _context3.abrupt("return", response); + + case 8: + case "end": + return _context3.stop(); + } + } + }, ForgeLogin); + }), + getUserInfo: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getUserInfo(_ref7, _ref8) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getUserInfo$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + payload = _ref7.payload; + call = _ref8.call, put = _ref8.put; + _context4.next = 4; + return call(_service_user__WEBPACK_IMPORTED_MODULE_4__[/* getUserInfo */ "w"], Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + + case 4: + response = _context4.sent; + localStorage.userInfo = JSON.stringify(response); + _context4.next = 8; + return put({ + type: 'save', + payload: { + userInfo: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response) + } + }); + + case 8: + return _context4.abrupt("return", response); + + case 9: + case "end": + return _context4.stop(); + } + } + }, getUserInfo); + }), + getEducoderUserInfo: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getEducoderUserInfo(_ref9, _ref10) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getEducoderUserInfo$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + payload = _ref9.payload; + call = _ref10.call, put = _ref10.put; + _context5.next = 4; + return call(_service_user__WEBPACK_IMPORTED_MODULE_4__[/* getEducoderUserInfo */ "l"], Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + + case 4: + response = _context5.sent; + return _context5.abrupt("return", response); + + case 6: + case "end": + return _context5.stop(); + } + } + }, getEducoderUserInfo); + }), + getNavigationInfo: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function getNavigationInfo(_ref11, _ref12) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function getNavigationInfo$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + payload = _ref11.payload; + call = _ref12.call, put = _ref12.put; + _context6.next = 4; + return call(_service_user__WEBPACK_IMPORTED_MODULE_4__[/* getNavigationInfo */ "p"], Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + + case 4: + response = _context6.sent; + _context6.next = 7; + return put({ + type: 'save', + payload: { + navigationInfo: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, response) + } + }); + + case 7: + case "end": + return _context6.stop(); + } + } + }, getNavigationInfo); + }), + setActionTabs: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function setActionTabs(_ref13, _ref14) { + var payload, call, put; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function setActionTabs$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + payload = _ref13.payload; + call = _ref14.call, put = _ref14.put; + _context7.next = 4; + return put({ + type: 'save', + payload: { + actionTabs: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload) + } + }); + + case 4: + case "end": + return _context7.stop(); + } + } + }, setActionTabs); + }), + ForgeCheckName: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function ForgeCheckName(_ref15, _ref16) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function ForgeCheckName$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + payload = _ref15.payload; + call = _ref16.call, put = _ref16.put; + _context8.next = 4; + return call(_service_user__WEBPACK_IMPORTED_MODULE_4__[/* ForgeCheckName */ "b"], Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + + case 4: + response = _context8.sent; + return _context8.abrupt("return", response); + + case 6: + case "end": + return _context8.stop(); + } + } + }, ForgeCheckName); + }), + ForgeCheckEmail: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function ForgeCheckEmail(_ref17, _ref18) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function ForgeCheckEmail$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + payload = _ref17.payload; + call = _ref18.call, put = _ref18.put; + _context9.next = 4; + return call(_service_user__WEBPACK_IMPORTED_MODULE_4__[/* ForgeCheckEmail */ "a"], Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + + case 4: + response = _context9.sent; + return _context9.abrupt("return", response); + + case 6: + case "end": + return _context9.stop(); + } + } + }, ForgeCheckEmail); + }), + ForgeSaveUserInfo: /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.mark(function ForgeSaveUserInfo(_ref19, _ref20) { + var payload, call, put, response; + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_1___default.a.wrap(function ForgeSaveUserInfo$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + payload = _ref19.payload; + call = _ref20.call, put = _ref20.put; + _context10.next = 4; + return call(_service_user__WEBPACK_IMPORTED_MODULE_4__[/* ForgeSaveUserInfo */ "e"], Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])({}, payload)); + + case 4: + response = _context10.sent; + return _context10.abrupt("return", response); + + case 6: + case "end": + return _context10.stop(); + } + } + }, ForgeSaveUserInfo); + }) + }, + reducers: { + save: function save(state, action) { + return Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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); + +/***/ }), + +/***/ "G3xj": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "QGpR"); + +// 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; + } +}; + + +/***/ }), + +/***/ "GD8e": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "GMoa").f; +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); +var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "g6Je"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "AF8d"); +var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "YiRR"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); + +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; + } +}); + + +/***/ }), + +/***/ "GGyQ": +/*!****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "3ss7"); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "3BUn"); +var getPrototypeOf = __webpack_require__(/*! ../internals/object-get-prototype-of */ "sX0U"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "lCTh"); + +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; + } }); +} + + +/***/ }), + +/***/ "GI8W": +/*!****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); + +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; + } +}); + + +/***/ }), + +/***/ "GIiq": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var of = __webpack_require__(/*! ../internals/collection-of */ "kD8M"); + +// `Map.of` method +// https://tc39.github.io/proposal-setmap-offrom/#sec-map.of +$({ target: 'Map', stat: true }, { + of: of +}); + + +/***/ }), + +/***/ "GMoa": +/*!****************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "Zz2s"); +var propertyIsEnumerableModule = __webpack_require__(/*! ../internals/object-property-is-enumerable */ "x95H"); +var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "chxm"); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "ZajO"); +var toPrimitive = __webpack_require__(/*! ../internals/to-primitive */ "fOfy"); +var has = __webpack_require__(/*! ../internals/has */ "O29V"); +var IE8_DOM_DEFINE = __webpack_require__(/*! ../internals/ie8-dom-define */ "iiUP"); + +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]); +}; + + +/***/ }), + +/***/ "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__); + + +/***/ }), + +/***/ "GQKk": +/*!***************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "958M"); +var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "GMoa").f; +var classof = __webpack_require__(/*! ../internals/classof-raw */ "rzQM"); +var macrotask = __webpack_require__(/*! ../internals/task */ "2F86").set; +var IS_IOS = __webpack_require__(/*! ../internals/engine-is-ios */ "KmJO"); + +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; +}; + + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "Gj96": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "T6fa").IteratorPrototype; +var create = __webpack_require__(/*! ../internals/object-create */ "Lb4M"); +var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "chxm"); +var setToStringTag = __webpack_require__(/*! ../internals/set-to-string-tag */ "8P1j"); +var Iterators = __webpack_require__(/*! ../internals/iterators */ "88+L"); + +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; +}; + + +/***/ }), + +/***/ "GmyR": +/*!****************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "RYUy"); + +var iterableToArray = __webpack_require__(/*! ./iterableToArray */ "UHvR"); + +var unsupportedIterableToArray = __webpack_require__(/*! ./unsupportedIterableToArray */ "rJ5X"); + +var nonIterableSpread = __webpack_require__(/*! ./nonIterableSpread */ "4Qem"); + +function _toConsumableArray(arr) { + return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); +} + +module.exports = _toConsumableArray; + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "Gp4y": +/*!************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var copyWithin = __webpack_require__(/*! ../internals/array-copy-within */ "kmd7"); +var addToUnscopables = __webpack_require__(/*! ../internals/add-to-unscopables */ "pWpj"); + +// `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'); + + +/***/ }), + +/***/ "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' +}); + +/***/ }), + +/***/ "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 ./node_modules/antd/es/table/hooks/useFilter/FilterDropdown.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__, "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; + }; +} + +/***/ }), + +/***/ "H8j4": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_mapCacheSet.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(/*! ./_getMapData */ "QkVE"); + +/** + * 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; +} + +module.exports = mapCacheSet; + + +/***/ }), + +/***/ "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 _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/regenerator */ "c1Ei"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/objectSpread2 */ "XEnU"); +/* harmony import */ var _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/asyncToGenerator */ "5Tp6"); +/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ "ErOA"); + + + + //实训首页列表 + +function getShixunsList(_x) { + return _getShixunsList.apply(this, arguments); +} // 获取实训首页菜单 + +function _getShixunsList() { + _getShixunsList = Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + return _context.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])('/api/shixuns.json', { + method: 'Get', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee2(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + return _context2.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])('/api/disciplines.json', { + method: 'Get', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee3(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + return _context3.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee4(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee4$(_context4) { + while (1) { + switch (_context4.prev = _context4.next) { + case 0: + return _context4.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee5(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee5$(_context5) { + while (1) { + switch (_context5.prev = _context5.next) { + case 0: + return _context5.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee6(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee6$(_context6) { + while (1) { + switch (_context6.prev = _context6.next) { + case 0: + return _context6.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee7(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee7$(_context7) { + while (1) { + switch (_context7.prev = _context7.next) { + case 0: + return _context7.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee8(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee8$(_context8) { + while (1) { + switch (_context8.prev = _context8.next) { + case 0: + return _context8.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee9(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee9$(_context9) { + while (1) { + switch (_context9.prev = _context9.next) { + case 0: + return _context9.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee10(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee10$(_context10) { + while (1) { + switch (_context10.prev = _context10.next) { + case 0: + return _context10.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee11(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee11$(_context11) { + while (1) { + switch (_context11.prev = _context11.next) { + case 0: + return _context11.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee12(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee12$(_context12) { + while (1) { + switch (_context12.prev = _context12.next) { + case 0: + return _context12.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee13(params) { + var _ref, id; + + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.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_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee14(params) { + var _ref2, id, course_id; + + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.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_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee15(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee15$(_context15) { + while (1) { + switch (_context15.prev = _context15.next) { + case 0: + return _context15.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee16(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee16$(_context16) { + while (1) { + switch (_context16.prev = _context16.next) { + case 0: + return _context16.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee17(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee17$(_context17) { + while (1) { + switch (_context17.prev = _context17.next) { + case 0: + return _context17.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/apply_public.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee18(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee18$(_context18) { + while (1) { + switch (_context18.prev = _context18.next) { + case 0: + return _context18.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee19(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee19$(_context19) { + while (1) { + switch (_context19.prev = _context19.next) { + case 0: + return _context19.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee20(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee20$(_context20) { + while (1) { + switch (_context20.prev = _context20.next) { + case 0: + return _context20.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee21(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee21$(_context21) { + while (1) { + switch (_context21.prev = _context21.next) { + case 0: + return _context21.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee22(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee22$(_context22) { + while (1) { + switch (_context22.prev = _context22.next) { + case 0: + return _context22.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee23(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee23$(_context23) { + while (1) { + switch (_context23.prev = _context23.next) { + case 0: + return _context23.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee24(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee24$(_context24) { + while (1) { + switch (_context24.prev = _context24.next) { + case 0: + return _context24.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee25(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee25$(_context25) { + while (1) { + switch (_context25.prev = _context25.next) { + case 0: + return _context25.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee26(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee26$(_context26) { + while (1) { + switch (_context26.prev = _context26.next) { + case 0: + return _context26.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee27(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee27$(_context27) { + while (1) { + switch (_context27.prev = _context27.next) { + case 0: + return _context27.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee28(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee28$(_context28) { + while (1) { + switch (_context28.prev = _context28.next) { + case 0: + return _context28.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee29(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee29$(_context29) { + while (1) { + switch (_context29.prev = _context29.next) { + case 0: + return _context29.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee30(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee30$(_context30) { + while (1) { + switch (_context30.prev = _context30.next) { + case 0: + return _context30.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee31(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee31$(_context31) { + while (1) { + switch (_context31.prev = _context31.next) { + case 0: + return _context31.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee32(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee32$(_context32) { + while (1) { + switch (_context32.prev = _context32.next) { + case 0: + return _context32.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee33(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee33$(_context33) { + while (1) { + switch (_context33.prev = _context33.next) { + case 0: + return _context33.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee34(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee34$(_context34) { + while (1) { + switch (_context34.prev = _context34.next) { + case 0: + return _context34.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee35(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee35$(_context35) { + while (1) { + switch (_context35.prev = _context35.next) { + case 0: + return _context35.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee36(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee36$(_context36) { + while (1) { + switch (_context36.prev = _context36.next) { + case 0: + return _context36.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee37(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee37$(_context37) { + while (1) { + switch (_context37.prev = _context37.next) { + case 0: + return _context37.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee38(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee38$(_context38) { + while (1) { + switch (_context38.prev = _context38.next) { + case 0: + return _context38.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee39(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee39$(_context39) { + while (1) { + switch (_context39.prev = _context39.next) { + case 0: + return _context39.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee40(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee40$(_context40) { + while (1) { + switch (_context40.prev = _context40.next) { + case 0: + return _context40.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee41(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee41$(_context41) { + while (1) { + switch (_context41.prev = _context41.next) { + case 0: + return _context41.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee42(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee42$(_context42) { + while (1) { + switch (_context42.prev = _context42.next) { + case 0: + return _context42.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee43(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee43$(_context43) { + while (1) { + switch (_context43.prev = _context43.next) { + case 0: + return _context43.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee44(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee44$(_context44) { + while (1) { + switch (_context44.prev = _context44.next) { + case 0: + return _context44.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee45(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee45$(_context45) { + while (1) { + switch (_context45.prev = _context45.next) { + case 0: + return _context45.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee46(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee46$(_context46) { + while (1) { + switch (_context46.prev = _context46.next) { + case 0: + return _context46.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee47(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee47$(_context47) { + while (1) { + switch (_context47.prev = _context47.next) { + case 0: + return _context47.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee48(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee48$(_context48) { + while (1) { + switch (_context48.prev = _context48.next) { + case 0: + return _context48.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.identifier, "/challenges.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee49(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee49$(_context49) { + while (1) { + switch (_context49.prev = _context49.next) { + case 0: + return _context49.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee50(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee50$(_context50) { + while (1) { + switch (_context50.prev = _context50.next) { + case 0: + return _context50.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, ".json"), { + method: 'put', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee51(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee51$(_context51) { + while (1) { + switch (_context51.prev = _context51.next) { + case 0: + return _context51.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee52(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee52$(_context52) { + while (1) { + switch (_context52.prev = _context52.next) { + case 0: + return _context52.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/move_position.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee53(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee53$(_context53) { + while (1) { + switch (_context53.prev = _context53.next) { + case 0: + return _context53.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, ".json"), { + method: 'delete', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee54(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee54$(_context54) { + while (1) { + switch (_context54.prev = _context54.next) { + case 0: + return _context54.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/edit.json"), { + method: 'get', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee55(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee55$(_context55) { + while (1) { + switch (_context55.prev = _context55.next) { + case 0: + return _context55.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengeId, "/answer.json"), { + method: 'get', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee56(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee56$(_context56) { + while (1) { + switch (_context56.prev = _context56.next) { + case 0: + return _context56.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengeId, "/crud_answer.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee57(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee57$(_context57) { + while (1) { + switch (_context57.prev = _context57.next) { + case 0: + return _context57.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/create_choose_question.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee58(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee58$(_context58) { + while (1) { + switch (_context58.prev = _context58.next) { + case 0: + return _context58.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/update_choose_question.json?choose_id=").concat(params.questionId), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee59(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee59$(_context59) { + while (1) { + switch (_context59.prev = _context59.next) { + case 0: + return _context59.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee60(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee60$(_context60) { + while (1) { + switch (_context60.prev = _context60.next) { + case 0: + return _context60.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee61(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee61$(_context61) { + while (1) { + switch (_context61.prev = _context61.next) { + case 0: + return _context61.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee62(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee62$(_context62) { + while (1) { + switch (_context62.prev = _context62.next) { + case 0: + return _context62.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/challenges/").concat(params.challengesId, "/edit_choose_question.json?choose_id=").concat(params.questionId), { + method: 'get', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee63(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee63$(_context63) { + while (1) { + switch (_context63.prev = _context63.next) { + case 0: + return _context63.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee64(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee64$(_context64) { + while (1) { + switch (_context64.prev = _context64.next) { + case 0: + return _context64.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee65(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee65$(_context65) { + while (1) { + switch (_context65.prev = _context65.next) { + case 0: + return _context65.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee66(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee66$(_context66) { + while (1) { + switch (_context66.prev = _context66.next) { + case 0: + return _context66.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee67(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee67$(_context67) { + while (1) { + switch (_context67.prev = _context67.next) { + case 0: + return _context67.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee68(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee68$(_context68) { + while (1) { + switch (_context68.prev = _context68.next) { + case 0: + return _context68.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee69(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee69$(_context69) { + while (1) { + switch (_context69.prev = _context69.next) { + case 0: + return _context69.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee70(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee70$(_context70) { + while (1) { + switch (_context70.prev = _context70.next) { + case 0: + return _context70.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee71(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee71$(_context71) { + while (1) { + switch (_context71.prev = _context71.next) { + case 0: + return _context71.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee72(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee72$(_context72) { + while (1) { + switch (_context72.prev = _context72.next) { + case 0: + return _context72.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee73(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee73$(_context73) { + while (1) { + switch (_context73.prev = _context73.next) { + case 0: + return _context73.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee74(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee74$(_context74) { + while (1) { + switch (_context74.prev = _context74.next) { + case 0: + return _context74.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee75(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee75$(_context75) { + while (1) { + switch (_context75.prev = _context75.next) { + case 0: + return _context75.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee76(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee76$(_context76) { + while (1) { + switch (_context76.prev = _context76.next) { + case 0: + return _context76.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee77(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee77$(_context77) { + while (1) { + switch (_context77.prev = _context77.next) { + case 0: + return _context77.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee78(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee78$(_context78) { + while (1) { + switch (_context78.prev = _context78.next) { + case 0: + return _context78.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee79(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee79$(_context79) { + while (1) { + switch (_context79.prev = _context79.next) { + case 0: + return _context79.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.identifier, "/change_editable.json"), { + method: 'put', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee80(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee80$(_context80) { + while (1) { + switch (_context80.prev = _context80.next) { + case 0: + return _context80.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/set_secret_dir.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee81(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee81$(_context81) { + while (1) { + switch (_context81.prev = _context81.next) { + case 0: + return _context81.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee82(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee82$(_context82) { + while (1) { + switch (_context82.prev = _context82.next) { + case 0: + return _context82.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee83(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee83$(_context83) { + while (1) { + switch (_context83.prev = _context83.next) { + case 0: + return _context83.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/init_repository.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee84(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee84$(_context84) { + while (1) { + switch (_context84.prev = _context84.next) { + case 0: + return _context84.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_secret_repository.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee85(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee85$(_context85) { + while (1) { + switch (_context85.prev = _context85.next) { + case 0: + return _context85.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/exist_exercise.json"), { + method: 'get', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee86(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee86$(_context86) { + while (1) { + switch (_context86.prev = _context86.next) { + case 0: + return _context86.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, ".json"), { + method: 'get', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee87(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee87$(_context87) { + while (1) { + switch (_context87.prev = _context87.next) { + case 0: + return _context87.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/publish.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee88(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee88$(_context88) { + while (1) { + switch (_context88.prev = _context88.next) { + case 0: + return _context88.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/open_vnc.json"), { + method: 'post', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee89(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee89$(_context89) { + while (1) { + switch (_context89.prev = _context89.next) { + case 0: + return _context89.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/open_webssh.json"), { + method: 'post', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee90(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee90$(_context90) { + while (1) { + switch (_context90.prev = _context90.next) { + case 0: + return _context90.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/save_image.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee91(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee91$(_context91) { + while (1) { + switch (_context91.prev = _context91.next) { + case 0: + return _context91.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/delete_image.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee92(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee92$(_context92) { + while (1) { + switch (_context92.prev = _context92.next) { + case 0: + return _context92.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/extend_vnc.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee93(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee93$(_context93) { + while (1) { + switch (_context93.prev = _context93.next) { + case 0: + return _context93.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/mirror_applies/".concat(params.id, "/reset_vnc_link.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee94(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee94$(_context94) { + while (1) { + switch (_context94.prev = _context94.next) { + case 0: + return _context94.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/paths/get_task_pass.json", { + method: 'get', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee95(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee95$(_context95) { + while (1) { + switch (_context95.prev = _context95.next) { + case 0: + return _context95.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/jupyters/get_info_with_jupyter_lab.json", { + method: 'get', + params: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* 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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_asyncToGenerator__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"])( /*#__PURE__*/_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.mark(function _callee96(params) { + return _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_regenerator__WEBPACK_IMPORTED_MODULE_0___default.a.wrap(function _callee96$(_context96) { + while (1) { + switch (_context96.prev = _context96.next) { + case 0: + return _context96.abrupt("return", Object(_utils_fetch__WEBPACK_IMPORTED_MODULE_3__[/* default */ "a"])("/api/shixuns/".concat(params.id, "/update_jupyter_lab_setting.json"), { + method: 'post', + body: Object(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_1__[/* default */ "a"])({}, params) + })); + + case 1: + case "end": + return _context96.stop(); + } + } + }, _callee96); + })); + return _updateJupyterLabSetting.apply(this, arguments); +} + +/***/ }), + +/***/ "HDyB": +/*!********************************************!*\ + !*** ./node_modules/lodash/_equalByTag.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"), + Uint8Array = __webpack_require__(/*! ./_Uint8Array */ "JHRd"), + eq = __webpack_require__(/*! ./eq */ "ljhN"), + equalArrays = __webpack_require__(/*! ./_equalArrays */ "or5M"), + mapToArray = __webpack_require__(/*! ./_mapToArray */ "7fqy"), + setToArray = __webpack_require__(/*! ./_setToArray */ "rEGp"); + +/** Used to compose bitmasks for value comparisons. */ +var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; + +/** `Object#toString` result references. */ +var boolTag = '[object Boolean]', + dateTag = '[object Date]', + errorTag = '[object Error]', + mapTag = '[object Map]', + numberTag = '[object Number]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]'; + +var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]'; + +/** Used to convert symbols to primitives and strings. */ +var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined; + +/** + * 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; +} + +module.exports = equalByTag; + + +/***/ }), + +/***/ "HGcs": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "DO64"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "4rco"); +var toString = __webpack_require__(/*! ../internals/object-to-string */ "y+/E"); + +// `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 }); +} + + +/***/ }), + +/***/ "HOxn": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_Promise.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var getNative = __webpack_require__(/*! ./_getNative */ "Cwc5"), + root = __webpack_require__(/*! ./_root */ "Kz5y"); + +/* Built-in method references that are verified to be native. */ +var Promise = getNative(root, 'Promise'); + +module.exports = Promise; + + +/***/ }), + +/***/ "HZuD": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "2dSn"); + +module.exports = function (it) { + var result = toInteger(it); + if (result < 0) throw RangeError("The argument can't be less than 0"); + return result; +}; + + +/***/ }), + +/***/ "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); + }); + }; +} + +/***/ }), + +/***/ "HaG1": +/*!*************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "ZajO"); +var toInteger = __webpack_require__(/*! ../internals/to-integer */ "2dSn"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); +var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "Ow7K"); +var arrayMethodUsesToLength = __webpack_require__(/*! ../internals/array-method-uses-to-length */ "MRyO"); + +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; + + +/***/ }), + +/***/ "Hc01": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var $entries = __webpack_require__(/*! ../internals/object-to-array */ "sLr6").entries; + +// `Object.entries` method +// https://tc39.github.io/ecma262/#sec-object.entries +$({ target: 'Object', stat: true }, { + entries: function entries(O) { + return $entries(O); + } +}); + + +/***/ }), + +/***/ "Hg0r": +/*!*********************************************************!*\ + !*** ./node_modules/dva/dist/index.esm.js + 27 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/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/createClass.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/inherits.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/objectSpread2.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/slicedToArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/typeof.js because of ./src/.umi-production/umi.ts */ +/*! 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/preset-built-in/node_modules/react-router/esm/react-router.js because of ./node_modules/react-router-config/esm/react-router-config.js */ +/*! 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 ./node_modules/@umijs/runtime/dist/index.esm.js */ +/*! 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/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/objectSpread.js +var objectSpread = __webpack_require__("vpQ4"); + +// 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/objectSpread2.js +var objectSpread2 = __webpack_require__("VTBJ"); + +// 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; +} + +/** + * Creates a Redux store that holds the state tree. + * 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. + */ + +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; +} + +/** + * 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 + }); + }; + }; +} + +/* + * This is a dummy function to check if the function name has been altered by minification. + * If the function has been minified and NODE_ENV !== 'production', warn the user. + */ + +function isCrushed() {} + +if (false) {} + + + +// 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 = Object(objectSpread["a" /* default */])({}, 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(Object(objectSpread["a" /* default */])({}, 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(Object(objectSpread["a" /* default */])({}, 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 Object(objectSpread["a" /* default */])({}, 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(Object(objectSpread["a" /* default */])({ + __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(Object(objectSpread["a" /* default */])({}, 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(Object(objectSpread["a" /* default */])({}, 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(Object(objectSpread["a" /* default */])({}, 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 = Object(objectSpread["a" /* default */])({}, 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(Object(objectSpread["a" /* default */])({}, reducers, extraReducers, app._store ? app._store.asyncReducers : {}))); + } + } +} + + + +// EXTERNAL MODULE: ./node_modules/@umijs/preset-built-in/node_modules/react-router/esm/react-router.js +var react_router = __webpack_require__("WHYC"); + +// 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 _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 _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/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/@babel/runtime/helpers/esm/inherits.js +var inherits = __webpack_require__("Ji7U"); + +// 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); + + function DynamicComponent() { + var _getPrototypeOf2; + + 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 = Object(possibleConstructorReturn["a" /* default */])(this, (_getPrototypeOf2 = Object(getPrototypeOf["a" /* default */])(DynamicComponent)).call.apply(_getPrototypeOf2, [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 react_default.a.createElement(AsyncComponent, this.props); + return 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(objectSpread["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 react_default.a.createElement(es["a" /* Provider */], { + store: store + }, router(Object(objectSpread["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; + callback(history.location, history.action); + 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); + + + +/***/ }), + +/***/ "Hvzi": +/*!********************************************!*\ + !*** ./node_modules/lodash/_hashDelete.js ***! + \********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * 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; +} + +module.exports = hashDelete; + + +/***/ }), + +/***/ "HzY1": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var NativePromise = __webpack_require__(/*! ../internals/native-promise-constructor */ "e8fa"); +var fails = __webpack_require__(/*! ../internals/fails */ "U+Zv"); +var getBuiltIn = __webpack_require__(/*! ../internals/get-built-in */ "g0jA"); +var speciesConstructor = __webpack_require__(/*! ../internals/species-constructor */ "2SaV"); +var promiseResolve = __webpack_require__(/*! ../internals/promise-resolve */ "Z3ij"); +var redefine = __webpack_require__(/*! ../internals/redefine */ "4rco"); + +// 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']); +} + + +/***/ }), + +/***/ "I+r/": +/*!**************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "O29V"); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "ZajO"); +var indexOf = __webpack_require__(/*! ../internals/array-includes */ "J19E").indexOf; +var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "R6J2"); + +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; +}; + + +/***/ }), + +/***/ "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 _Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_node_modules_babel_runtime_helpers_esm_slicedToArray__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@umijs/bundler-utils/node_modules/@babel/runtime/helpers/esm/slicedToArray */ "k16G"); +/* 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 _Users_caishi_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 _Users_caishi_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_forgeplus_react_node_modules_umijs_plugin_model_node_modules_fast_deep_equal_index_js__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _Users_caishi_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 _Users_caishi_forgeplus_react_node_modules_umijs_plugin_model_lib_helpers_constant__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_Users_caishi_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"])(_Users_caishi_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(_Users_caishi_forgeplus_react_node_modules_umijs_bundler_utils_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 (!_Users_caishi_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; +} +; + +/***/ }), + +/***/ "IIKO": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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); +} + +/***/ }), + +/***/ "IS7e": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "Zz2s"); +var objectDefinePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "3BUn"); +var regExpFlags = __webpack_require__(/*! ../internals/regexp-flags */ "F2Bo"); +var UNSUPPORTED_Y = __webpack_require__(/*! ../internals/regexp-sticky-helpers */ "shq4").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 + }); +} + + +/***/ }), + +/***/ "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); +}; + + +/***/ }), + +/***/ "IULS": +/*!********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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; + } +}); + + +/***/ }), + +/***/ "IWfS": +/*!**************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "U+Zv"); +var wellKnownSymbol = __webpack_require__(/*! ../internals/well-known-symbol */ "lCTh"); +var V8_VERSION = __webpack_require__(/*! ../internals/engine-v8-version */ "B3yx"); + +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; + }); +}; + + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "Int2": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var flattenIntoArray = __webpack_require__(/*! ../internals/flatten-into-array */ "1eo0"); +var toObject = __webpack_require__(/*! ../internals/to-object */ "OgNa"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); +var toInteger = __webpack_require__(/*! ../internals/to-integer */ "2dSn"); +var arraySpeciesCreate = __webpack_require__(/*! ../internals/array-species-create */ "h+LB"); + +// `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; + } +}); + + +/***/ }), + +/***/ "IrzF": +/*!******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); + +// `Reflect.has` method +// https://tc39.github.io/ecma262/#sec-reflect.has +$({ target: 'Reflect', stat: true }, { + has: function has(target, propertyKey) { + return propertyKey in target; + } +}); + + +/***/ }), + +/***/ "Iyw/": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); + +// `Number.EPSILON` constant +// https://tc39.github.io/ecma262/#sec-number.epsilon +$({ target: 'Number', stat: true }, { + EPSILON: Math.pow(2, -52) +}); + + +/***/ }), + +/***/ "J19E": +/*!********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "ZajO"); +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); +var toAbsoluteIndex = __webpack_require__(/*! ../internals/to-absolute-index */ "bLU8"); + +// `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) +}; + + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "JFQb": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var collectionAddAll = __webpack_require__(/*! ../internals/collection-add-all */ "QYsF"); + +// `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); + } +}); + + +/***/ }), + +/***/ "JHRd": +/*!********************************************!*\ + !*** ./node_modules/lodash/_Uint8Array.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 Uint8Array = root.Uint8Array; + +module.exports = Uint8Array; + + +/***/ }), + +/***/ "JHgL": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_mapCacheGet.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var getMapData = __webpack_require__(/*! ./_getMapData */ "QkVE"); + +/** + * 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); +} + +module.exports = mapCacheGet; + + +/***/ }), + +/***/ "JHtV": +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "3ss7"); +var onFreeze = __webpack_require__(/*! ../internals/internal-metadata */ "v+BB").onFreeze; +var FREEZING = __webpack_require__(/*! ../internals/freezing */ "Osee"); +var fails = __webpack_require__(/*! ../internals/fails */ "U+Zv"); + +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; + } +}); + + +/***/ }), + +/***/ "JKt0": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IndexedObject = __webpack_require__(/*! ../internals/indexed-object */ "Nna7"); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "ZajO"); +var arrayMethodIsStrict = __webpack_require__(/*! ../internals/array-method-is-strict */ "Ow7K"); + +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); + } +}); + + +/***/ }), + +/***/ "JRqE": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var fails = __webpack_require__(/*! ../internals/fails */ "U+Zv"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "3ss7"); + +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; + } +}); + + +/***/ }), + +/***/ "JSQU": +/*!*****************************************!*\ + !*** ./node_modules/lodash/_hashSet.js ***! + \*****************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports, __webpack_require__) { + +var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ "YESw"); + +/** Used to stand-in for `undefined` hash values. */ +var HASH_UNDEFINED = '__lodash_hash_undefined__'; + +/** + * 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; +} + +module.exports = hashSet; + + +/***/ }), + +/***/ "JTzB": +/*!*************************************************!*\ + !*** ./node_modules/lodash/_baseIsArguments.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 argsTag = '[object Arguments]'; + +/** + * 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; +} + +module.exports = baseIsArguments; + + +/***/ }), + +/***/ "JWMi": +/*!**********************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "958M"); + +module.exports = global; + + +/***/ }), + +/***/ "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; +} + +/***/ }), + +/***/ "JgrT": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "BXT5"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "Z7je"); + +// `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', '', ''); + } +}); + + +/***/ }), + +/***/ "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"); + } + + Object.defineProperty(subClass, "prototype", { + value: Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + writable: true, + configurable: true + } + }), + writable: false + }); + if (superClass) Object(_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__[/* default */ "a"])(subClass, superClass); +} + +/***/ }), + +/***/ "JlQn": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "rzQM"); + +// `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; +}; + + +/***/ }), + +/***/ "JumN": +/*!******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "Zz2s"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "GMoa"); + +// `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); + } +}); + + +/***/ }), + +/***/ "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__) { + +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 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 +); + +var inspectCustom = __webpack_require__(/*! ./util.inspect */ 2).custom; +var inspectSymbol = inspectCustom && 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('options "indent" must be "\\t", an integer > 0, or `null`'); + } + + 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'; + } + return String(obj); + } + if (typeof obj === 'bigint') { + return String(obj) + 'n'; + } + + 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 = seen.slice(); + 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') { + var name = nameOf(obj); + var keys = arrObjKeys(obj, inspect); + return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + keys.join(', ') + ' }' : ''); + } + if (isSymbol(obj)) { + var symString = hasShammedSymbols ? String(obj).replace(/^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj); + return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString; + } + if (isElement(obj)) { + var s = '<' + String(obj.nodeName).toLowerCase(); + 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 += ''; + return s; + } + if (isArray(obj)) { + if (obj.length === 0) { return '[]'; } + var xs = arrObjKeys(obj, inspect); + if (indent && !singleLineValues(xs)) { + return '[' + indentedJoin(xs, indent) + ']'; + } + return '[ ' + xs.join(', ') + ' ]'; + } + if (isError(obj)) { + var parts = arrObjKeys(obj, inspect); + if (parts.length === 0) { return '[' + String(obj) + ']'; } + return '{ [' + String(obj) + '] ' + parts.join(', ') + ' }'; + } + if (typeof obj === 'object' && customInspect) { + if (inspectSymbol && typeof obj[inspectSymbol] === 'function') { + return obj[inspectSymbol](); + } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') { + return obj.inspect(); + } + } + if (isMap(obj)) { + var mapParts = []; + 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 = []; + 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))); + } + 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 ? toStr(obj).slice(8, -1) : protoTag ? 'Object' : ''; + var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : ''; + var tag = constructorTag + (stringTag || protoTag ? '[' + [].concat(stringTag || [], protoTag || []).join(': ') + '] ' : ''); + if (ys.length === 0) { return tag + '{}'; } + if (indent) { + return tag + '{' + indentedJoin(ys, indent) + '}'; + } + return tag + '{ ' + ys.join(', ') + ' }'; + } + return String(obj); +}; + +function wrapQuotes(s, defaultStyle, opts) { + var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'"; + return quoteChar + s + quoteChar; +} + +function quote(s) { + return String(s).replace(/"/g, '"'); +} + +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(str.slice(0, opts.maxStringLength), opts) + trailer; + } + // eslint-disable-next-line no-control-regex + var s = str.replace(/(['\\])/g, '\\$1').replace(/[\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' : '') + n.toString(16).toUpperCase(); +} + +function markBoxed(str) { + return 'Object(' + str + ')'; +} + +function weakCollectionOf(type) { + return type + ' { ? }'; +} + +function collectionOf(type, size, entries, indent) { + var joinedEntries = indent ? indentedJoin(entries, indent) : entries.join(', '); + 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 = Array(opts.indent + 1).join(' '); + } else { + return null; + } + return { + base: baseIndent, + prev: Array(depth + 1).join(baseIndent) + }; +} + +function indentedJoin(xs, indent) { + if (xs.length === 0) { return ''; } + var lineJoiner = '\n' + indent.prev + indent.base; + return lineJoiner + xs.join(',' + 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 ((/[^\w$]/).test(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; +} + + +/***/ }), + +/***/ "K1y7": +/*!***********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var getOwnPropertyDescriptor = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "GMoa").f; +var toLength = __webpack_require__(/*! ../internals/to-length */ "1/dy"); +var notARegExp = __webpack_require__(/*! ../internals/not-a-regexp */ "g6Je"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "AF8d"); +var correctIsRegExpLogic = __webpack_require__(/*! ../internals/correct-is-regexp-logic */ "YiRR"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); + +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; + } +}); + + +/***/ }), + +/***/ "K4yx": +/*!************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "lCTh"); + +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; +}; + + +/***/ }), + +/***/ "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 + +/***/ }), + +/***/ "KJZP": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "fOfy"); +var definePropertyModule = __webpack_require__(/*! ../internals/object-define-property */ "3BUn"); +var createPropertyDescriptor = __webpack_require__(/*! ../internals/create-property-descriptor */ "chxm"); + +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; +}; + + +/***/ }), + +/***/ "KMkd": +/*!************************************************!*\ + !*** ./node_modules/lodash/_listCacheClear.js ***! + \************************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ +function listCacheClear() { + this.__data__ = []; + this.size = 0; +} + +module.exports = listCacheClear; + + +/***/ }), + +/***/ "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 ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/iterableToArray.js because of ./src/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./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 */ _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 _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "284h"); + +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"]; +// Initial setting +// should move it to antd main repo? +(0, _twoTonePrimaryColor.setTwoToneColor)('#1890ff'); +var Icon = /*#__PURE__*/React.forwardRef(function (props, ref) { + var _classNames; + + 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; + + var classString = (0, _classnames.default)(prefixCls, (_classNames = {}, (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-").concat(icon.name), !!icon.name), (0, _defineProperty2.default)(_classNames, "".concat(prefixCls, "-spin"), !!spin || icon.name === 'loading'), _classNames), 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 = Icon; +exports.default = _default; + +/***/ }), + +/***/ "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); + +/***/ }), + +/***/ "KTpG": +/*!****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var sign = __webpack_require__(/*! ../internals/math-sign */ "gi+8"); + +// `Math.sign` method +// https://tc39.github.io/ecma262/#sec-math.sign +$({ target: 'Math', stat: true }, { + sign: sign +}); + + +/***/ }), + +/***/ "KUlJ": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var aFunction = __webpack_require__(/*! ../internals/a-function */ "WRgv"); +var getSetIterator = __webpack_require__(/*! ../internals/get-set-iterator */ "8LUj"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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; + } +}); + + +/***/ }), + +/***/ "KVaG": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var log1p = __webpack_require__(/*! ../internals/math-log1p */ "oGHG"); + +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)); + } +}); + + +/***/ }), + +/***/ "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); + +/***/ }), + +/***/ "KfFf": +/*!**********************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qva9"); +var collectionStrong = __webpack_require__(/*! ../internals/collection-strong */ "7alH"); + +// `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); + + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "KmJO": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "6Wqr"); + +module.exports = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent); + + +/***/ }), + +/***/ "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"))) + +/***/ }), + +/***/ "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 _interopRequireWildcard = __webpack_require__(/*! @babel/runtime/helpers/interopRequireWildcard */ "284h"); + +var _interopRequireDefault = __webpack_require__(/*! @babel/runtime/helpers/interopRequireDefault */ "TqRt"); + +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")); + +// 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 + })); +}; + +InfoCircleOutlined.displayName = 'InfoCircleOutlined'; + +var _default = /*#__PURE__*/React.forwardRef(InfoCircleOutlined); + +exports.default = _default; + +/***/ }), + +/***/ "Kwbf": +/*!********************************************!*\ + !*** ./node_modules/rc-util/es/warning.js ***! + \********************************************/ +/*! exports provided: warning, note, resetWarned, call, warningOnce, noteOnce, default */ +/*! exports used: default, noteOnce */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +/* 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 = {}; +function warning(valid, message) { + // Support uglify + if (false) {} +} +function note(valid, message) { + // Support uglify + if (false) {} +} +function resetWarned() { + warned = {}; +} +function call(method, valid, message) { + if (!valid && !warned[message]) { + method(false, message); + warned[message] = true; + } +} +function warningOnce(valid, message) { + call(warning, valid, message); +} +function noteOnce(valid, message) { + call(note, valid, message); +} +/* harmony default export */ __webpack_exports__["a"] = (warningOnce); +/* eslint-enable */ + +/***/ }), + +/***/ "KwlI": +/*!**********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "2dSn"); +var requireObjectCoercible = __webpack_require__(/*! ../internals/require-object-coercible */ "AF8d"); + +// `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) +}; + + +/***/ }), + +/***/ "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; + + +/***/ }), + +/***/ "L/mO": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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' +]; + + +/***/ }), + +/***/ "L5r4": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var IS_PURE = __webpack_require__(/*! ../internals/is-pure */ "A6dR"); +var anObject = __webpack_require__(/*! ../internals/an-object */ "QGpR"); +var getMapIterator = __webpack_require__(/*! ../internals/get-map-iterator */ "vFgh"); +var iterate = __webpack_require__(/*! ../internals/iterate */ "z+kd"); + +// `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; + } +}); + + +/***/ }), + +/***/ "L8xA": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_stackDelete.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * 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; +} + +module.exports = stackDelete; + + +/***/ }), + +/***/ "L9PY": +/*!******************************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var DESCRIPTORS = __webpack_require__(/*! ../internals/descriptors */ "Zz2s"); +var ownKeys = __webpack_require__(/*! ../internals/own-keys */ "F6Nw"); +var toIndexedObject = __webpack_require__(/*! ../internals/to-indexed-object */ "ZajO"); +var getOwnPropertyDescriptorModule = __webpack_require__(/*! ../internals/object-get-own-property-descriptor */ "GMoa"); +var createProperty = __webpack_require__(/*! ../internals/create-property */ "KJZP"); + +// `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; + } +}); + + +/***/ }), + +/***/ "LFei": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "BXT5"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "Z7je"); + +// `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', '', ''); + } +}); + + +/***/ }), + +/***/ "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/.umi-production/umi.ts */ +/*! ModuleConcatenation bailout: Cannot concat with ./node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.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 */ _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() { + 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; + } +} +// 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); + }; +} + +/***/ }), + +/***/ "LKUS": +/*!*******************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "yg/m"); + +// `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); + }; +}); + + +/***/ }), + +/***/ "LMWd": +/*!***************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "958M"); +var redefineAll = __webpack_require__(/*! ../internals/redefine-all */ "SdaD"); +var InternalMetadataModule = __webpack_require__(/*! ../internals/internal-metadata */ "v+BB"); +var collection = __webpack_require__(/*! ../internals/collection */ "qva9"); +var collectionWeak = __webpack_require__(/*! ../internals/collection-weak */ "v7GV"); +var isObject = __webpack_require__(/*! ../internals/is-object */ "3ss7"); +var enforceIternalState = __webpack_require__(/*! ../internals/internal-state */ "tY+O").enforce; +var NATIVE_WEAK_MAP = __webpack_require__(/*! ../internals/native-weak-map */ "nEAk"); + +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; + } + }); +} + + +/***/ }), + +/***/ "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; + +/***/ }), + +/***/ "LSPM": +/*!*********************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); + +// `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; + } +}); + + +/***/ }), + +/***/ "LXxW": +/*!*********************************************!*\ + !*** ./node_modules/lodash/_arrayFilter.js ***! + \*********************************************/ +/*! no static exports found */ +/*! all exports used */ +/*! ModuleConcatenation bailout: Module is not an ECMAScript module */ +/***/ (function(module, exports) { + +/** + * 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; +} + +module.exports = arrayFilter; + + +/***/ }), + +/***/ "LaBb": +/*!***************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "WRgv"); + +// 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); + }; +}; + + +/***/ }), + +/***/ "Lb4M": +/*!*******************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "QGpR"); +var defineProperties = __webpack_require__(/*! ../internals/object-define-properties */ "rLe1"); +var enumBugKeys = __webpack_require__(/*! ../internals/enum-bug-keys */ "L/mO"); +var hiddenKeys = __webpack_require__(/*! ../internals/hidden-keys */ "R6J2"); +var html = __webpack_require__(/*! ../internals/html */ "ET62"); +var documentCreateElement = __webpack_require__(/*! ../internals/document-create-element */ "0IDy"); +var sharedKey = __webpack_require__(/*! ../internals/shared-key */ "3c9i"); + +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); +}; + + +/***/ }), + +/***/ "Lcv6": +/*!*****************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "qlSD"); +var createHTML = __webpack_require__(/*! ../internals/create-html */ "BXT5"); +var forcedStringHTMLMethod = __webpack_require__(/*! ../internals/string-html-forced */ "Z7je"); + +// `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', '', ''); + } +}); + + +/***/ }), + +/***/ "Lcwr": +/*!********************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "yg/m"); + +// `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); + }; +}); + + +/***/ }), + +/***/ "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); + + +/***/ }), + +/***/ "Lqka": +/*!*********************************************************************************************************!*\ + !*** ./node_modules/@umijs/bundler-utils/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 */ "pWpj"); + +addToUnscopables('flatMap'); + + +/***/ }), + +/***/ "LtsZ": +/*!*******************************************************!*\ + !*** ./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 */ "uYtH"); +/* 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 */ "WHYC"); +/* 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 */ "8L3h"); +/* 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: () =>

Loading something

}) + // loadableOptions = { ...loadableOptions, ...options }; + + + return loadableFn(loadableOptions); +} + + + + +/***/ }), + +/***/ "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 + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * 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 = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + + /** 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 '

' + func(text) + '

'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '

fred, barney, & pebbles

' + */ + 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(''); + * // => 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, & 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('<%- value %>'); + * compiled({ 'value': '