needs to exist in the component ancestry.");
}
function createError(message, exception) {
const eMsg = exception ? `
${exception.stack}` : "";
return `[React Intl] ${message}${eMsg}`;
}
function defaultErrorHandler(error) {
if (false) {}
}
const DEFAULT_INTL_CONFIG = {
formats: {},
messages: {},
timeZone: void 0,
textComponent: _react_17_0_2_react.Fragment,
defaultLocale: "en",
defaultFormats: {},
onError: defaultErrorHandler
};
function createIntlCache() {
return {
dateTime: {},
number: {},
message: {},
relativeTime: {},
pluralRules: {},
list: {},
displayNames: {}
};
}
function createFormatters(cache = createIntlCache()) {
const RelativeTimeFormat = Intl.RelativeTimeFormat;
const ListFormat = Intl.ListFormat;
const DisplayNames = Intl.DisplayNames;
return {
getDateTimeFormat: lib(Intl.DateTimeFormat, cache.dateTime),
getNumberFormat: lib(Intl.NumberFormat, cache.number),
getMessageFormat: lib(_intl_messageformat_7_8_4_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) {
const formatType = formats && formats[type];
let format;
if (formatType) {
format = formatType[name];
}
if (format) {
return format;
}
onError(createError(`No ${type} format named: ${name}`));
}
;// CONCATENATED MODULE: ./node_modules/_react-intl@3.12.1@react-intl/lib/formatters/number.js
const 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({ locale, formats, onError }, getNumberFormat, options = {}) {
const { format } = options;
const defaults = format && getNamedFormat(formats, "number", format, onError) || {};
const filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults);
return getNumberFormat(locale, filteredOptions);
}
function formatNumber(config, getNumberFormat, value, options = {}) {
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, options = {}) {
try {
return getFormatter(config, getNumberFormat, options).formatToParts(value);
} catch (e) {
config.onError(createError("Error formatting number.", e));
}
return [];
}
;// CONCATENATED MODULE: ./node_modules/_react-intl@3.12.1@react-intl/lib/formatters/relativeTime.js
const RELATIVE_TIME_FORMAT_OPTIONS = [
"numeric",
"style"
];
function relativeTime_getFormatter({ locale, formats, onError }, getRelativeTimeFormat, options = {}) {
const { format } = options;
const defaults = !!format && getNamedFormat(formats, "relative", format, onError) || {};
const filteredOptions = filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults);
return getRelativeTimeFormat(locale, filteredOptions);
}
function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options = {}) {
if (!unit) {
unit = "second";
}
const RelativeTimeFormat = Intl.RelativeTimeFormat;
if (!RelativeTimeFormat) {
config.onError(createError(`Intl.RelativeTimeFormat is not available in this environment.
Try polyfilling it using "@formatjs/intl-relativetimeformat"
`));
}
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@3.12.1@react-intl/lib/formatters/dateTime.js
const DATE_TIME_FORMAT_OPTIONS = [
"localeMatcher",
"formatMatcher",
"timeZone",
"hour12",
"weekday",
"era",
"year",
"month",
"day",
"hour",
"minute",
"second",
"timeZoneName"
];
function dateTime_getFormatter({ locale, formats, onError, timeZone }, type, getDateTimeFormat, options = {}) {
const { format } = options;
const defaults = Object.assign(Object.assign({}, timeZone && { timeZone }), format && getNamedFormat(formats, type, format, onError));
let filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);
if (type === "time" && !filteredOptions.hour && !filteredOptions.minute && !filteredOptions.second) {
filteredOptions = Object.assign(Object.assign({}, filteredOptions), { hour: "numeric", minute: "numeric" });
}
return getDateTimeFormat(locale, filteredOptions);
}
function formatDate(config, getDateTimeFormat, value, options = {}) {
const 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, options = {}) {
const 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, options = {}) {
const 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, options = {}) {
const 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@3.12.1@react-intl/lib/formatters/plural.js
const PLURAL_FORMAT_OPTIONS = [
"localeMatcher",
"type"
];
function formatPlural({ locale, onError }, getPluralRules, value, options = {}) {
if (!Intl.PluralRules) {
onError(createError(`Intl.PluralRules is not available in this environment.
Try polyfilling it using "@formatjs/intl-pluralrules"
`));
}
const filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);
try {
return getPluralRules(locale, filteredOptions).select(value);
} catch (e) {
onError(createError("Error formatting plural.", e));
}
return "other";
}
;// CONCATENATED MODULE: ./node_modules/_react-intl@3.12.1@react-intl/lib/formatters/message.js
function setTimeZoneInOptions(opts, timeZone) {
return Object.keys(opts).reduce((all, k) => {
all[k] = Object.assign({ timeZone }, opts[k]);
return all;
}, {});
}
function deepMergeOptions(opts1, opts2) {
const keys = Object.keys(Object.assign(Object.assign({}, opts1), opts2));
return keys.reduce((all, k) => {
all[k] = Object.assign(Object.assign({}, opts1[k] || {}), opts2[k] || {});
return all;
}, {});
}
function deepMergeFormatsAndSetTimeZone(f1, timeZone) {
if (!timeZone) {
return f1;
}
const mfFormats = _intl_messageformat_7_8_4_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)) });
}
const prepareIntlMessageFormatHtmlOutput = (chunks) => _react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, ...chunks);
function formatMessage({ locale, formats, messages, defaultLocale, defaultFormats, onError, timeZone }, state, messageDescriptor = { id: "" }, values = {}) {
const { id, defaultMessage } = messageDescriptor;
invariant(!!id, "[React Intl] An `id` must be provided to format a message.");
const message = messages && messages[String(id)];
formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);
defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);
let formattedMessageParts = [];
if (message) {
try {
const formatter = state.getMessageFormat(message, locale, formats, {
formatters: state
});
formattedMessageParts = formatter.formatHTMLMessage(values);
} catch (e) {
onError(createError(`Error formatting message: "${id}" for locale: "${locale}"` + (defaultMessage ? ", using default message as fallback." : ""), e));
}
} else {
if (!defaultMessage || locale && locale.toLowerCase() !== defaultLocale.toLowerCase()) {
onError(createError(`Missing message: "${id}" for locale: "${locale}"` + (defaultMessage ? ", using default message as fallback." : "")));
}
}
if (!formattedMessageParts.length && defaultMessage) {
try {
const formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats);
formattedMessageParts = formatter.formatHTMLMessage(values);
} catch (e) {
onError(createError(`Error formatting the default message for: "${id}"`, e));
}
}
if (!formattedMessageParts.length) {
onError(createError(`Cannot format message: "${id}", using message ${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 prepareIntlMessageFormatHtmlOutput(formattedMessageParts);
}
function message_formatHTMLMessage(config, state, messageDescriptor = { id: "" }, rawValues = {}) {
const escapedValues = Object.keys(rawValues).reduce((escaped, name) => {
const value = rawValues[name];
escaped[name] = typeof value === "string" ? utils_escape(value) : value;
return escaped;
}, {});
return formatMessage(config, state, messageDescriptor, escapedValues);
}
// EXTERNAL MODULE: ./node_modules/_shallow-equal@1.2.1@shallow-equal/objects/index.js
var objects = __webpack_require__(18947);
var objects_default = /*#__PURE__*/__webpack_require__.n(objects);
;// CONCATENATED MODULE: ./node_modules/_react-intl@3.12.1@react-intl/lib/formatters/list.js
const LIST_FORMAT_OPTIONS = [
"localeMatcher",
"type",
"style"
];
const now = Date.now();
function generateToken(i) {
return `${now}_${i}_${now}`;
}
function formatList({ locale, onError }, getListFormat, values, options = {}) {
const ListFormat = Intl.ListFormat;
if (!ListFormat) {
onError(createError(`Intl.ListFormat is not available in this environment.
Try polyfilling it using "@formatjs/intl-listformat"
`));
}
const filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS);
try {
const richValues = {};
const serializedValues = values.map((v, i) => {
if (typeof v === "object") {
const id = generateToken(i);
richValues[id] = v;
return id;
}
return String(v);
});
if (!Object.keys(richValues).length) {
return getListFormat(locale, filteredOptions).format(serializedValues);
}
const parts = getListFormat(locale, filteredOptions).formatToParts(serializedValues);
return parts.reduce((all, el) => {
const 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@3.12.1@react-intl/lib/formatters/displayName.js
const DISPLAY_NAMES_OPTONS = [
"localeMatcher",
"style",
"type",
"fallback"
];
function formatDisplayName({ locale, onError }, getDisplayNames, value, options = {}) {
const DisplayNames = Intl.DisplayNames;
if (!DisplayNames) {
onError(createError(`Intl.DisplayNames is not available in this environment.
Try polyfilling it using "@formatjs/intl-displaynames"
`));
}
const 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@3.12.1@react-intl/lib/components/provider.js
const shallowEquals = (objects_default()) || 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
};
}
function createIntl(config, cache) {
const formatters = createFormatters(cache);
const resolvedConfig = Object.assign(Object.assign({}, DEFAULT_INTL_CONFIG), config);
const { locale, defaultLocale, onError } = resolvedConfig;
if (!locale) {
if (onError) {
onError(createError(`"locale" was not configured, using "${defaultLocale}" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/API.md#intlshape for more details`));
}
resolvedConfig.locale = resolvedConfig.defaultLocale || "en";
} else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {
onError(createError(`Missing locale data for locale: "${locale}" in Intl.NumberFormat. Using default locale: "${defaultLocale}" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/Getting-Started.md#runtime-requirements for more details`));
} else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length && onError) {
onError(createError(`Missing locale data for locale: "${locale}" in Intl.DateTimeFormat. Using default locale: "${defaultLocale}" as fallback. See https://github.com/formatjs/react-intl/blob/master/docs/Getting-Started.md#runtime-requirements for more details`));
}
return Object.assign(Object.assign({}, resolvedConfig), { 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: 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) });
}
class provider_IntlProvider extends _react_17_0_2_react.PureComponent {
constructor() {
super(...arguments);
this.cache = createIntlCache();
this.state = {
cache: this.cache,
intl: createIntl(processIntlConfig(this.props), this.cache),
prevConfig: processIntlConfig(this.props)
};
}
static getDerivedStateFromProps(props, { prevConfig, cache }) {
const config = processIntlConfig(props);
if (!shallowEquals(prevConfig, config)) {
return {
intl: createIntl(config, cache),
prevConfig: config
};
}
return null;
}
render() {
utils_invariantIntlContext(this.state.intl);
return _react_17_0_2_react.createElement(Provider, { value: this.state.intl }, this.props.children);
}
}
provider_IntlProvider.displayName = "IntlProvider";
provider_IntlProvider.defaultProps = DEFAULT_INTL_CONFIG;
// EXTERNAL MODULE: ./src/.umi-production/core/plugin.ts + 15 modules
var core_plugin = __webpack_require__(78697);
// EXTERNAL MODULE: ./node_modules/_event-emitter@0.3.5@event-emitter/index.js
var _event_emitter_0_3_5_event_emitter = __webpack_require__(3424);
var _event_emitter_0_3_5_event_emitter_default = /*#__PURE__*/__webpack_require__.n(_event_emitter_0_3_5_event_emitter);
// EXTERNAL MODULE: ./node_modules/_warning@4.0.3@warning/warning.js
var _warning_4_0_3_warning_warning = __webpack_require__(85239);
;// CONCATENATED MODULE: ./src/.umi-production/plugin-locale/localeExports.ts
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
let g_intl;
const useLocalStorage = true;
const localeExports_event = new (_event_emitter_0_3_5_event_emitter_default())();
const LANG_CHANGE_EVENT = Symbol("LANG_CHANGE");
const flattenMessages = (nestedMessages, prefix = "") => {
return Object.keys(nestedMessages).reduce(
(messages, key) => {
const value = nestedMessages[key];
const prefixedKey = prefix ? `${prefix}.${key}` : key;
if (typeof value === "string") {
messages[prefixedKey] = value;
} else {
Object.assign(messages, flattenMessages(value, prefixedKey));
}
return messages;
},
{}
);
};
const localeInfo = {};
const addLocale = (name, messages, extraLocales) => {
var _a, _b, _c, _d;
if (!name) {
return;
}
const mergeMessages = ((_a = localeInfo[name]) == null ? void 0 : _a.messages) ? Object.assign({}, localeInfo[name].messages, messages) : messages;
const { momentLocale = (_b = localeInfo[name]) == null ? void 0 : _b.momentLocale, antd = (_c = localeInfo[name]) == null ? void 0 : _c.antd } = extraLocales || {};
const locale = (_d = name.split("-")) == null ? void 0 : _d.join("-");
localeInfo[name] = {
messages: mergeMessages,
locale,
momentLocale,
antd
};
if (locale === getLocale()) {
localeExports_event.emit(LANG_CHANGE_EVENT, locale);
}
};
const applyRuntimeLocalePlugin = (initialValue) => {
return (0,core_plugin/* getPluginManager */.We)().applyPlugins({
key: "locale",
type: "modify",
initialValue
});
};
const _createIntl = (locale) => {
const runtimeLocale = applyRuntimeLocalePlugin(localeInfo[locale]);
const _a = runtimeLocale, { cache } = _a, config = __objRest(_a, ["cache"]);
return createIntl(config, cache);
};
const getIntl = (locale, changeIntl) => {
if (g_intl && !changeIntl && !locale) {
return g_intl;
}
if (!locale)
locale = getLocale();
if (locale && localeInfo[locale]) {
return _createIntl(locale);
}
if (localeInfo["zh-CN"]) {
return _createIntl("zh-CN");
}
return createIntl({
locale: "zh-CN",
messages: {}
});
};
const setIntl = (locale) => {
g_intl = getIntl(locale, true);
};
const getLocale = () => {
const runtimeLocale = applyRuntimeLocalePlugin({});
if (typeof (runtimeLocale == null ? void 0 : runtimeLocale.getLocale) === "function") {
return runtimeLocale.getLocale();
}
const lang = navigator.cookieEnabled && typeof localStorage !== "undefined" && useLocalStorage ? window.localStorage.getItem("umi_locale") : "";
let browserLang;
return lang || browserLang || "zh-CN";
};
const getDirection = () => {
const lang = getLocale();
const rtlLangs = ["he", "ar", "fa", "ku"];
const direction = rtlLangs.filter((lng) => lang.startsWith(lng)).length ? "rtl" : "ltr";
return direction;
};
const setLocale = (lang, realReload = true) => {
const updater = () => {
if (getLocale() !== lang) {
if (navigator.cookieEnabled && typeof window.localStorage !== "undefined" && useLocalStorage) {
window.localStorage.setItem("umi_locale", lang || "");
}
setIntl(lang);
if (realReload) {
window.location.reload();
} else {
localeExports_event.emit(LANG_CHANGE_EVENT, lang);
if (window.dispatchEvent) {
const event2 = new Event("languagechange");
window.dispatchEvent(event2);
}
}
}
};
updater();
};
let firstWaring = true;
const localeExports_formatMessage = (descriptor, values) => {
if (firstWaring) {
warning(
false,
`Using this API will cause automatic refresh when switching languages, please use useIntl or injectIntl.
\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
http://j.mp/37Fkd5Q
`
);
firstWaring = false;
}
if (!g_intl) {
setIntl(getLocale());
}
return g_intl.formatMessage(descriptor, values);
};
const getAllLocales = () => Object.keys(localeInfo);
/***/ }),
/***/ 40974:
/*!****************************************!*\
!*** ./src/components/Exercise/ip.tsx ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ y: function() { return /* binding */ findLocalIp; }
/* harmony export */ });
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd */ 43418);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! antd */ 95237);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! antd */ 43604);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _utils_validate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/validate */ 83739);
const findLocalIp = (data) => new Promise((resolve, reject) => {
if (data.ip_limit === "no" && !(data.ip_bind && data.ip_bind_type)) {
return resolve("");
}
window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
if (typeof window.RTCPeerConnection == "undefined")
return reject("WebRTC not supported by browser");
let pc = new RTCPeerConnection();
let ips = [];
pc.createDataChannel("");
pc.createOffer().then((offer) => pc.setLocalDescription(offer)).catch((err) => reject(err));
pc.onicecandidate = (event) => {
console.log("event:", event);
const ipArr = [];
if (!event || !event.candidate) {
console.log("ips", ips);
if (ips.length == 0 || !(0,_utils_validate__WEBPACK_IMPORTED_MODULE_1__/* .isValidIP */ .t)(ips[0])) {
const modal = antd__WEBPACK_IMPORTED_MODULE_2__["default"].info({
title: /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, { flex: "1" }, "\u63D0\u793A"), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "iconfont icon-yiguanbi1 current c-grey-c", onClick: () => modal.destroy() }))),
icon: null,
width: 500,
className: "custom-modal-divider",
content: /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, 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__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.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__WEBPACK_IMPORTED_MODULE_0__.createElement("br", null), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.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");
}
const realIp = ips.filter((item) => (0,_utils_validate__WEBPACK_IMPORTED_MODULE_1__/* .isValidIP */ .t)(item));
if (!realIp || !realIp.length) {
return reject("IP\u83B7\u53D6\u5931\u8D25");
}
return resolve(realIp.join(""));
}
let parts = event.candidate.candidate.split(" ");
let [base, componentId, protocol, priority, ip, port, , type, ...attr] = parts;
let component = ["rtp", "rtpc"];
console.log("event:", event);
if (!ips.some((e) => 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 (let i = 0; i < attr.length; i += 2)
console.log("> " + attr[i] + ": " + attr[i + 1]);
}
};
});
/***/ }),
/***/ 6179:
/*!************************************************!*\
!*** ./src/models/engineering/evaluateList.ts ***!
\************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ k: function() { return /* binding */ evaluateListHeaderKey; }
/* harmony export */ });
/* harmony import */ var _service_engineering__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/service/engineering */ 25934);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! antd */ 8591);
/* harmony import */ var _pages_Engineering_util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/pages/Engineering/util */ 81951);
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
const evaluateListHeaderKey = ["\u8BA4\u8BC1\u4E13\u4E1A", "\u8BA4\u8BC1\u5C4A\u522B"];
const EngineeringEvaluteLisModal = {
namespace: "engineeringEvaluteList",
state: {
actionTabs: {
key: "",
params: {}
},
headerData: {
dataSource: {
[evaluateListHeaderKey[0]]: {
width: 235,
placeholder: `\u8BF7\u9009\u62E9${evaluateListHeaderKey[0]}`,
loading: "engineeringEvaluteList/getMajorList",
dataList: []
},
[evaluateListHeaderKey[1]]: {
width: 138,
placeholder: `\u8BF7\u9009\u62E9${evaluateListHeaderKey[1]}`,
loading: "engineeringEvaluteList/getYearList",
dataList: []
}
},
active: {}
},
tabListData: {
total: 0,
pageNo: 1,
pageSize: 20,
dataSource: []
}
},
effects: {
*setActionTabs({ payload }, { call, put }) {
yield put({
type: "save",
payload: { actionTabs: __spreadValues({}, payload) }
});
},
*getMajorList({ payload }, { call, put, select }) {
const { userInfo } = yield select((_) => _.user);
if (userInfo == null ? void 0 : userInfo.school_id) {
const result = yield call(_service_engineering__WEBPACK_IMPORTED_MODULE_0__/* .getMajorListService */ .BA, userInfo.school_id);
if (result && result.data) {
const item = _pages_Engineering_util__WEBPACK_IMPORTED_MODULE_1__/* .localSelect */ .U.getItem(userInfo == null ? void 0 : userInfo.login);
yield put({
type: "setMajorOrYearDataSource",
payload: {
key: evaluateListHeaderKey[0],
value: result.data.map((list) => ({
label: list.name,
value: list.ec_major_school_id
})),
active: result.data.length > 0 ? item[0] || result.data[0].ec_major_school_id : void 0
}
});
}
}
},
*getYearList({ payload }, { call, put, select }) {
const result = yield call(_service_engineering__WEBPACK_IMPORTED_MODULE_0__/* .getYearListService */ .Nx, payload.id);
const { userInfo } = yield select((_) => _.user);
if (result && result.data) {
const item = _pages_Engineering_util__WEBPACK_IMPORTED_MODULE_1__/* .localSelect */ .U.getItem(userInfo == null ? void 0 : userInfo.login);
yield put({
type: "setMajorOrYearDataSource",
payload: {
key: evaluateListHeaderKey[1],
value: result.data.map((list) => ({
label: list.year,
value: list.ec_year_id
})),
active: result.data.length > 0 ? payload.firstEnter ? item[1] : result.data[0].ec_year_id : void 0
}
});
}
},
*getCourseResults({ payload = {} }, { call, put, select }) {
const { calc, page, per_page } = payload;
const {
headerData,
tabListData
} = yield select(
(_) => _.engineeringEvaluteList
);
const { userInfo } = yield select((_) => _.user);
let id = headerData.active[evaluateListHeaderKey[1]];
if (id) {
let param = {
id,
page: page || 1,
per_page: per_page || tabListData.pageSize
};
if (calc) {
param = __spreadProps(__spreadValues({}, param), {
page: tabListData.pageNo
});
}
const result = yield call(_service_engineering__WEBPACK_IMPORTED_MODULE_0__/* .getCourseResultsService */ ._y, param);
const k = [headerData.active[evaluateListHeaderKey[0]], headerData.active[evaluateListHeaderKey[1]]];
_pages_Engineering_util__WEBPACK_IMPORTED_MODULE_1__/* .localSelect */ .U.setItem(userInfo == null ? void 0 : userInfo.login, k);
if (result && result.ec_courses) {
yield put({
type: "setCourseResults",
payload: __spreadProps(__spreadValues({}, tabListData), {
pageNo: param.page,
total: result.count,
pageSize: param.per_page || tabListData.pageSize,
dataSource: result.ec_courses.map((list, index) => __spreadProps(__spreadValues({}, list), {
key: param.page > 1 ? (param.page - 1) * param.per_page + index + 1 : index + 1
}))
})
});
}
} else {
yield put({
type: "setCourseResults",
payload: __spreadProps(__spreadValues({}, tabListData), {
pageNo: 1,
total: 0,
dataSource: []
})
});
}
},
*exportCourse({ payload }, { call, select }) {
const { headerData } = yield select(
(_) => _.engineeringEvaluteList
);
if (headerData.active[evaluateListHeaderKey[1]]) {
yield call(
_service_engineering__WEBPACK_IMPORTED_MODULE_0__/* .exportCourseService */ .F,
headerData.active[evaluateListHeaderKey[1]]
);
}
},
*compute({ payload }, { call, put }) {
const _a = payload, { all } = _a, rest = __objRest(_a, ["all"]);
const result = yield call(
all ? _service_engineering__WEBPACK_IMPORTED_MODULE_0__/* .postComputeAllService */ .At : _service_engineering__WEBPACK_IMPORTED_MODULE_0__/* .postComputeCourseSingleService */ .PX,
rest
);
if (result && result.status === 0) {
antd__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.success("\u8BA1\u7B97\u5B8C\u6210");
yield put({
type: "getCourseResults",
payload: {
calc: true
}
});
} else {
antd__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP.error(result.message);
}
}
},
reducers: {
save(state, action) {
return __spreadValues(__spreadValues({}, state), action.payload);
},
setMajorOrYearDataSource(state, { payload }) {
let active = state.headerData.active;
if (payload.active) {
active = __spreadProps(__spreadValues({}, active), {
[payload.key]: payload.active
});
}
return __spreadProps(__spreadValues({}, state), {
headerData: __spreadProps(__spreadValues({}, state.headerData), {
dataSource: __spreadProps(__spreadValues({}, state.headerData.dataSource), {
[payload.key]: __spreadProps(__spreadValues({}, state.headerData.dataSource[payload.key]), {
dataList: payload.value
})
}),
active
})
});
},
setMajorOrYearActive(state, { payload }) {
return __spreadProps(__spreadValues({}, state), {
headerData: __spreadProps(__spreadValues({}, state.headerData), {
active: __spreadProps(__spreadValues({}, state.headerData.active), {
[payload.key]: payload.value
})
})
});
},
setCourseResults(state, { payload }) {
return __spreadProps(__spreadValues({}, state), {
tabListData: __spreadValues(__spreadValues({}, state.tabListData), payload)
});
}
},
subscriptions: {
setup({ dispatch, history }) {
return history.listen(({ pathname }) => {
if (pathname === "/") {
dispatch({
type: "query"
});
}
});
}
}
};
/* harmony default export */ __webpack_exports__.Z = (EngineeringEvaluteLisModal);
/***/ }),
/***/ 55267:
/*!***************************************!*\
!*** ./src/models/problemset/util.ts ***!
\***************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ L: function() { return /* binding */ formatCourseOptions; },
/* harmony export */ r: function() { return /* binding */ formatPaperData; }
/* harmony export */ });
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
const formatCourseOptions = (disciplines) => {
return disciplines == null ? void 0 : disciplines.map((item) => {
const children = (item.sub_disciplines || []).map((subItem) => ({
value: subItem.id,
label: subItem.name
}));
return {
value: item.id,
label: item.name,
children
};
});
};
const numberFormatChinese = {
1: "\u4E00",
2: "\u4E8C",
3: "\u4E09",
4: "\u56DB",
5: "\u4E94",
6: "\u516D",
7: "\u4E03",
8: "\u516B"
};
const formatPaperData = (originData) => {
if (!originData) {
return;
}
const {
all_questions_count,
all_score,
single_questions,
multiple_questions,
judgement_questions,
program_questions,
completion_questions,
subjective_questions,
practical_questions,
combination_questions
} = originData || {};
const questionData = [
__spreadValues({ type: "SINGLE", name: "\u5355\u9009\u9898" }, single_questions),
__spreadValues({ type: "MULTIPLE", name: "\u591A\u9009\u9898" }, multiple_questions),
__spreadValues({ type: "COMPLETION", name: "\u586B\u7A7A\u9898" }, completion_questions),
__spreadValues({ type: "JUDGMENT", name: "\u5224\u65AD\u9898" }, judgement_questions),
__spreadValues({ type: "SUBJECTIVE", name: "\u7B80\u7B54\u9898" }, subjective_questions),
__spreadValues({ type: "PROGRAM", name: "\u7F16\u7A0B\u9898" }, program_questions),
__spreadValues({ type: "PRACTICAL", name: "\u5B9E\u8BAD\u9898" }, practical_questions),
__spreadValues({ type: "COMBINATION", name: "\u7EC4\u5408\u9898" }, combination_questions)
];
const questionList = questionData.filter((item) => item.questions_count > 0).map((item, index) => __spreadValues(__spreadValues({}, item), { number: numberFormatChinese[index + 1] }));
return {
all_questions_count,
all_score,
questionList
};
};
/***/ }),
/***/ 81951:
/*!****************************************!*\
!*** ./src/pages/Engineering/util.tsx ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ U: function() { return /* binding */ localSelect; },
/* harmony export */ t: function() { return /* binding */ verifyModal; }
/* harmony export */ });
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! antd */ 43418);
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/authority */ 77883);
const verifyModal = (fuc, text = "") => {
antd__WEBPACK_IMPORTED_MODULE_1__["default"].confirm({
centered: true,
width: 520,
okText: "\u786E\u5B9A",
cancelText: "\u53D6\u6D88",
title: "\u63D0\u793A",
content: text,
onOk: fuc
});
};
const localSelect = {
setItem: (key, value) => {
var _a;
const recordKey = key + "-engineering" + ((_a = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_0__/* .userInfo */ .eY)()) == null ? void 0 : _a.school_id);
const recordValue = JSON.stringify(value);
localStorage.setItem(recordKey, recordValue);
},
getItem: (key) => {
var _a;
const recordKey = key + "-engineering" + ((_a = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_0__/* .userInfo */ .eY)()) == null ? void 0 : _a.school_id);
const localRecordValue = localStorage.getItem(recordKey);
const recordValue = localRecordValue !== null && localRecordValue !== "[object Object]" ? JSON.parse(localRecordValue) : [];
return recordValue;
},
clear: (key) => {
var _a;
const recordKey = key + "-engineering" + ((_a = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_0__/* .userInfo */ .eY)()) == null ? void 0 : _a.school_id);
localStorage.removeItem(recordKey);
}
};
/***/ }),
/***/ 58814:
/*!********************************!*\
!*** ./src/service/account.ts ***!
\********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $f: function() { return /* binding */ cancelProfessionalAuth; },
/* harmony export */ Cq: function() { return /* binding */ getCode; },
/* harmony export */ GY: function() { return /* binding */ getSchoolOption; },
/* harmony export */ I8: function() { return /* binding */ bindEmail; },
/* harmony export */ Ow: function() { return /* binding */ applyProfessionalAuth; },
/* harmony export */ P: function() { return /* binding */ cancelRealNameAuth; },
/* harmony export */ Ql: function() { return /* binding */ getDepartmentOption; },
/* harmony export */ RA: function() { return /* binding */ cancelAuthentication; },
/* harmony export */ Zm: function() { return /* binding */ appplyDepartment; },
/* harmony export */ bz: function() { return /* binding */ appplySchool; },
/* harmony export */ eF: function() { return /* binding */ bindPhone; },
/* harmony export */ gQ: function() { return /* binding */ updatePassword; },
/* harmony export */ ht: function() { return /* binding */ applyRealNameAuth; },
/* harmony export */ kN: function() { return /* binding */ cancelProfessionalCertification; },
/* harmony export */ n1: function() { return /* binding */ updateAvatar; },
/* harmony export */ nI: function() { return /* binding */ createSubjectVideo; },
/* harmony export */ o9: function() { return /* binding */ getBasicInfo; },
/* harmony export */ sG: function() { return /* binding */ updateAccount; },
/* harmony export */ wi: function() { return /* binding */ unbindAccount; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function updateAvatar(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.login}/avatar.json`, {
method: "put",
body: params
});
});
}
function getBasicInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.login}.json`, {
method: "get"
});
});
}
function appplySchool(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/add_school_applies.json`, {
method: "post",
body: params
});
});
}
function getSchoolOption(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/schools/for_option.json`, {
method: "get",
params
});
});
}
function getDepartmentOption(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/schools/${params.id}/departments/for_option.json`, {
method: "get",
params
});
});
}
function appplyDepartment(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/add_department_applies.json`, {
method: "post",
body: params
});
});
}
function updateAccount(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.id}.json`, {
method: "put",
body: params
});
});
}
function cancelRealNameAuth(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.login}/authentication_apply.json`, {
method: "delete"
});
});
}
function cancelProfessionalAuth(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.login}/professional_auth_apply.json`, {
method: "delete"
});
});
}
function applyProfessionalAuth(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.id}/professional_auth_apply.json`, {
method: "post",
body: params
});
});
}
function applyRealNameAuth(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.id}/authentication_apply.json`, {
method: "post",
body: params
});
});
}
function getCode(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/accounts/get_verification_code.json`, {
method: "get",
params
});
});
}
function bindPhone(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.login}/phone_bind.json`, {
method: "post",
body: params
});
});
}
function bindEmail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.login}/email_bind.json`, {
method: "post",
body: params
});
});
}
function updatePassword(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.login}/password.json`, {
method: "put",
body: params
});
});
}
function unbindAccount(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.basicInfoId}/open_users/${params.id}.json`, {
method: "delete"
});
});
}
function cancelAuthentication(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.login}/cancel_authentication.json`, {
method: "post",
body: params
});
});
}
function cancelProfessionalCertification(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.login}/cancel_professional_certification.json`, {
method: "post",
body: params
});
});
}
function createSubjectVideo(urlParams, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${urlParams.login}/videos/${urlParams.id}/create_subject_video.json`, {
method: "post",
body: params
});
});
}
/***/ }),
/***/ 288:
/*!*************************************!*\
!*** ./src/service/announcement.ts ***!
\*************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ An: function() { return /* binding */ newInforms; },
/* harmony export */ TO: function() { return /* binding */ informUp; },
/* harmony export */ my: function() { return /* binding */ updateInforms; },
/* harmony export */ nZ: function() { return /* binding */ informDown; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function informUp(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/inform_up.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function informDown(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/inform_down.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function updateInforms(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/update_informs.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function newInforms(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/new_informs.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
/***/ }),
/***/ 93931:
/*!***********************************!*\
!*** ./src/service/attachment.ts ***!
\***********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ H: function() { return /* binding */ updateVisits; },
/* harmony export */ Nm: function() { return /* binding */ getDetail; },
/* harmony export */ Ot: function() { return /* binding */ updateFiles; },
/* harmony export */ SV: function() { return /* binding */ allAttachment; },
/* harmony export */ tO: function() { return /* binding */ fileImport; },
/* harmony export */ zI: function() { return /* binding */ mineAttachment; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function allAttachment(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/files/public_with_course_and_project`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function mineAttachment(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/files/mine_with_course_and_project.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function fileImport(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/files/import.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/files/${params.id}.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function updateFiles(params) {
return __async(this, null, function* () {
const { id } = params;
delete params.id;
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/files/${id}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function updateVisits(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/files/${params.id}/update_visits.json`, {
method: "post"
});
});
}
/***/ }),
/***/ 79650:
/*!*******************************!*\
!*** ./src/service/boards.ts ***!
\*******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ CJ: function() { return /* binding */ escTopping; },
/* harmony export */ Mf: function() { return /* binding */ deleteReply; },
/* harmony export */ NA: function() { return /* binding */ replyLike; },
/* harmony export */ PC: function() { return /* binding */ getReplyList; },
/* harmony export */ PP: function() { return /* binding */ createReply; },
/* harmony export */ YQ: function() { return /* binding */ replyUnLike; },
/* harmony export */ cc: function() { return /* binding */ setTopping; },
/* harmony export */ dI: function() { return /* binding */ getBoardsDetail; },
/* harmony export */ yq: function() { return /* binding */ getBoardsCategoryList; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getBoardsCategoryList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/board_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getBoardsDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/messages/${params.boardId}.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function setTopping(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/messages/${params.id}/sticky_top.json`, {
method: "put",
body: {
course_id: params.coursesId
}
});
});
}
function escTopping(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/messages/${params.id}/sticky_top.json`, {
method: "put",
body: {
course_id: params.coursesId
}
});
});
}
function getReplyList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/messages/${params.boardId}/reply_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function createReply(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/messages/${params.boardId}/reply.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function replyLike(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/praise_tread/like.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function replyUnLike(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/praise_tread/unlike.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function deleteReply(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/commons/delete.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
/***/ }),
/***/ 28108:
/*!***********************************!*\
!*** ./src/service/classrooms.ts ***!
\***********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $T: function() { return /* binding */ renameCourseGroup; },
/* harmony export */ A: function() { return /* binding */ deleteCourse; },
/* harmony export */ Ab: function() { return /* binding */ moveboard; },
/* harmony export */ Al: function() { return /* binding */ getClassroomCommonHomeworksList; },
/* harmony export */ BQ: function() { return /* binding */ createExperiment; },
/* harmony export */ BR: function() { return /* binding */ getClassroomPollsList; },
/* harmony export */ Bn: function() { return /* binding */ submitCourses; },
/* harmony export */ Cq: function() { return /* binding */ getPollsCourseGroup; },
/* harmony export */ DJ: function() { return /* binding */ getLiveVideoList; },
/* harmony export */ Dd: function() { return /* binding */ getCourseUseInfos; },
/* harmony export */ Ds: function() { return /* binding */ createCoursesHomework; },
/* harmony export */ EO: function() { return /* binding */ getCourseEditData; },
/* harmony export */ Ed: function() { return /* binding */ getCoursesMine; },
/* harmony export */ FU: function() { return /* binding */ searchCoursesList; },
/* harmony export */ Fg: function() { return /* binding */ getRankList; },
/* harmony export */ GV: function() { return /* binding */ getCourseWorkscore; },
/* harmony export */ Gk: function() { return /* binding */ getClassroomTeacherShixunsList; },
/* harmony export */ Gm: function() { return /* binding */ getShixunListsItem; },
/* harmony export */ Gz: function() { return /* binding */ getStatisticsBody; },
/* harmony export */ Hl: function() { return /* binding */ getStatisticsHeader; },
/* harmony export */ Hn: function() { return /* binding */ getShixunAiRecommendLists; },
/* harmony export */ ID: function() { return /* binding */ updatePollVotes; },
/* harmony export */ J2: function() { return /* binding */ getCourseStudentsList; },
/* harmony export */ K$: function() { return /* binding */ getSchoolList; },
/* harmony export */ KP: function() { return /* binding */ getBoardList; },
/* harmony export */ KT: function() { return /* binding */ getAttachmentList; },
/* harmony export */ L$: function() { return /* binding */ setInviteCodeHalt; },
/* harmony export */ Lk: function() { return /* binding */ getCommitIdContent; },
/* harmony export */ Ls: function() { return /* binding */ getClassroomAttendancesStatistic; },
/* harmony export */ MA: function() { return /* binding */ deleteStudent; },
/* harmony export */ MJ: function() { return /* binding */ exportPollsScores; },
/* harmony export */ Mc: function() { return /* binding */ stopHomework; },
/* harmony export */ N7: function() { return /* binding */ getClassroomExercisesList; },
/* harmony export */ Nd: function() { return /* binding */ getClassroomShixunsList; },
/* harmony export */ Nl: function() { return /* binding */ exportCourseAndOther; },
/* harmony export */ Ns: function() { return /* binding */ submitPollAnswer; },
/* harmony export */ O3: function() { return /* binding */ getVideoList; },
/* harmony export */ Pj: function() { return /* binding */ getShixunLists; },
/* harmony export */ QX: function() { return /* binding */ exportCourseTotalScore; },
/* harmony export */ QZ: function() { return /* binding */ getAnnouncementList; },
/* harmony export */ R2: function() { return /* binding */ getClassroomGraduationTaskList; },
/* harmony export */ Rk: function() { return /* binding */ getCourseGroupStudents; },
/* harmony export */ S9: function() { return /* binding */ duplicateCourse; },
/* harmony export */ U8: function() { return /* binding */ updateTaskPosition; },
/* harmony export */ UD: function() { return /* binding */ updateAttendanceStatus; },
/* harmony export */ U_: function() { return /* binding */ getClassroomTopBanner; },
/* harmony export */ Uy: function() { return /* binding */ exportExerciseStudentScores; },
/* harmony export */ V8: function() { return /* binding */ getClassroomList; },
/* harmony export */ Vw: function() { return /* binding */ getClassroomAttendancesList; },
/* harmony export */ W0: function() { return /* binding */ exportCourseMemberScores; },
/* harmony export */ W7: function() { return /* binding */ getCoursesLists; },
/* harmony export */ WK: function() { return /* binding */ joincoursegroup; },
/* harmony export */ Wr: function() { return /* binding */ moveCategory; },
/* harmony export */ YR: function() { return /* binding */ exportCourseInfo; },
/* harmony export */ Z0: function() { return /* binding */ deleteSecondCategory; },
/* harmony export */ ZT: function() { return /* binding */ getCourseware; },
/* harmony export */ ZX: function() { return /* binding */ courseMemberAttendances; },
/* harmony export */ _9: function() { return /* binding */ getExperimentLists; },
/* harmony export */ _B: function() { return /* binding */ cancelMarkWrongQuestion; },
/* harmony export */ aP: function() { return /* binding */ exportCourseWorkListScores; },
/* harmony export */ aQ: function() { return /* binding */ createShixunHomework; },
/* harmony export */ aZ: function() { return /* binding */ addStudentBySearch; },
/* harmony export */ bm: function() { return /* binding */ getCourseMemberAttendanceData; },
/* harmony export */ bz: function() { return /* binding */ appplySchool; },
/* harmony export */ c_: function() { return /* binding */ getAllCourseGroup; },
/* harmony export */ ds: function() { return /* binding */ getAttendancesData; },
/* harmony export */ fN: function() { return /* binding */ exitCourse; },
/* harmony export */ fr: function() { return /* binding */ updateCourseData; },
/* harmony export */ g4: function() { return /* binding */ getCourseStatistics; },
/* harmony export */ gq: function() { return /* binding */ setAssistantPermissions; },
/* harmony export */ hf: function() { return /* binding */ getNewCourseGroups; },
/* harmony export */ i: function() { return /* binding */ deleteBoardCategory; },
/* harmony export */ i6: function() { return /* binding */ joinCourseGroup; },
/* harmony export */ i7: function() { return /* binding */ getPollStartAnswer; },
/* harmony export */ ih: function() { return /* binding */ getMoocEditData; },
/* harmony export */ kW: function() { return /* binding */ getCourseGroupsList; },
/* harmony export */ km: function() { return /* binding */ getAllTasks; },
/* harmony export */ nQ: function() { return /* binding */ searchSchoolTeacherList; },
/* harmony export */ nX: function() { return /* binding */ hiddenModule; },
/* harmony export */ oM: function() { return /* binding */ getSearchCourseList; },
/* harmony export */ oR: function() { return /* binding */ getAllowEndGroups; },
/* harmony export */ pf: function() { return /* binding */ getNewStartClassData; },
/* harmony export */ pr: function() { return /* binding */ markWrongQuestion; },
/* harmony export */ pv: function() { return /* binding */ deleteCourseGroup; },
/* harmony export */ qB: function() { return /* binding */ getCourseGroups; },
/* harmony export */ rS: function() { return /* binding */ getAssistantPermissions; },
/* harmony export */ s: function() { return /* binding */ createMoocData; },
/* harmony export */ sb: function() { return /* binding */ setPublicOrPrivate; },
/* harmony export */ t1: function() { return /* binding */ getCourseActscore; },
/* harmony export */ tB: function() { return /* binding */ updateMoocData; },
/* harmony export */ td: function() { return /* binding */ exportMoocrecords; },
/* harmony export */ uh: function() { return /* binding */ addTeacher; },
/* harmony export */ up: function() { return /* binding */ calculateAllShixunScores; },
/* harmony export */ w9: function() { return /* binding */ getClassroomLeftMenus; },
/* harmony export */ wR: function() { return /* binding */ transferToCourseGroup; },
/* harmony export */ yS: function() { return /* binding */ exportCourseActScore; },
/* harmony export */ yV: function() { return /* binding */ getClassroomGraduationTopicsList; },
/* harmony export */ yd: function() { return /* binding */ stickyModule; },
/* harmony export */ zg: function() { return /* binding */ getAttendanceDetail; }
/* harmony export */ });
/* unused harmony exports getCourseMenus, exportCourseWorkListAppendix */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const getCourseUseInfos = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/course_statistics/course_use_infos.json", { method: "Get", params });
});
const getRankList = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/course_statistics/rank_list.json", { method: "Get", params });
});
const getStatisticsBody = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/course_statistics/statistics_body.json", { method: "Get", params });
});
const getStatisticsHeader = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/course_statistics/statistics_header.json", { method: "Get", params });
});
function setAssistantPermissions(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.course_id}/set_assistant_permissions.json`, {
method: "post",
body: __spreadValues({}, params.permissions)
});
});
}
function getAssistantPermissions(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.course_id}/assistant_permissions.json`, {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getClassroomList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/courses.json", {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getShixunAiRecommendLists(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
"/api/intelligent_recommendations/according_course_recommend_shixuns.json",
{
method: "Get",
params: __spreadValues({}, params)
}
);
});
}
function getCourseMenus(params) {
return __async(this, null, function* () {
return Fetch("/api/disciplines.json", {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getClassroomTopBanner(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/top_banner.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getClassroomLeftMenus(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.id || params.coursesId}/left_banner.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function getClassroomShixunsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/homework_commons.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getClassroomTeacherShixunsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/homework_commons/list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getClassroomGraduationTopicsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/graduation_topics.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getClassroomGraduationTaskList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/graduation_tasks.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getClassroomExercisesList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/exercises.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getClassroomPollsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/polls.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getClassroomCommonHomeworksList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/homework_commons.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCourseGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/course_groups.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getNewCourseGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/all_course_groups.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getClassroomAttendancesList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/attendances.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getClassroomAttendancesStatistic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/weapps/courses/${params.coursesId}/attendances.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getAttendanceDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/attendances/${params.id}/edit.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getAnnouncementList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/informs.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getAttachmentList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/files.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getVideoList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/course_videos.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getLiveVideoList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/live_links.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCoursesMine(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/mine.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getBoardList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/boards/${params.categoryId}/messages.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCourseGroupsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/course_groups.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCourseStudentsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/students.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCourseStatistics(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/statistics.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCourseWorkscore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/work_score.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCourseActscore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/act_score.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getShixunLists(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixun_lists.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getShixunListsItem(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getExperimentLists(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params == null ? void 0 : params.course_id}/homework_commons/impersonal_list.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function createShixunHomework(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/homework_commons/create_shixun_homework.json`,
{
method: "post",
body: __spreadValues({}, params)
}
);
});
}
function createExperiment(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params == null ? void 0 : params.course_id}/homework_commons/create_collaborators.json`,
{
method: "post",
body: __spreadValues({}, params)
}
);
});
}
function getCoursesLists(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/subject_lists.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function createCoursesHomework(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/homework_commons/create_subject_homework.json`,
{
method: "post",
body: __spreadValues({}, params)
}
);
});
}
function getSchoolList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/schools/school_list.json`, {
method: "get",
params
});
});
}
function getSearchCourseList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/search_course_list.json`, {
method: "post",
body: params
});
});
}
function submitCourses(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses.json`, {
method: "post",
body: params
});
});
}
function appplySchool(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/add_school_applies.json`, {
method: "post",
body: params
});
});
}
function searchSchoolTeacherList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/member_search.json`, {
method: "get",
params
});
});
}
function searchCoursesList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/search_all.json`, {
method: "get",
params
});
});
}
function addTeacher(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/add_teacher.json`, {
method: "post",
body: params
});
});
}
function addStudentBySearch(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/add_students_by_search.json`, {
method: "post",
body: params
});
});
}
function setPublicOrPrivate(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/set_public_or_private.json`, {
method: "post",
body: params
});
});
}
function setInviteCodeHalt(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/set_invite_code_halt.json`, {
method: "post",
body: params
});
});
}
function duplicateCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/duplicate_course.json`, {
method: "post",
body: params
});
});
}
function deleteCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}.json`, {
method: "delete",
body: params
});
});
}
function getCourseEditData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/settings.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function updateCourseData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}.json`, {
method: "put",
body: params
});
});
}
function exportCourseInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/export_couser_info.json`, {
method: "get",
params: { export: true }
});
});
}
function exportCourseActScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/export_member_act_score_async.json`,
{
method: "get",
params: __spreadValues({ export: true }, params)
}
);
});
}
function exportCourseTotalScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/export_total_homework_commons_score.json`,
{
method: "get",
params: __spreadValues({ export: true }, params)
}
);
});
}
function exportCourseAndOther(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/export_total_exercises_and_other_score.json`,
{
method: "get",
params: __spreadValues({ export: true }, params)
}
);
});
}
function exportMoocrecords(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/export_mooc_records.json`, {
method: "get",
params: __spreadValues({ export: true }, params)
});
});
}
function exportCourseMemberScores(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/export_total_course_score.json`,
{
method: "get",
params: __spreadValues({ export: true }, params)
}
);
});
}
function exportCourseWorkListScores(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/homework_commons/${params.categoryId}/export_scores.json`,
{
method: "get",
params: __spreadValues({ export: true }, params)
}
);
});
}
function exportCourseWorkListAppendix(params) {
return __async(this, null, function* () {
return Fetch(`/api/homework_commons/${params.categoryId}/works_list.zip`, {
method: "get",
params: __spreadValues({ export: true }, params)
});
});
}
function deleteSecondCategory(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api//course_second_categories/${params.id}.json`, {
method: "delete",
params: { export: true }
});
});
}
function deleteBoardCategory(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api//boards/${params.id}.json`, {
method: "delete",
params: { export: true }
});
});
}
function stickyModule(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_modules/${params.id}/sticky_module.json`, {
method: "get"
});
});
}
function hiddenModule(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_modules/${params.id}/hidden_module.json`, {
method: "get"
});
});
}
function getNewStartClassData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/new.json`, {
method: "get",
params
});
});
}
function getAttendancesData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/weapps/attendances/${params.id}.json`, {
method: "get",
params
});
});
}
function getCourseMemberAttendanceData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/weapps/course_member_attendances.json`, {
method: "get",
params
});
});
}
function updateAttendanceStatus(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/weapps/course_member_attendances/update_status.json`, {
method: "post",
body: params
});
});
}
function exportPollsScores(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/commit_result.xlsx`, {
method: "get",
params: __spreadValues({ export: true }, params)
});
});
}
function exportExerciseStudentScores(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/export_scores.json`, {
method: "get",
params: __spreadValues({ export: true }, params)
});
});
}
function getPollStartAnswer(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/start_answer.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function updatePollVotes(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/poll_questions/${params.questionId}/poll_votes.json`, {
method: "post",
body: params
});
});
}
function submitPollAnswer(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/commit_poll.json`, {
method: "post",
body: params
});
});
}
function getAllTasks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.courseId}/tasks_list.json`, {
method: "get",
params
});
});
}
function updateTaskPosition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.courseId}/update_task_position.json`, {
method: "post",
body: params
});
});
}
function calculateAllShixunScores(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/calculate_all_shixun_scores.json`,
{
method: "get",
params
}
);
});
}
function getAllCourseGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/all_course_groups.json`, {
method: "get",
params
});
});
}
function getPollsCourseGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/polls/all_course_groups.json`, {
method: "get",
params
});
});
}
function getCourseGroupStudents(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/students.json`, {
method: "get",
params
});
});
}
function renameCourseGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_groups/${params.categoryId}/rename_group.json`, {
method: "POST",
body: params
});
});
}
function deleteCourseGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_groups/${params.categoryId}.json`, {
method: "delete",
body: params
});
});
}
function joinCourseGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/join_course_group.json`, {
method: "POST",
body: params
});
});
}
function transferToCourseGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/transfer_to_course_group.json`,
{
method: "post",
body: params
}
);
});
}
function deleteStudent(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/delete_from_course.json`, {
method: "post",
body: params
});
});
}
function joincoursegroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/join_course_group.json`, {
method: "post",
body: params
});
});
}
function exitCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/exit_course.json`, {
method: "post"
});
});
}
function courseMemberAttendances(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/weapps/course_member_attendances.json`, {
method: "post",
body: __spreadValues({}, params)
// attendance_id: 335
// attendance_mode: "QUICK"
});
});
}
function getMoocEditData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/mooc_users/${params.user_id}/edit.json`,
{
method: "get",
params
}
);
});
}
function createMoocData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/mooc_users.json`, {
method: "post",
body: params
});
});
}
function updateMoocData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/mooc_users/${params.user_id}.json`,
{
method: "put",
body: params
}
);
});
}
function moveCategory(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/course_second_categories/${params.id}/move_category.json`,
{
method: "post",
body: params
}
);
});
}
function moveboard(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/boards/${params.id}/move_category.json`, {
method: "post",
body: params
});
});
}
function getCourseware(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/courseware.json`, {
method: "get",
params
});
});
}
function markWrongQuestion(coursesId, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${coursesId}/mark_wrong_topic.json`, {
method: "get",
params
});
});
}
function cancelMarkWrongQuestion(coursesId, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${coursesId}/cancel_wrong_topic.json`, {
method: "get",
params
});
});
}
function getAllowEndGroups(homework_id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${homework_id}/allow_end_group.json`, {
method: "get",
params
});
});
}
function stopHomework(course_id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${course_id}/homework_commons/end_with_homework_list_position.json`, {
method: "post",
body: params
});
});
}
function getCommitIdContent(id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/tasks/${id}/get_content_for_commit_id.json`, {
method: "get",
params
});
});
}
/***/ }),
/***/ 77924:
/*!*************************************!*\
!*** ./src/service/competitions.ts ***!
\*************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $M: function() { return /* binding */ basicSetting; },
/* harmony export */ $P: function() { return /* binding */ all_team_members; },
/* harmony export */ Dh: function() { return /* binding */ getStaff; },
/* harmony export */ FU: function() { return /* binding */ AddTeam; },
/* harmony export */ GQ: function() { return /* binding */ Charts; },
/* harmony export */ IN: function() { return /* binding */ identifier_exist; },
/* harmony export */ JM: function() { return /* binding */ shixun_select; },
/* harmony export */ Ju: function() { return /* binding */ getCertificateInfo; },
/* harmony export */ Mn: function() { return /* binding */ get_picture; },
/* harmony export */ Ni: function() { return /* binding */ getVerification; },
/* harmony export */ Pg: function() { return /* binding */ getHeader; },
/* harmony export */ Pt: function() { return /* binding */ competitionTeams; },
/* harmony export */ Qp: function() { return /* binding */ Reward; },
/* harmony export */ R9: function() { return /* binding */ AddPersonnel; },
/* harmony export */ Ux: function() { return /* binding */ ChartRules; },
/* harmony export */ Vy: function() { return /* binding */ Authentication; },
/* harmony export */ XJ: function() { return /* binding */ Accounts; },
/* harmony export */ XR: function() { return /* binding */ getCourse; },
/* harmony export */ Ze: function() { return /* binding */ getTeamDetail; },
/* harmony export */ aq: function() { return /* binding */ getTeamList; },
/* harmony export */ bQ: function() { return /* binding */ getCompetitionsList; },
/* harmony export */ jS: function() { return /* binding */ getTeacher; },
/* harmony export */ lm: function() { return /* binding */ get_shixun_settings; },
/* harmony export */ ml: function() { return /* binding */ TabResults; },
/* harmony export */ o3: function() { return /* binding */ common_header; },
/* harmony export */ pA: function() { return /* binding */ search_managers; },
/* harmony export */ pS: function() { return /* binding */ shixun_delete; },
/* harmony export */ pU: function() { return /* binding */ Prize; },
/* harmony export */ ps: function() { return /* binding */ DeleteTeam; },
/* harmony export */ q0: function() { return /* binding */ add_managers; },
/* harmony export */ qN: function() { return /* binding */ delete_managers; },
/* harmony export */ qS: function() { return /* binding */ addApplytojoincourse; },
/* harmony export */ qj: function() { return /* binding */ getShixun; },
/* harmony export */ qt: function() { return /* binding */ competition_review; },
/* harmony export */ rV: function() { return /* binding */ getItem; },
/* harmony export */ rZ: function() { return /* binding */ info_finish; },
/* harmony export */ rk: function() { return /* binding */ EmailBind; },
/* harmony export */ rm: function() { return /* binding */ SubmitTeam; },
/* harmony export */ sK: function() { return /* binding */ getStudents; },
/* harmony export */ sL: function() { return /* binding */ get_managers; },
/* harmony export */ su: function() { return /* binding */ shixun_add; },
/* harmony export */ tC: function() { return /* binding */ Professional; },
/* harmony export */ tO: function() { return /* binding */ setleader; },
/* harmony export */ u9: function() { return /* binding */ Results; },
/* harmony export */ uZ: function() { return /* binding */ PhoneBind; },
/* harmony export */ vV: function() { return /* binding */ ExitTeam; },
/* harmony export */ xx: function() { return /* binding */ getMemberWorks; },
/* harmony export */ y8: function() { return /* binding */ deletAttachments; },
/* harmony export */ yS: function() { return /* binding */ UpTeam; },
/* harmony export */ zF: function() { return /* binding */ getWorkSubmitUpdateRes; },
/* harmony export */ zc: function() { return /* binding */ JoinTeam; },
/* harmony export */ zj: function() { return /* binding */ updateMdContent; },
/* harmony export */ zz: function() { return /* binding */ competition_teams; }
/* harmony export */ });
/* unused harmony exports download_template, addCompetitions */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getWorkSubmitUpdateRes(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/update_result.json`, {
method: "post",
body: params
});
});
}
function getCompetitionsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/competitions.json", {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function addApplytojoincourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/apply_to_join_course.json`, {
method: "post",
body: params
});
});
}
function competitionTeams(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams.json`, {
method: "post"
});
});
}
function getStaff(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_staff.json`, {
method: "get"
});
});
}
function getHeader(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/common_header.json`, {
method: "get"
});
});
}
function getItem(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/${params.url}`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function updateMdContent(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/update_md_content.json`, {
method: "post",
body: params
});
});
}
function getTeamList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams.json`, {
method: "get",
params
});
});
}
function getTeamDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams/${params.Teannameid}/edit.json`, {
method: "get",
params
});
});
}
function UpTeam(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams/${params.Teannameid}.json`, {
method: "put",
body: params
});
});
}
function ExitTeam(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams/${params.id}/leave.json`, {
method: "post",
body: params
});
});
}
function DeleteTeam(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams/${params.id}.json`, {
method: "delete"
});
});
}
function AddTeam(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams.json`, {
method: "post",
body: params
});
});
}
function AddPersonnel(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.id}/add_managers.json`, {
method: "post",
body: params
});
});
}
function JoinTeam(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams/join.json`, {
method: "post",
body: params
});
});
}
function getTeacher(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/teachers.json`, {
method: "get",
params
});
});
}
function getStudents(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/students.json`, {
method: "get",
params
});
});
}
function SubmitTeam(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams/${params.teamid}/crud_team_members.json`, {
method: "post",
body: params
});
});
}
function Reward(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/competition_reward.json`, {
method: "post",
body: params
});
});
}
function ChartRules(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/chart_rules.json`, {
method: "get"
});
});
}
function Charts(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/charts.json`, {
method: "get",
params
});
});
}
function Results(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/results.json`, {
method: "get",
params
});
});
}
function TabResults(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/md_tab_rules.json`, {
method: "get",
params
});
});
}
function Prize(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/prize.json`, {
method: "get",
params
});
});
}
function Accounts(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.id}.json`, {
method: "get",
params
});
});
}
function getVerification(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/accounts/get_verification_code.json`, {
method: "get",
params
});
});
}
function PhoneBind(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.userid}/phone_bind.json`, {
method: "post",
body: params
});
});
}
function EmailBind(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.userid}/email_bind.json`, {
method: "post",
body: params
});
});
}
function Professional(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.userid}/professional_auth_apply.json`, {
method: "delete"
});
});
}
function Authentication(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.userid}/authentication_apply.json`, {
method: "delete"
});
});
}
function setleader(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/prize_leader_account.json`, {
method: "put",
body: params
});
});
}
function getShixun(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams/${params.teamid}/shixun_detail.json`, {
method: "get"
});
});
}
function getCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_teams/${params.teamid}/course_detail.json`, {
method: "get"
});
});
}
function deletAttachments(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/attachments/${params.id}.json`, {
method: "delete"
});
});
}
function getCertificateInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.id}/get_certificate_info.json`, {
method: "get",
params
});
});
}
function basicSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.id}/basic_setting.json`, {
method: "post",
body: params
});
});
}
function download_template() {
return __async(this, null, function* () {
return Fetch(`/api/competitions/download_template`, {
method: "get",
responseType: "arraybuffer"
});
});
}
function common_header(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params}/common_header.json`, {
method: "get"
});
});
}
function addCompetitions(params) {
return __async(this, null, function* () {
return Fetch(`/api/competitions.json`, {
method: "post",
body: params
});
});
}
function search_managers(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params == null ? void 0 : params.id}/search_managers.json`, {
method: "get",
params
});
});
}
function get_managers(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params}/get_managers.json`, {
method: "get"
});
});
}
function add_managers(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${data == null ? void 0 : data.id}/add_managers.json`, {
method: "post",
body: data
});
});
}
function delete_managers(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${data == null ? void 0 : data.id}/delete_managers.json`, {
method: "delete",
body: data
});
});
}
function get_picture(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params}/get_picture.json`, {
method: "get"
});
});
}
function identifier_exist(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${data == null ? void 0 : data.id}/identifier_exist.json`, {
method: "post",
body: data
});
});
}
function get_shixun_settings(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params}/get_shixun_settings.json`, {
method: "get"
});
});
}
function shixun_add(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${data == null ? void 0 : data.id}/shixun_add.json`, {
method: "post",
body: data
});
});
}
function shixun_delete(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${data == null ? void 0 : data.id}/shixun_delete.json`, {
method: "delete",
body: data
});
});
}
function shixun_select(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${data == null ? void 0 : data.id}/shixun_select.json`, {
method: "post",
body: data
});
});
}
function info_finish(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params}/info_finish.json`, {
method: "get"
});
});
}
function competition_review(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${data == null ? void 0 : data.id}/competition_review.json`, {
method: "post",
body: __spreadValues({}, data)
});
});
}
function competition_teams(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${data.identifier}/competition_teams.json`, {
method: "get",
params: data
});
});
}
function all_team_members(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${data.identifier}/all_team_members.json`, {
method: "get",
params: data
});
});
}
function getMemberWorks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/competitions/${params.identifier}/competition_commit_records/member_works.json`, {
method: "get",
params
});
});
}
/***/ }),
/***/ 25934:
/*!******************************************************!*\
!*** ./src/service/engineering/index.ts + 1 modules ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
F: function() { return /* reexport */ exportCourseService; },
OE: function() { return /* reexport */ exportGraduationService; },
ff: function() { return /* reexport */ getCourseResultDetailClass; },
p1: function() { return /* reexport */ getCourseResultDetailService; },
_y: function() { return /* reexport */ getCourseResultsService; },
mK: function() { return /* reexport */ getFormulasService; },
gq: function() { return /* reexport */ getGraduationResultDetailService; },
eM: function() { return /* reexport */ getGraduationResultsService; },
BA: function() { return /* binding */ getMajorListService; },
bA: function() { return /* binding */ getTopPageService; },
Nx: function() { return /* binding */ getYearListService; },
Qx: function() { return /* reexport */ postComputeAllGraduationService; },
At: function() { return /* reexport */ postComputeAllService; },
PX: function() { return /* reexport */ postComputeCourseSingleService; },
Xl: function() { return /* reexport */ postComputeGraduationSingleService; },
y9: function() { return /* reexport */ putFormulasService; },
No: function() { return /* reexport */ putGoalValueService; },
ay: function() { return /* binding */ putTopPageService; }
});
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(64841);
;// CONCATENATED MODULE: ./src/service/engineering/evaluate.ts
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __objRest = (source, exclude) => {
var target = {};
for (var prop in source)
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
target[prop] = source[prop];
if (source != null && __getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(source)) {
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
target[prop] = source[prop];
}
return target;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const getCourseResultsService = (_a) => __async(void 0, null, function* () {
var _b = _a, { id } = _b, params = __objRest(_b, ["id"]);
return (0,fetch/* default */.ZP)(`/api/ec_years/${id}/course_results.json`, {
method: "get",
params
});
});
const exportCourseService = (ec_year_id) => {
let el = document.createElement("iframe");
el.src = `/api/ec_years/${ec_year_id}/course_results.xlsx`;
el.style.display = "none";
document.body.appendChild(el);
};
const getCourseResultDetailClass = ({
ec_year_id
}) => {
return (0,fetch/* default */.ZP)(`/api/ec_years/${ec_year_id}/course_results/get_class.json`, {
method: "get"
});
};
const getCourseResultDetailService = ({
ec_year_id,
id,
class_name = null
}) => {
return (0,fetch/* default */.ZP)(`/api/ec_years/${ec_year_id}/course_results/${id}.json`, {
method: "get",
params: {
class_name
}
});
};
const postComputeAllService = ({
ec_year_id
}) => {
return (0,fetch/* default */.ZP)(
`/api/ec_courses/1/evaluations/compute_all_courses_data`,
{
method: "post",
body: {
ec_year_id
}
}
);
};
const postComputeCourseSingleService = ({
ec_course_id
}) => {
return (0,fetch/* default */.ZP)(`/api/ec_courses/${ec_course_id}/evaluations/evaluation_data`, {
method: "POST"
});
};
const exportGraduationService = (ec_year_id) => {
let el = document.createElement("iframe");
el.src = `/api/ec_years/${ec_year_id}/ec_graduation_results.xlsx`;
el.style.display = "none";
document.body.appendChild(el);
};
const postComputeAllGraduationService = ({
ec_year_id
}) => {
return (0,fetch/* default */.ZP)(
`/api/ec_years/${ec_year_id}/ec_graduation_results/compute_all`,
{
method: "post"
}
);
};
const postComputeGraduationSingleService = ({
ec_year_id,
id
}) => {
return (0,fetch/* default */.ZP)(
`/api/ec_years/${ec_year_id}/ec_graduation_results/compute_single?id=${id}`,
{
method: "POST"
}
);
};
const getGraduationResultsService = (ec_year_id) => {
return (0,fetch/* default */.ZP)(`/api/ec_years/${ec_year_id}/ec_graduation_results.json`, {
method: "get"
});
};
const getFormulasService = (ec_year_id) => {
return (0,fetch/* default */.ZP)(
`/api/ec_years/${ec_year_id}/ec_graduation_results/get_formulas.json`,
{
method: "get"
}
);
};
const putFormulasService = ({
ec_year_id,
formula_one,
formula_two,
formula_three
}) => {
return (0,fetch/* default */.ZP)(
`/api/ec_years/${ec_year_id}/ec_graduation_results/set_formulas.json`,
{
method: "PUT",
body: {
formula_one_id: formula_one,
formula_two_id: formula_two,
formula_three_id: formula_three
}
}
);
};
const getGraduationResultDetailService = ({
ec_year_id,
id
}) => {
return (0,fetch/* default */.ZP)(`/api/ec_years/${ec_year_id}/ec_graduation_results/${id}.json`, {
method: "get"
});
};
const putGoalValueService = (_c) => {
var _d = _c, {
ec_year_id,
type,
goal_value
} = _d, rest = __objRest(_d, [
"ec_year_id",
"type",
"goal_value"
]);
let query = `?type=${type}`;
let options = {
method: "PUT"
};
if (type === "all") {
query += `&goal_value=${goal_value}`;
}
if (type === "each") {
options = __spreadProps(__spreadValues({}, options), {
body: rest
});
}
return (0,fetch/* default */.ZP)(
`/api/ec_years/${ec_year_id}/ec_graduation_results/set_goal_value${query}`,
options
);
};
;// CONCATENATED MODULE: ./src/service/engineering/index.ts
var engineering_async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const getMajorListService = (school_id) => engineering_async(void 0, null, function* () {
return (0,fetch/* default */.ZP)(`/api/schools/${school_id}/ec_majors/get_major_list.json`, {
method: "get"
});
});
const getYearListService = (ec_major_school_id) => engineering_async(void 0, null, function* () {
return (0,fetch/* default */.ZP)(
`/api/ec_major_schools/${ec_major_school_id}/ec_years/get_year_list.json`,
{
method: "get"
}
);
});
const getTopPageService = ({
ec_year_id,
school_id
}) => {
return (0,fetch/* default */.ZP)(`/api/ec_years/${ec_year_id}/top_pages.json`, {
method: "get",
params: {
school_id
}
});
};
const putTopPageService = ({
id,
name
}) => {
return (0,fetch/* default */.ZP)(`/api/ec_years/1/top_pages/${id}?name=${name}`, {
method: "PUT"
});
};
/***/ }),
/***/ 53669:
/*!*********************************!*\
!*** ./src/service/exercise.ts ***!
\*********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $Q: function() { return /* binding */ resetMyGame; },
/* harmony export */ BJ: function() { return /* binding */ getReviewExercise; },
/* harmony export */ CD: function() { return /* binding */ getExerciseStart; },
/* harmony export */ Cl: function() { return /* binding */ checkIp; },
/* harmony export */ Di: function() { return /* binding */ editExerciseQuestion; },
/* harmony export */ Fl: function() { return /* binding */ exeriseQuestionDelete; },
/* harmony export */ G$: function() { return /* binding */ getExerciseList; },
/* harmony export */ GK: function() { return /* binding */ exeriseMoveUpDown; },
/* harmony export */ Ip: function() { return /* binding */ putAdjustScore; },
/* harmony export */ J: function() { return /* binding */ getExerciseIdentityPhotos; },
/* harmony export */ KE: function() { return /* binding */ getEndGroups; },
/* harmony export */ LP: function() { return /* binding */ putBatchAdjustScore; },
/* harmony export */ MK: function() { return /* binding */ addExerciseQuestion; },
/* harmony export */ Mb: function() { return /* binding */ simulateExercise; },
/* harmony export */ N3: function() { return /* binding */ getExerciseCourses; },
/* harmony export */ P8: function() { return /* binding */ saveScreenRecordList; },
/* harmony export */ PJ: function() { return /* binding */ queryIdentityPhotoState; },
/* harmony export */ PT: function() { return /* binding */ exerciseLeftTime; },
/* harmony export */ RK: function() { return /* binding */ getEditQuestionTypeAlias; },
/* harmony export */ Ty: function() { return /* binding */ getExerciseUserInfo; },
/* harmony export */ UH: function() { return /* binding */ getObjectiveScores; },
/* harmony export */ UK: function() { return /* binding */ getCommonHeader; },
/* harmony export */ Uj: function() { return /* binding */ exportList; },
/* harmony export */ Ul: function() { return /* binding */ getWorkSetting; },
/* harmony export */ VL: function() { return /* binding */ submitExerciseAnswer; },
/* harmony export */ Vj: function() { return /* binding */ beginCommit; },
/* harmony export */ W4: function() { return /* binding */ getReviewGroupExercise; },
/* harmony export */ WL: function() { return /* binding */ simulateBeginCommit; },
/* harmony export */ X4: function() { return /* binding */ getCentralizeReviewExercise; },
/* harmony export */ Xn: function() { return /* binding */ getCodeReviewDetail; },
/* harmony export */ YY: function() { return /* binding */ getTagDiscipline; },
/* harmony export */ Yu: function() { return /* binding */ getScreenRecordList; },
/* harmony export */ ZD: function() { return /* binding */ unlockUser; },
/* harmony export */ Zg: function() { return /* binding */ checkExam; },
/* harmony export */ _B: function() { return /* binding */ getExerciseStartAnswer; },
/* harmony export */ _F: function() { return /* binding */ startSimulateAnswer; },
/* harmony export */ _U: function() { return /* binding */ getQuestionResult; },
/* harmony export */ _u: function() { return /* binding */ getExerciseStatistics; },
/* harmony export */ ab: function() { return /* binding */ unbindIp; },
/* harmony export */ cC: function() { return /* binding */ allowCloseCamera; },
/* harmony export */ cV: function() { return /* binding */ getQuestionTypeAlias; },
/* harmony export */ ck: function() { return /* binding */ commitScreenAt; },
/* harmony export */ eA: function() { return /* binding */ exitDeletePod; },
/* harmony export */ gA: function() { return /* binding */ teacherUpdate; },
/* harmony export */ gG: function() { return /* binding */ changeScore; },
/* harmony export */ gJ: function() { return /* binding */ setEcsAttachment; },
/* harmony export */ iw: function() { return /* binding */ getExerciseExportHeadData; },
/* harmony export */ kp: function() { return /* binding */ submitSimulateExerciseAnswer; },
/* harmony export */ lf: function() { return /* binding */ saveBanks; },
/* harmony export */ n$: function() { return /* binding */ getBrankList; },
/* harmony export */ nF: function() { return /* binding */ startProgram; },
/* harmony export */ o3: function() { return /* binding */ checkRedoStatus; },
/* harmony export */ oS: function() { return /* binding */ putExerciseAdjustScore; },
/* harmony export */ oX: function() { return /* binding */ updateExerciseAnswers; },
/* harmony export */ oy: function() { return /* binding */ recordScreen; },
/* harmony export */ pL: function() { return /* binding */ exerciseStartUnLock; },
/* harmony export */ pu: function() { return /* binding */ postReviewExercise; },
/* harmony export */ q6: function() { return /* binding */ redoExercise; },
/* harmony export */ qf: function() { return /* binding */ editExercise; },
/* harmony export */ qz: function() { return /* binding */ delayedTime; },
/* harmony export */ s: function() { return /* binding */ getRedoListModal; },
/* harmony export */ sA: function() { return /* binding */ getExaminationIntelligentSettings; },
/* harmony export */ sS: function() { return /* binding */ markQuestion; },
/* harmony export */ tX: function() { return /* binding */ getRedoModal; },
/* harmony export */ uR: function() { return /* binding */ addExercise; },
/* harmony export */ ux: function() { return /* binding */ getPublishGroups; },
/* harmony export */ wy: function() { return /* binding */ putExercise; },
/* harmony export */ xA: function() { return /* binding */ getUserExercise; },
/* harmony export */ yu: function() { return /* binding */ getRandomEditExercises; },
/* harmony export */ zR: function() { return /* binding */ changeExerciseScore; }
/* harmony export */ });
/* unused harmony exports getVideoPushUrl, updateSetting, makeUpStudents */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const getQuestionResult = (params) => (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params == null ? void 0 : params.id}/exercise_question_result.json`, { method: "get", params });
const getQuestionTypeAlias = (params) => {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/get_question_type_alias.json`, {
method: "get",
params
});
};
function teacherUpdate(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_questions/${data == null ? void 0 : data.id}/teacher_update.json`, {
method: "post",
body: __spreadValues({}, data)
});
});
}
function getEditQuestionTypeAlias(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/edit_question_type_alias.json`, {
method: "POST",
body: params
});
});
}
function getExerciseList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/exercise_lists.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getExerciseIdentityPhotos(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/exercise_identity_photos.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getVideoPushUrl(params) {
return __async(this, null, function* () {
return Fetch(`/api/exercises/${params.categoryId}/video_push_url.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function queryIdentityPhotoState(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/query_identity_photo_state.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getExerciseStatistics(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/exercise_result.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getBrankList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/question_banks/bank_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function saveBanks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/question_banks/save_banks.json`, {
method: "POST",
body: __spreadValues({}, params)
});
});
}
function getExerciseCourses(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/exercises/publish_modal.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCommonHeader(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/common_header.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function addExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/exercises.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function putExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.exerciseId}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function editExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getTagDiscipline(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/tag_disciplines.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function editExerciseQuestion(params) {
return __async(this, null, function* () {
const { id } = params;
delete params.id;
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_questions/${id}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function addExerciseQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/exercise_questions.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function exeriseMoveUpDown(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_questions/${params.id}/up_down.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function exeriseQuestionDelete(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_questions/${params.id}.json`, {
method: "delete"
});
});
}
function getEndGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/exercises/end_modal.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getPublishGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/publish_groups.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getReviewExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.exerciseId}/user_exercise_detail.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function postReviewExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.exerciseId}/consult_exercise.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getCentralizeReviewExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.exerciseId}/teacher_appraise.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function putAdjustScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_questions/${params.id}/adjust_score.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function putBatchAdjustScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_questions/${params.id}/batch_adjust_score.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function putExerciseAdjustScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/adjust_score.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function delayedTime(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/delayed_time.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getWorkSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/exercise_setting.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function updateSetting(params) {
return __async(this, null, function* () {
return Fetch(`/api/exercises/${params.categoryId}/commit_setting.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getReviewGroupExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.exerciseId}/review_exercises_by_students.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function exportList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/exercise_lists.xlsx`, {
method: "get",
params: __spreadProps(__spreadValues({}, params), { export: true })
});
});
}
function getExerciseStartAnswer(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/user_exercise_detail.json`, {
method: "get",
params: __spreadProps(__spreadValues({}, params), { login: null })
});
}
function getExerciseStart(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/start.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function exerciseStartUnLock(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/start_unlock.json`, {
method: "post",
body: __spreadValues({}, params)
});
}
function updateExerciseAnswers(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_questions/${params.questionId}/exercise_answers.json`, {
method: "post",
body: params
});
});
}
function submitExerciseAnswer(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/commit_exercise.json`, {
method: "post",
body: params
});
});
}
function submitSimulateExerciseAnswer(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/simulate_commit_exercise.json`, {
method: "post",
body: params
});
});
}
function redoExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/redo_exercise.json`, {
method: "post",
body: params
});
});
}
function resetMyGame(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/${params.url}`, {
method: "get",
params: __spreadValues({}, params)
});
}
function startProgram(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/problems/${params.id}/start.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function beginCommit(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/begin_commit.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function simulateBeginCommit(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/simulate_begin_commit.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function getExaminationIntelligentSettings(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_intelligent_settings/optional_items.json`, {
method: "post",
body: __spreadValues({}, params)
});
}
function getRandomEditExercises(params) {
console.log("params:", params);
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/edit.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function getObjectiveScores(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/get_objective_scores.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function getRedoModal(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/redo_modal.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function getRedoListModal(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/student_redo_lists.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function getUserExercise(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/get_user_exercises.json`, {
method: "get",
params
});
}
function getExerciseExportHeadData(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/exercise_header.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function allowCloseCamera(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/allow_close_camera.json`, {
method: "post",
body: __spreadValues({}, params)
});
}
function getExerciseUserInfo(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/get_exercise_user_info.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function recordScreen(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/record_screen`, {
method: "post",
params: __spreadValues({}, params)
});
}
function unbindIp(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/unbind_ip.json`, {
method: "post",
body: __spreadValues({}, params)
});
}
function checkIp(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.id}/check_ip.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function checkExam(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params == null ? void 0 : params.id}/check_user_exercise.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function makeUpStudents(params) {
return Fetch(`/api/exercises/${params.id}/make_up_students.json`, {
method: "get",
params: __spreadValues({}, params)
});
}
function getCodeReviewDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/exercises/code_review_detail.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function changeScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_questions/${params.question_id}/adjust_score.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function simulateExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.categoryId}/simulate_exercise.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function startSimulateAnswer(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/simulate_start_answer.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function exerciseLeftTime(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/exercise_time.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function commitScreenAt(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${params.categoryId}/commit_screen_at.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function unlockUser(id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${id}/unlock_user`, {
method: "post",
body: params
});
});
}
function saveScreenRecordList(exerciseId, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${exerciseId}/save_screen_record.json`, {
method: "post",
body: params
});
});
}
function getScreenRecordList(exerciseId, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${exerciseId}/screen_record_list.json`, {
method: "get",
params
});
});
}
function setEcsAttachment(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/attachments/set_ecs_attachment.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function checkRedoStatus(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/need_redo.json`, {
method: "get",
params
});
});
}
function markQuestion(id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercises/${id}/mark.json`, {
method: "post",
body: params
});
});
}
function exitDeletePod(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/myshixuns/${data}/exit_delete_pod.json`, {
method: "post",
body: data
});
});
}
function changeExerciseScore(body) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/users/change_exercise_score.json", {
method: "put",
body
});
});
}
/***/ }),
/***/ 85084:
/*!*******************************!*\
!*** ./src/service/forums.ts ***!
\*******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B0: function() { return /* binding */ stickyOrCancel; },
/* harmony export */ Si: function() { return /* binding */ getForumsDetailData; },
/* harmony export */ Sr: function() { return /* binding */ cancelWatch; },
/* harmony export */ YP: function() { return /* binding */ watch; },
/* harmony export */ b4: function() { return /* binding */ updateForums; },
/* harmony export */ bc: function() { return /* binding */ getForumsData; },
/* harmony export */ dX: function() { return /* binding */ newForums; },
/* harmony export */ eh: function() { return /* binding */ rewardCode; },
/* harmony export */ iI: function() { return /* binding */ getForumsNewData; },
/* harmony export */ kd: function() { return /* binding */ getForumsShixunData; },
/* harmony export */ qR: function() { return /* binding */ getForumsEditData; },
/* harmony export */ sW: function() { return /* binding */ deleteForums; },
/* harmony export */ ts: function() { return /* binding */ reply; },
/* harmony export */ vL: function() { return /* binding */ like; },
/* harmony export */ z5: function() { return /* binding */ getMoreReply; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getForumsData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos.json`, {
method: "get",
params
});
});
}
function getForumsShixunData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/discusses/forum_discusses.json`, {
method: "get",
params
});
});
}
function stickyOrCancel(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos/${params.id}/sticky_or_cancel.json`, {
method: "post",
body: params
});
});
}
function deleteForums(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos/${params.id}.json`, {
method: "delete",
body: params
});
});
}
function getForumsNewData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos/new.json`, {
method: "get",
params
});
});
}
function getForumsEditData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos/${params.id}/edit.json`, {
method: "get",
params
});
});
}
function newForums(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function updateForums(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos/${params.id}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function getForumsDetailData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos/${params.id}.json`, {
method: "get",
params
});
});
}
function watch(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.user_id}/watch.json`, {
method: "post",
body: params
});
});
}
function cancelWatch(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.user_id}/watch.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function rewardCode(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/discusses/${params.id}/reward_code.json`, {
method: "post",
body: params
});
});
}
function like(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/discusses/${params.id}/plus.json`, {
method: "post",
body: params
});
});
}
function reply(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos/reply.json`, {
method: "post",
body: params
});
});
}
function getMoreReply(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/memos/${params.id}/more_reply.json`, {
method: "get",
params
});
});
}
/***/ }),
/***/ 66421:
/*!*******************************!*\
!*** ./src/service/global.ts ***!
\*******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ D2: function() { return /* binding */ getGlobalSetting; },
/* harmony export */ n0: function() { return /* binding */ getSystemUpdate; },
/* harmony export */ tk: function() { return /* binding */ addSearchRecord; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getGlobalSetting() {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/setting.json", {
method: "Get"
});
});
}
function getSystemUpdate() {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/users/system_update.json", {
method: "Get"
});
});
}
function addSearchRecord(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/search_records", {
method: "post",
body: params
});
});
}
/***/ }),
/***/ 40351:
/*!***********************************!*\
!*** ./src/service/graduation.ts ***!
\***********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B6: function() { return /* binding */ getTopisDetail; },
/* harmony export */ Gr: function() { return /* binding */ addTopic; },
/* harmony export */ Mf: function() { return /* binding */ deleteReply; },
/* harmony export */ NA: function() { return /* binding */ replyLike; },
/* harmony export */ PC: function() { return /* binding */ getReplyList; },
/* harmony export */ PP: function() { return /* binding */ createReply; },
/* harmony export */ QA: function() { return /* binding */ getTasksListDetail; },
/* harmony export */ RP: function() { return /* binding */ editTasks; },
/* harmony export */ Sv: function() { return /* binding */ addTasks; },
/* harmony export */ YQ: function() { return /* binding */ replyUnLike; },
/* harmony export */ _n: function() { return /* binding */ editTasksDefaultData; },
/* harmony export */ hL: function() { return /* binding */ editTopicDefaultData; },
/* harmony export */ je: function() { return /* binding */ agreeTopic; },
/* harmony export */ mM: function() { return /* binding */ refuseTopic; },
/* harmony export */ wA: function() { return /* binding */ editTopic; },
/* harmony export */ x_: function() { return /* binding */ getTopisDetailList; },
/* harmony export */ y0: function() { return /* binding */ addTopicDefaultData; },
/* harmony export */ y3: function() { return /* binding */ getTasksDetail; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getTasksDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduation_tasks/${params.categoryId}.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getTasksListDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduation_tasks/${params.categoryId}/tasks_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getTopisDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_topics/${params.categoryId}/show_detail.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getTopisDetailList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_topics/${params.categoryId}.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function refuseTopic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_topics/${params.categoryId}/refuse_student_topic.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function agreeTopic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_topics/${params.categoryId}/accept_student_topic.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getReplyList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/show_comment.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function createReply(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/reply_message.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function replyLike(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/praise_tread/like.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function replyUnLike(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/praise_tread/unlike.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function deleteReply(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/commons/delete.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function addTopicDefaultData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_topics/new.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function editTopicDefaultData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_topics/${params.categoryId}/edit.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function addTopic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_topics`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function editTopic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_topics/${params.categoryId}`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function addTasks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_tasks`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function editTasks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduation_tasks/${params.categoryId}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function editTasksDefaultData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduation_tasks/${params.categoryId}/edit.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
/***/ }),
/***/ 13857:
/*!************************************!*\
!*** ./src/service/graduations.ts ***!
\************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ AA: function() { return /* binding */ getGraduationsTeachers; },
/* harmony export */ Db: function() { return /* binding */ getGraduationsExportAll; },
/* harmony export */ Dd: function() { return /* binding */ getGraduationsSetNoviceGuide; },
/* harmony export */ F7: function() { return /* binding */ getGraduationsInfo; },
/* harmony export */ Fi: function() { return /* binding */ postGraduationStudentsPass; },
/* harmony export */ H3: function() { return /* binding */ getGraduationsFinalScore; },
/* harmony export */ HF: function() { return /* binding */ getAddGraduationsTeachers; },
/* harmony export */ HH: function() { return /* binding */ getGraduationsSetFinalScore; },
/* harmony export */ Ib: function() { return /* binding */ postGraduationTeachersNotPass; },
/* harmony export */ J3: function() { return /* binding */ getGraduations; },
/* harmony export */ NT: function() { return /* binding */ getSchoolsList; },
/* harmony export */ NX: function() { return /* binding */ getAddGraduationsStudents; },
/* harmony export */ Ot: function() { return /* binding */ getAddGraduationsUpdateMajor; },
/* harmony export */ Ou: function() { return /* binding */ getGraduationsDetails; },
/* harmony export */ Ps: function() { return /* binding */ getDepartments; },
/* harmony export */ Rk: function() { return /* binding */ getGraduationsNotices; },
/* harmony export */ Tz: function() { return /* binding */ getGraduationsExportStatus; },
/* harmony export */ V1: function() { return /* binding */ postGraduationTeachersPass; },
/* harmony export */ Wz: function() { return /* binding */ postGraduations; },
/* harmony export */ Xh: function() { return /* binding */ getGraduationsStageDetails; },
/* harmony export */ Xw: function() { return /* binding */ getGraduationsTasks; },
/* harmony export */ YS: function() { return /* binding */ getPutGraduationsTasks; },
/* harmony export */ Zd: function() { return /* binding */ postGraduationStudentsNotPass; },
/* harmony export */ bS: function() { return /* binding */ getGraduationsTeacherSearch; },
/* harmony export */ ck: function() { return /* binding */ getGraduationsSetdo; },
/* harmony export */ eh: function() { return /* binding */ getGraduationsStudents; },
/* harmony export */ il: function() { return /* binding */ getGraduationsAuthorizedRedelivery; },
/* harmony export */ j7: function() { return /* binding */ getGraduationsSubmit; },
/* harmony export */ jW: function() { return /* binding */ getCreateGraduationsTasks; },
/* harmony export */ km: function() { return /* binding */ getDelGraduationsTasks; },
/* harmony export */ l5: function() { return /* binding */ getGraduationsStudentsSearch; },
/* harmony export */ rU: function() { return /* binding */ deleteGraduationStudents; },
/* harmony export */ xF: function() { return /* binding */ getGraduationsSchoolSearch; },
/* harmony export */ zC: function() { return /* binding */ getGraduationPreview; },
/* harmony export */ zT: function() { return /* binding */ deleteGraduationTeachers; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getSchoolsList(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/schools/search.json`, {
method: "get",
params
});
}
function getDepartments(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/schools/${params.id}/departments/for_option.json`, {
method: "get",
params
});
}
function postGraduations(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations.json`, {
method: "POST",
body: params
});
}
function getGraduations(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations.json`, {
method: "get",
params
});
}
function getGraduationsAuthorizedRedelivery(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.identifier}/graduation_stages/${params.stageid}/authorized_redelivery.json`, {
method: "POST",
body: params
});
});
}
function getGraduationsSubmit(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.identifier}/graduation_stages/${params.stageid}/submit.json`, {
method: "POST",
body: params
});
});
}
function getGraduationsExportStatus(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/student_tasks/export_status.json`, {
method: "get",
params
});
});
}
function getGraduationsExportAll(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/student_tasks/export_all_attachments.json`, {
method: "get",
params
});
});
}
function getGraduationsStageDetails(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.identifier}/graduation_stages/${params.id}.json`, {
method: "get",
params
});
});
}
function getGraduationsSetFinalScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/student_tasks/set_final_score.json`, {
method: "POST",
body: params
});
});
}
function getGraduationsFinalScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/student_tasks/final_score.json`, {
method: "get",
params
});
});
}
function getGraduationsSetNoviceGuide(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/set_novice_guide.json`, {
method: "POST",
body: params
});
});
}
function getGraduationsSetdo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_notices/${params.doid}/set_do.json`, {
method: "POST",
body: params
});
});
}
function getAddGraduationsTeachers(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_teachers.json`, {
method: "POST",
body: params
});
});
}
function getAddGraduationsUpdateMajor(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.identifier}/graduation_students/${params.id}/update_major.json`, {
method: "PUT",
body: params
});
});
}
function getAddGraduationsStudents(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_students.json`, {
method: "POST",
body: params
});
});
}
function getGraduationsTeacherSearch(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_teachers/search.json`, {
method: "get",
params
});
});
}
function getGraduationsSchoolSearch(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/schools/search.json`, {
method: "get",
params
});
});
}
function getGraduationsStudentsSearch(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_students/search.json`, {
method: "get",
params
});
});
}
function getGraduationsStudents(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_students.json`, {
method: "get",
params
});
});
}
function getGraduationsTeachers(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_teachers.json`, {
method: "get",
params
});
});
}
function getCreateGraduationsTasks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.graduation_id}/graduation_tasks.json`, {
method: "POST",
body: params
});
});
}
function getPutGraduationsTasks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.graduation_id}/graduation_tasks/${params.id}.json`, {
method: "PUT",
body: params
});
});
}
function getDelGraduationsTasks(params) {
return __async(this, null, function* () {
var _a;
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_tasks/${(_a = params.ids) == null ? void 0 : _a[0]}`, {
method: "DELETE",
body: {
ids: params.ids
}
});
});
}
function getGraduationsTasks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_tasks.json`, {
method: "get",
params
});
});
}
function getGraduationsNotices(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}/graduation_notices.json`, {
method: "get",
params
});
});
}
function getGraduationsInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params.id}.json`, {
method: "get"
});
});
}
function getGraduationsDetails(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${params == null ? void 0 : params.id}/common_header.json`, {
method: "get"
});
});
}
function getGraduationPreview(id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${id}/preview.json`, {
method: "get"
});
});
}
function postGraduationTeachersNotPass(id, body) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${id}/graduation_teachers/not_pass.json`, {
method: "post",
body
});
});
}
function postGraduationTeachersPass(id, body) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${id}/graduation_teachers/pass.json`, {
method: "post",
body
});
});
}
function postGraduationStudentsNotPass(id, body) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${id}/graduation_students/not_pass.json`, {
method: "post",
body
});
});
}
function postGraduationStudentsPass(id, body) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${id}/graduation_students/pass.json`, {
method: "post",
body
});
});
}
function deleteGraduationStudents(id, body) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${id}/graduation_students/batch_delete`, {
method: "delete",
body
});
});
}
function deleteGraduationTeachers(id, body) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/graduations/${id}/graduation_teachers/batch_delete`, {
method: "delete",
body
});
});
}
/***/ }),
/***/ 20385:
/*!*****************************!*\
!*** ./src/service/home.ts ***!
\*****************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ LA: function() { return /* binding */ getHomeNotice; },
/* harmony export */ S_: function() { return /* binding */ UploadNotice; },
/* harmony export */ Tt: function() { return /* binding */ HomeIndex; },
/* harmony export */ cR: function() { return /* binding */ applyToJoinCourse; },
/* harmony export */ vm: function() { return /* binding */ projectApplies; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function HomeIndex() {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/home/index.json", {
method: "Get"
});
});
}
function applyToJoinCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/courses/apply_to_join_course.json", {
method: "post",
body: params
});
});
}
function projectApplies(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/project_applies.json", {
method: "post",
body: params
});
});
}
function getHomeNotice(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/users/home_notice.json", {
method: "Get"
});
});
}
function UploadNotice(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/users/view_notice.json", {
method: "post",
body: params
});
});
}
/***/ }),
/***/ 29268:
/*!*********************************!*\
!*** ./src/service/messages.ts ***!
\*********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ AD: function() { return /* binding */ getTidings; },
/* harmony export */ Ig: function() { return /* binding */ unreadMessageInfo; },
/* harmony export */ Ko: function() { return /* binding */ getRecentContacts; },
/* harmony export */ QJ: function() { return /* binding */ getUsersForPrivateMessages; },
/* harmony export */ Ub: function() { return /* binding */ getPrivateMessageDetails; },
/* harmony export */ V8: function() { return /* binding */ getPrivateMessages; },
/* harmony export */ dl: function() { return /* binding */ deletePrivateMessage; },
/* harmony export */ w0: function() { return /* binding */ postPrivateMessages; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getTidings(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/users/tidings.json", {
method: "get",
params: __spreadValues({}, params)
});
});
}
function unreadMessageInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.userId}/unread_message_info.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getPrivateMessages(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.userId}/private_messages.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function postPrivateMessages(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.userId}/private_messages.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getRecentContacts(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.id}/recent_contacts.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getUsersForPrivateMessages(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users_for_private_messages.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getPrivateMessageDetails(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.userId}/private_message_details.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function deletePrivateMessage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.userId}/private_messages/${params.id}.json`, {
method: "delete"
});
});
}
/***/ }),
/***/ 85597:
/*!***************************************!*\
!*** ./src/service/onlineLearning.ts ***!
\***************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ A2: function() { return /* binding */ addVideoToStage; },
/* harmony export */ CI: function() { return /* binding */ addStage; },
/* harmony export */ Ep: function() { return /* binding */ selectShixunToStage; },
/* harmony export */ Ex: function() { return /* binding */ stagesMovePosition; },
/* harmony export */ R7: function() { return /* binding */ getOnlineLearning; },
/* harmony export */ WW: function() { return /* binding */ deleteStages; },
/* harmony export */ _V: function() { return /* binding */ deleteStage; },
/* harmony export */ ms: function() { return /* binding */ upPosition; },
/* harmony export */ s0: function() { return /* binding */ addCoursewareToStage; },
/* harmony export */ vf: function() { return /* binding */ satgeAddShixunToStage; },
/* harmony export */ xn: function() { return /* binding */ updateStage; },
/* harmony export */ yy: function() { return /* binding */ downPosition; }
/* harmony export */ });
/* unused harmony export addShixunToStage */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getOnlineLearning(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/online_learning.json`, {
method: "get"
});
});
}
function updateStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.id}.json`, {
method: "put",
body: params
});
});
}
function addStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/course_stages.json`, {
method: "post",
body: params
});
});
}
function satgeAddShixunToStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.id}/add_shixun_to_stage.json`, {
method: "post",
body: params
});
});
}
function selectShixunToStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.id}/select_shixun_to_stage.json`, {
method: "post",
body: params
});
});
}
function addVideoToStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.id}/add_video_to_stage.json`, {
method: "post",
body: params
});
});
}
function addCoursewareToStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.id}/add_attachment_to_stage.json`, {
method: "post",
body: params
});
});
}
function addShixunToStage(params) {
return __async(this, null, function* () {
return Fetch(`/api/paths/add_shixun_to_stage.json`, {
method: "post",
body: params
});
});
}
function upPosition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.id}/up_position.json`, {
method: "post"
});
});
}
function downPosition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.id}/down_position.json`, {
method: "post"
});
});
}
function deleteStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.id}.json`, {
method: "delete"
});
});
}
function stagesMovePosition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.stage_id}/items/move_position.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function deleteStages(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_stages/${params.stage_id}/items/${params.id}`, {
method: "delete"
});
});
}
/***/ }),
/***/ 90445:
/*!*************************************!*\
!*** ./src/service/paperlibrary.ts ***!
\*************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ DF: function() { return /* binding */ setPublic; },
/* harmony export */ Di: function() { return /* binding */ getExamDetail; },
/* harmony export */ Dm: function() { return /* binding */ getTeachGroupData; },
/* harmony export */ Dq: function() { return /* binding */ getExerciseHeadInfo; },
/* harmony export */ Gd: function() { return /* binding */ getPaperlibraryList; },
/* harmony export */ Hb: function() { return /* binding */ importItemBanks; },
/* harmony export */ Hm: function() { return /* binding */ batchDelete; },
/* harmony export */ JP: function() { return /* binding */ generateExerciseId; },
/* harmony export */ NC: function() { return /* binding */ handleDeleteEditQuestion; },
/* harmony export */ Pl: function() { return /* binding */ setPrivate; },
/* harmony export */ Qp: function() { return /* binding */ batchPublic; },
/* harmony export */ RK: function() { return /* binding */ getEditQuestionTypeAlias; },
/* harmony export */ YP: function() { return /* binding */ batchSetScore; },
/* harmony export */ ar: function() { return /* binding */ getCustomDisciplines; },
/* harmony export */ cV: function() { return /* binding */ getQuestionTypeAlias; },
/* harmony export */ d1: function() { return /* binding */ getDisciplines; },
/* harmony export */ fn: function() { return /* binding */ handleDelete; },
/* harmony export */ iT: function() { return /* binding */ getPaperData; },
/* harmony export */ jK: function() { return /* binding */ updatePaper; },
/* harmony export */ kF: function() { return /* binding */ changeExamScore; },
/* harmony export */ kp: function() { return /* binding */ sendToClass; },
/* harmony export */ oF: function() { return /* binding */ createOrModifyQuestion; },
/* harmony export */ qN: function() { return /* binding */ adjustPosition; },
/* harmony export */ tS: function() { return /* binding */ getCourseList; },
/* harmony export */ ts: function() { return /* binding */ setScore; },
/* harmony export */ un: function() { return /* binding */ createExam; },
/* harmony export */ w0: function() { return /* binding */ updateExam; }
/* harmony export */ });
/* unused harmony exports setShixunScore, addQuestion, sortQuestion, deleteQuestion, newBatchSetScore */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const getQuestionTypeAlias = (params) => {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/get_question_type_alias.json`, {
method: "get",
params
});
};
function getEditQuestionTypeAlias(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/edit_question_type_alias.json`, {
method: "POST",
body: params
});
});
}
function getDisciplines(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/disciplines.json", {
method: "get",
params
});
});
}
function getCustomDisciplines(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/disciplines/by_examination_banks.json", {
method: "get",
params
});
});
}
function getPaperlibraryList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/examination_banks.json", {
method: "get",
params
});
});
}
function setPublic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/set_public.json`, {
method: "post"
});
});
}
function setPrivate(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/set_private.json`, {
method: "post"
});
});
}
function handleDelete(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}.json`, {
method: "delete"
});
});
}
function getCourseList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/question_banks/my_courses.json`, {
method: "get",
params
});
});
}
function sendToClass(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/send_to_course.json`, {
method: "post",
body: params
});
});
}
function getPaperData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}.json`, {
method: "get",
params
});
});
}
function setScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/examination_banks_item_banks/${params.itemId}/set_score`, {
method: "post",
body: params
});
});
}
function setShixunScore(params) {
return __async(this, null, function* () {
return Fetch(`/api/examination_banks/${params.id}/examination_banks_item_banks/${params.itemId}/set_shixun_score.json`, {
method: "post",
body: params
});
});
}
function handleDeleteEditQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/examination_banks_item_banks/${params.itemId}.json`, {
method: "delete"
});
});
}
function batchSetScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/examination_banks_item_banks/batch_set_score.json`, {
method: "post",
body: params
});
});
}
function batchDelete(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/examination_banks_item_banks/destroy_by_item_type.json`, {
method: "delete",
body: params
});
});
}
function adjustPosition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/examination_banks_item_banks/${params.itemId}/adjust_position.json`, {
method: "post",
body: params
});
});
}
function updatePaper(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}.json`, {
method: "put",
body: params
});
});
}
function getTeachGroupData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/teach_group_shares.json`, {
method: "get",
params
});
});
}
function batchPublic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/set_batch_public.json`, {
method: "post",
body: params
});
});
}
function createExam(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/create_exam.json`, {
method: "post",
body: params
});
});
}
function updateExam(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/update_exam.json`, {
method: "put",
body: params
});
});
}
function getExamDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/edit_exam.json`, {
method: "get"
});
});
}
function addQuestion(id, params) {
return __async(this, null, function* () {
return Fetch(`/api/examination_banks/${id}/examination_banks_item_banks.json`, {
method: "post",
body: params
});
});
}
function createOrModifyQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/examination_banks_item_banks/create_item_bank.json`, {
method: "post",
body: params
});
});
}
function sortQuestion(id, params) {
return __async(this, null, function* () {
return Fetch(`/api/examination_banks/${id}/sort_question_type.json`, {
method: "post",
body: params
});
});
}
function deleteQuestion(params) {
return __async(this, null, function* () {
return Fetch(`/api/examination_banks/${params.exam_id}/examination_banks_item_banks/${params.question_id}.json`, {
method: "delete"
});
});
}
function newBatchSetScore(id, params) {
return __async(this, null, function* () {
return Fetch(`/api/examination_banks/${id}/batch_set_score.json`, {
method: "post",
body: params
});
});
}
function generateExerciseId(id) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${id}/simulate_exercise.json`, {
method: "post"
// body: params
});
});
}
function getExerciseHeadInfo(id) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${id}/exercise_header.json`, {
method: "get"
});
});
}
function importItemBanks(id, file) {
return __async(this, null, function* () {
const formData = new FormData();
formData.append("file", file);
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${id}/import_item_banks.json`, {
method: "post",
body: formData
}, true);
});
}
function changeExamScore(body) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/users/change_exam_score.json", {
method: "put",
body
});
});
}
/***/ }),
/***/ 2850:
/*!******************************!*\
!*** ./src/service/paths.ts ***!
\******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $D: function() { return /* binding */ deleteCourses; },
/* harmony export */ A2: function() { return /* binding */ addVideoToStage; },
/* harmony export */ A7: function() { return /* binding */ courseHomework; },
/* harmony export */ AQ: function() { return /* binding */ getRightData; },
/* harmony export */ Ax: function() { return /* binding */ getDiscusses; },
/* harmony export */ CI: function() { return /* binding */ addStage; },
/* harmony export */ DQ: function() { return /* binding */ addHomeworkToStage; },
/* harmony export */ DU: function() { return /* binding */ getStudentData; },
/* harmony export */ EP: function() { return /* binding */ deleteMember; },
/* harmony export */ Ep: function() { return /* binding */ selectShixunToStage; },
/* harmony export */ Er: function() { return /* binding */ cancelPublic; },
/* harmony export */ Ex: function() { return /* binding */ stagesMovePosition; },
/* harmony export */ FD: function() { return /* binding */ homeworkToStageInfo; },
/* harmony export */ F_: function() { return /* binding */ getShixunAnalyzeData; },
/* harmony export */ Fg: function() { return /* binding */ getRankList; },
/* harmony export */ GY: function() { return /* binding */ getSchoolOption; },
/* harmony export */ Go: function() { return /* binding */ applyPublish; },
/* harmony export */ Gz: function() { return /* binding */ getStatisticsBody; },
/* harmony export */ Hl: function() { return /* binding */ getStatisticsHeader; },
/* harmony export */ JS: function() { return /* binding */ immediatelyRegister; },
/* harmony export */ KM: function() { return /* binding */ collect; },
/* harmony export */ M2: function() { return /* binding */ upCoursewareToStage; },
/* harmony export */ MO: function() { return /* binding */ getSendCourseList; },
/* harmony export */ Mt: function() { return /* binding */ addBlankItems; },
/* harmony export */ Mu: function() { return /* binding */ getCourseDiscusses; },
/* harmony export */ NV: function() { return /* binding */ getHomeworkDetail; },
/* harmony export */ Q: function() { return /* binding */ sendToCourse; },
/* harmony export */ VO: function() { return /* binding */ editHomeworkToStage; },
/* harmony export */ WD: function() { return /* binding */ postDiscuss; },
/* harmony export */ WO: function() { return /* binding */ applyPublic; },
/* harmony export */ WW: function() { return /* binding */ deleteStages; },
/* harmony export */ _C: function() { return /* binding */ batchAddHomeworkToStage; },
/* harmony export */ _V: function() { return /* binding */ deleteStage; },
/* harmony export */ bw: function() { return /* binding */ updateTeamTitle; },
/* harmony export */ bz: function() { return /* binding */ appplySchool; },
/* harmony export */ c3: function() { return /* binding */ appointment; },
/* harmony export */ cn: function() { return /* binding */ getIntelligentRecommendationsList; },
/* harmony export */ eJ: function() { return /* binding */ deletePath; },
/* harmony export */ ef: function() { return /* binding */ getLearnStatistics; },
/* harmony export */ fh: function() { return /* binding */ getCourseMenus; },
/* harmony export */ fj: function() { return /* binding */ cancelPublish; },
/* harmony export */ hS: function() { return /* binding */ getOnlineCount; },
/* harmony export */ jT: function() { return /* binding */ subjectHomework; },
/* harmony export */ ke: function() { return /* binding */ excellentDiscuss; },
/* harmony export */ lk: function() { return /* binding */ getPathsDetail; },
/* harmony export */ mQ: function() { return /* binding */ getEditCourseData; },
/* harmony export */ ms: function() { return /* binding */ upPosition; },
/* harmony export */ mx: function() { return /* binding */ addSubjectMembers; },
/* harmony export */ nq: function() { return /* binding */ getSubjectUseInfos; },
/* harmony export */ p4: function() { return /* binding */ sendToCourseTest; },
/* harmony export */ pU: function() { return /* binding */ submitCourse; },
/* harmony export */ rS: function() { return /* binding */ watchAttachmentHistories; },
/* harmony export */ rs: function() { return /* binding */ cancelCollect; },
/* harmony export */ s0: function() { return /* binding */ addCoursewareToStage; },
/* harmony export */ sm: function() { return /* binding */ addCourses; },
/* harmony export */ tS: function() { return /* binding */ getCourseList; },
/* harmony export */ tu: function() { return /* binding */ editCourse; },
/* harmony export */ ue: function() { return /* binding */ getCoureses; },
/* harmony export */ vf: function() { return /* binding */ satgeAddShixunToStage; },
/* harmony export */ xn: function() { return /* binding */ updateStage; },
/* harmony export */ yN: function() { return /* binding */ getStageData; },
/* harmony export */ yy: function() { return /* binding */ downPosition; }
/* harmony export */ });
/* unused harmony exports memberMoveUp, memberMoveDowm, getStatisticsInfo, getShixunUseData, getLearnData, appendToStage, addShixunToStage, createDiscusses */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const getSubjectUseInfos = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/subject_statistics/subject_use_infos.json", { method: "Get", params });
});
const getRankList = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/subject_statistics/rank_list.json", { method: "Get", params });
});
const getStatisticsBody = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/subject_statistics/statistics_body.json", { method: "Get", params });
});
const getStatisticsHeader = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/subject_statistics/statistics_header.json", { method: "Get", params });
});
const getOnlineCount = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/subject_statistics/online_count.json", { method: "Get", params });
});
function getCourseList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/paths.json", {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getIntelligentRecommendationsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/intelligent_recommendations/subject_lists.json", {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getCourseMenus(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/disciplines.json", {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function editCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}.json`, {
method: "PUT",
body: params
});
});
}
function submitCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths.json`, {
method: "post",
body: params
});
});
}
function getEditCourseData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/edit.json`, {
method: "get"
});
});
}
function getPathsDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}.json`, {
method: "get",
params: __spreadValues({
identifier: params.id
}, params)
});
});
}
function getRightData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/right_banner.json`, {
method: "get",
params
});
});
}
function getCoureses(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/spoc_courses.json`, {
method: "get",
params
});
});
}
function getStageData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages.json`, {
method: "get",
params
});
});
}
function updateTeamTitle(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/update_team_title.json`, {
method: "post",
body: params
});
});
}
function deleteMember(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/delete_member.json`, {
method: "Delete",
body: params
});
});
}
function deleteCourses(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/spoc_courses/${params == null ? void 0 : params.courseid}.json`, {
method: "Delete"
// body: params
});
});
}
function memberMoveUp(params) {
return __async(this, null, function* () {
return Fetch(`/api/paths/${params.id}/up_member_position.json`, {
method: "post",
body: params
});
});
}
function memberMoveDowm(params) {
return __async(this, null, function* () {
return Fetch(`/api/paths/${params.id}/down_member_position.json`, {
method: "post",
body: params
});
});
}
function collect(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/collections.json`, {
method: "post",
body: params
});
});
}
function cancelCollect(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/collections/cancel.json`, {
method: "Delete",
body: params
});
});
}
function deletePath(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}.json`, {
method: "Delete",
body: params
});
});
}
function applyPublish(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/publish.json`, {
method: "post",
body: params
});
});
}
function cancelPublish(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/cancel_publish.json`, {
method: "post",
body: params
});
});
}
function applyPublic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/apply_public.json`, {
method: "post",
body: params
});
});
}
function cancelPublic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/cancel_public.json`, {
method: "post",
body: params
});
});
}
function getSendCourseList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/choose_course.json`, {
method: "get",
params
});
});
}
function sendToCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/send_to_course.json`, {
method: "post",
body: params
});
});
}
function sendToCourseTest(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/send_to_course.json`, {
method: "post",
body: params
});
});
}
function addSubjectMembers(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/add_subject_members.json`, {
method: "post",
body: params
});
});
}
function addCourses(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/spoc_courses.json`, {
method: "post",
body: params
});
});
}
function appointment(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/appointment.json`, {
method: "post",
body: params
});
});
}
function immediatelyRegister(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/join_excellent_course.json`, {
method: "post",
body: params
});
});
}
function watchAttachmentHistories(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/watch_attachment_histories.json`, {
method: "post",
body: params
});
});
}
function getStatisticsInfo(params) {
return __async(this, null, function* () {
return Fetch(`/api/paths/${params.id}/statistics_info.json`, {
method: "get",
params
});
});
}
function getShixunUseData(params) {
return __async(this, null, function* () {
return Fetch(`/api/paths/${params.id}/shixun_analyze.json`, {
method: "get",
params
});
});
}
function getLearnData(params) {
return __async(this, null, function* () {
return Fetch(`/api/paths/${params.id}/learning_analyze.json`, {
method: "get",
params
});
});
}
function getLearnStatistics(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/learning_statistics.json`, {
method: "get",
params
});
});
}
function getShixunAnalyzeData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/shixun_statistics.json`, {
method: "get",
params
});
});
}
function getStudentData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/study_analyze/${params.type}.json`, {
method: "get",
params
});
});
}
function appendToStage(params) {
return __async(this, null, function* () {
return Fetch(`/api/paths/append_to_stage.json`, {
method: "post",
body: params
});
});
}
function updateStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.id}.json`, {
method: "put",
body: params
});
});
}
function satgeAddShixunToStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.id}/add_shixun_to_stage.json`, {
method: "post",
body: params
});
});
}
function selectShixunToStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.id}/select_shixun_to_stage.json`, {
method: "post",
body: params
});
});
}
function addVideoToStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.id}/add_video_to_stage.json`, {
method: "post",
body: params
});
});
}
function addCoursewareToStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.id}/add_attachment_to_stage.json`, {
method: "post",
body: params
});
});
}
function upCoursewareToStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stage_shixuns/${params.id}.json`, {
method: "put",
body: params
});
});
}
function addBlankItems(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.id}/add_blank_to_stage.json`, {
method: "post",
body: params
});
});
}
function addStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages.json`, {
method: "post",
body: params
});
});
}
function addShixunToStage(params) {
return __async(this, null, function* () {
return Fetch(`/api/paths/add_shixun_to_stage.json`, {
method: "post",
body: params
});
});
}
function upPosition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.id}/up_position.json`, {
method: "get"
});
});
}
function downPosition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.id}/down_position.json`, {
method: "get"
});
});
}
function deleteStage(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.id}.json`, {
method: "delete"
});
});
}
function getDiscusses(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.pathId}/discusses.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCourseDiscusses(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/excellent_discusses.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function createDiscusses(params) {
return __async(this, null, function* () {
return Fetch(`/api/discusses.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function stagesMovePosition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.stage_id}/items/move_position`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function deleteStages(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${params.stage_id}/items/${params.id}`, {
method: "delete"
// body:{...params}
});
});
}
function excellentDiscuss(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.id}/excellent_discuss`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function postDiscuss(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/${params.id}/post_discuss`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getSchoolOption(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/schools/for_option.json`, {
method: "get",
params
});
});
}
function appplySchool(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/add_school_applies.json`, {
method: "post",
body: params
});
});
}
function addHomeworkToStage(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${data == null ? void 0 : data.id}/add_homework_to_stage.json`, {
method: "post",
body: data
});
});
}
function homeworkToStageInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stage_shixuns/${params == null ? void 0 : params.id}/edit.json`, {
method: "get",
params
});
});
}
function editHomeworkToStage(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stage_shixuns/${data == null ? void 0 : data.id}.json`, {
method: "put",
body: data
});
});
}
function subjectHomework(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params == null ? void 0 : params.user_id}/subjects/subject_homework.json`, {
method: "get",
params
});
});
}
function courseHomework(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params == null ? void 0 : params.user_id}/courses/course_homework.json`, {
method: "get",
params
});
});
}
function batchAddHomeworkToStage(data) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages/${data == null ? void 0 : data.id}/batch_add_homework_to_stage.json`, {
method: "post",
body: data
});
});
}
function getHomeworkDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/get_homework_detail.json`, {
method: "get",
params
});
});
}
/***/ }),
/***/ 74051:
/*!******************************!*\
!*** ./src/service/polls.ts ***!
\******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Fd: function() { return /* binding */ addPollBankQuestions; },
/* harmony export */ Hi: function() { return /* binding */ getPollsSetting; },
/* harmony export */ IU: function() { return /* binding */ editPollsQuestion; },
/* harmony export */ KE: function() { return /* binding */ getEndGroups; },
/* harmony export */ Kc: function() { return /* binding */ putExerciseBankQuestions; },
/* harmony export */ MK: function() { return /* binding */ addExerciseQuestion; },
/* harmony export */ Q9: function() { return /* binding */ getPollsCourses; },
/* harmony export */ Qg: function() { return /* binding */ putPolls; },
/* harmony export */ Qn: function() { return /* binding */ getPollsStatistics; },
/* harmony export */ UK: function() { return /* binding */ getCommonHeader; },
/* harmony export */ W: function() { return /* binding */ exercisesBanksMoveUpDown; },
/* harmony export */ Ye: function() { return /* binding */ editPolls; },
/* harmony export */ hO: function() { return /* binding */ putExerciseBanks; },
/* harmony export */ iV: function() { return /* binding */ addExerciseBankQuestions; },
/* harmony export */ jy: function() { return /* binding */ deletePollsQuestion; },
/* harmony export */ kp: function() { return /* binding */ getExerciseBanks; },
/* harmony export */ lf: function() { return /* binding */ saveBanks; },
/* harmony export */ m7: function() { return /* binding */ updateSetting; },
/* harmony export */ n$: function() { return /* binding */ getBrankList; },
/* harmony export */ rJ: function() { return /* binding */ addPolls; },
/* harmony export */ s3: function() { return /* binding */ getPollsList; },
/* harmony export */ ux: function() { return /* binding */ getPublishGroups; },
/* harmony export */ vf: function() { return /* binding */ exerciseBanksMoveUpDown; },
/* harmony export */ wh: function() { return /* binding */ pollsMoveUpDown; },
/* harmony export */ wo: function() { return /* binding */ putPollBankQuestions; },
/* harmony export */ x$: function() { return /* binding */ deleteExerciseBanksQuestion; }
/* harmony export */ });
/* unused harmony export deleteExerciseBanks */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getPollsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/poll_lists.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getCommonHeader(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/common_header.json`, {
method: "get"
});
});
}
function getPollsSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/poll_setting.json`, {
method: "get"
});
});
}
function updateSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/commit_setting.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getEndGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/polls/end_poll_modal.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getPublishGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/publish_groups.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getPollsStatistics(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/commit_result.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getBrankList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/question_banks/bank_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function saveBanks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/question_banks/save_banks.json`, {
method: "POST",
body: __spreadValues({}, params)
});
});
}
function getPollsCourses(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/polls/publish_modal.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function addPolls(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/polls.json`, {
method: "POST",
body: __spreadValues({}, params)
});
});
}
function editPolls(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.categoryId}/edit.json`, {
method: "get"
});
});
}
function putPolls(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.pollsId}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function editPollsQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/poll_questions/${params.pollsId}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function addExerciseQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/polls/${params.pollsId}/poll_questions.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function deletePollsQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/poll_questions/${params.pollsId}.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function pollsMoveUpDown(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/poll_questions/${params.pollsId}/up_down.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getExerciseBanks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_banks/${params.topicId}.json`, {
method: "get"
});
});
}
function putExerciseBanks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_banks/${params.topicId}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function deleteExerciseBanks(params) {
return __async(this, null, function* () {
return Fetch(`/api/exercise_banks/${params.topicId}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function deleteExerciseBanksQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_bank_questions/${params.pollsId}.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function exerciseBanksMoveUpDown(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/poll_questions/${params.pollsId}/up_down.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function addPollBankQuestions(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/poll_bank_questions.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function putPollBankQuestions(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/poll_bank_questions/${params.pollsId}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function putExerciseBankQuestions(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_bank_questions/${params.id}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function addExerciseBankQuestions(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_bank_questions.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function exercisesBanksMoveUpDown(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/exercise_bank_questions/${params.exerciseId}/up_down.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
/***/ }),
/***/ 41200:
/*!***********************************!*\
!*** ./src/service/problemset.ts ***!
\***********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $c: function() { return /* binding */ editInfo; },
/* harmony export */ A1: function() { return /* binding */ moveUp; },
/* harmony export */ Bd: function() { return /* binding */ startExperience; },
/* harmony export */ Bo: function() { return /* binding */ getEditDataBprogram; },
/* harmony export */ Cc: function() { return /* binding */ setChallengeScore; },
/* harmony export */ Cn: function() { return /* binding */ handleDeletePreviewQuestion; },
/* harmony export */ DF: function() { return /* binding */ setPublic; },
/* harmony export */ Dm: function() { return /* binding */ getTeachGroupData; },
/* harmony export */ FG: function() { return /* binding */ getEditData; },
/* harmony export */ GW: function() { return /* binding */ batchShare; },
/* harmony export */ HF: function() { return /* binding */ unselectAll; },
/* harmony export */ Hm: function() { return /* binding */ batchDelete; },
/* harmony export */ IJ: function() { return /* binding */ revokePublish; },
/* harmony export */ L5: function() { return /* binding */ createFeedback; },
/* harmony export */ LS: function() { return /* binding */ batchGroup; },
/* harmony export */ MZ: function() { return /* binding */ programPublish; },
/* harmony export */ Mr: function() { return /* binding */ addProblemset; },
/* harmony export */ NZ: function() { return /* binding */ getPaperList; },
/* harmony export */ Of: function() { return /* binding */ getItemBanks; },
/* harmony export */ Pl: function() { return /* binding */ setPrivate; },
/* harmony export */ Qj: function() { return /* binding */ getBasketList; },
/* harmony export */ Qp: function() { return /* binding */ batchPublic; },
/* harmony export */ RT: function() { return /* binding */ clearBasket; },
/* harmony export */ Rp: function() { return /* binding */ addGroup; },
/* harmony export */ U6: function() { return /* binding */ addKnowledge; },
/* harmony export */ Vl: function() { return /* binding */ setCombinationScore; },
/* harmony export */ Wk: function() { return /* binding */ editProblemset; },
/* harmony export */ YP: function() { return /* binding */ batchSetScore; },
/* harmony export */ Ys: function() { return /* binding */ select; },
/* harmony export */ al: function() { return /* binding */ cancel; },
/* harmony export */ bF: function() { return /* binding */ batchPublishCondition; },
/* harmony export */ d1: function() { return /* binding */ getDisciplines; },
/* harmony export */ dt: function() { return /* binding */ batchPublish; },
/* harmony export */ et: function() { return /* binding */ newPreviewProblemset; },
/* harmony export */ ex: function() { return /* binding */ getGroup; },
/* harmony export */ fY: function() { return /* binding */ revokeItem; },
/* harmony export */ fn: function() { return /* binding */ handleDelete; },
/* harmony export */ hI: function() { return /* binding */ getGroupList; },
/* harmony export */ hg: function() { return /* binding */ getTeachGroupDataById; },
/* harmony export */ iT: function() { return /* binding */ getPaperData; },
/* harmony export */ lS: function() { return /* binding */ cancelCollection; },
/* harmony export */ nD: function() { return /* binding */ batchQuestionsDelete; },
/* harmony export */ qN: function() { return /* binding */ adjustPosition; },
/* harmony export */ rV: function() { return /* binding */ examUnselectAll; },
/* harmony export */ s: function() { return /* binding */ joinCollection; },
/* harmony export */ sD: function() { return /* binding */ programCancelPublish; },
/* harmony export */ sS: function() { return /* binding */ createGroup; },
/* harmony export */ ts: function() { return /* binding */ setScore; },
/* harmony export */ vi: function() { return /* binding */ moveDown; },
/* harmony export */ x5: function() { return /* binding */ basketDelete; },
/* harmony export */ zh: function() { return /* binding */ examinationItems; }
/* harmony export */ });
/* unused harmony exports setExerciseCombinationScore, joinGroup, updateGroup, getSubdirectory */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getDisciplines(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/disciplines.json", {
method: "get",
params: __spreadProps(__spreadValues({}, params), { clazz: "ItemBanksGroup" })
});
});
}
function getBasketList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/item_baskets/basket_list.json", {
method: "get",
params
});
});
}
function getGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/item_banks_groups/for_problemset.json", {
method: "post",
body: params
});
});
}
function getItemBanks(body) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/item_banks/list.json", {
method: "post",
body
});
});
}
function setPrivate(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/${params.id}/set_private.json`, {
method: "post"
});
});
}
function setPublic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/${params.id}/set_public.json`, {
method: "post"
});
});
}
function handleDelete(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/${params.id}.json`, {
method: "delete"
});
});
}
function startExperience(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/problems/${params.id}/start.json`, {
method: "get"
});
});
}
function cancel(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/${params.id}.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function select(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets.json`, {
method: "post",
body: params
});
});
}
function examUnselectAll(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/cancel_items.json`, {
method: "post",
body: params
});
});
}
function basketDelete(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/delete_item_type.json`, {
method: "delete",
body: {
item_type: params.type
}
});
});
}
function unselectAll(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/cancel_items.json`, {
method: "post",
body: params
});
});
}
function addKnowledge(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/tag_disciplines.json`, {
method: "post",
body: params
});
});
}
function editProblemset(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/${params.id}.json`, {
method: "put",
body: params
});
});
}
function addProblemset(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks.json`, {
method: "post",
body: params
});
});
}
function getEditData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/${params.id}/edit.json`, {
method: "get"
});
});
}
function getEditDataBprogram(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/problems/${params.id}/edit.json`, {
method: "get"
});
});
}
function getPaperData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets.json`, {
method: "get",
params
});
});
}
function setScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/${params.id}/set_score.json`, {
method: "post",
body: params
});
});
}
function setChallengeScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/${params.id}/set_challenge_score.json`, {
method: "post",
body: params
});
});
}
function setCombinationScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/${params.id}/combination_set_score.json`, {
method: "post",
body: params
});
});
}
function setExerciseCombinationScore(params) {
return __async(this, null, function* () {
return Fetch(`/api/examination_banks//${params.exerid}/examination_banks_item_banks/${params.id}/combination_set_score.json`, {
method: "post",
body: params
});
});
}
function handleDeletePreviewQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/${params.id}.json`, {
method: "delete"
});
});
}
function batchSetScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/batch_set_score.json`, {
method: "post",
body: params
});
});
}
function batchDelete(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/delete_item_type.json`, {
method: "delete",
body: params
});
});
}
function adjustPosition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/${params.id}/adjust_position.json`, {
method: "post",
body: params
});
});
}
function newPreviewProblemset(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks.json`, {
method: "post",
body: params
});
});
}
function revokeItem(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.id}/revoke_item.json`, {
method: "delete",
body: params
});
});
}
function examinationItems(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/examination_banks/${params.exam_id}/examination_banks_item_banks.json`, {
method: "post",
body: params
});
});
}
function joinCollection(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/${params.id}/join_to_collection.json`, {
method: "post",
params
});
});
}
function cancelCollection(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/${params.id}/cancel_collection.json`, {
method: "post",
params
});
});
}
function getPaperList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks_groups.json`, {
method: "get",
params
});
});
}
function getGroupList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks_groups/mine.json`, {
method: "get",
params
});
});
}
function joinGroup(params) {
return __async(this, null, function* () {
return Fetch(`/api/item_banks/${params.id}/join_to_group.json`, {
method: "post",
body: params
});
});
}
function updateGroup(params) {
return __async(this, null, function* () {
return Fetch(`/api/item_banks_groups/${params.id}.json`, {
method: "put",
body: params
});
});
}
function createGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks_groups.json`, {
method: "post",
body: params
});
});
}
function createFeedback(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/${params.id}/feedback.json`, {
method: "post",
body: params
});
});
}
function getTeachGroupData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/teach_group_shares.json`, {
method: "get",
params
});
});
}
function batchShare(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/teach_group_shares.json`, {
method: "post",
body: params
});
});
}
function batchQuestionsDelete(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/batch_delete.json`, {
method: "post",
body: params
});
});
}
function batchGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/batch_to_group.json`, {
method: "post",
body: params
});
});
}
function addGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/add_to_mine.json`, {
method: "post",
body: params
});
});
}
function batchPublic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/set_batch_public.json`, {
method: "post",
body: params
});
});
}
function getTeachGroupDataById(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/teach_group_shares/show_groups.json`, {
method: "get",
params
});
});
}
function programPublish(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/problems/${params.identifier}/publish.json`, {
method: "post",
body: params
});
}
function programCancelPublish(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/problems/${params.identifier}/cancel_publish.json`, {
method: "post",
body: params
});
}
function revokePublish(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks/cancel_public.json`, {
method: "post",
body: { ids: [...params.id] }
});
}
function moveUp(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks_groups/${params.id}/up_position.json`, {
method: "get",
params
});
});
}
function moveDown(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_banks_groups/${params.id}/down_position.json`, {
method: "get",
params
});
});
}
function editInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.id}/edit_hack.json`, {
method: "get",
params
});
});
}
function batchPublishCondition(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/problems/batch_publish_condition.json`, {
method: "post",
body: params
});
});
}
function batchPublish(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/problems/batch_publish.json`, {
method: "post",
body: params
});
});
}
function getSubdirectory(params) {
return __async(this, null, function* () {
return Fetch(`/api/item_banks/get_groups.json`, {
method: "get",
params
});
});
}
function clearBasket() {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/item_baskets/delete_all_items.json`, {
method: "delete"
});
});
}
/***/ }),
/***/ 25147:
/*!********************************!*\
!*** ./src/service/restful.ts ***!
\********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ E1: function() { return /* binding */ deleteRestFul; },
/* harmony export */ Go: function() { return /* binding */ getRestful; },
/* harmony export */ H5: function() { return /* binding */ getRestfulDetail; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getRestful(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/restfuls.json", {
method: "get",
params
});
});
}
function getRestfulDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/restfuls/${params.id}.json`, {
method: "get",
params
});
});
}
function deleteRestFul(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/restfuls/${params.id}.json`, {
method: "delete",
params
});
});
}
/***/ }),
/***/ 13385:
/*!****************************************!*\
!*** ./src/service/shixunHomeworks.ts ***!
\****************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Ar: function() { return /* binding */ editCommonHomeWork; },
/* harmony export */ BD: function() { return /* binding */ editCommonHomeWorkDefaultData; },
/* harmony export */ Be: function() { return /* binding */ addStudentWork; },
/* harmony export */ Dx: function() { return /* binding */ exportShixunWorks; },
/* harmony export */ Fr: function() { return /* binding */ shixunResetMyGame; },
/* harmony export */ GS: function() { return /* binding */ queryGameUrl; },
/* harmony export */ G_: function() { return /* binding */ getNewestShixunWorkComments; },
/* harmony export */ H: function() { return /* binding */ updateWork; },
/* harmony export */ H1: function() { return /* binding */ AddCommonHomework; },
/* harmony export */ Hj: function() { return /* binding */ getStudentWorkDetail; },
/* harmony export */ JA: function() { return /* binding */ getStudentWorkCommon; },
/* harmony export */ JG: function() { return /* binding */ getCodeReviewCourse; },
/* harmony export */ KE: function() { return /* binding */ getEndGroups; },
/* harmony export */ Lz: function() { return /* binding */ getSearchMemberList; },
/* harmony export */ Mf: function() { return /* binding */ deleteReply; },
/* harmony export */ NA: function() { return /* binding */ replyLike; },
/* harmony export */ PC: function() { return /* binding */ getReplyList; },
/* harmony export */ PP: function() { return /* binding */ createReply; },
/* harmony export */ PW: function() { return /* binding */ editStudentWorkDefaultData; },
/* harmony export */ Q3: function() { return /* binding */ getReferenceAnswer; },
/* harmony export */ QC: function() { return /* binding */ delStudentWorkScore; },
/* harmony export */ Qt: function() { return /* binding */ addCommonHomeWorkDefaultData; },
/* harmony export */ R$: function() { return /* binding */ appealAnonymousScore; },
/* harmony export */ RP: function() { return /* binding */ getCodeReview; },
/* harmony export */ Ti: function() { return /* binding */ getFileRepeatDetail; },
/* harmony export */ Uc: function() { return /* binding */ getScoreStatus; },
/* harmony export */ Ul: function() { return /* binding */ getWorkSetting; },
/* harmony export */ VB: function() { return /* binding */ getFileRepeatListInCommonHomework; },
/* harmony export */ Vs: function() { return /* binding */ updateScore; },
/* harmony export */ Xn: function() { return /* binding */ getCodeReviewDetail; },
/* harmony export */ YQ: function() { return /* binding */ replyUnLike; },
/* harmony export */ Z8: function() { return /* binding */ getShixunWorkList; },
/* harmony export */ ak: function() { return /* binding */ addStudentWorkDefaultData; },
/* harmony export */ co: function() { return /* binding */ relateProject; },
/* harmony export */ cz: function() { return /* binding */ getShixunWorkReports; },
/* harmony export */ fK: function() { return /* binding */ getShixunWorkHeadInfo; },
/* harmony export */ gG: function() { return /* binding */ changeScore; },
/* harmony export */ gZ: function() { return /* binding */ deleteStudentWorkScoreCommit; },
/* harmony export */ h$: function() { return /* binding */ getWorkList; },
/* harmony export */ ku: function() { return /* binding */ getProjectList; },
/* harmony export */ lf: function() { return /* binding */ saveBanks; },
/* harmony export */ m7: function() { return /* binding */ updateSetting; },
/* harmony export */ mz: function() { return /* binding */ reviseAttachment; },
/* harmony export */ n$: function() { return /* binding */ getBrankList; },
/* harmony export */ oN: function() { return /* binding */ getFileRepeatResult; },
/* harmony export */ pH: function() { return /* binding */ editCommonHomeWorkDefaultBankData; },
/* harmony export */ pb: function() { return /* binding */ updateHomeWorkCommitDes; },
/* harmony export */ qP: function() { return /* binding */ addStudentWorkScoreCommit; },
/* harmony export */ ql: function() { return /* binding */ getAllStudentWorks; },
/* harmony export */ rN: function() { return /* binding */ cancelRelateProject; },
/* harmony export */ sw: function() { return /* binding */ getShixunWorkReport; },
/* harmony export */ t1: function() { return /* binding */ getShixunWorkReportEchart; },
/* harmony export */ to: function() { return /* binding */ getWorkDetail; },
/* harmony export */ ub: function() { return /* binding */ getStudentWorkSupplyDetail; },
/* harmony export */ ux: function() { return /* binding */ getPublishGroups; },
/* harmony export */ wS: function() { return /* binding */ getHomeWorkCommitDes; },
/* harmony export */ yT: function() { return /* binding */ editBankCommonHomeWork; },
/* harmony export */ yy: function() { return /* binding */ addStudentWorkScore; },
/* harmony export */ z2: function() { return /* binding */ editStudentWork; }
/* harmony export */ });
/* unused harmony exports cancelAppeal, dealAppealScore */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getWorkList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/works_list.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getShixunWorkList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixun_homeworks/${params.categoryId}/student_works.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getShixunWorkHeadInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixun_homeworks/${params.categoryId}/header_info.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function queryGameUrl(id) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${id}/query_game_url.json`, {
method: "get"
});
});
}
function getNewestShixunWorkComments(id) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${id}/get_newest_shixun_work_comments.json`, {
method: "get"
});
});
}
function getWorkDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}.json`, {
method: "get"
});
});
}
function getCodeReview(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/homework_commons/${params.categoryId}/code_review_results.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function getCodeReviewDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/homework_commons/${params.categoryId}/code_review_detail.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function getWorkSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/settings.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function updateSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/homework_commons/${params.categoryId}/update_settings.json`,
{
method: "post",
body: __spreadValues({}, params)
}
);
});
}
function getCodeReviewCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/group_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function exportShixunWorks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/works_list.xlsx`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getReferenceAnswer(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/homework_commons/${params.coursesId}/reference_answer.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function getPublishGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/homework_commons/${params.categoryId}/publish_groups.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function getEndGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/end_groups.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getBrankList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/question_banks/bank_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function saveBanks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/question_banks/save_banks.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getShixunWorkReport(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.homeworkId}/shixun_work_report.json`, {
method: "get",
params
});
});
}
function getShixunWorkReportEchart(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.homeworkId}/shixun_work_report_echart_data.json`, {
method: "get",
params
});
});
}
function getShixunWorkReports(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/homework_commons/user_hack_detail.json`, {
method: "get",
params: __spreadProps(__spreadValues({}, params), {
id: params.categoryId
})
});
});
}
function changeScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.categoryId}/adjust_review_score.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getReplyList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/show_comment.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function createReply(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/reply_message.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function replyLike(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/praise_tread/like.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function replyUnLike(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/praise_tread/unlike.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function deleteReply(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/commons/delete.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function updateWork(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/update_explanation.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function AddCommonHomework(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/homework_commons.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function editCommonHomeWork(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function editBankCommonHomeWork(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_banks/${params.id}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function addStudentWorkDefaultData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.commonHomeworkId}/student_works/new.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function editStudentWorkDefaultData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.homeworkId}/edit.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function editStudentWork(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.homeworkId}.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function reviseAttachment(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.homeworkId}/revise_attachment.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function addStudentWork(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.commonHomeworkId}/student_works.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function relateProject(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.homeworkId}/student_works/relate_project.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function cancelRelateProject(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.homeworkId}/student_works/cancel_relate_project.json`, {
method: "get"
});
});
}
function getProjectList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/projects/search.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getSearchMemberList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.commonHomeworkId}/student_works/search_member_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function addCommonHomeWorkDefaultData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/homework_commons/new.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function editCommonHomeWorkDefaultData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/edit.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function editCommonHomeWorkDefaultBankData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_banks/${params.id}.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getStudentWorkDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.userId}.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getStudentWorkSupplyDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.userId}/supply_attachments.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getStudentWorkCommon(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.userId}/comment_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function delStudentWorkScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.userId}/destroy_score.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function addStudentWorkScoreCommit(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.userId}/add_score_reply.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getAllStudentWorks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/all_student_works.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function deleteStudentWorkScoreCommit(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.homeworkId}/destroy_work_comment.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function getScoreStatus(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/score_status.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function updateScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_commons/${params.categoryId}/update_score.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function addStudentWorkScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.userId}/add_score.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function cancelAppeal(params) {
return __async(this, null, function* () {
return Fetch(`/api/student_works/${params.userId}/cancel_appeal.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function appealAnonymousScore(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.userId}/appeal_anonymous_score.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function dealAppealScore(params) {
return __async(this, null, function* () {
return Fetch(`/api/student_works/${params.userId}/deal_appeal_score.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function shixunResetMyGame(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/myshixuns/${params.id}/reset_my_game.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getHomeWorkCommitDes(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.homeworkId}/commit_des.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function updateHomeWorkCommitDes(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/student_works/${params.homeworkId}/update_des.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getFileRepeatListInCommonHomework(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/homework_commons/file_repeat_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getFileRepeatResult(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.coursesId}/homework_commons/file_repeat_result.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function getFileRepeatDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/courses/${params.course_id}/homework_commons/file_repeat_detail.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
/***/ }),
/***/ 58215:
/*!********************************!*\
!*** ./src/service/shixuns.ts ***!
\********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ $Q: function() { return /* binding */ resetMyGame; },
/* harmony export */ AE: function() { return /* binding */ getChallengesAnswer; },
/* harmony export */ AQ: function() { return /* binding */ getRightData; },
/* harmony export */ Ag: function() { return /* binding */ getRepository; },
/* harmony export */ Ar: function() { return /* binding */ release; },
/* harmony export */ At: function() { return /* binding */ getForkList; },
/* harmony export */ BK: function() { return /* binding */ execJupyter; },
/* harmony export */ Bj: function() { return /* binding */ getScriptContent; },
/* harmony export */ DC: function() { return /* binding */ getSettingsData; },
/* harmony export */ Dz: function() { return /* binding */ updateCollaboratorEditable; },
/* harmony export */ E4: function() { return /* binding */ getRankingList; },
/* harmony export */ EH: function() { return /* binding */ applyShixunMirror; },
/* harmony export */ Ee: function() { return /* binding */ existExercise; },
/* harmony export */ Er: function() { return /* binding */ cancelPublic; },
/* harmony export */ Fg: function() { return /* binding */ getRankList; },
/* harmony export */ GI: function() { return /* binding */ getAuditSituationData; },
/* harmony export */ Gr: function() { return /* binding */ getShixunQuote; },
/* harmony export */ Gu: function() { return /* binding */ getShixunsJupyterLab; },
/* harmony export */ Gz: function() { return /* binding */ getStatisticsBody; },
/* harmony export */ Hl: function() { return /* binding */ getStatisticsHeader; },
/* harmony export */ IT: function() { return /* binding */ moveGitFile; },
/* harmony export */ I_: function() { return /* binding */ getShixunsMenus; },
/* harmony export */ Ir: function() { return /* binding */ execShixun; },
/* harmony export */ Je: function() { return /* binding */ getRepositoryCommit; },
/* harmony export */ K: function() { return /* binding */ getEnvironmentData; },
/* harmony export */ K0: function() { return /* binding */ createSecretRepository; },
/* harmony export */ KM: function() { return /* binding */ collect; },
/* harmony export */ K_: function() { return /* binding */ getTimeInfoWithTPM; },
/* harmony export */ LK: function() { return /* binding */ getFileContent; },
/* harmony export */ LP: function() { return /* binding */ updateAuditSituation; },
/* harmony export */ Ne: function() { return /* binding */ cancelRelease; },
/* harmony export */ OV: function() { return /* binding */ addCollaborator; },
/* harmony export */ OW: function() { return /* binding */ deleteAttachment; },
/* harmony export */ Op: function() { return /* binding */ uploadGitFolder; },
/* harmony export */ P2: function() { return /* binding */ getChangeManager; },
/* harmony export */ Po: function() { return /* binding */ getShixunsDetail; },
/* harmony export */ Ps: function() { return /* binding */ deleteShixun; },
/* harmony export */ Q: function() { return /* binding */ sendToCourse; },
/* harmony export */ Q1: function() { return /* binding */ getEnvironmentDetail; },
/* harmony export */ QA: function() { return /* binding */ updateJupyterLabSetting; },
/* harmony export */ Ql: function() { return /* binding */ getDepartments; },
/* harmony export */ Rs: function() { return /* binding */ updateChallengesNew; },
/* harmony export */ SG: function() { return /* binding */ previewJupyter; },
/* harmony export */ Tn: function() { return /* binding */ addChallengesQuestion; },
/* harmony export */ Tr: function() { return /* binding */ checkShixunCopy; },
/* harmony export */ U0: function() { return /* binding */ getSetData; },
/* harmony export */ U9: function() { return /* binding */ permanentClose; },
/* harmony export */ UQ: function() { return /* binding */ getEditChallengesQuestion; },
/* harmony export */ Ui: function() { return /* binding */ getInfoWithTPM; },
/* harmony export */ Vx: function() { return /* binding */ createRepositorys; },
/* harmony export */ WO: function() { return /* binding */ applyPublic; },
/* harmony export */ WT: function() { return /* binding */ getProgressHomeworks; },
/* harmony export */ Wi: function() { return /* binding */ getCustomScript; },
/* harmony export */ Wl: function() { return /* binding */ getRepositorys; },
/* harmony export */ X$: function() { return /* binding */ changeManager; },
/* harmony export */ Yn: function() { return /* binding */ deleteChallengesQuestion; },
/* harmony export */ Z2: function() { return /* binding */ getMirrorScript; },
/* harmony export */ ZO: function() { return /* binding */ updateSettingBasicInfo; },
/* harmony export */ Zt: function() { return /* binding */ setSecretDir; },
/* harmony export */ _7: function() { return /* binding */ searchUserCourses; },
/* harmony export */ _9: function() { return /* binding */ upChallengesQuestion; },
/* harmony export */ aH: function() { return /* binding */ updatePermissionSetting; },
/* harmony export */ al: function() { return /* binding */ addChallengesNew; },
/* harmony export */ b8: function() { return /* binding */ getNewShixunsData; },
/* harmony export */ bq: function() { return /* binding */ updateChallengesQuestion; },
/* harmony export */ dK: function() { return /* binding */ openChallenge; },
/* harmony export */ e: function() { return /* binding */ getShixunUseInfos; },
/* harmony export */ eX: function() { return /* binding */ submitShixuns; },
/* harmony export */ eb: function() { return /* binding */ getQuestionList; },
/* harmony export */ fL: function() { return /* binding */ addRepositoryFiles; },
/* harmony export */ h4: function() { return /* binding */ createRepository; },
/* harmony export */ hS: function() { return /* binding */ getOnlineCount; },
/* harmony export */ he: function() { return /* binding */ getShixunsList; },
/* harmony export */ hn: function() { return /* binding */ challengeMoveDown; },
/* harmony export */ ii: function() { return /* binding */ getChallengePractice; },
/* harmony export */ im: function() { return /* binding */ downChallengesQuestion; },
/* harmony export */ j8: function() { return /* binding */ getCollaboratorsData; },
/* harmony export */ jq: function() { return /* binding */ updateRepositoryFiles; },
/* harmony export */ kF: function() { return /* binding */ updateRepositoryFile; },
/* harmony export */ km: function() { return /* binding */ getChallengesNew; },
/* harmony export */ l3: function() { return /* binding */ addTeachGroupMember; },
/* harmony export */ m7: function() { return /* binding */ updateSetting; },
/* harmony export */ mI: function() { return /* binding */ getInfoWithJupyterLab; },
/* harmony export */ n5: function() { return /* binding */ getChallengesData; },
/* harmony export */ nu: function() { return /* binding */ getFileContents; },
/* harmony export */ p0: function() { return /* binding */ deleteGitFiles; },
/* harmony export */ q0: function() { return /* binding */ getChallengesEdit; },
/* harmony export */ q9: function() { return /* binding */ activeWithTPM; },
/* harmony export */ qA: function() { return /* binding */ saveWithTPM; },
/* harmony export */ rO: function() { return /* binding */ deleteChallengesNew; },
/* harmony export */ rs: function() { return /* binding */ cancelCollect; },
/* harmony export */ sr: function() { return /* binding */ deleteGitFile; },
/* harmony export */ t2: function() { return /* binding */ moveGitFiles; },
/* harmony export */ tX: function() { return /* binding */ getMirrorApplies; },
/* harmony export */ uo: function() { return /* binding */ deleteDataSet; },
/* harmony export */ v3: function() { return /* binding */ addRepositoryFile; },
/* harmony export */ w: function() { return /* binding */ getSecretRepository; },
/* harmony export */ xK: function() { return /* binding */ updateChallengesAnswer; },
/* harmony export */ xg: function() { return /* binding */ updateChallenges; },
/* harmony export */ xk: function() { return /* binding */ deleteCollaborators; },
/* harmony export */ yE: function() { return /* binding */ updateLearnSetting; },
/* harmony export */ yx: function() { return /* binding */ getTaskPass; },
/* harmony export */ zD: function() { return /* binding */ challengeMoveUp; },
/* harmony export */ zH: function() { return /* binding */ resetWithTPM; }
/* harmony export */ });
/* unused harmony exports mirrorAppliesPublish, mirrorAppliesOpenVnc, mirrorAppliesOpenWebssh, mirrorAppliesSaveImage, mirrorAppliesDeleteImage, mirrorAppliesExtendVnc, mirrorAppliesResetVncLink, updateShixunStudyNum */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const getStatisticsHeader = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/shixun_statistics/statistics_header.json", { method: "Get", params });
});
const getOnlineCount = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/shixun_statistics/online_count.json", { method: "Get", params });
});
const getStatisticsBody = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/shixun_statistics/statistics_body.json", { method: "Get", params });
});
const getRankList = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/shixun_statistics/rank_list.json", { method: "Get", params });
});
const getShixunUseInfos = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/shixun_statistics/shixun_use_infos.json", { method: "Get", params });
});
function getShixunsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/shixuns.json", {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getShixunsMenus(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/disciplines.json", {
method: "Get",
params: __spreadValues({ source: "shixun" }, params || {})
});
});
}
function getShixunsDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}.json`, {
method: "Get"
});
});
}
function getRightData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/show_right.json`, {
method: "Get"
});
});
}
function getChallengesData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/challenges.json`, {
method: "Get"
});
});
}
function execJupyter(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/jupyter_exec.json${params.reset ? `?reset=${params.reset}` : ""}`,
{
method: "Get",
params
}
);
});
}
function execShixun(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/shixun_exec.json${params.reset ? `?reset=${params.reset}` : ""}`,
{
method: "Get",
params
}
);
});
}
function openChallenge(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(params.url, {
method: "Get"
});
});
}
function challengeMoveUp(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.shixun_identifier}/challenges/${params.challenge_id}/index_up.json`,
{
method: "Get"
}
);
});
}
function challengeMoveDown(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.shixun_identifier}/challenges/${params.challenge_id}/index_down.json`,
{
method: "Get"
}
);
});
}
function cancelCollect(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/collections/cancel.json`, {
method: "Delete",
body: {
container_id: params.container_id,
container_type: params.container_type
}
});
});
}
function collect(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/collections.json`, {
method: "Post",
body: {
container_id: params.container_id,
container_type: params.container_type
}
});
});
}
function searchUserCourses(params) {
return __async(this, null, function* () {
const { id } = params || {};
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${id}/search_user_courses.json`, {
method: "Get",
params
});
});
}
function sendToCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params == null ? void 0 : params.id}/send_to_course.json`, {
method: "Post",
body: __spreadValues({}, params)
});
});
}
function cancelRelease(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/cancel_publish.json`, {
method: "Get"
});
});
}
function cancelPublic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/cancel_apply_public.json`, {
method: "Get"
});
});
}
function applyPublic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/apply_public.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function release(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/publish.json`, {
method: "Get"
});
});
}
function getNewShixunsData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/jupyter_new.json`, {
method: "Get"
});
});
}
function deleteAttachment(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/attachments/${params.id}.json`, {
method: "delete"
});
});
}
function applyShixunMirror(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/apply_shixun_mirror.json`, {
method: "post",
body: params
});
});
}
function submitShixuns(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns.json`, {
method: "post",
body: params
});
});
}
function getShixunsJupyterLab(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/jupyter_lab_new.json`, {
method: "get",
params
});
});
}
function getAuditSituationData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/review_newest_record.json`, {
method: "Get"
});
});
}
function updateAuditSituation(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/review_shixun.json`, {
method: "post",
body: params
});
});
}
function getCollaboratorsData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/collaborators.json`, {
method: "Get",
params
});
});
}
function addCollaborator(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/shixun_members_added.json`, {
method: "post",
body: params
});
});
}
function addTeachGroupMember(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.identifier}/add_members_group.json`, {
method: "post",
body: params
});
});
}
function getChangeManager(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/change_manager.json`, {
method: "Get",
params
});
});
}
function changeManager(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/change_manager.json`, {
method: "post",
body: params
});
});
}
function deleteCollaborators(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/collaborators_delete.json`,
{
method: "delete",
body: {
user_id: params.userId
}
}
);
});
}
function getRankingList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/ranking_list.json`, {
method: "Get"
});
});
}
function getSettingsData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/settings.json`, {
method: "Get"
});
});
}
function getMirrorScript(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/get_mirror_script.json`,
{
method: "Get",
params: {
mirror_id: params.mirror_id
}
}
);
});
}
function getScriptContent(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/get_script_contents.json`, {
method: "Get",
params
});
});
}
function getCustomScript(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/get_custom_script.json`, {
method: "Get",
params
});
});
}
function updateSettingBasicInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/update_for_jupyter.json`, {
method: "put",
body: params
});
});
}
function getShixunQuote(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/shixun_quotes.json`, {
method: "Get"
});
});
}
function deleteShixun(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}.json`, {
method: "delete"
});
});
}
function permanentClose(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/close.json`, {
method: "post",
body: params
});
});
}
function getDepartments(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/departments.json`, {
method: "Get",
params
});
});
}
function updatePermissionSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/update_permission_setting.json`, {
method: "post",
body: params
});
});
}
function updateLearnSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/update_learn_setting.json`, {
method: "post",
body: params
});
});
}
function updateSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/update_setting`, {
method: "post",
body: params
});
});
}
function getSetData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/get_data_sets.json`, {
method: "Get",
params
});
});
}
function deleteDataSet(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/destroy_data_sets.json`, {
method: "Delete",
body: { id: params.deleteId }
});
});
}
function getChallengesNew(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/challenges/new.json`, {
method: "get"
});
});
}
function addChallengesNew(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.identifier}/challenges.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getChallengePractice(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengeId}/edit.json`,
{
method: "get",
params: {
tab: params.tab
}
}
);
});
}
function updateChallengesNew(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}.json`,
{
method: "put",
body: __spreadValues({}, params)
}
);
});
}
function getQuestionList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/choose_questions.json`,
{
method: "get"
}
);
});
}
function updateChallenges(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/challenges/move_position.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function deleteChallengesNew(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}.json`,
{
method: "delete",
body: __spreadValues({}, params)
}
);
});
}
function getChallengesEdit(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/edit.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function getChallengesAnswer(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengeId}/answer.json`,
{
method: "get",
params: __spreadValues({}, params)
}
);
});
}
function updateChallengesAnswer(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengeId}/crud_answer.json`,
{
method: "post",
body: __spreadValues({}, params)
}
);
});
}
function addChallengesQuestion(params) {
return __async(this, null, function* () {
if (params.type === 1) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/create_choose_question.json`,
{
method: "post",
body: __spreadValues({}, params)
}
);
}
if (params.type === 2) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/create_blank_question.json`,
{
method: "post",
body: __spreadValues({}, params)
}
);
}
if (params.type === 3) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/create_judge_question.json`,
{
method: "post",
body: __spreadValues({}, params)
}
);
}
});
}
function updateChallengesQuestion(params) {
return __async(this, null, function* () {
if (params.type === 1) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/update_choose_question.json`,
{
method: "post",
body: __spreadProps(__spreadValues({}, params), { choose_id: params.questionId })
}
);
}
if (params.type === 2) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/update_blank_question.json`,
{
method: "put",
body: __spreadProps(__spreadValues({}, params), { choose_id: params.questionId })
}
);
}
if (params.type === 3) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/update_judge_question.json`,
{
method: "put",
body: __spreadProps(__spreadValues({}, params), { choose_id: params.questionId })
}
);
}
});
}
function deleteChallengesQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/destroy_challenge_choose.json`,
{
method: "Delete",
body: { choose_id: params.questionId }
}
);
});
}
function upChallengesQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/choose_question_up_position.json`,
{
method: "post",
body: { challenge_choose_id: params.questionId }
}
);
});
}
function downChallengesQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/choose_question_down_position.json`,
{
method: "post",
body: { challenge_choose_id: params.questionId }
}
);
});
}
function getEditChallengesQuestion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(
`/api/shixuns/${params.id}/challenges/${params.challengesId}/edit_choose_question.json`,
{
method: "get",
params: __spreadProps(__spreadValues({}, params), { choose_id: params.questionId })
}
);
});
}
function deleteGitFile(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/delete_git_file.json`, {
method: "Delete",
body: params
});
});
}
function deleteGitFiles(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/sci/projects/${params.id}/delete_git_file.json`, {
method: "Delete",
body: params
});
});
}
function moveGitFile(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/mv_file.json`, {
method: "post",
body: params
});
});
}
function moveGitFiles(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/sci/projects/${params.id}/mv_file.json`, {
method: "post",
body: params
});
});
}
function getRepository(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/repository.json`, {
method: "post",
body: params
});
});
}
function getRepositorys(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/sci/projects/${params.id}/repository.json`, {
method: "post",
body: params
});
});
}
function getSecretRepository(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/secret_repository.json`, {
method: "post",
body: params
});
});
}
function addRepositoryFile(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/add_file.json`, {
method: "post",
body: params
});
});
}
function addRepositoryFiles(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/sci/projects/${params.id}/add_file.json`, {
method: "post",
body: params
});
});
}
function getRepositoryCommit(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/commits.json`, {
method: "post",
body: params
});
});
}
function getFileContent(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/file_content.json`, {
method: "post",
body: params
});
});
}
function getFileContents(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/sci/projects/${params.id}/file_content.json`, {
method: "post",
body: params
});
});
}
function updateRepositoryFile(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/update_file.json`, {
method: "post",
body: params
});
});
}
function updateRepositoryFiles(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/sci/projects/${params.id}/update_file.json`, {
method: "post",
body: params
});
});
}
function uploadGitFolder(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/upload_git_folder.json`, {
method: "post",
body: { path: params.path, secret_repository: params.secret_repository }
});
});
}
function resetMyGame(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/${params.url}`, {
method: "Get"
});
});
}
function getInfoWithTPM(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/jupyters/get_info_with_tpm.json`, {
method: "Get",
params
});
});
}
function getTimeInfoWithTPM(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/jupyters/timeinfo_with_tpm.json`, {
method: "Get",
params
});
});
}
function resetWithTPM(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/jupyters/reset_with_tpm.json`, {
method: "Get",
params
});
});
}
function saveWithTPM(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/jupyters/save_with_tpm.json`, {
method: "Get",
params
});
});
}
function activeWithTPM(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/jupyters/active_with_tpm.json`, {
method: "Get",
params
});
});
}
function getForkList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/fork_list.json`, {
method: "Get",
params
});
});
}
function updateCollaboratorEditable(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.identifier}/change_editable.json`, {
method: "put",
body: __spreadValues({}, params)
});
});
}
function setSecretDir(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/set_secret_dir.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getEnvironmentData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/new.json`, {
method: "Get",
params
});
});
}
function getEnvironmentDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/environment_info`, {
method: "Get",
params
});
});
}
function createRepository(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/init_repository.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function createRepositorys(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/sci/projects/${params.id}/init_repository.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function createSecretRepository(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/update_secret_repository.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function existExercise(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/exist_exercise.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getMirrorApplies(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/mirror_applies/${params.id}.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function mirrorAppliesPublish(params) {
return __async(this, null, function* () {
return Fetch(`/api/mirror_applies/${params.id}/publish.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function mirrorAppliesOpenVnc(params) {
return __async(this, null, function* () {
return Fetch(`/api/mirror_applies/${params.id}/open_vnc.json`, {
method: "post",
params: __spreadValues({}, params)
});
});
}
function mirrorAppliesOpenWebssh(params) {
return __async(this, null, function* () {
return Fetch(`/api/mirror_applies/${params.id}/open_webssh.json`, {
method: "post",
params: __spreadValues({}, params)
});
});
}
function mirrorAppliesSaveImage(params) {
return __async(this, null, function* () {
return Fetch(`/api/mirror_applies/${params.id}/save_image.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function mirrorAppliesDeleteImage(params) {
return __async(this, null, function* () {
return Fetch(`/api/mirror_applies/${params.id}/delete_image.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function mirrorAppliesExtendVnc(params) {
return __async(this, null, function* () {
return Fetch(`/api/mirror_applies/${params.id}/extend_vnc.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function mirrorAppliesResetVncLink(params) {
return __async(this, null, function* () {
return Fetch(`/api/mirror_applies/${params.id}/reset_vnc_link.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getTaskPass(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/paths/get_task_pass.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getInfoWithJupyterLab(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/jupyters/get_info_with_jupyter_lab.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function updateJupyterLabSetting(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/${params.id}/update_jupyter_lab_setting.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function checkShixunCopy(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/shixuns/check_shixun_copy.json`, {
method: "post",
body: params
});
});
}
function getProgressHomeworks(shixun_id) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/progress_homeworks/${shixun_id}`, {
method: "get",
params: {
is_initiative_study: 1
}
});
});
}
function updateShixunStudyNum(params) {
return __async(this, null, function* () {
return Fetch(`/api/shixuns/${params.id}/update_shixun_study_num.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function previewJupyter(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/jupyters/preview.json`, {
method: "get",
params
});
});
}
/***/ }),
/***/ 98948:
/*!********************************!*\
!*** ./src/service/teacher.ts ***!
\********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Bg: function() { return /* binding */ getGraduationGroupList; },
/* harmony export */ FO: function() { return /* binding */ teacherApplicationReview; },
/* harmony export */ eJ: function() { return /* binding */ joinGraduationGroup; },
/* harmony export */ eZ: function() { return /* binding */ createGraduationGroup; },
/* harmony export */ fd: function() { return /* binding */ studentApplicationReview; },
/* harmony export */ gp: function() { return /* binding */ getList; },
/* harmony export */ iU: function() { return /* binding */ getApplyStudents; },
/* harmony export */ l3: function() { return /* binding */ deleteCourseStudents; },
/* harmony export */ mw: function() { return /* binding */ changeMemberRole; },
/* harmony export */ oZ: function() { return /* binding */ setAllCourseGroups; },
/* harmony export */ rM: function() { return /* binding */ changeCourseAdmin; },
/* harmony export */ r_: function() { return /* binding */ checkJoinStudent; },
/* harmony export */ s: function() { return /* binding */ getApplyList; },
/* harmony export */ ur: function() { return /* binding */ getStudentsList; },
/* harmony export */ xV: function() { return /* binding */ getAllCourseGroups; },
/* harmony export */ yb: function() { return /* binding */ deleteCourseTeacher; }
/* harmony export */ });
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/teachers.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getApplyList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/apply_teachers.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getGraduationGroupList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/graduation_group_list.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getAllCourseGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/all_course_groups.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function setAllCourseGroups(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/set_course_group.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function joinGraduationGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/join_graduation_group.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function createGraduationGroup(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/create_graduation_group.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function deleteCourseTeacher(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/delete_course_teacher.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function deleteCourseStudents(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/delete_from_course.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function changeMemberRole(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/change_member_role.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function changeCourseAdmin(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/change_course_admin.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function teacherApplicationReview(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/teacher_application_review.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getStudentsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/students.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getApplyStudents(identifier, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${identifier}/apply_students.json`, {
method: "get",
params
});
});
}
function checkJoinStudent(identifier, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${identifier}/join_student_checkout.json`, {
method: "get",
params
});
});
}
function studentApplicationReview(identifier, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${identifier}/student_application_review.json`, {
method: "post",
body: params
});
});
}
/***/ }),
/***/ 63203:
/*!*****************************!*\
!*** ./src/service/user.ts ***!
\*****************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Cx: function() { return /* binding */ topicsSetPublic; },
/* harmony export */ Cy: function() { return /* binding */ postUserChoiceLearnPath; },
/* harmony export */ DA: function() { return /* binding */ getHomepageInfo; },
/* harmony export */ Ef: function() { return /* binding */ topicSendToClass; },
/* harmony export */ Es: function() { return /* binding */ LoginIn; },
/* harmony export */ Ex: function() { return /* binding */ changPassword; },
/* harmony export */ FM: function() { return /* binding */ deleteVideo; },
/* harmony export */ Fn: function() { return /* binding */ videoSendToClass; },
/* harmony export */ Gq: function() { return /* binding */ LoginForPhone; },
/* harmony export */ Ho: function() { return /* binding */ getCourses; },
/* harmony export */ IU: function() { return /* binding */ getEngineerUrl; },
/* harmony export */ JJ: function() { return /* binding */ getHomeworkBanksDetail; },
/* harmony export */ Ol: function() { return /* binding */ validateName; },
/* harmony export */ Qx: function() { return /* binding */ getReviewVideos; },
/* harmony export */ Tv: function() { return /* binding */ deleteQuestionBanks; },
/* harmony export */ WS: function() { return /* binding */ topicsDelete; },
/* harmony export */ WY: function() { return /* binding */ getVideos; },
/* harmony export */ ai: function() { return /* binding */ getQuestionBanks; },
/* harmony export */ bG: function() { return /* binding */ getUserInfo; },
/* harmony export */ c0: function() { return /* binding */ resetPassword; },
/* harmony export */ dE: function() { return /* binding */ cancelShixun; },
/* harmony export */ dt: function() { return /* binding */ batchPublish; },
/* harmony export */ gI: function() { return /* binding */ topicGetCourseList; },
/* harmony export */ lO: function() { return /* binding */ logWatchHistory; },
/* harmony export */ mW: function() { return /* binding */ getProjects; },
/* harmony export */ n0: function() { return /* binding */ getSystemUpdate; },
/* harmony export */ nV: function() { return /* binding */ getUserLearnPath; },
/* harmony export */ o1: function() { return /* binding */ getValidateCode; },
/* harmony export */ qN: function() { return /* binding */ signed; },
/* harmony export */ rV: function() { return /* binding */ getShixuns; },
/* harmony export */ sh: function() { return /* binding */ getUserPersona; },
/* harmony export */ vR: function() { return /* binding */ LoginOut; },
/* harmony export */ w3: function() { return /* binding */ getPaths; },
/* harmony export */ x4: function() { return /* binding */ getNavigationInfo; },
/* harmony export */ z2: function() { return /* binding */ register; }
/* harmony export */ });
/* unused harmony export wechatRegister */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function LoginIn(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/accounts/login.json", {
method: "post",
body: __spreadValues({}, params)
});
});
}
function LoginOut(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/accounts/logout.json", {
method: "get"
// body: { ...params },
});
});
}
function getUserInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/get_user_info.json`, {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getNavigationInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/users/get_notice.json", {
method: "get",
params: __spreadValues({}, params)
});
});
}
function getSystemUpdate() {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/users/system_update.json", {
method: "get"
});
});
}
function getHomepageInfo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/homepage_info.json`, {
method: "get"
});
});
}
function signed(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/attendance.json`, {
method: "post"
});
});
}
function getCourses(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/courses.json`, {
method: "get",
params
});
});
}
function getShixuns(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/shixuns.json`, {
method: "get",
params
});
});
}
function getPaths(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/subjects.json`, {
method: "get",
params
});
});
}
function getProjects(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/projects.json`, {
method: "get",
params
});
});
}
function getVideos(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/videos.json`, {
method: "get",
params
});
});
}
function getReviewVideos(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/videos/review.json`, {
method: "get",
params
});
});
}
function deleteVideo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/videos/${params.id}.json`, {
method: "delete"
});
});
}
function logWatchHistory(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/watch_video_histories.json", {
method: "post",
body: params
});
});
}
function getQuestionBanks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/question_banks.json`, {
method: "get",
params
});
});
}
function topicsSetPublic(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/question_banks/multi_public.json", {
method: "post",
body: params
});
});
}
function topicsDelete(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/question_banks/multi_delete.json", {
method: "delete",
body: params
});
});
}
function topicGetCourseList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/question_banks/my_courses.json`, {
method: "get",
params
});
});
}
function topicSendToClass(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/question_banks/send_to_course.json", {
method: "post",
body: params
});
});
}
function videoSendToClass(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/videos/${params.object_id}/create_course_video.json`, {
method: "post",
body: params
});
});
}
function getHomeworkBanksDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/homework_banks/${params.topicId}.json`, {
method: "get",
params
});
});
}
function deleteQuestionBanks(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/question_banks/multi_delete.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function batchPublish(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/${params.username}/videos/batch_publish.json`, {
method: "post",
body: params
});
});
}
function cancelShixun(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/myshixuns/${params.identifier}/cancel.json`, {
method: "delete",
body: __spreadValues({}, params)
});
});
}
function getEngineerUrl() {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/get_engineer_url.json`, {
method: "get"
});
});
}
function postUserChoiceLearnPath(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/intelligent_recommendations/user_choice_learn_path.json`, {
method: "post",
body: __spreadValues({}, params)
});
});
}
function getUserPersona() {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/intelligent_recommendations/persona.json`, {
method: "get"
});
});
}
function getUserLearnPath() {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/intelligent_recommendations/user_learn_path.json`, {
method: "get"
});
});
}
function validateName(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/accounts/valid_email_and_phone.json", {
method: "get",
params
});
}
function getValidateCode(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/accounts/get_verification_code.json", {
method: "get",
params
});
}
function register(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/accounts/register.json", {
method: "post",
body: __spreadValues({}, params)
});
}
function wechatRegister(params) {
return Fetch("/api/weapps/register.json", {
method: "post",
body: __spreadValues({}, params)
});
}
function changPassword(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/users/accounts/${params.login}/password.json`, {
method: "put",
body: __spreadValues({}, params)
});
}
function resetPassword(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/accounts/reset_password.json", {
method: "post",
body: __spreadValues({}, params)
});
}
function LoginForPhone(params) {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)("/api/accounts/login_for_phone.json", {
method: "get",
params: __spreadValues({}, params)
});
}
/***/ }),
/***/ 41193:
/*!******************************!*\
!*** ./src/service/video.ts ***!
\******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ BQ: function() { return /* binding */ getVideoStatisticsList; },
/* harmony export */ DH: function() { return /* binding */ viewVideo; },
/* harmony export */ Db: function() { return /* binding */ getAnalysesDetail; },
/* harmony export */ Ju: function() { return /* binding */ savePhoto; },
/* harmony export */ Mz: function() { return /* binding */ getVideoDurationStatics; },
/* harmony export */ O2: function() { return /* binding */ getVideoDetail; },
/* harmony export */ TJ: function() { return /* binding */ getVideoEditDatas; },
/* harmony export */ Vg: function() { return /* binding */ getStudentVideoStatisticsList; },
/* harmony export */ ZY: function() { return /* binding */ getVideoStatistics; },
/* harmony export */ Zx: function() { return /* binding */ getVideoPeopleStatics; },
/* harmony export */ cU: function() { return /* binding */ getOneVideoStatisticsList; },
/* harmony export */ fn: function() { return /* binding */ getVideoData; },
/* harmony export */ jK: function() { return /* binding */ starVideo; },
/* harmony export */ yN: function() { return /* binding */ getStageData; }
/* harmony export */ });
/* unused harmony exports addVideoItems, getVideoEditData, updateVideo, videoSendToCourse, getVideoMyCourses, addSchool */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
function getVideoStatisticsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/watch_video_histories.json`, {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getVideoStatistics(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/watch_statics.json`, {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getOneVideoStatisticsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/course_videos/${params.videoId}/watch_histories.json`, {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getStudentVideoStatisticsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.coursesId}/own_watch_histories.json`, {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getVideoDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/video_items/${params.id}.json`, {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function addVideoItems(params) {
return __async(this, null, function* () {
return Fetch("/api/video_items.json", {
method: "post",
body: params
});
});
}
function getVideoEditData(params) {
return __async(this, null, function* () {
return Fetch(`/api/video_items/${params.id}/edit.json`, {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function getVideoEditDatas(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stage_shixuns/${params.id}/edit.json`, {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function starVideo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/video_items/${params.id}/star.json`, {
method: "post",
body: params
});
});
}
function updateVideo(params) {
return __async(this, null, function* () {
return Fetch(`/api/video_items/${params.id}.json`, {
method: "put",
body: params
});
});
}
function videoSendToCourse(params) {
return __async(this, null, function* () {
return Fetch(`/api/video_items/${params.id}/send_to_course.json`, {
method: "post",
body: params
});
});
}
function getVideoMyCourses(params) {
return __async(this, null, function* () {
return Fetch(`/api/users/my_courses.json`, {
method: "Get",
params: __spreadValues({}, params)
});
});
}
function viewVideo(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/video_items/${params.id}/view_video.json`, {
method: "post",
body: params
});
});
}
function addSchool(params) {
return __async(this, null, function* () {
return Fetch(`/api/video_items/${params.id}/add_school.json`, {
method: "post",
body: params
});
});
}
function getVideoPeopleStatics(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.course_id}/video_people_statics.json`, {
method: "get",
params
});
});
}
function getVideoDurationStatics(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params.course_id}/video_duration_statics.json`, {
method: "get",
params
});
});
}
function getStageData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/stages.json`, {
method: "get",
params
});
});
}
function getVideoData(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/courses/${params == null ? void 0 : params.id}/course_videos_tree.json`, {
method: "get",
params
});
});
}
function savePhoto(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/study_action_analyses.json`, {
method: "post",
body: params
});
});
}
function getAnalysesDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/study_action_analyses/detail.json`, {
method: "post",
body: params
});
});
}
/***/ }),
/***/ 39196:
/*!**************************************!*\
!*** ./src/service/virtualSpaces.ts ***!
\**************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ A: function() { return /* binding */ deleteCourse; },
/* harmony export */ CH: function() { return /* binding */ putEditDiscussion; },
/* harmony export */ EA: function() { return /* binding */ getDiscussionList; },
/* harmony export */ FU: function() { return /* binding */ getGoodLessonsDetail; },
/* harmony export */ G_: function() { return /* binding */ getGoodLessonsList; },
/* harmony export */ LY: function() { return /* binding */ addShixun; },
/* harmony export */ Ll: function() { return /* binding */ postDiscussionList; },
/* harmony export */ MM: function() { return /* binding */ Addmember; },
/* harmony export */ Ps: function() { return /* binding */ deleteShixun; },
/* harmony export */ Sl: function() { return /* binding */ getVirtualSpacesMenus; },
/* harmony export */ To: function() { return /* binding */ putGoodLessonsDetail; },
/* harmony export */ Vf: function() { return /* binding */ postGoodLessonsList; },
/* harmony export */ XQ: function() { return /* binding */ getDiscussionDetail; },
/* harmony export */ b: function() { return /* binding */ getLessonResourcesList; },
/* harmony export */ bq: function() { return /* binding */ addCourse; },
/* harmony export */ cZ: function() { return /* binding */ postAddLessonRes; },
/* harmony export */ rV: function() { return /* binding */ getShixuns; },
/* harmony export */ sT: function() { return /* binding */ getVirtualSpacesDetails; },
/* harmony export */ tS: function() { return /* binding */ getCourseList; },
/* harmony export */ xt: function() { return /* binding */ change_creator; },
/* harmony export */ y2: function() { return /* binding */ getBaseStatisticData; }
/* harmony export */ });
/* unused harmony export upvideos */
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @/utils/fetch */ 64841);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const getBaseStatisticData = (params) => __async(void 0, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/base_statistic_data.json`, { method: "Get", params });
});
function putEditDiscussion(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/discussions/${params.id}.json`, {
method: "put",
body: params
});
});
}
function getDiscussionDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/discussions/${params.id}.json`, {
method: "get",
params
});
});
}
function postDiscussionList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/discussions.json`, {
method: "post",
body: params
});
});
}
function getDiscussionList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/discussions.json`, {
method: "get",
params
});
});
}
function postAddLessonRes(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/good_lessons/${params.id}/add_resources.json`, {
method: "post",
body: params
});
});
}
function getLessonResourcesList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/good_lessons/${params.id}/lesson_resources_list.json`, {
method: "get",
params
});
});
}
function getGoodLessonsDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/good_lessons/${params.id}.json`, {
method: "get",
params
});
});
}
function putGoodLessonsDetail(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/good_lessons/${params.id}.json`, {
method: "put",
body: params
});
});
}
function postGoodLessonsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/good_lessons.json`, {
method: "post",
body: params
});
});
}
function getGoodLessonsList(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/good_lessons.json`, {
method: "get",
params
});
});
}
function getVirtualSpacesDetails(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params == null ? void 0 : params.id}.json`, {
method: "get"
});
});
}
function getVirtualSpacesMenus(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params == null ? void 0 : params.id}/modules.json`, {
method: "get"
});
});
}
function upvideos(params) {
return __async(this, null, function* () {
return Fetch(`/api/virtual_classrooms/${params.id}/videos/batch_publish.json`, {
method: "post",
body: params
});
});
}
function Addmember(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/members.json`, {
method: "post",
body: params
});
});
}
function change_creator(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_spacesId}/members/${params.id}/change_creator.json`, {
method: "post",
body: params
});
});
}
function getShixuns(id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${id}/shixuns.json`, {
method: "get",
params
});
});
}
function addShixun(id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${id}/shixuns`, {
method: "post",
body: params
});
});
}
function deleteShixun(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_classroom_id}/shixuns/${params.shixun_id}.json`, {
method: "delete"
});
});
}
function getCourseList(id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${id}/subjects.json`, {
method: "get",
params
});
});
}
function addCourse(virtual_classroom_id, params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${virtual_classroom_id}/subjects.json`, {
method: "post",
body: params
});
});
}
function deleteCourse(params) {
return __async(this, null, function* () {
return (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .ZP)(`/api/virtual_classrooms/${params.virtual_classroom_id}/subjects/${params.subject_id}.json`, {
method: "delete"
});
});
}
/***/ }),
/***/ 77883:
/*!********************************!*\
!*** ./src/utils/authority.ts ***!
\********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ EO: function() { return /* binding */ isCommonAdminOrCreator; },
/* harmony export */ G5: function() { return /* binding */ isAdminOrTeacher; },
/* harmony export */ GD: function() { return /* binding */ RoleType; },
/* harmony export */ GJ: function() { return /* binding */ isAdmin; },
/* harmony export */ Gg: function() { return /* binding */ isAdminOrAssistant; },
/* harmony export */ I2: function() { return /* binding */ getRoleAuth; },
/* harmony export */ IR: function() { return /* binding */ isTeacher; },
/* harmony export */ JA: function() { return /* binding */ isCommonStudent; },
/* harmony export */ Jd: function() { return /* binding */ isNotMember; },
/* harmony export */ Ny: function() { return /* binding */ isSuperAdmins; },
/* harmony export */ RV: function() { return /* binding */ isAdminOrStudent; },
/* harmony export */ Rb: function() { return /* binding */ isAdminOrCreatorOrOperation; },
/* harmony export */ Rm: function() { return /* binding */ isAssistant; },
/* harmony export */ V9: function() { return /* binding */ canShixunAdd; },
/* harmony export */ Yh: function() { return /* binding */ isStudents; },
/* harmony export */ aN: function() { return /* binding */ isAdminOrCreator; },
/* harmony export */ aQ: function() { return /* binding */ courseIsEnd; },
/* harmony export */ ag: function() { return /* binding */ isCommonSuperAdminOrOperation; },
/* harmony export */ bg: function() { return /* binding */ isLogin; },
/* harmony export */ d8: function() { return /* binding */ isCreator; },
/* harmony export */ dE: function() { return /* binding */ isStudent; },
/* harmony export */ eB: function() { return /* binding */ isAdmins; },
/* harmony export */ eY: function() { return /* binding */ userInfo; },
/* harmony export */ fn: function() { return /* binding */ isCommonSuperAdmin; },
/* harmony export */ h: function() { return /* binding */ isGPStudent; },
/* harmony export */ j5: function() { return /* binding */ isSuperAdmin; },
/* harmony export */ oF: function() { return /* binding */ isAdminOrAuthor; },
/* harmony export */ qz: function() { return /* binding */ isMainSite; },
/* harmony export */ tu: function() { return /* binding */ isGPAdminOrTeacher; }
/* harmony export */ });
/* unused harmony exports getAuthentication, isAdminAndCreator, isCreatorAndTeacher, canCommonAdd, canCommonDelete, canCommonUpdate, canCommonView, canCommonDownload, canShixunDelete, canShixunUpdate, canShixunView, canShixunSendToClassroom, canShixunViewAnswer, canShixunCancelPublic, canProblemsetAdd, canProblemsetDelete, canProblemsetUpdate, canProblemsetView, canProblemsetGroup, canProblemsetCancelPublic, canProblemsetCorrection, canProblemsetCollect, canProblemsetViewAnalysis, canPaperlibraryAdd, canPaperlibraryDelete, canPaperlibraryUpdate, canPaperlibraryView, canPaperlibraryCancelPublic, canPaperlibrarySendToClassroom, authentication, getGraduationsAuth, isGPAdmin, isGPTeacher */
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! umi */ 23852);
var RoleType = /* @__PURE__ */ ((RoleType2) => {
RoleType2[RoleType2["SuperAdmin"] = 1] = "SuperAdmin";
RoleType2[RoleType2["Operation"] = 2] = "Operation";
RoleType2[RoleType2["CertifiedTeacher"] = 5] = "CertifiedTeacher";
RoleType2[RoleType2["TrainingProduction"] = 8] = "TrainingProduction";
RoleType2[RoleType2["UncertifiedTeacher"] = 12] = "UncertifiedTeacher";
RoleType2[RoleType2["Student"] = 15] = "Student";
return RoleType2;
})(RoleType || {});
var CourseRoleType = /* @__PURE__ */ ((CourseRoleType2) => {
CourseRoleType2[CourseRoleType2["SuperAdmin"] = 1] = "SuperAdmin";
CourseRoleType2[CourseRoleType2["Operation"] = 2] = "Operation";
CourseRoleType2[CourseRoleType2["Admin"] = 5] = "Admin";
CourseRoleType2[CourseRoleType2["Teacher"] = 8] = "Teacher";
CourseRoleType2[CourseRoleType2["Assistant"] = 12] = "Assistant";
CourseRoleType2[CourseRoleType2["Student"] = 15] = "Student";
return CourseRoleType2;
})(CourseRoleType || {});
var GraduationsRoleType = /* @__PURE__ */ ((GraduationsRoleType2) => {
GraduationsRoleType2[GraduationsRoleType2["SuperAdmin"] = 0] = "SuperAdmin";
GraduationsRoleType2[GraduationsRoleType2["Teacher"] = 1] = "Teacher";
GraduationsRoleType2[GraduationsRoleType2["Student"] = 2] = "Student";
return GraduationsRoleType2;
})(GraduationsRoleType || {});
const getRoleAuth = (auth) => {
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_0__.getDvaApp)()._store.getState();
const { userInfo: userInfo2 } = user;
return auth.some((v) => v == (userInfo2 == null ? void 0 : userInfo2.role));
};
const getCourseAuth = (auth) => {
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_0__.getDvaApp)()._store.getState();
const { userInfo: userInfo2 } = user;
if (userInfo2 == null ? void 0 : userInfo2.own)
return true;
return auth.some((v) => {
var _a;
return v == ((_a = userInfo2 == null ? void 0 : userInfo2.course) == null ? void 0 : _a.course_role);
});
};
const isMainSite = () => {
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_0__.getDvaApp)()._store.getState();
const { userInfo: userInfo2 } = user;
return userInfo2.main_site;
};
const courseIsEnd = () => {
var _a;
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_0__.getDvaApp)()._store.getState();
const { userInfo: userInfo2 } = user;
return (_a = userInfo2 == null ? void 0 : userInfo2.course) == null ? void 0 : _a.course_is_end;
};
const getAuthentication = () => {
const { user } = getDvaApp()._store.getState();
const { userInfo: userInfo2 } = user;
return userInfo2.authentication;
};
const isAdmin = () => {
return getCourseAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* Admin */, 8 /* Teacher */, 12 /* Assistant */]);
};
const isAdminOrAssistant = () => {
return getCourseAuth([1 /* SuperAdmin */, 8 /* Teacher */, 5 /* Admin */, 12 /* Assistant */, 2 /* Operation */]);
};
const isAdminOrAuthor = () => {
return getCourseAuth([1 /* SuperAdmin */, 8 /* Teacher */, 5 /* Admin */]);
};
const isSuperAdmin = () => {
return getCourseAuth([1 /* SuperAdmin */]);
};
const isAdminOrCreator = () => {
return getCourseAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* Admin */]);
};
const isSuperAdmins = () => {
return getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const isAdminAndCreator = () => {
return getCourseAuth([1 /* SuperAdmin */, 5 /* Admin */]);
};
const isCreatorAndTeacher = () => {
return getCourseAuth([5 /* Admin */, 8 /* Teacher */]);
};
const isCreator = () => {
return getCourseAuth([5 /* Admin */]);
};
const isAdminOrCreatorOrOperation = () => {
return getCourseAuth([1 /* SuperAdmin */, 5 /* Admin */, 2 /* Operation */]);
};
const isAdminOrTeacher = () => {
return getCourseAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* Admin */, 8 /* Teacher */]);
};
const isAssistant = () => {
return getCourseAuth([12 /* Assistant */]);
};
const isTeacher = () => {
return getCourseAuth([8 /* Teacher */]);
};
const isStudent = () => {
return getCourseAuth([15 /* Student */]);
};
const isAdminOrStudent = () => {
return getCourseAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* Admin */, 8 /* Teacher */, 12 /* Assistant */, 15 /* Student */]);
};
const isAdmins = () => {
return getCourseAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* Admin */, 8 /* Teacher */, 12 /* Assistant */]);
};
const isNotMember = () => {
var _a;
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_0__.getDvaApp)()._store.getState();
const { userInfo: userInfo2 } = user;
if (((_a = userInfo2 == null ? void 0 : userInfo2.course) == null ? void 0 : _a.course_role) === null) {
return true;
} else {
return false;
}
};
const canCommonAdd = (isPublic = true, own = false) => {
return getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */, 15 /* Student */]);
};
const canCommonDelete = (isPublic = true, own = false) => {
return own || !own && getRoleAuth([1 /* SuperAdmin */]);
};
const canCommonUpdate = (isPublic = true, own = false) => {
return own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const isStudents = () => {
return getRoleAuth([15 /* Student */]);
};
const canCommonView = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */, 15 /* Student */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canCommonDownload = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */, 15 /* Student */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canShixunAdd = (isPublic = true, own = false) => {
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_0__.getDvaApp)()._store.getState();
const { userInfo: userInfo2 } = user;
if (userInfo2 == null ? void 0 : userInfo2.is_shixun_marker) {
return true;
}
;
return getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */]);
};
const canShixunDelete = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */]) : own || !own && getRoleAuth([1 /* SuperAdmin */]);
};
const canShixunUpdate = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canShixunView = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */, 15 /* Student */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canShixunSendToClassroom = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canShixunViewAnswer = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canShixunCancelPublic = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */]) : false;
};
const canProblemsetAdd = (isPublic = true, own = false) => {
return getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */, 15 /* Student */]);
};
const canProblemsetDelete = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */]) : own || !own && getRoleAuth([1 /* SuperAdmin */]);
};
const canProblemsetUpdate = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canProblemsetView = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */, 15 /* Student */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canProblemsetGroup = (isPublic = true, own = false) => {
return isPublic ? false : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canProblemsetCancelPublic = (isPublic = true, own = false) => {
return isPublic ? own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]) : false;
};
const canProblemsetCorrection = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */]) : false;
};
const canProblemsetCollect = (isPublic = true, own = false) => {
return isPublic ? !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */]) : false;
};
const canProblemsetViewAnalysis = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canPaperlibraryAdd = (isPublic = true, own = false) => {
return getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */]);
};
const canPaperlibraryDelete = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */]) : own || !own && getRoleAuth([1 /* SuperAdmin */]);
};
const canPaperlibraryUpdate = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canPaperlibraryView = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const canPaperlibraryCancelPublic = (isPublic = true, own = false) => {
return isPublic ? own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]) : false;
};
const canPaperlibrarySendToClassroom = (isPublic = true, own = false) => {
return isPublic ? getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */, 8 /* TrainingProduction */, 12 /* UncertifiedTeacher */]) : own || !own && getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const authentication = (isPublic = true, own = false) => {
return getCourseAuth([8 /* Teacher */]);
};
const isCommonSuperAdmin = () => {
return getRoleAuth([1 /* SuperAdmin */]);
};
const isCommonSuperAdminOrOperation = () => {
return getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */]);
};
const isCommonStudent = () => {
return getRoleAuth([15 /* Student */]);
};
const isCommonAdminOrCreator = () => {
return getRoleAuth([1 /* SuperAdmin */, 2 /* Operation */, 5 /* CertifiedTeacher */]);
};
const isLogin = () => {
var _a;
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_0__.getDvaApp)()._store.getState();
return !!((_a = user.userInfo) == null ? void 0 : _a.login);
};
const userInfo = () => {
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_0__.getDvaApp)()._store.getState();
return user.userInfo;
};
const getGraduationsAuth = (auth) => {
const { graduations } = (0,umi__WEBPACK_IMPORTED_MODULE_0__.getDvaApp)()._store.getState();
const { details } = graduations;
return auth.some((v) => v === (details == null ? void 0 : details.user_identity));
};
const isGPAdminOrTeacher = () => {
return getGraduationsAuth([0 /* SuperAdmin */, 1 /* Teacher */]);
};
const isGPAdmin = () => {
return getGraduationsAuth([0 /* SuperAdmin */]);
};
const isGPTeacher = () => {
return getGraduationsAuth([1 /* Teacher */]);
};
const isGPStudent = () => {
return getGraduationsAuth([2 /* Student */]);
};
/***/ }),
/***/ 16298:
/*!*******************************!*\
!*** ./src/utils/constant.ts ***!
\*******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ f: function() { return /* binding */ QUESTIONTYPE; },
/* harmony export */ k: function() { return /* binding */ TAGLIST; }
/* harmony export */ });
const QUESTIONTYPE = [
{ id: 0, name: "\u5355\u9009\u9898", nameType: "SINGLE" },
{ id: 1, name: "\u591A\u9009\u9898", nameType: "MULTIPLE" },
{ id: 2, name: "\u5224\u65AD\u9898", nameType: "JUDGMENT" },
{ id: 3, name: "\u586B\u7A7A\u9898", nameType: "COMPLETION" },
{ id: 4, name: "\u7B80\u7B54\u9898", nameType: "SUBJECTIVE" },
{ id: 5, name: "\u5B9E\u8BAD\u9898", nameType: "PRACTICAL" },
{ id: 6, name: "\u7F16\u7A0B\u9898", nameType: "PROGRAM" },
{ id: 7, name: "\u7EC4\u5408\u9898", nameType: "COMBINATION" },
{ id: 8, name: "\u7A0B\u5E8F\u586B\u7A7A\u9898", nameType: "BPROGRAM" }
];
const TAGLIST = [
"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"
];
/***/ }),
/***/ 86717:
/*!**********************************!*\
!*** ./src/utils/contentType.ts ***!
\**********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ F: function() { return /* binding */ contentType; }
/* harmony export */ });
const 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"
};
/***/ }),
/***/ 19351:
/*!**************************************!*\
!*** ./src/utils/env.ts + 1 modules ***!
\**************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ env; }
});
// UNUSED EXPORTS: GlobalConfig
;// CONCATENATED MODULE: ./src/utils/env/dev.ts
const DEV = {
// PROXY_SERVER: 'https://data.educoder.net',
PROXY_SERVER: "https://test2-data.educoder.net",
API_SERVER: "",
REPORT_SERVER: "http://192.168.1.57:3001",
IMG_SERVER: "https://new-testali-cdn.educoder.net",
FORGE: "https://code.educoder.net/",
SSH_SERVER: "wss://webssh.educoder.net",
SSH_Slice: "https://testfu.educoder.net",
OFFICE_SERVER: "https://testoffice.educoder.net",
ONLYOFFICE: "https://testoffice.educoder.net",
OFFICE_IP: "http://113.246.243.98:9569",
TERMINAL_URL: "testsvc1.vnc.educoder.net",
QQLoginCB: encodeURIComponent("https://test-newweb.educoder.net")
};
/* harmony default export */ var dev = ((/* unused pure expression or super */ null && (DEV)));
;// CONCATENATED MODULE: ./src/utils/env.ts
const GlobalConfig = {
local: {
API_SERVER: "http://localhost:3000",
IMG_SERVER: "https://testali-cdn.educoder.net/",
REPORT_SERVER: "http://192.168.1.57:3001",
FORGE: "https://test-oldweb.educoder.net/",
SSH_SERVER: "wss://pre-webssh.educoder.net",
SSH_Slice: "https://testfu.educoder.net",
OFFICE_SERVER: "https://testoffice.educoder.net",
ONLYOFFICE: "https://testoffice.educoder.net",
OFFICE_IP: "http://113.246.243.98:9569",
QQLoginCB: encodeURIComponent("https://test-newweb.educoder.net")
},
dev: DEV,
newReactTest: {
// API_SERVER: 'https://test-data.educoder.net',
API_SERVER: (() => {
let api = "https://test-data.educoder.net";
const host = location.host;
if (host === "test2.educoder.net") {
api = "https://test2-data.educoder.net";
}
if (host === "test3.educoder.net") {
api = "https://test3-data.educoder.net";
}
return api;
})(),
SSH_SERVER: "wss://pre-webssh.educoder.net",
SSH_Slice: "https://testfu.educoder.net",
IMG_SERVER: (() => {
let imgServer = "https://new-testali-cdn.educoder.net";
const host = location.host;
if (host === "test3.educoder.net") {
imgServer = "https://test3-data.educoder.net";
}
return imgServer;
})(),
OFFICE_SERVER: "https://testoffice.educoder.net",
ONLYOFFICE: "https://testoffice.educoder.net",
OFFICE_IP: "http://113.246.243.98:9569",
REPORT_SERVER: "http://192.168.1.57:3001",
FORGE: "https://test-oldweb.educoder.net/",
QQLoginCB: encodeURIComponent("https://test-data.educoder.net"),
TERMINAL_URL: "testsvc1.vnc.educoder.net"
},
preNewBuild: {
// API_SERVER: 'https://pre-data.educoder.net',
API_SERVER: (() => {
let api = "https://pre-data.educoder.net";
if (location.host === "pre2.educoder.net") {
api = "https://pre2-data.educoder.net";
}
return api;
})(),
IMG_SERVER: "https://preali-cdn.educoder.net",
SSH_SERVER: "wss://pre-webssh.educoder.net",
SSH_Slice: "https://testfu.educoder.net",
REPORT_SERVER: "http://192.168.1.57:3001",
OFFICE_SERVER: "https://testoffice.educoder.net",
ONLYOFFICE: "https://testoffice.educoder.net",
OFFICE_IP: "http://113.246.243.98:9569",
FORGE: "https://forge.educoder.net/",
QQLoginCB: encodeURIComponent("https://pre.educoder.net")
},
newBuild: {
// API_SERVER: 'https://data.educoder.net',
API_SERVER: (() => {
let api = "https://data.educoder.net";
const domain = document.domain;
if (domain === "kepukehuan.educoder.net") {
api = "https://kepukehuan-data.educoder.net";
} else if (document.domain === "www.tokcoder.com" || document.domain === "tokcoder.com") {
api = "https://data.tokcoder.com";
}
return api;
})(),
SSH_SERVER: "wss://webssh.educoder.net",
REPORT_SERVER: "http://192.168.1.57:3001",
SSH_Slice: "https://fu.educoder.net",
IMG_SERVER: "https://ali-cdn.educoder.net",
OFFICE_SERVER: "https://officeserver.educoder.net",
ONLYOFFICE: "https://office.educoder.net",
OFFICE_IP: "https://officedata.educoder.net",
FORGE: "https://code.educoder.net/",
QQLoginCB: encodeURIComponent("https://www.educoder.net"),
TERMINAL_URL: ".jupyter.educoder.net"
},
// test
newTest: {
API_SERVER: "https://test-data.educoder.net",
IMG_SERVER: "https://test-data.educoder.net",
REPORT_SERVER: "http://192.168.1.57:3001",
SSH_SERVER: "wss://pre-webssh.educoder.net",
SSH_Slice: "https://testfu.educoder.net",
OFFICE_SERVER: "https://testoffice.educoder.net",
ONLYOFFICE: "https://testoffice.educoder.net",
OFFICE_IP: "http://113.246.243.98:9569",
FORGE: "http://test-oldweb.educoder.net/",
QQLoginCB: encodeURIComponent("https://test-data.educoder.net")
},
test: {
API_SERVER: "",
IMG_SERVER: "",
REPORT_SERVER: "http://192.168.1.57:3001",
FORGE: "http://test-oldweb.educoder.net/",
SSH_Slice: "https://testfu.educoder.net",
OFFICE_SERVER: "https://testoffice.educoder.net",
ONLYOFFICE: "https://testoffice.educoder.net",
OFFICE_IP: "http://113.246.243.98:9569",
SSH_SERVER: "wss://pre-webssh.educoder.net",
QQLoginCB: encodeURIComponent("https://test-newweb.educoder.net")
},
preBuild: {
API_SERVER: "",
IMG_SERVER: "https://preali-cdn.educoder.net",
REPORT_SERVER: "http://192.168.1.57:3001",
FORGE: "https://forge.educoder.net/",
SSH_Slice: "https://testfu.educoder.net",
OFFICE_SERVER: "https://testoffice.educoder.net",
ONLYOFFICE: "https://testoffice.educoder.net",
OFFICE_IP: "http://113.246.243.98:9569",
SSH_SERVER: "wss://pre-webssh.educoder.net",
QQLoginCB: encodeURIComponent("https://test-newweb.educoder.net")
},
newWeb: {
API_SERVER: "https://test-newweb.educoder.net",
IMG_SERVER: "https://test-newweb.educoder.net/",
REPORT_SERVER: "http://192.168.1.57:3001",
FORGE: "http://test-oldweb.educoder.net/",
SSH_Slice: "https://testfu.educoder.net",
OFFICE_SERVER: "https://testoffice.educoder.net",
ONLYOFFICE: "https://testoffice.educoder.net",
OFFICE_IP: "http://113.246.243.98:9569",
SSH_SERVER: "wss://pre-webssh.educoder.net",
QQLoginCB: encodeURIComponent("https://test-newweb.educoder.net")
},
build: {
API_SERVER: "",
IMG_SERVER: "",
REPORT_SERVER: "http://192.168.1.57:3001",
FORGE: "https://forge.educoder.net/",
SSH_SERVER: "wss://webssh.educoder.net",
SSH_Slice: "https://fu.educoder.net",
OFFICE_SERVER: "https://officeserver.educoder.net",
ONLYOFFICE: "https://testoffice.educoder.net",
OFFICE_IP: "https://officedata.educoder.net",
QQLoginCB: encodeURIComponent("https://www.educoder.net"),
TERMINAL_URL: ".jupyter.educoder.net"
}
};
/* harmony default export */ var env = (GlobalConfig[window.ENV || "dev"]);
/***/ }),
/***/ 64841:
/*!****************************!*\
!*** ./src/utils/fetch.ts ***!
\****************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ IV: function() { return /* binding */ del; },
/* harmony export */ U2: function() { return /* binding */ get; },
/* harmony export */ ZP: function() { return /* binding */ request; },
/* harmony export */ d4: function() { return /* binding */ getqq; },
/* harmony export */ gz: function() { return /* binding */ put; },
/* harmony export */ rz: function() { return /* binding */ parseParams; },
/* harmony export */ v_: function() { return /* binding */ post; }
/* harmony export */ });
/* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./env */ 19351);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! antd */ 28909);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! antd */ 43418);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! antd */ 8591);
/* harmony import */ var hash_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! hash.js */ 85582);
/* harmony import */ var hash_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(hash_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! umi */ 23852);
/* harmony import */ var _utils_util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @/utils/util */ 75798);
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
let modalConfirm;
const codeMessage = {
200: "\u670D\u52A1\u5668\u6210\u529F\u8FD4\u56DE\u8BF7\u6C42\u7684\u6570\u636E\u3002",
201: "\u65B0\u5EFA\u6216\u4FEE\u6539\u6570\u636E\u6210\u529F\u3002",
202: "\u4E00\u4E2A\u8BF7\u6C42\u5DF2\u7ECF\u8FDB\u5165\u540E\u53F0\u6392\u961F\uFF08\u5F02\u6B65\u4EFB\u52A1\uFF09\u3002",
204: "\u5220\u9664\u6570\u636E\u6210\u529F\u3002",
400: "\u53D1\u51FA\u7684\u8BF7\u6C42\u6709\u9519\u8BEF\uFF0C\u670D\u52A1\u5668\u6CA1\u6709\u8FDB\u884C\u65B0\u5EFA\u6216\u4FEE\u6539\u6570\u636E\u7684\u64CD\u4F5C\u3002",
401: "\u7528\u6237\u6CA1\u6709\u6743\u9650\uFF08\u4EE4\u724C\u3001\u7528\u6237\u540D\u3001\u5BC6\u7801\u9519\u8BEF\uFF09\u3002",
403: "\u7528\u6237\u5F97\u5230\u6388\u6743\uFF0C\u4F46\u662F\u8BBF\u95EE\u662F\u88AB\u7981\u6B62\u7684\u3002",
404: "\u53D1\u51FA\u7684\u8BF7\u6C42\u9488\u5BF9\u7684\u662F\u4E0D\u5B58\u5728\u7684\u8BB0\u5F55\uFF0C\u670D\u52A1\u5668\u6CA1\u6709\u8FDB\u884C\u64CD\u4F5C\u3002",
406: "\u8BF7\u6C42\u7684\u683C\u5F0F\u4E0D\u53EF\u5F97\u3002",
410: "\u8BF7\u6C42\u7684\u8D44\u6E90\u88AB\u6C38\u4E45\u5220\u9664\uFF0C\u4E14\u4E0D\u4F1A\u518D\u5F97\u5230\u7684\u3002",
422: "\u5F53\u521B\u5EFA\u4E00\u4E2A\u5BF9\u8C61\u65F6\uFF0C\u53D1\u751F\u4E00\u4E2A\u9A8C\u8BC1\u9519\u8BEF\u3002",
500: "\u670D\u52A1\u5668\u53D1\u751F\u9519\u8BEF\uFF0C\u8BF7\u68C0\u67E5\u670D\u52A1\u5668\u3002",
502: "\u7F51\u5173\u9519\u8BEF\u3002",
503: "\u670D\u52A1\u4E0D\u53EF\u7528\uFF0C\u670D\u52A1\u5668\u6682\u65F6\u8FC7\u8F7D\u6216\u7EF4\u62A4\u3002",
504: "\u7F51\u5173\u8D85\u65F6\u3002"
};
const checkStatus = (response, responseData) => __async(void 0, null, function* () {
if (response.status >= 200 && response.status < 300) {
return response;
}
const errortext = codeMessage[response.status] || response.statusText;
let text;
var resJson = response.json();
yield resJson.then((resolve, reject) => {
setTimeout(() => {
let app = (0,umi__WEBPACK_IMPORTED_MODULE_3__.getDvaApp)();
}, 400);
text = resolve.message;
window.showNetworkErrorTip(true);
antd__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z.error({
style: { wordBreak: "break-all" },
// duration: null,
message: resolve.message || `\u8BF7\u6C42\u9519\u8BEF ${response.status}: ${response.message}`,
description: resolve.message ? "" : errortext
});
});
const error = new Error(errortext);
error.name = response.status;
error.response = response;
throw {
data: response,
code: response.status,
message: text || errortext
};
});
const cachedSave = (response, hashcode) => {
const contentType = response.headers.get("Content-Type");
if (contentType && contentType.match(/application\/json/i)) {
response.clone().text().then(() => {
});
}
return response;
};
function isEncoded(str) {
try {
decodeURIComponent(str);
return decodeURIComponent(encodeURIComponent(str)) === str;
} catch (error) {
return false;
}
}
const parseParams = (param) => {
param = param || {};
let paramStr = "";
for (let key in param) {
if (typeof param[key] === "object") {
if (Array.isArray(param[key])) {
param[key].forEach((element, k) => {
paramStr += "&" + key + `[]=` + element;
});
}
} else {
if (param[key] !== void 0)
paramStr += "&" + key + "=" + (isEncoded(param[key]) ? param[key] : encodeURIComponent(param[key]));
}
}
return paramStr.substr(1);
};
function request(url, option, flag, ismin) {
!option.method ? option.method = "get" : "";
option.method = option.method.toUpperCase();
option.mode = "cors";
const options = __spreadValues({}, option);
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_3__.getDvaApp)()._store.getState();
const { userInfo } = user;
const fingerprint = url + (options.body ? JSON.stringify(options.body) : "");
const hashcode = hash_js__WEBPACK_IMPORTED_MODULE_1___default().sha256().update(fingerprint).digest("hex");
const defaultOptions = {
credentials: "include",
withCredentials: true
};
const userParam = {};
if (userInfo == null ? void 0 : userInfo.login) {
userParam.zzud = userInfo == null ? void 0 : userInfo.login;
if (userInfo == null ? void 0 : userInfo.school_id)
userParam.zzsud = userInfo == null ? void 0 : userInfo.school_id;
options.params = __spreadValues(__spreadValues({}, options.params || {}), userParam);
}
let newOptions = __spreadValues(__spreadValues({}, defaultOptions), JSON.parse(JSON.stringify(options)));
if (newOptions.method === "POST" || newOptions.method === "PUT" || newOptions.method === "PATCH" || newOptions.method === "DELETE") {
if (!flag) {
newOptions.headers = __spreadValues({
Accept: "application/json",
"Content-Type": "application/json; charset=utf-8",
"Pc-Authorization": (0,_utils_util__WEBPACK_IMPORTED_MODULE_4__/* .getCookie */ .ej)("_educoder_session")
}, newOptions.headers);
newOptions.body = JSON.stringify(options.body);
} else {
newOptions.headers = __spreadProps(__spreadValues({}, newOptions.headers), {
"Pc-Authorization": (0,_utils_util__WEBPACK_IMPORTED_MODULE_4__/* .getCookie */ .ej)("_educoder_session")
});
newOptions.body = options.body;
}
}
if (newOptions.method == "GET") {
newOptions.headers = __spreadProps(__spreadValues({
Accept: "application/json",
"Content-Type": "application/json; charset=utf-8"
}, newOptions.headers), {
"Pc-Authorization": (0,_utils_util__WEBPACK_IMPORTED_MODULE_4__/* .getCookie */ .ej)("_educoder_session")
});
if (options.params && parseParams(options.params))
url += "?" + parseParams(options.params);
} else if (userParam.zzud) {
url += "?" + parseParams(__spreadValues({}, userParam));
}
const expirys = options.expirys && 60;
let ContentType;
((ContentType2) => {
ContentType2["json"] = "application/json;charset=UTF-8";
ContentType2["form"] = "application/x-www-form-urlencoded; charset=UTF-8";
})(ContentType || (ContentType = {}));
let HttpMethod;
((HttpMethod2) => {
HttpMethod2["get"] = "GET";
HttpMethod2["post"] = "POST";
})(HttpMethod || (HttpMethod = {}));
const downloadFile = (response) => __async(this, null, function* () {
const d = yield response.arrayBuffer();
let fileName;
const blob = new Blob([d]);
try {
fileName = response.headers.get("Content-Disposition").split(";")[1].replace("filename=", "").replace(/[\s+,\',\",\‘,\’,\“,\”,\<,\>,\《,\》]/g, "");
} catch (e) {
fileName = "userfiles.zip";
}
const a = document.createElement("a");
const url2 = window.URL.createObjectURL(blob);
const filename = fileName;
a.href = url2;
a.download = filename;
a.click();
window.URL.revokeObjectURL(url2);
return d;
});
let prefixUrl = _env__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.API_SERVER;
if (window.ENV === "dev" || url.startsWith("http"))
prefixUrl = "";
if (newOptions.method == "GET") {
if (newOptions.params) {
Object.keys(newOptions.params).map((key) => {
if (newOptions.params[key]) {
if (Array.isArray(newOptions.params[key])) {
} else {
try {
newOptions.params[key] = encodeURIComponent(decodeURIComponent(newOptions.params[key]));
} catch (error) {
newOptions.params[key] = encodeURIComponent(newOptions.params[key]);
}
}
}
});
}
}
(0,_utils_util__WEBPACK_IMPORTED_MODULE_4__/* .setHeader */ .Ec)(newOptions, url);
if (ismin)
prefixUrl = "";
return fetch(prefixUrl + url, newOptions).then(
(response) => checkStatus(response, __spreadValues({ url: _env__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.API_SERVER + url }, newOptions))
).then((response) => cachedSave(response, hashcode)).then((response) => __async(this, null, function* () {
var _a, _b, _c, _d;
try {
const cs = response.headers.get("cs");
if (cs) {
(0,_utils_util__WEBPACK_IMPORTED_MODULE_4__/* .setCookie */ .d8)("_educoder_session", cs, 1);
}
} catch (error) {
}
if (response.status === 204) {
return response.text();
}
let d;
if (response.headers.get("content-type").indexOf("application/json") > -1) {
d = yield response.json();
} else if (newOptions.headers["Content-Type"] === "application/xml") {
d = yield response.text();
} else if (((_a = options.body) == null ? void 0 : _a.autoDownload) || ((_b = options.params) == null ? void 0 : _b.autoDownload)) {
d = yield downloadFile(response);
} else {
d = yield response.arrayBuffer();
}
try {
if (d.status === 401 && (!((_c = newOptions.params) == null ? void 0 : _c.hidePopLogin) || !((_d = newOptions.body) == null ? void 0 : _d.hidePopLogin))) {
(0,umi__WEBPACK_IMPORTED_MODULE_3__.getDvaApp)()._store.dispatch({
type: "user/showPopLogin",
payload: {
showPopLogin: true,
showClosable: true
}
});
}
if (d.status === 402) {
if (localStorage.getItem("addinfo") === "2") {
(0,umi__WEBPACK_IMPORTED_MODULE_3__.getDvaApp)()._store.dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {
key: "\u586B\u5145\u4FE1\u606F\u5F39\u7A97"
}
});
} else {
modalConfirm = modalConfirm || antd__WEBPACK_IMPORTED_MODULE_6__["default"].confirm({
visible: false,
okText: "\u786E\u5B9A",
cancelText: "\u53D6\u6D88"
});
modalConfirm.update({
centered: true,
visible: true,
title: "\u63D0\u793A",
content: "\u60A8\u9700\u8981\u53BB\u5B8C\u5584\u60A8\u7684\u4E2A\u4EBA\u8D44\u6599\uFF0C\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",
okText: "\u7ACB\u5373\u5B8C\u5584",
cancelText: "\u7A0D\u540E\u5B8C\u5584",
onOk: () => {
umi__WEBPACK_IMPORTED_MODULE_3__.history.push("/account/profile/edit");
}
});
}
}
} catch (e) {
console.log("fetcherr", e);
}
handleHttpStatus(d, url);
return d;
})).catch((e, a, b) => {
try {
const status = e.code;
if (e instanceof TypeError) {
window.showNetworkErrorTip(true);
}
if (status) {
if (status === 401) {
(0,umi__WEBPACK_IMPORTED_MODULE_3__.getDvaApp)()._store.dispatch({
type: "user/showPopLogin",
payload: {
showPopLogin: true,
showClosable: true
}
});
return;
}
handleHttpStatus(e, url);
} else {
if (url.includes("/file/filePatchMerge")) {
(0,umi__WEBPACK_IMPORTED_MODULE_3__.getDvaApp)()._store.dispatch({
type: "shixunHomeworks/setActionTabs",
payload: {
key: "\u5206\u7247\u4E13\u7528504",
params: newOptions.body
}
});
} else {
window.showNetworkErrorTip(true);
}
}
return e;
} catch (e2) {
}
});
}
let historyFlag = false;
let errorFlag = false;
const handleHttpStatus = (e, url) => {
var _a, _b, _c;
if (e.status == -6 && !errorFlag) {
errorFlag = true;
setTimeout(() => errorFlag = false, 500);
antd__WEBPACK_IMPORTED_MODULE_6__["default"].info({
title: "\u7CFB\u7EDF\u901A\u77E5",
content: e.message,
okText: "\u77E5\u9053\u4E86",
maskStyle: { background: "#000" },
onOk: () => {
window.location.reload();
}
});
return;
}
if (e.status == -7) {
errorFlag = true;
setTimeout(() => errorFlag = false, 500);
let html = "";
if ((_a = e == null ? void 0 : e.data) == null ? void 0 : _a.exercise_list) {
(_c = (_b = e == null ? void 0 : e.data) == null ? void 0 : _b.exercise_list) == null ? void 0 : _c.map((item) => {
html += `\u300A${item.exercise_name}\u300B`;
});
}
antd__WEBPACK_IMPORTED_MODULE_6__["default"].info({
title: "\u63D0\u793A",
content: react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", { id: "fetchStatus7", className: "fetchStatus7" }, ""),
maskClosable: false,
closeIcon: false,
width: 550,
maskStyle: { background: "#000" },
okText: "\u8FD4\u56DE\u9996\u9875",
onOk: () => {
window.location.href = "/";
}
});
setTimeout(() => {
document.getElementById("fetchStatus7").innerHTML = `\u60A8\u5F53\u524D\u6709\u6B63\u5728\u8FDB\u884C\u7684\u8003\u8BD5 ${html} \uFF0C\u8BF7\u5728\u8003\u8BD5\u7ED3\u675F\u540E\u8BBF\u95EE\u8BE5\u9875\u9762
`;
}, 500);
return;
}
if ((e.status == -1 || e.status == -2 || e.status == -102 || e.status > 400) && e.status != 403 && !errorFlag) {
errorFlag = true;
setTimeout(() => errorFlag = false, 500);
antd__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP.warning({ content: e.message, key: "message-key" });
return;
}
const mapping = {
403: "/403",
404: "/404",
500: "/500"
};
if (mapping[e.status] && !historyFlag) {
const { user } = (0,umi__WEBPACK_IMPORTED_MODULE_3__.getDvaApp)()._store.getState();
const { userInfo } = user;
if (window.location.pathname.indexOf("/users") > -1 && document.domain === "kepukehuan.educoder.net")
historyFlag = true;
setTimeout(() => historyFlag = false, 500);
if (e.status === 403) {
umi__WEBPACK_IMPORTED_MODULE_3__.history.replace(mapping[e.status]);
} else {
umi__WEBPACK_IMPORTED_MODULE_3__.history.replace(mapping[e.status]);
}
sessionStorage.setItem("errorStatus", JSON.stringify(e));
return;
}
};
function get(url, params) {
return request(`/api/${url}`, {
method: "Get",
params: params || {}
});
}
function getqq(url, params) {
return request(`/${url}`, {
method: "Get",
params
});
}
function post(url, params) {
return request(`/api/${url}`, {
method: "Post",
body: __spreadValues({}, params)
});
}
function put(url, params) {
return request(`/api/${url}`, {
method: "Put",
body: __spreadValues({}, params)
});
}
function del(url, params) {
return request(`/api/${url}`, { method: "delete", body: __spreadValues({}, params || {}) });
}
/***/ }),
/***/ 75798:
/*!****************************!*\
!*** ./src/utils/util.tsx ***!
\****************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ AS: function() { return /* binding */ vtrsKey; },
/* harmony export */ Br: function() { return /* binding */ getBlob; },
/* harmony export */ DH: function() { return /* binding */ timego; },
/* harmony export */ Dk: function() { return /* binding */ setDocumentTitle; },
/* harmony export */ Dw: function() { return /* binding */ onPreviewImage; },
/* harmony export */ EM: function() { return /* binding */ toChineseNumber; },
/* harmony export */ Ec: function() { return /* binding */ setHeader; },
/* harmony export */ FH: function() { return /* binding */ downLoadFile; },
/* harmony export */ G7: function() { return /* binding */ handleValidatorNickName; },
/* harmony export */ HJ: function() { return /* binding */ handleValidatorName; },
/* harmony export */ I9: function() { return /* binding */ RomanNumber; },
/* harmony export */ IS: function() { return /* binding */ isWechatBrowser; },
/* harmony export */ JL: function() { return /* binding */ formatHomeWorkStatusToName; },
/* harmony export */ L4: function() { return /* binding */ PollsStatus; },
/* harmony export */ L9: function() { return /* binding */ trackEvent; },
/* harmony export */ LR: function() { return /* binding */ download; },
/* harmony export */ Ll: function() { return /* binding */ checkIsClientExam; },
/* harmony export */ M: function() { return /* binding */ setmiyah; },
/* harmony export */ M2: function() { return /* binding */ randomArray; },
/* harmony export */ NY: function() { return /* binding */ setUrlQuery; },
/* harmony export */ Nd: function() { return /* binding */ downLoadLink; },
/* harmony export */ Oo: function() { return /* binding */ getCategoryName; },
/* harmony export */ Or: function() { return /* binding */ toWechatLogin; },
/* harmony export */ PF: function() { return /* binding */ formatRandomPaperDatas; },
/* harmony export */ Pq: function() { return /* binding */ cutName; },
/* harmony export */ Q8: function() { return /* binding */ sendAppStatus; },
/* harmony export */ QB: function() { return /* binding */ timeContrast; },
/* harmony export */ QH: function() { return /* binding */ downLoadFileIframe; },
/* harmony export */ Qq: function() { return /* binding */ JudgeSort; },
/* harmony export */ RD: function() { return /* binding */ bytesToSize; },
/* harmony export */ RG: function() { return /* binding */ copyTextFuc; },
/* harmony export */ Sp: function() { return /* binding */ rangeNumber; },
/* harmony export */ Sv: function() { return /* binding */ downloadFile; },
/* harmony export */ Tv: function() { return /* binding */ ImgSrcConvert; },
/* harmony export */ U6: function() { return /* binding */ HalfPastOne; },
/* harmony export */ UQ: function() { return /* binding */ HomeWorkDetailStatus; },
/* harmony export */ Uw: function() { return /* binding */ CommonWorkStatus; },
/* harmony export */ VV: function() { return /* binding */ StatusClassroomsTags; },
/* harmony export */ Vf: function() { return /* binding */ domScrollToTop; },
/* harmony export */ W: function() { return /* binding */ isUnOrNull; },
/* harmony export */ WX: function() { return /* binding */ isLocalApp; },
/* harmony export */ Y: function() { return /* binding */ HomeWorkCommonDetailStatus; },
/* harmony export */ YA: function() { return /* binding */ getHiddenName; },
/* harmony export */ ZJ: function() { return /* binding */ toDataUrl; },
/* harmony export */ _g: function() { return /* binding */ getMessagesUrl; },
/* harmony export */ _m: function() { return /* binding */ isKepuKehuan; },
/* harmony export */ ad: function() { return /* binding */ formatRandomPaperData; },
/* harmony export */ b9: function() { return /* binding */ isPc; },
/* harmony export */ cX: function() { return /* binding */ localSort; },
/* harmony export */ d8: function() { return /* binding */ setCookie; },
/* harmony export */ db: function() { return /* binding */ getFileContentAndUrl; },
/* harmony export */ eF: function() { return /* binding */ bindPhone; },
/* harmony export */ eR: function() { return /* binding */ validateLength; },
/* harmony export */ ej: function() { return /* binding */ getCookie; },
/* harmony export */ en: function() { return /* binding */ parseUrl; },
/* harmony export */ i7: function() { return /* binding */ isChrome; },
/* harmony export */ j1: function() { return /* binding */ StatusGraduationProjectTags; },
/* harmony export */ jh: function() { return /* binding */ educationList; },
/* harmony export */ ju: function() { return /* binding */ ExerciseStatus; },
/* harmony export */ jz: function() { return /* binding */ replaceParamVal; },
/* harmony export */ k3: function() { return /* binding */ scrollToTop; },
/* harmony export */ kk: function() { return /* binding */ pointerEvents; },
/* harmony export */ lC: function() { return /* binding */ HomeWorkListStatus; },
/* harmony export */ lF: function() { return /* binding */ toWNumber; },
/* harmony export */ li: function() { return /* binding */ toTimeFormat; },
/* harmony export */ m5: function() { return /* binding */ clearAllCookies; },
/* harmony export */ nr: function() { return /* binding */ startExercise; },
/* harmony export */ oP: function() { return /* binding */ getJsonFromUrl; },
/* harmony export */ oV: function() { return /* binding */ ZimuSort; },
/* harmony export */ og: function() { return /* binding */ formatRate; },
/* harmony export */ oi: function() { return /* binding */ checkLocalOrPublicIp; },
/* harmony export */ pp: function() { return /* binding */ findEndWhitespace; },
/* harmony export */ qZ: function() { return /* binding */ arrTrans; },
/* harmony export */ qd: function() { return /* binding */ DayHalfPastOne; },
/* harmony export */ rK: function() { return /* binding */ HomeWorkShixunListStatus; },
/* harmony export */ rU: function() { return /* binding */ showTotal; },
/* harmony export */ rz: function() { return /* binding */ moveArray; },
/* harmony export */ s2: function() { return /* binding */ isMobileDevice; },
/* harmony export */ tP: function() { return /* binding */ cutFileName; },
/* harmony export */ tw: function() { return /* binding */ getTwoDecimalPlaces; },
/* harmony export */ uD: function() { return /* binding */ dealUploadChange; },
/* harmony export */ vA: function() { return /* binding */ HomeWorkShixunDetailStatus; },
/* harmony export */ vB: function() { return /* binding */ exerciseTips; },
/* harmony export */ xg: function() { return /* binding */ openNewWindow; },
/* harmony export */ y3: function() { return /* binding */ getBase64; },
/* harmony export */ yC: function() { return /* binding */ compareVersion; }
/* harmony export */ });
/* unused harmony exports parseParams, StatusTags, WorkStatus, timeformat, delCookie, saveAs, isFirefox, isChromeOrFirefox, formatMoney, openNewWindows, formatTextMiddleIntercept, isEmpty, middleEllipsis, getUrlToken, checkDisabledExam, messageInfo, base64ToBlob, trackEventCustom */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _utils_authority__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @/utils/authority */ 77883);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! antd */ 8591);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! antd */ 43418);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! antd */ 95237);
/* harmony import */ var antd__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! antd */ 43604);
/* harmony import */ var _components_Exercise_ip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @/components/Exercise/ip */ 40974);
/* harmony import */ var _service_exercise__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/service/exercise */ 53669);
/* harmony import */ var _contentType__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./contentType */ 86717);
/* harmony import */ var umi__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! umi */ 23852);
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! md5 */ 93735);
/* harmony import */ var md5__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(md5__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var _env__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./env */ 19351);
/* harmony import */ var _components_mediator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @/components/mediator */ 50993);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! moment */ 9498);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_9__);
var __defProp = Object.defineProperty;
var __defProps = Object.defineProperties;
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
for (var prop in b || (b = {}))
if (__hasOwnProp.call(b, prop))
__defNormalProp(a, prop, b[prop]);
if (__getOwnPropSymbols)
for (var prop of __getOwnPropSymbols(b)) {
if (__propIsEnum.call(b, prop))
__defNormalProp(a, prop, b[prop]);
}
return a;
};
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e) {
reject(e);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e) {
reject(e);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
var _a, _b;
const aKey = "e83900ca9be33747397cc81a8f68ac11";
const sKey = "6de3a75ae5718cde1e0907a593afd01f";
const parseParams = (param) => {
param = param || {};
let paramStr = "";
for (let key in param) {
if (typeof param[key] === "object") {
if (Array.isArray(param[key])) {
param[key].forEach((element, k) => {
paramStr += "&" + key + `[]=` + element;
});
}
} else {
if (param[key] !== void 0)
paramStr += "&" + key + "=" + param[key];
}
}
return paramStr.substr(1);
};
function bytesToSize(bytes) {
var sizes = ["Bytes", "KB", "MB", "GB", "TB"];
if (bytes == 0)
return "0 Byte";
var i = parseInt("" + Math.floor(Math.log(bytes) / Math.log(1024)), 10);
return (bytes / Math.pow(1024, i)).toFixed(1) + " " + sizes[i];
}
const getTwoDecimalPlaces = (value) => Math.round(Math.round(value * 1e5) / 1e3 * 100) / 100;
const toWNumber = (num) => num / 1e4 > 1 ? /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(react__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, Math.round(num / 1e4 * 100) / 100, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("i", { className: "font12" }, "w")) : num;
const toChineseNumber = (num) => {
const strs = num.toString().replace(/(?=(\d{4})+$)/g, ",").split(",").filter(Boolean);
const chars = ["\u96F6", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u4E03", "\u516B", "\u4E5D"];
const units = ["", "\u5341", "\u767E", "\u5343"];
const bigUnits = ["", "\u4E07", "\u4EBF"];
const _transform = (numStr) => {
let result2 = "";
for (let i = 0; i < numStr.length; i++) {
const digit = +numStr[i];
const c = chars[digit];
const u = units[numStr.length - 1 - i];
if (digit === 0) {
if (result2[result2.length - 1] !== chars[0]) {
result2 += c;
}
} else {
result2 += c + u;
}
}
if (result2[result2.length - 1] === chars[0]) {
result2 = result2.slice(0, -1);
}
return result2;
};
let result = "";
for (let i = 0; i < strs.length; i++) {
const part = strs[i];
const c = _transform(part);
const u = c ? bigUnits[strs.length - 1 - i] : "";
result += c + u;
}
return result;
};
const moveArray = (arr, index1, index2) => {
const element = arr.splice(index1, 1)[0];
arr.splice(index2, 0, element);
return arr;
};
const 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"
];
const JudgeSort = ["\u6B63\u786E", "\u9519\u8BEF"];
const RomanNumber = [
"I",
"II",
"III",
"IV",
"V",
"VI",
"VII",
"VIII",
"IX",
"X",
"XI",
"XII",
"XIII",
"XIV",
"XV",
"XVI",
"XVII",
"XVIII",
"XIX",
"XX"
];
const findEndWhitespace = (s) => {
if (!s)
return "";
var reg = /(?:\\[rn]|[\r\n]+)+/g;
var ns = s.split(reg);
ns = ns.map((item) => {
var matchs = item.match(/\s+$/g);
if (!matchs)
return item;
var str = matchs[0].split("").map((i) => "\x1B[41m \x1B[0m");
return item.replace(/\s+$/g, "") + str.join("");
});
return ns.join("\x1B[41m\x1B[37m\u21B5\x1B[0m\r\n");
};
const StatusTags = (props) => {
const tags = {
\u5DF2\u622A\u6B62: {
class: "tag-style bg-pink ml10"
},
\u63D0\u4EA4\u4E2D: {
class: "tag-style bg-blue ml10"
},
\u8FDB\u884C\u4E2D: {
class: "tag-style bg-blue ml10"
},
\u672A\u53D1\u5E03: {
class: "tag-style bgB8B8B8 ml10"
},
\u8865\u4EA4\u4E2D: {
class: "tag-style bg-blue ml10"
},
\u96C6\u4E2D\u9605\u5377: {
class: "tag-style bg-light-orangess ml10soft"
}
};
return props.data && props.data.map(function(v, k) {
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { key: k, className: tags[v] && tags[v]["class"] }, v);
});
};
const formatHomeWorkStatusToName = (status) => {
const mapping = {
[-1]: "\u91CD\u505A\u4E2D",
0: "\u672A\u5F00\u542F",
1: "\u672A\u901A\u5173",
2: "\u6309\u65F6\u901A\u5173"
};
return mapping[status] || "\u8FDF\u4EA4\u901A\u5173";
};
const HomeWorkListStatus = (props) => {
var _a2, _b2;
const wStatus = {
[-1]: {
name: "\u91CD\u505A\u4E2D",
class: "c-orange"
},
0: {
name: "\u672A\u5F00\u542F",
class: "c-black"
},
1: {
name: "\u672A\u901A\u5173",
class: "c-red"
},
2: {
name: "\u6309\u65F6\u901A\u5173",
class: "c-green"
},
3: {
name: "\u8FDF\u4EA4\u901A\u5173",
class: "c-orange"
},
4: {
name: "\u622A\u6B62\u901A\u5173",
class: "c-red"
}
};
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: (_a2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _a2["class"] }, (_b2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _b2["name"]);
};
const HomeWorkShixunListStatus = (props) => {
var _a2, _b2;
const wStatus = {
[-1]: {
name: "\u91CD\u505A\u4E2D",
class: "c-orange"
},
0: {
name: "\u672A\u5F00\u542F",
class: "c-black"
},
1: {
name: "\u672A\u901A\u5173",
class: "c-red"
},
2: {
name: "\u6309\u65F6\u901A\u5173",
class: "c-green"
},
3: {
name: "\u8FDF\u4EA4\u901A\u5173",
class: "c-orange"
},
4: {
name: "\u622A\u6B62\u540E\u901A\u5173",
class: "c-red"
}
};
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: (_a2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _a2["class"] }, (_b2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _b2["name"]);
};
const HomeWorkDetailStatus = (props) => {
var _a2, _b2;
const wStatus = {
[-1]: {
name: "\u91CD\u505A\u4E2D",
class: "c-orange",
color: "#999999"
},
0: {
name: "\u672A\u5F00\u542F",
class: "c-black",
color: "#999999"
},
1: {
name: "\u672A\u901A\u5173",
class: "c-red",
color: "#d4443d"
},
2: {
name: "\u6309\u65F6\u901A\u5173",
class: "c-green",
color: "#57be40"
},
3: {
name: "\u8FDF\u4EA4\u901A\u5173",
class: "c-orange",
color: "#f09143"
},
4: {
name: "\u622A\u6B62\u901A\u5173",
class: "c-red",
color: "#d4443d"
}
};
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
"span",
{
style: {
marginLeft: "10px",
color: "#fff",
background: (_a2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _a2["color"],
borderRadius: "20px",
width: "65px",
height: "18px",
justifyContent: "center",
display: "inline-flex",
lineHeight: "18px"
}
},
(_b2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _b2["name"]
);
};
const HomeWorkShixunDetailStatus = (props) => {
var _a2, _b2;
const wStatus = {
[-1]: {
name: "\u91CD\u505A\u4E2D",
class: "c-orange",
color: "#999999"
},
0: {
name: "\u672A\u5F00\u542F",
class: "c-black",
color: "#999999"
},
1: {
name: "\u672A\u901A\u5173",
class: "c-red",
color: "#d4443d"
},
2: {
name: "\u6309\u65F6\u901A\u5173",
class: "c-green",
color: "#57be40"
},
3: {
name: "\u8FDF\u4EA4\u901A\u5173",
class: "c-orange",
color: "#f09143"
},
4: {
name: "\u622A\u6B62\u540E\u901A\u5173",
class: "c-red",
color: "#d4443d"
}
};
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
"span",
{
style: {
marginLeft: "10px",
color: "#fff",
background: (_a2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _a2["color"],
borderRadius: "20px",
padding: "0 8px",
height: "18px",
justifyContent: "center",
display: "inline-flex",
lineHeight: "18px"
}
},
(_b2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _b2["name"]
);
};
const HomeWorkCommonDetailStatus = (props) => {
var _a2, _b2;
const wStatus = {
[-1]: {
name: "\u91CD\u505A\u4E2D",
class: "c-black",
color: "#999999"
},
0: {
name: "\u672A\u63D0\u4EA4",
class: "c-black",
color: "#999999"
},
1: {
name: "\u6309\u65F6\u63D0\u4EA4",
class: "c-green",
color: "#57be40"
},
2: {
name: "\u5EF6\u65F6\u63D0\u4EA4",
class: "c-red",
color: "#d4443d"
}
};
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
"span",
{
style: {
marginLeft: "10px",
color: "#fff",
background: (_a2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _a2["color"],
borderRadius: "20px",
padding: "0 8px",
height: "18px",
justifyContent: "center",
display: "inline-flex",
lineHeight: "18px"
}
},
(_b2 = wStatus == null ? void 0 : wStatus[props.status]) == null ? void 0 : _b2["name"]
);
};
const StatusGraduationProjectTags = (props) => {
const { status } = props;
const tags = {
0: {
class: "tag-style bg-blue ml10",
name: "\u5F85\u9009\u4E2D"
},
1: {
class: "tag-style bg-blue ml10",
name: "\u5F85\u786E\u8BA4"
},
2: {
class: "tag-style bg-pink ml10",
name: "\u5DF2\u786E\u8BA4"
}
};
try {
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: tags[status]["class"] }, tags[status]["name"]);
} catch (e) {
console.log("utils.StatusGraduationProjectTags", props.status);
}
};
const ExerciseStatus = {
1: "\u672A\u53D1\u5E03",
2: "\u8003\u8BD5\u4E2D",
3: "\u5DF2\u622A\u6B62",
4: "\u5DF2\u7ED3\u675F",
5: "\u96C6\u4E2D\u9605\u5377",
99: "\u6A21\u62DF\u8003\u8BD5\u4E2D"
};
const PollsStatus = {
1: "\u672A\u53D1\u5E03",
2: "\u63D0\u4EA4\u4E2D",
3: "\u5DF2\u622A\u6B62",
4: "\u5DF2\u7ED3\u675F",
5: "\u672A\u5F00\u59CB"
};
const StatusClassroomsTags = (props) => {
let tags = {
\u6A21\u62DF\u8003\u8BD5\u4E2D: {
class: "tag-style bg-light-pink ml10"
},
\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A: {
class: "tag-style-fzb ml10 iconfont icon-fangzuobi"
},
\u516C\u5F00: {
class: "tag-style bg-blue ml10"
},
\u5DF2\u5F00\u542F\u8865\u4EA4: {
class: "tag-style bg-green ml10soft"
},
\u672A\u5F00\u542F\u8865\u4EA4: {
class: "tag-style bg-pink ml10soft"
},
\u672A\u53D1\u5E03: {
class: "tag-style bgB8B8B8 ml10soft"
},
\u672A\u5F00\u59CB: {
class: "tag-style bg-c5d6ff ml10soft"
},
\u533F\u540D\u4F5C\u54C1: {
class: "tag-style bg-cyan ml10"
},
\u5DF2\u9009\u62E9: {
class: "tag-style bg-grey-ede ml10"
},
\u5DF2\u7ED3\u675F: {
class: "tag-style bg-grey-ede ml10soft"
},
\u63D0\u4EA4\u4E2D: {
class: "tag-style bg-blue ml10soft"
},
\u8FDB\u884C\u4E2D: {
class: "tag-style bg-blue ml10soft"
},
\u533F\u8BC4\u4E2D: {
class: "tag-style bg-blue ml10"
},
\u7533\u8BC9\u4E2D: {
class: "tag-style bg-blue ml10"
},
\u8003\u8BD5\u4E2D: {
class: "tag-style bg-light-blue ml10"
},
\u8865\u4EA4\u4E2D: {
class: "tag-style bg-blue ml10soft"
},
\u8BC4\u9605\u4E2D: {
class: "tag-style bg-blue ml10"
},
\u5F85\u9009\u4E2D: {
class: "tag-style bg-blue ml10"
},
\u4EA4\u53C9\u8BC4\u9605\u4E2D: {
class: "tag-style bg-light-orange ml10"
},
\u5DF2\u5F00\u542F\u4EA4\u53C9\u8BC4\u9605: {
class: "tag-style bg-lightblue-purple ml10"
},
\u5F85\u786E\u8BA4: {
class: "tag-style bg-lightblue-purple ml10"
},
\u5F85\u5904\u7406: {
class: "tag-style bg-lightblue-purple ml10"
},
\u79C1\u6709: {
class: "tag-style bg-lightblue-purple ml10"
},
\u672A\u63D0\u4EA4: {
class: "tag-style bg-lightblue-purple ml10"
},
\u5DF2\u786E\u8BA4: {
class: "tag-style bg-light-pink ml10"
},
\u5DF2\u53D1\u5E03: {
class: "tag-style bg-light-blue ml10"
},
\u5DF2\u622A\u6B62: {
class: "tag-style bg-light-pink ml10soft"
},
\u5F00\u53D1\u8BFE\u7A0B: {
class: "tag-style bg-orange ml10"
},
\u5DF2\u5F00\u64AD: {
class: "tag-style-border border-green c-green ml10"
},
\u672A\u5F00\u64AD: {
class: "tag-style-border border-light-black ml10"
},
// 样式需要调整 作业列表
\u6309\u65F6\u901A\u5173: {
class: "tag-style-border border-light-black ml10"
},
\u8FDF\u4EA4\u901A\u5173: {
class: "tag-style-border border-light-black ml10"
},
\u672A\u901A\u5173: {
class: "tag-style-border border-light-black ml10"
},
\u672A\u5F00\u542F: {
class: "tag-style-border border-light-black ml10"
},
// 这里需要定义
\u96C6\u4E2D\u9605\u5377: {
class: "tag-style bg-light-orangess ml10soft"
}
};
const temporaryTags = {
\u672A\u53D1\u5E03: {
class: "tag-style bg-C6CED6 ml10soft"
},
\u672A\u5F00\u59CB: {
class: "tag-style bg-C1E2FF ml10soft"
},
\u8FDB\u884C\u4E2D: {
class: "tag-style bg-0152d9 ml10soft"
},
\u5DF2\u622A\u6B62: {
class: "tag-style bg-E53333 ml10soft"
},
\u63D0\u4EA4\u4E2D: {
class: "tag-style bg-0152d9 ml10soft"
},
\u8865\u4EA4\u4E2D: {
class: "tag-style bg-44D7B6 ml10soft"
}
};
if (props.temporary) {
tags = __spreadValues(__spreadValues({}, tags), temporaryTags);
}
const arr = [];
if (props.is_random) {
arr.push(/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "tag-style bg-blue ml10" }, "\u968F\u673A"));
}
try {
props.status && // console.log(props, "props");
props.status.map((v, k) => {
arr.push(
/* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
"span",
{
style: (props == null ? 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;
};
const exerciseTips = (v, appraise_label) => {
if (v === 5 || appraise_label) {
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { style: { backgroundColor: "#f59a23" }, className: "tag-style ml5" }, "\u96C6\u4E2D\u9605\u5377");
}
if (v === 1) {
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { style: { backgroundColor: "#B8B8B8" }, className: "tag-style ml5" }, "\u672A\u5F00\u59CB");
}
if (v === 2) {
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { style: { backgroundColor: "#007AFF" }, className: "tag-style ml5" }, "\u8003\u8BD5\u4E2D");
}
if (v === 3) {
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { style: { backgroundColor: "#FC2D6B" }, className: "tag-style ml5" }, "\u5DF2\u622A\u6B62");
}
};
const WorkStatus = (props) => {
var _a2, _b2;
const wStatus = {
[-1]: {
name: "\u91CD\u505A\u4E2D",
class: "c-orange"
},
0: {
name: "\u672A\u63D0\u4EA4",
class: "c-black"
},
1: {
name: "\u672A\u901A\u5173",
class: "c-red"
},
2: {
name: "\u6309\u65F6\u901A\u5173",
class: "c-green"
},
3: {
name: "\u8FDF\u4EA4\u901A\u5173",
class: "c-orange"
}
};
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: (_a2 = wStatus[props.status]) == null ? void 0 : _a2["class"] }, (_b2 = wStatus[props.status]) == null ? void 0 : _b2["name"]);
};
const CommonWorkStatus = (props) => {
var _a2, _b2;
const wStatus = {
0: {
name: "\u672A\u63D0\u4EA4",
class: "c-black"
},
1: {
name: "\u6309\u65F6\u63D0\u4EA4",
class: "c-green"
},
2: {
name: "\u5EF6\u65F6\u63D0\u4EA4",
class: "c-red"
}
};
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: (_a2 = wStatus[props.status]) == null ? void 0 : _a2["class"] }, (_b2 = wStatus[props.status]) == null ? void 0 : _b2["name"]);
};
const timego = (dateTimeStamp) => {
dateTimeStamp = new Date(dateTimeStamp).getTime();
let minute = 1e3 * 60;
let hour = minute * 60;
let day = hour * 24;
let result = "";
let now = (/* @__PURE__ */ new Date()).getTime();
let diffValue = now - dateTimeStamp;
if (diffValue < 0) {
console.log("\u65F6\u95F4\u4E0D\u5BF9\u52B2,\u670D\u52A1\u5668\u521B\u5EFA\u65F6\u95F4\u4E0E\u5F53\u524D\u65F6\u95F4\u4E0D\u540C\u6B65");
return result = "\u521A\u521A";
}
let dayC = parseInt(diffValue / day, 10);
let hourC = parseInt(diffValue / hour, 10);
let minC = parseInt(diffValue / minute, 10);
if (dayC > 30) {
result = "" + timeformat(dateTimeStamp, "yyyy-MM-dd");
} else if (dayC > 1) {
result = "" + dayC + "\u5929\u524D";
} else if (dayC == 1) {
result = "\u6628\u5929";
} else if (hourC >= 1) {
result = "" + hourC + "\u5C0F\u65F6\u524D";
} else if (minC >= 5) {
result = "" + minC + "\u5206\u949F\u524D";
} else
result = "\u521A\u521A";
return result;
};
function replaceParamVal(paramName, replaceWith) {
var oUrl = window.location.href.toString();
var re = eval("/(" + paramName + "=)([^&]*)/gi");
var nUrl = oUrl.replace(re, paramName + "=" + replaceWith);
window.history.replaceState(null, "", nUrl);
}
const 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);
let 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()
};
let w = [
["\u65E5", "\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D"],
["\u5468\u65E5", "\u5468\u4E00", "\u5468\u4E8C", "\u5468\u4E09", "\u5468\u56DB", "\u5468\u4E94", "\u5468\u516D"],
["\u661F\u671F\u65E5", "\u661F\u671F\u4E00", "\u661F\u671F\u4E8C", "\u661F\u671F\u4E09", "\u661F\u671F\u56DB", "\u661F\u671F\u4E94", "\u661F\u671F\u516D"]
];
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 (let 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;
};
const toTimeFormat = (time) => {
if (!time || time < 0)
return "0\u79D2";
console.log("time:", time);
let minute = 60;
let hour = minute * 60;
let day = hour * 24;
let dayC = time / day;
let hourC = time / hour;
let minC = time / minute;
let senC = time % 60;
if (dayC >= 1) {
return parseInt(dayC.toString()) + "\u5929" + Math.floor(hourC % 24) + "\u65F6" + Math.floor(minC % 60) + "\u5206" + Math.floor(time % 60) + "\u79D2";
} else if (hourC > 1) {
return parseInt(hourC.toString()) + "\u65F6" + Math.floor(minC % 60) + "\u5206" + Math.floor(time % 60) + "\u79D2";
} else if (minC >= 1) {
return parseInt(minC.toString()) + "\u5206" + Math.floor(time % 60) + "\u79D2";
} else {
return Math.ceil(time) + "\u79D2";
}
};
const validateLength = (str = "", length = 100) => {
let len = 0;
if (str) {
len = str.length;
for (let i = 0; i < len; i++) {
let charCode = str.charCodeAt(i);
if (charCode >= 55296 && charCode <= 56319) {
len--;
i++;
}
}
}
return len <= length;
};
const handleValidatorNickName = (rule, value, callback) => {
if (value) {
let iconRule1 = /[`~!@#$%^&*()\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、]/im;
let 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/gi;
const iconRule2s = iconRule2.test(value);
const iconRule1s = iconRule1.test(value);
if (iconRule2s === true || iconRule1s === true) {
callback("2-20\u4F4D\u4E2D\u82F1\u6587\u3001\u6570\u5B57\u53CA\u4E0B\u5212\u7EBF");
} else if (value.length < 2) {
callback("2-20\u4F4D\u4E2D\u82F1\u6587\u3001\u6570\u5B57\u53CA\u4E0B\u5212\u7EBF");
} else if (value.length >= 21) {
callback("2-20\u4F4D\u4E2D\u82F1\u6587\u3001\u6570\u5B57\u53CA\u4E0B\u5212\u7EBF");
}
}
callback();
};
const handleValidatorName = (rule, value, callback) => {
if (value) {
let iconRule1 = /[`~!@#$%^&()_\-+=<>?:"{}|,.\/;'\\[\]·~!@#¥%……&()——\-+={}|《》?:“”【】、;‘’,。、]/im;
let 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/gi;
const iconRule2s = iconRule2.test(value);
const iconRule1s = iconRule1.test(value);
if (iconRule2s === true || iconRule1s === true) {
callback("2-20\u4F4D\u4E2D\u82F1\u6587\u3001\u6570\u5B57");
} else if (value.length < 2) {
callback("2-20\u4F4D\u4E2D\u82F1\u6587\u3001\u6570\u5B57");
} else if (value.length >= 21) {
callback("2-20\u4F4D\u4E2D\u82F1\u6587\u3001\u6570\u5B57");
}
}
callback();
};
const getHiddenName = (name) => {
if (!name)
return "";
let len = name.length - 1;
let str = "";
for (var i = 0; i < len; i++) {
str += "*";
}
const newName = name.substr(0, 1) + str;
return newName;
};
const getBase64 = (img, callback) => {
const reader = new FileReader();
reader.addEventListener("load", () => callback(reader.result));
reader.readAsDataURL(img);
};
const getFileContentAndUrl = (file) => {
return new Promise((resolve, reject) => {
var reader = new FileReader();
reader.onload = function() {
try {
const link = window.URL.createObjectURL(file);
resolve({
text: this.result,
link
});
} catch (e) {
antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .ZP.warning("\u5F53\u524D\u6587\u4EF6\u65E0\u6CD5\u8BFB\u53D6\u5185\u5BB9");
reject("\u5F53\u524D\u6587\u4EF6\u65E0\u6CD5\u8BFB\u53D6\u5185\u5BB9");
}
};
reader.readAsText(file);
});
};
function setmiyah(logins) {
const opens = "79e33abd4b6588941ab7622aed1e67e8";
return md5__WEBPACK_IMPORTED_MODULE_6___default()(opens + logins);
}
const getCookie = (key) => {
var arr, reg = RegExp("(^| )" + key + "=([^;]+)(;|$)");
if (arr = document.cookie.match(reg))
return decodeURIComponent(arr[2]);
else
return null;
};
function setCookie(cname, cvalue, exdays) {
var d = /* @__PURE__ */ new Date();
d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1e3);
var expires = "expires=" + d.toUTCString();
document.cookie = cname + "=" + cvalue + "; " + expires + `;domain=${document.domain.indexOf("educoder.net") > -1 ? ".educoder.net" : document.domain};path=/;SameSite=None;secure`;
}
const delCookie = (name) => {
document.cookie = name + "=; expires=Thu, 01 Jan 1970 00:00:01 GMT;path=/;";
};
const clearAllCookies = () => {
var cookies = document.cookie.split(";");
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i];
var eqPos = cookie.indexOf("=");
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
}
};
function downLoadLink(title, url) {
let link = document.createElement("a");
document.body.appendChild(link);
link.href = url;
if (title) {
link.title = title;
link.download = title;
}
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
}
function getBlob(url) {
return new Promise((resolve) => {
const xhr = new window.XMLHttpRequest();
xhr.open("GET", url, true);
xhr.withCredentials = true;
xhr.responseType = "blob";
xhr.onload = () => {
if (xhr.status === 200) {
resolve(xhr.response);
}
};
xhr.send();
});
}
function saveAs(blob, filename) {
if (window.navigator.msSaveOrOpenBlob) {
window.navigator.msSaveBlob(blob, filename);
} else {
const link = document.createElement("a");
const body = document.querySelector("body");
link.href = window.URL.createObjectURL(blob);
link.download = filename;
link.style.display = "none";
body.appendChild(link);
link.click();
body.removeChild(link);
window.URL.revokeObjectURL(link.href);
}
}
function download(url, filename) {
getBlob(url).then((blob) => {
saveAs(blob, filename);
});
}
function downLoadFileIframe(title, url) {
return new Promise((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(() => {
document.body.removeChild(elemIF);
}, 1e3);
},
true
);
time = setInterval(() => {
if (getCookie("fileDownload")) {
delCookie("fileDownload");
clearInterval(time);
resolve();
}
}, 1e3);
});
}
function downLoadFile(title, url) {
downLoadLink(title, url);
}
const setUrlQuery = (options) => {
let { url, query } = options;
if (!url)
return "";
if (query) {
let queryArr = [];
for (const key in query) {
if (query.hasOwnProperty(key) && !isUnOrNull(query[key])) {
if (typeof query[key] === "object") {
query[key].map((v) => {
queryArr.push(`${key}[]=${v}`);
});
} else {
queryArr.push(`${key}=${query[key]}`);
}
}
}
if (url.indexOf("?") !== -1) {
url = `${url}&${queryArr.join("&")}`;
} else {
url = `${url}?${queryArr.join("&")}`;
}
console.log("url1111", url);
}
return url;
};
function isPc() {
let userAgentInfo = navigator.userAgent;
let Agents = [
"Android",
"iPhone",
"SymbianOS",
"Windows Phone",
"iPad",
"iPod"
];
let flag = true;
for (var v = 0; v < Agents.length; v++) {
if (userAgentInfo.indexOf(Agents[v]) > 0) {
flag = false;
break;
}
}
return flag;
}
function isChrome() {
let userAgentInfo = navigator.userAgent;
let Agents = ["Chrome"];
return Agents.some((item) => userAgentInfo.indexOf(item) > -1 ? true : false);
}
function isFirefox() {
let userAgentInfo = navigator.userAgent;
let Agents = ["Firefox"];
return Agents.some((item) => userAgentInfo.indexOf(item) > -1 ? true : false);
}
function isChromeOrFirefox() {
let userAgentInfo = navigator.userAgent;
let Agents = ["Chrome", "Firefox"];
return Agents.some((item) => userAgentInfo.indexOf(item) > -1 ? true : false);
}
const formatMoney = (value = "") => {
var _a2;
return (_a2 = value == null ? void 0 : value.toString()) == null ? void 0 : _a2.replace(/\B(?=(\d{3})+(?!\d))/g, ",");
};
const openNewWindow = (url) => {
let link = document.createElement("a");
link.target = "_blank";
document.body.appendChild(link);
link.href = url;
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
};
const openNewWindows = (url) => {
let link = document.createElement("a");
document.body.appendChild(link);
link.href = url;
let evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
};
const formatTextMiddleIntercept = (text = "") => {
if (text.length <= 6) {
return text;
}
return `${text.substring(0, 3)}...${text.substring(
text.length - 3,
text.length
)}`;
};
const HalfPastOne = () => {
let hours = (/* @__PURE__ */ new Date()).getHours();
let minute = (/* @__PURE__ */ new Date()).getMinutes();
if (minute >= 30) {
hours++;
minute = "00";
} else {
minute = "30";
}
return hours + ":" + minute;
};
const DayHalfPastOne = (reg = "-") => {
let hours = (/* @__PURE__ */ new Date()).getHours();
let minute = (/* @__PURE__ */ new Date()).getMinutes();
if (minute >= 30) {
hours++;
minute = "00";
} else {
minute = "30";
}
return (/* @__PURE__ */ new Date()).toLocaleDateString().replace(/\//g, reg) + " " + hours + ":" + minute;
};
var Type = /* @__PURE__ */ ((Type2) => {
Type2["Number"] = "Number";
Type2["String"] = "String";
Type2["Boolean"] = "Boolean";
Type2["Object"] = "Object";
Type2["Array"] = "Array";
Type2["Function"] = "Function";
return Type2;
})(Type || {});
const type = (obj) => {
const type2 = Object.prototype.toString.call(obj);
return type2.substring(8, type2.length - 1);
};
const isEmpty = (obj) => {
if (type(obj) === "Array" /* Array */) {
return obj.length === 0;
}
if (type(obj) === "Object" /* Object */) {
return Object.keys(obj).length === 0;
}
return !obj;
};
const rangeNumber = (start, end) => {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
};
const middleEllipsis = (text, len = 12) => {
let firstStart = len / 2 - 2;
let endStart = len / 2 + 3;
if (text.length > len) {
return text.substr(0, firstStart) + "..." + text.substr(endStart, len);
} else {
return text;
}
};
const 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;
}
};
const isUnOrNull = (val) => {
return val === void 0 || val === null;
};
function getUrlToken(name, str) {
const reg = new RegExp(`(^|&)${name}=([^&]*)(&|$)`, `i`);
const r = str.substr(1).match(reg);
if (r != null)
return decodeURIComponent(r[2]);
return null;
}
const getMessagesUrl = (item) => {
var _a2;
if (item.link_url) {
return window.open(item.link_url);
}
switch (item == null ? void 0 : item.container_type) {
case "TeacherChangeUserInfo":
return window.open("/account/profile");
case "TeacherResetUserPassword":
return window.open("/account/secure");
case "ApplyUserAuthentication":
return window.open("/account/certification");
}
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");
}
if (item.tiding_type === "Code") {
return window.open("/account/profile");
}
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") {
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") {
return window.open(`/shixuns/${item.identifier}/challenges`);
}
case "ApplySubject":
if (item.tiding_type === "Apply") {
return window.open("/admins/subject_authorizations");
}
if (item.tiding_type === "System") {
return window.open(`/paths/${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":
return window.open(`/classrooms/${item.belong_container_id}/teachers`);
case "StudentJoinCourse":
if (item.tiding_type === "Apply") {
return window.open(`/classrooms/${item.belong_container_id}/teachers`);
}
if (item.tiding_type === "System") {
return window.open(`/classrooms/${item.belong_container_id}/students`);
}
case "DealCourse":
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/`
);
case "TeacherJoinCourse":
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/`
);
case "Course":
if (item.tiding_type === "Delete") {
return;
}
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/`
);
case "ArchiveCourse":
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/`
);
case "Shixun":
return window.open(`/shixuns/${item.identifier}/challenges`);
case "Subject":
return window.open(`/paths/${item.container_id}`);
case "JournalsForMessage":
switch (item.parent_container_type) {
case "Principal":
return "";
case "HomeworkCommon":
if (item.homework_type === "normal") {
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.parent_container_id}/question`
);
}
if (item.homework_type === "group") {
return window.open(
`/classrooms/${item.belong_container_id}/group_homework/${item.parent_container_id}/question`
);
}
if (item.homework_type === "practice") {
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/${item.parent_container_id}/detail?tabs=1`
);
}
return "";
case "GraduationTopic":
return window.open(
`/classrooms/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`
);
case "StudentWorksScore":
return window.open(item.link_url);
}
case "Memo":
return window.open(`/forums/${item.parent_container_id}`);
case "Message":
return window.open(`/forums/`);
case "Watcher":
return window.open(`/users/${item.trigger_user.login}/classrooms`);
case "PraiseTread":
return "";
case "Grade":
return "";
case "JoinProject":
return window.open(_env__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z.FORGE + item.project_url);
case "ReporterJoinProject":
return window.open(_env__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z.FORGE + item.project_url);
case "DealProject":
return window.open(_env__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z.FORGE + item.project_url);
case "ManagerJoinProject":
return window.open(_env__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z.FORGE + item.project_url);
case "Poll":
switch (item.parent_container_type) {
case "CommitPoll":
return window.open(
` /classrooms/${item.belong_container_id}/poll/${item.container_id}/detail`
);
default:
return window.open(
` /classrooms/${item.belong_container_id}/poll/${item.container_id}/detail`
);
}
case "Exercise":
switch (item.parent_container_type) {
case "CommitExercise":
return window.open(
` /classrooms/${item.belong_container_id}/exercise/${item.container_id}/detail?tab=0`
);
case "ExerciseScore":
return window.open(
` /classrooms/${item.belong_container_id}/exercise/${item.container_id}/detail?tab=0`
);
default:
return window.open(
`/classrooms/${item.belong_container_id}/exercise/${item.container_id}/detail?tab=0`
);
}
case "StudentGraduationTopic":
return window.open(
`/classrooms/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`
);
case "DealStudentTopicSelect":
return window.open(
`/classrooms/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`
);
case "GraduationTask":
return window.open(
`/classrooms/${item.belong_container_id}/graduation_tasks/${item.container_id}`
);
case "GraduationWork":
return window.open(
`/classrooms/${item.belong_container_id}/graduation_tasks/${item.container_id}`
);
case "GraduationWorkScore":
return window.open(
`/classrooms/${item.belong_container_id}/graduation_tasks/${item.parent_container_id}`
);
case "HomeworkCommon":
switch (item.parent_container_type) {
case "AnonymousCommentFail":
if (item.homework_type === "normal") {
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.parent_container_id}/detail`
);
}
if (item.homework_type === "group") {
return window.open(
`/classrooms/${item.belong_container_id}/group_homework/${item.parent_container_id}/detail`
);
}
if (item.homework_type === "practice") {
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/${item.parent_container_id}/detail?tabs=0`
);
}
case "HomeworkPublish":
if (item.homework_type === "normal") {
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.parent_container_id}/detail`
);
}
if (item.homework_type === "group") {
return window.open(
`/classrooms/${item.belong_container_id}/group_homework/${item.parent_container_id}/detail`
);
}
if (item.homework_type === "practice") {
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/${item.parent_container_id}/detail?tabs=0`
);
}
case "AnonymousAppeal":
if (item.homework_type === "normal") {
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.parent_container_id}/detail`
);
}
if (item.homework_type === "group") {
return window.open(
`/classrooms/${item.belong_container_id}/group_homework/${item.parent_container_id}/detail`
);
}
if (item.homework_type === "practice") {
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/${item.parent_container_id}/detail?tabs=0`
);
}
default:
if (item.homework_type === "normal") {
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.parent_container_id}/detail`
);
}
if (item.homework_type === "group") {
return window.open(
`/classrooms/${item.belong_container_id}/group_homework/${item.parent_container_id}/detail`
);
}
if (item.homework_type === "practice") {
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/${item.parent_container_id}/detail?tabs=0`
);
}
}
case "StudentWork":
if (item.homework_type === "normal") {
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.parent_container_id}/review/${item.container_id}`
);
}
if (item.homework_type === "group") {
return window.open(
`/classrooms/${item.belong_container_id}/group_homework/${item.parent_container_id}/review/${item.container_id}`
);
}
if (item.homework_type === "practice") {
return window.open(
`/classrooms/${item.belong_container_id}/shixun_homework/${item.parent_container_id}/detail`
);
}
case "StudentWorksScore":
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.trigger_user.id}/review/${item.parent_container_id}`
);
case "StudentWorksScoresAppeal":
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.trigger_user.id}/review/${item.parent_container_id}`
);
case "ChallengeWorkScore":
return "";
case "SendMessage":
return window.open(`${_env__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z.API_SERVER}/admins/mirror_repositories`);
case "Journal":
return window.open(`/issues/${item.parent_container_id}`);
case "Issue":
return window.open(`/issues/${item.container_id}`);
case "PullRequest":
return window.open(_env__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z.FORGE + item.project_url);
case "Department":
return window.open(`/account/profile`);
case "Library":
if (item.tiding_type === "Apply") {
return window.open(`/admins/library_applies`);
}
if (item.tiding_type === "System") {
return window.open(`/moop_cases/${item.container_id}`);
}
case "ProjectPackage":
if (item.tiding_type === "Destroyed") {
return;
}
if (item.tiding_type === "Destroyed_end") {
return;
} else {
if (item.tiding_type === "Apply") {
return window.open(`/admins/project_package_applies`);
}
return window.open(`/crowdsourcing/${item.container_id}`);
}
case "Discuss":
if (item.parent_container_type === "Hack" && item.extra) {
return window.open(`/myproblems/${item.extra}/comment`);
} else if (item.extra === "ai_reply" && item.task_identifier) {
return window.open(`/tasks/${item.task_identifier}?extra=extra`);
} else {
return window.open(`/shixuns/${item.identifier}/shixun_discuss`);
}
case "Video":
if (item.tiding_type === "Apply") {
return window.open(`/admins/video_applies`);
} else if (item.tiding_type === "System") {
return window.open(`/users/${(_a2 = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_1__/* .userInfo */ .eY)()) == null ? void 0 : _a2.login}/videos`);
}
return "";
case "PublicCourseStart":
return window.open(`/classrooms/${item.container_id}/informs`);
case "SubjectStartCourse":
return window.open(`/paths/${item.container_id}`);
case "ResubmitStudentWork":
if (item.homework_type === "normal") {
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.parent_container_id}/${item.container_id}/appraise`
);
}
if (item.homework_type === "group") {
return window.open(
`/classrooms/${item.belong_container_id}/group_homework/${item.parent_container_id}/${item.container_id}/appraise`
);
}
case "AdjustScore":
if (item.homework_type === "normal") {
return window.open(
`/classrooms/${item.belong_container_id}/common_homework/${item.parent_container_id}`
);
}
if (item.homework_type === "group") {
return window.open(
`/classrooms/${item.belong_container_id}/group_homework/${item.parent_container_id}`
);
}
case "LiveLink":
return window.open(
`/classrooms/${item.belong_container_id}/course_videos?open=live`
);
case "Hack":
if (item.extra && item.parent_container_type !== "HackDelete") {
return window.open(`/problems/${item.extra}/edit`);
}
default:
return;
}
};
const checkLocalOrPublicIp = (v, hideTip) => __async(void 0, null, function* () {
let ip = "", modal;
return new Promise((resolve, reject) => __async(void 0, null, function* () {
if (v.ip_limit !== "no" || v.ip_bind && v.ip_bind_type) {
ip = yield (0,_components_Exercise_ip__WEBPACK_IMPORTED_MODULE_2__/* .findLocalIp */ .y)({ ip_limit: v == null ? void 0 : v.ip_limit, ip_bind: v == null ? void 0 : v.ip_bind, ip_bind_type: v == null ? void 0 : v.ip_bind_type });
console.log(ip);
}
const res = yield (0,_service_exercise__WEBPACK_IMPORTED_MODULE_3__/* .checkIp */ .Cl)({ id: v.exerciseId, ip });
if (res.status === 0) {
resolve(res);
} else if (res.status === -5) {
(0,umi__WEBPACK_IMPORTED_MODULE_5__.getDvaApp)()._store.dispatch({
type: "exercise/setActionTabs",
payload: {
key: "student-unlock",
exerciseParams: { errorMessage: res == null ? void 0 : res.message, exercise_user_id: v == null ? void 0 : v.exercise_user_id, id: v.exerciseId, unlockClose: v.unlockClose }
}
});
return;
} else {
resolve(res);
}
if (v.errmsgHide || hideTip) {
return true;
}
if (res.status === -1) {
modal = antd__WEBPACK_IMPORTED_MODULE_11__["default"].info({
title: /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, { flex: "1" }, "\u63D0\u793A"), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
"span",
{
className: "iconfont icon-yiguanbi1 current c-grey-c",
onClick: () => modal.destroy()
}
))),
icon: null,
className: "custom-modal-divider",
content: /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "font16 p20" }, "\u60A8\u7684IP\u4E0D\u5728\u8003\u8BD5\u5141\u8BB8\u7684\u8303\u56F4\u5185\uFF01"),
okText: "\u6211\u77E5\u9053\u4E86"
});
return false;
} else if (res.status === -2) {
modal = antd__WEBPACK_IMPORTED_MODULE_11__["default"].info({
title: /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_12__/* ["default"] */ .Z, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, { flex: "1" }, "\u63D0\u793A"), /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(antd__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z, null, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement(
"span",
{
className: "iconfont icon-yiguanbi1 current c-grey-c",
onClick: () => modal.destroy()
}
))),
icon: null,
className: "custom-modal-divider",
content: /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "font16 p20" }, "\u60A8\u5DF2\u7ED1\u5B9A\u5F53\u524D\u8003\u8BD5IP\u5730\u5740\uFF1A", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-red" }, res.ip), "\u8BF7\u4F7F\u7528\u8BE5IP\u5730\u5740\u8FDB\u5165\u8003\u8BD5\u3002"),
okText: "\u6211\u77E5\u9053\u4E86"
});
return false;
}
}));
});
const checkDisabledExam = (v) => {
return new Promise((resolve, reject) => __async(void 0, null, function* () {
const res = yield (0,_service_exercise__WEBPACK_IMPORTED_MODULE_3__/* .checkExam */ .Zg)({
id: v == null ? void 0 : v.exerciseId,
coursesId: v == null ? void 0 : v.coursesId
});
if ((res == null ? void 0 : res.status) === 0) {
resolve("");
return;
}
setTimeout(() => {
window.location.reload();
}, 2e3);
reject("");
}));
};
const isKepuKehuan = () => {
if (location.pathname.indexOf("/classrooms/4RW9CYHY") > -1 || location.pathname.indexOf("/classrooms/qb4ft587") > -1 || location.pathname.indexOf("/classrooms/c5q9bsp2") > -1) {
return true;
} else {
return false;
}
};
const startExercise = (v) => __async(void 0, null, function* () {
var _a2, _b2, _c;
sessionStorage.removeItem("studentunlock");
let modal;
if ((location.pathname.indexOf("/classrooms/4RW9CYHY") > -1 || location.pathname.indexOf("/classrooms/qb4ft587") > -1 || location.pathname.indexOf("/classrooms/c5q9bsp2") > -1) && !isPc()) {
antd__WEBPACK_IMPORTED_MODULE_11__["default"].info({
content: "\u8BF7\u4F7F\u7528\u7535\u8111\u53C2\u52A0\u8003\u8BD5\uFF01"
});
return;
}
copyTextFuc(" ", true);
yield checkDisabledExam(v);
if (v.ip_limit !== "no" || v.ip_bind) {
const res = yield checkLocalOrPublicIp(v, true);
if ((res == null ? void 0 : res.status) !== 0)
return;
if (!isChrome()) {
antd__WEBPACK_IMPORTED_MODULE_11__["default"].info({
icon: null,
okText: "\u786E\u5B9A",
width: 500,
content: /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "font16" }, "\u672C\u6B21\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A\u8BBE\u7F6E\uFF0C\u4EC5\u652F\u6301", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-red" }, "\u8C37\u6B4C"), "\u3002", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("br", null), "\u8BF7\u4F7F\u7528", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-red" }, "\u8C37\u6B4C"), "\u6D4F\u89C8\u5668\u5F00\u59CB\u8003\u8BD5\u3002")
});
return;
}
}
if (v.open_camera || v.screen_open || v.ip_limit !== "no" || v.identity_verify) {
if (!isChromeOrFirefox()) {
antd__WEBPACK_IMPORTED_MODULE_11__["default"].info({
icon: null,
okText: "\u786E\u5B9A",
width: 500,
content: /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", { className: "font16" }, "\u672C\u6B21\u8003\u8BD5\u5DF2\u5F00\u542F\u9632\u4F5C\u5F0A\u8BBE\u7F6E\uFF0C\u4EC5\u652F\u6301", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-red" }, "\u8C37\u6B4C"), "\u3001", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-red" }, "\u706B\u72D0"), "\u6D4F\u89C8\u5668\u3002", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("br", null), "\u8BF7\u4F7F\u7528", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-red" }, "\u8C37\u6B4C"), "\u3001", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-red" }, "\u706B\u72D0"), "\u6D4F\u89C8\u5668\u5F00\u59CB\u8003\u8BD5\u3002")
});
return false;
}
if (v.open_phone_video_recording) {
window.location.href = `/classrooms/${v.coursesId}/exercise/${v.exerciseId}/users/${(_a2 = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_1__/* .userInfo */ .eY)()) == null ? void 0 : _a2.login}/check`;
} else if (v.identity_verify && v.current_status === 2) {
window.location.href = `/classrooms/${v.coursesId}/exercise/${v.exerciseId}/users/${(_b2 = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_1__/* .userInfo */ .eY)()) == null ? void 0 : _b2.login}/check`;
} else {
window.location.href = `/classrooms/${v.coursesId}/exercise/${v.exerciseId}/users/${(_c = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_1__/* .userInfo */ .eY)()) == null ? void 0 : _c.login}`;
}
} else {
if (v.identity_verify && v.current_status === 2) {
window.location.href = `/classrooms/${v.coursesId}/exercise/${v.exerciseId}/users/${v.login}/check`;
} else {
window.location.href = `/classrooms/${v.coursesId}/exercise/${v.exerciseId}/users/${v.login}`;
}
}
});
var httpBuildQuery = function(queryData, numericPrefix, argSeparator, tempKey) {
console.log("param:", queryData);
numericPrefix = numericPrefix || null;
argSeparator = argSeparator || "&";
tempKey = tempKey || null;
if (!queryData) {
return "";
}
var cleanArray = function(actual) {
var newArray = new Array();
for (var i = 0; i < actual.length; i++) {
if (actual[i]) {
newArray.push(actual[i]);
}
}
return newArray;
};
var esc = function(param) {
return encodeURIComponent(param).replace(/[!'()*]/g, escape);
};
var isNumeric = function(n) {
return !isNaN(parseFloat(n)) && isFinite(n);
};
var query = Object.keys(queryData).map(function(k) {
var res;
var key = k;
if (typeof queryData[k] === "object" && queryData[k] !== null) {
res = httpBuildQuery(queryData[k], null);
} else {
if (numericPrefix) {
key = isNumeric(key) ? numericPrefix + Number(key) : key;
}
var val = queryData[k];
val = val === true ? "1" : val;
val = val === false ? "0" : val;
val = val === 0 ? "0" : val;
val = val || "";
res = key + "=" + val;
}
return res;
});
return cleanArray(query).join(argSeparator).replace(/[!'()*]/g, escape);
};
const parseParamsStr = (v, method) => {
const param = {};
const p = Object.assign(true, v, {});
const arr = [];
Object.keys(p).sort().forEach(function(key) {
p[key] = p[key] === true ? "true" : p[key];
p[key] = p[key] === false ? "false" : p[key];
if (method === "GET") {
if (p[key] !== null) {
if (typeof p[key] === "object" && (!Array.isArray(p[key]) || Array.isArray(p[key]) && !p[key].length))
return;
const _key = p[key] === null || p[key] === "null" ? "" : p[key];
arr.push(`${key}=${typeof _key === "string" || typeof _key === "number" ? decodeURIComponent(_key) : JSON.stringify(_key)}`);
}
} else {
const _key = p[key] === null || p[key] === "null" ? "" : p[key];
arr.push(`${key}=${typeof _key === "string" || typeof _key === "number" ? _key : JSON.stringify(_key)}`);
if (typeof p[key] === "object") {
param[key] = p[key];
} else {
param[key] = p[key];
}
}
});
return arr.join("&").trim();
};
const educationList = [
{
name: "\u672C\u79D1",
id: 6
},
{
name: "\u5927\u4E13",
id: 5
},
{
name: "\u4E2D\u4E13",
id: 4
},
{
name: "\u9AD8\u4E2D",
id: 3
},
{
name: "\u521D\u4E2D",
id: 2
},
{
name: "\u5C0F\u5B66",
id: 1
},
{
name: "\u5176\u4ED6",
id: 9
},
{
name: "\u7855\u58EB",
id: 7
},
{
name: "\u535A\u58EB",
id: 8
},
{
name: "\u9AD8\u4E2D",
id: 3
},
{
name: "\u521D\u4E2D",
id: 2
},
{
name: "\u5C0F\u5B66",
id: 1
},
{
name: "\u5176\u4ED6",
id: 9
},
{
name: "\u7855\u58EB",
id: 7
},
{
name: "\u535A\u58EB",
id: 8
}
];
const setHeader = (newOptions, url) => {
var _a2, _b2;
const timenow = Date.now();
const body = typeof (newOptions == null ? void 0 : newOptions.body) === "string" ? JSON.parse(newOptions == null ? void 0 : newOptions.body) : newOptions == null ? void 0 : newOptions.body;
let stringToSign = "method=" + newOptions.method + "&" + (newOptions.method === "GET" && !!((_a2 = Object.keys((newOptions == null ? void 0 : newOptions.params) || {})) == null ? void 0 : _a2.length) && !!parseParamsStr(newOptions.params, newOptions.method).length ? parseParamsStr(newOptions.params, newOptions.method) + "&" : "") + (!!((_b2 = Object.keys(body || {})) == null ? void 0 : _b2.length) ? parseParamsStr(JSON.parse(newOptions.body), newOptions.method) + "&" : "") + "ak=" + aKey + "&sk=" + sKey + "&time=" + timenow;
newOptions.headers["X-EDU-Type"] = "pc";
newOptions.headers["X-EDU-Timestamp"] = timenow;
newOptions.headers["X-EDU-Signature"] = md5__WEBPACK_IMPORTED_MODULE_6___default()(stringToSign);
if (document.domain.indexOf("educoder.net") > -1) {
console.log("stringToSign:", stringToSign, url);
}
return newOptions;
};
const parseUrl = (url) => {
const pattern = /(\w+)=([^\#&]*)/gi;
const parames = {};
url.replace(pattern, function(attr, key, value) {
parames[key] = decodeURI(value);
});
return parames;
};
const messageInfo = (status, date) => {
const info = {
1: "\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u6682\u672A\u53D1\u5E03\uFF0C\u8BF7\u8054\u7CFB\u672C\u8BFE\u5802\u6559\u5E08\u3002",
2: "\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u4E0D\u5B58\u5728\uFF0C\u8BF7\u8054\u7CFB\u672C\u8BFE\u5802\u6559\u5E08\u3002",
3: "\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u9762\u5411\u6307\u5B9A\u5355\u4F4D\u5F00\u653E\uFF0C\u8BF7\u8054\u7CFB\u672C\u8BFE\u5802\u6559\u5E08\u3002",
4: `\u5F53\u524D\u5B9E\u8DF5\u9879\u76EE\u5C06\u4E8E${date}\u53D1\u5E03\uFF0C\u8BF7\u7B49\u5F85\u3002`
};
const s = info[status];
antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .ZP.warning(s);
};
const base64ToBlob = (code, filename) => {
var _a2;
const raw = window.atob(code);
const rawLength = raw.length;
const uInt8Array = new Uint8Array(rawLength);
for (let i = 0; i < rawLength; ++i) {
uInt8Array[i] = raw.charCodeAt(i);
}
return new Blob([uInt8Array], {
type: _contentType__WEBPACK_IMPORTED_MODULE_4__/* .contentType */ .F[(_a2 = filename.split(".")) == null ? void 0 : _a2[1]] || "application/octet-stream"
});
};
const downloadFile = (fileName, content, filename) => {
const blob = base64ToBlob(content, filename);
if (window.navigator.msSaveOrOpenBlob) {
navigator.msSaveBlob(blob, fileName);
} else {
const link = document.createElement("a");
link.href = window.URL.createObjectURL(blob);
link.download = fileName;
document.body.appendChild(link);
const evt = document.createEvent("MouseEvents");
evt.initEvent("click", false, false);
link.dispatchEvent(evt);
document.body.removeChild(link);
}
};
const trackEvent = (arr) => {
var _a2;
if (!!arr.length) {
try {
window._czc.push(["_trackEvent", ...arr]);
window == null ? void 0 : window.gtag("event", arr[1], {
event_category: arr[0],
event_label: arr[2] || "",
value: arr[3] || "",
user_id: ((_a2 = (0,_utils_authority__WEBPACK_IMPORTED_MODULE_1__/* .userInfo */ .eY)()) == null ? void 0 : _a2.login) || ""
});
} catch (e) {
console.log("trackEvent:err:", e);
}
}
};
const trackEventCustom = (arr) => {
if (!!arr.length) {
try {
window._czc.push(["_setCustomVar", ...arr]);
} catch (e) {
console.log("trackEvent:err:", e);
}
}
};
const onPreviewImage = (e) => {
const parentIndexOf = (node, parent) => {
if (node.localName === parent) {
return node;
}
for (let i = 0, n = node; n = n.parentNode; i++) {
if (n.localName === parent) {
return n;
}
if (n == document.documentElement) {
return false;
}
}
};
const t = e.target;
const dom = parentIndexOf(t, "a");
if (dom == null ? void 0 : dom.href)
return;
if (t.tagName.toUpperCase() === "IMG") {
let url = t.src || t.getAttribute("src");
if (url && url.indexOf("/images/avatars/User") === -1) {
e.stopPropagation();
e.preventDefault();
_components_mediator__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z.publish("preview-image", url);
}
}
};
const getCategoryName = (data, categoryId) => {
var _a2, _b2, _c, _d;
if (data) {
let res = (_a2 = data == null ? void 0 : data.filter(
(item) => item.type === location.pathname.split("/")[3]
)) == null ? void 0 : _a2[0];
if (categoryId)
return (_d = (_c = (_b2 = res == null ? void 0 : res.second_category) == null ? void 0 : _b2.filter(
(item) => item.category_id == categoryId
)) == null ? void 0 : _c[0]) == null ? void 0 : _d["category_name"];
else
return res == null ? void 0 : res["name"];
}
return null;
};
const bindPhone = (obj) => {
const modal = antd__WEBPACK_IMPORTED_MODULE_11__["default"].confirm({
title: "\u5B8C\u5584\u624B\u673A\u53F7\u7801",
content: "\u6309\u7167\u6709\u5173\u653F\u7B56\u89C4\u5B9A\uFF0C\u7279\u6B8A\u5B9E\u9A8C\u9700\u8981\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u624D\u80FD\u4F7F\u7528\uFF0C\u8BF7\u5148\u7ED1\u5B9A\u624B\u673A\u53F7\u7801",
okText: "\u7ACB\u5373\u7ED1\u5B9A",
cancelText: "\u53D6\u6D88",
centered: true,
onOk: () => {
location.href = "/account/secure";
},
onCancel: () => {
modal.destroy();
(obj == null ? void 0 : obj.onCancel) && obj.onCancel();
}
});
};
const copyTextFuc = (v = "", hide = false) => {
const input = document.createElement("textarea");
input.value = v;
document.body.appendChild(input);
input.select();
document.execCommand("Copy");
if (!hide) {
antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .ZP.success("\u590D\u5236\u6210\u529F");
}
document.body.removeChild(input);
};
const getJsonFromUrl = (url) => {
if (!url)
url = window.location.search;
if (!url)
return {};
let query = url.substring(1);
let result = {};
query.split("&").forEach(function(part) {
let item = part.split("=");
result[item[0]] = decodeURIComponent(item[1]);
});
return result;
};
const arrTrans = (num, arr) => {
if (!arr)
return null;
const iconsArr = [];
arr.forEach((item, index) => {
const page = Math.floor(index / num);
if (!iconsArr[page]) {
iconsArr[page] = [];
}
iconsArr[page].push(item);
});
return iconsArr;
};
const setDocumentTitle = (title) => {
if (checkIsClientExam()) {
document.title = "\u5934\u6B4C\u8003\u8BD5\u7CFB\u7EDF";
} else if (title !== "" && title) {
document.title = title || (document.domain.indexOf(".educoder.net") > -1 ? "\u5934\u6B4C\u5B9E\u8DF5\u6559\u5B66\u5E73\u53F0" : "");
}
};
const checkIsClientExam = () => {
var _a2;
return (_a2 = window == null ? void 0 : window.localStorage) == null ? void 0 : _a2.isClientExam;
};
const localSort = {
setItem: (key, value, type2) => {
const recordKey = key;
const localRecordValue = localStorage.getItem(recordKey);
const recordValue = localRecordValue !== null && localRecordValue !== "[object Object]" ? JSON.parse(localRecordValue) : {};
recordValue[type2] = value;
localStorage.setItem(recordKey, JSON.stringify(recordValue));
},
getItem: (key, type2) => {
const recordKey = key;
const localRecordValue = localStorage.getItem(recordKey);
const recordValue = localRecordValue !== null && localRecordValue !== "[object Object]" ? JSON.parse(localRecordValue) : {};
return recordValue[type2];
}
};
const ImgSrcConvert = (src) => {
if (src == null ? void 0 : src.startsWith("http")) {
return src;
}
return _env__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .Z.IMG_SERVER + src;
};
const compareVersion = (var1) => {
const var2 = getVersion();
const v1 = var1.split(".");
const v2 = var2.split(".");
const len = Math.max(v1.length, v2.length);
while (v1.length < len) {
v1.push("0");
}
while (v2.length < len) {
v2.push("0");
}
for (let i = 0; i < len; i++) {
const num1 = parseInt(v1[i]);
const num2 = parseInt(v2[i]);
if (num1 > num2) {
return 1;
} else if (num1 < num2) {
return -1;
}
}
return 0;
};
const getVersion = () => {
const agent = navigator.userAgent.toLowerCase();
const version = agent.match(/version\/[\d.]+/gi);
if (version) {
return version[0].replace(/version\//, "");
}
return version;
};
const isLocalApp = () => {
return navigator.userAgent.indexOf("ExerciseApp") > -1;
};
function randomArray(array, seed) {
let currentIndex = array.length, temporaryValue, randomIndex;
seed = seed || 1;
let r = function() {
var x = Math.sin(seed++) * 1e3;
return x - Math.floor(x);
};
while (0 !== currentIndex) {
randomIndex = Math.floor(r() * currentIndex);
currentIndex -= 1;
temporaryValue = array[currentIndex];
array[currentIndex] = array[randomIndex];
array[randomIndex] = temporaryValue;
}
return array;
}
function pointerEvents(val) {
const iframe = document.getElementsByTagName("iframe");
for (let i = 0; i < iframe.length; i++) {
iframe[i].style["pointer-events"] = val;
}
const canvas = document.getElementsByTagName("canvas");
for (let i = 0; i < canvas.length; i++) {
canvas[i].style["pointer-events"] = val;
}
}
const toDataUrl = (url) => {
return new Promise((resolve, reject) => {
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.onload = function() {
var reader = new FileReader();
reader.onloadend = function() {
resolve(reader.result);
};
reader.readAsDataURL(xhr.response);
};
xhr.open("GET", url);
xhr.responseType = "blob";
xhr.send();
});
};
const vtrsKey = (_b = (_a = location == null ? void 0 : location.pathname) == null ? void 0 : _a.split("/")) == null ? void 0 : _b[1];
function scrollToTop() {
window.scrollTo({
left: 0,
top: 0,
behavior: "smooth"
});
}
function domScrollToTop(e) {
var _a2;
(_a2 = document.querySelector(e)) == null ? void 0 : _a2.scrollTo({
left: 0,
top: 0,
behavior: "smooth"
});
}
function dealUploadChange(info) {
var _a2, _b2, _c, _d, _e;
const list = (_a2 = info.fileList) == null ? void 0 : _a2.map((e) => {
var _a3, _b3;
return __spreadProps(__spreadValues({}, e), {
status: typeof (e == null ? void 0 : e.response) === "string" || ((_a3 = e == null ? void 0 : e.response) == null ? void 0 : _a3.status) === -1 ? "error" : e.status,
response: typeof (e == null ? void 0 : e.response) === "string" ? e == null ? void 0 : e.response : (e == null ? void 0 : e.response) ? (e == null ? void 0 : e.response.status) === -1 ? (_b3 = e == null ? void 0 : e.response) == null ? void 0 : _b3.message : e == null ? void 0 : e.response : e == null ? void 0 : e.response
});
});
if (((_c = (_b2 = info.file) == null ? void 0 : _b2.response) == null ? void 0 : _c.status) === -1) {
antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .ZP.destroy();
antd__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .ZP.warning((_e = (_d = info.file) == null ? void 0 : _d.response) == null ? void 0 : _e.message);
}
return list;
}
function cutFileName(str = "", num) {
if (!str)
return "";
const lastDotIndex = str.lastIndexOf(".");
let strItem = [str, ""];
if (lastDotIndex !== -1 && lastDotIndex !== str.length - 1) {
const filename = str.substring(0, lastDotIndex);
const extension = str.substring(lastDotIndex + 1);
strItem = [filename, extension];
}
if (strItem[0].length > num) {
const dealStr = strItem[0].slice(0, num) + "..." + strItem[1];
return dealStr;
}
return str;
}
function cutName(str = "", num, init = "--") {
if (!str)
return init;
return (str == null ? void 0 : str.length) >= num ? (str == null ? void 0 : str.slice(0, num)) + "..." : str;
}
function timeContrast(nextStartTime) {
if (!!nextStartTime) {
return moment__WEBPACK_IMPORTED_MODULE_9___default()().isBefore(moment__WEBPACK_IMPORTED_MODULE_9___default()(nextStartTime));
}
return true;
}
function showTotal(total) {
return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "font14 c-grey-333" }, "\u5171", /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0__.createElement("span", { className: "c-light-primary" }, "\xA0", total, "\xA0"), "\u6761\u6570\u636E");
}
const formatRandomPaperData = (originData) => {
const numberFormatChinese = { 1: "\u4E00", 2: "\u4E8C", 3: "\u4E09", 4: "\u56DB", 5: "\u4E94", 6: "\u516D", 7: "\u4E03" };
if (!originData) {
return;
}
const {
exam,
single_questions,
multiple_questions,
judgement_questions,
program_questions,
completion_questions,
subjective_questions,
practical_questions,
combination_questions,
bprogram_questions
} = originData || {};
const questionData = [
__spreadValues({ type: "SINGLE", name: "\u5355\u9009\u9898" }, single_questions),
__spreadValues({ type: "MULTIPLE", name: "\u591A\u9009\u9898" }, multiple_questions),
__spreadValues({ type: "COMPLETION", name: "\u586B\u7A7A\u9898" }, completion_questions),
__spreadValues({ type: "JUDGMENT", name: "\u5224\u65AD\u9898" }, judgement_questions),
__spreadValues({ type: "SUBJECTIVE", name: "\u7B80\u7B54\u9898" }, subjective_questions),
__spreadValues({ type: "PROGRAM", name: "\u7F16\u7A0B\u9898" }, program_questions),
__spreadValues({ type: "BPROGRAM", name: "\u7A0B\u5E8F\u586B\u7A7A\u9898" }, bprogram_questions),
__spreadValues({ type: "PRACTICAL", name: "\u5B9E\u8BAD\u9898" }, practical_questions),
__spreadValues({ type: "COMBINATION", name: "\u7EC4\u5408\u9898" }, combination_questions)
];
const ids = [];
let all_score = 0;
let all_questions_count = 0;
const questionList = questionData.filter((item) => item.questions_count > 0).map((item, index) => {
var _a2;
(_a2 = item.questions) == null ? void 0 : _a2.forEach((e) => {
ids.push(e.id);
all_score = all_score + e.score;
all_questions_count = all_questions_count + 1;
});
return __spreadValues(__spreadValues({}, item), { number: numberFormatChinese[index + 1] });
});
return {
all_questions_count,
all_score,
questionList,
ids,
exam
};
};
const formatRandomPaperDatas = (originData) => {
var _a2;
const numberFormatChinese = { 1: "\u4E00", 2: "\u4E8C", 3: "\u4E09", 4: "\u56DB", 5: "\u4E94", 6: "\u516D", 7: "\u4E03" };
if (!originData) {
return;
}
const {
exam,
single_questions,
multiple_questions,
judgement_questions,
program_questions,
completion_questions,
subjective_questions,
practical_questions,
combination_questions,
bprogram_questions
} = originData || {};
const questionData = [
__spreadValues({ type: "SINGLE", name: "\u5355\u9009\u9898" }, single_questions),
__spreadValues({ type: "MULTIPLE", name: "\u591A\u9009\u9898" }, multiple_questions),
__spreadValues({ type: "COMPLETION", name: "\u586B\u7A7A\u9898" }, completion_questions),
__spreadValues({ type: "JUDGMENT", name: "\u5224\u65AD\u9898" }, judgement_questions),
__spreadValues({ type: "SUBJECTIVE", name: "\u7B80\u7B54\u9898" }, subjective_questions),
__spreadValues({ type: "PROGRAM", name: "\u7F16\u7A0B\u9898" }, program_questions),
__spreadValues({ type: "BPROGRAM", name: "\u7A0B\u5E8F\u586B\u7A7A\u9898" }, bprogram_questions),
__spreadValues({ type: "PRACTICAL", name: "\u5B9E\u8BAD\u9898" }, practical_questions),
__spreadValues({ type: "COMBINATION", name: "\u7EC4\u5408\u9898" }, combination_questions)
];
let items = [];
(_a2 = exam == null ? void 0 : exam.question_type_position) == null ? void 0 : _a2.map((item, index) => {
questionData == null ? void 0 : questionData.map((val, jindex) => {
if (item.type === val.type) {
items.push(val);
}
});
});
const ids = [];
let all_score = 0;
let all_questions_count = 0;
const questionList = items.filter((item) => item.questions_count > 0).map((item, index) => {
var _a3;
(_a3 = item.questions) == null ? void 0 : _a3.forEach((e) => {
ids.push(e.id);
all_score = all_score + e.score;
all_questions_count = all_questions_count + 1;
});
return __spreadValues(__spreadValues({}, item), { number: numberFormatChinese[index + 1] });
});
return {
all_questions_count,
all_score,
questionList,
ids,
exam
};
};
const isWechatBrowser = () => {
const ua = navigator.userAgent.toLowerCase();
if (ua.match(/MicroMessenger/i) == "micromessenger") {
return true;
} else {
return false;
}
};
const toWechatLogin = () => {
if (isWechatBrowser()) {
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx0955caba88bc37eb&redirect_uri=https%3A%2F%2Fwww.educoder.net%2fotherloginstart&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`;
} else {
window.location.href = `/wxlogin.html`;
}
};
const isMobileDevice = () => {
return typeof window.orientation !== "undefined" || navigator.userAgent.indexOf("Mobi") !== -1;
};
const sendAppStatus = (socket, param) => {
var _a2;
try {
if (param) {
socket.send(JSON.stringify({ type: "toggleLockExit", data: true }));
if (param == null ? void 0 : param.forbid_screen) {
socket.send(JSON.stringify({ type: "open-disabled-switchscreen" }));
}
if (param == null ? void 0 : param.use_white_list) {
socket.send(JSON.stringify({ type: "open-only-allow-runapp", data: param == null ? void 0 : param.white_list }));
}
if (param == null ? void 0 : param.net_limit) {
socket.send(JSON.stringify({ type: "network-close", data: (_a2 = param == null ? void 0 : param.net_limit_list) == null ? void 0 : _a2.split("\n") }));
}
} else {
socket.send(JSON.stringify({ type: "toggleLockExit", data: false }));
socket.send(JSON.stringify({ type: "close-disabled-switchscreen" }));
socket.send(JSON.stringify({ type: "close-only-allow-runapp" }));
socket.send(JSON.stringify({ type: "network-open" }));
}
} catch (e) {
}
};
/***/ }),
/***/ 83739:
/*!*******************************!*\
!*** ./src/utils/validate.ts ***!
\*******************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ t: function() { return /* binding */ isValidIP; }
/* harmony export */ });
/* unused harmony export isValidIPPrefix */
const 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);
};
const 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);
};
/***/ }),
/***/ 21643:
/*!********************************************************************************************!*\
!*** ./node_modules/_@umijs_renderer-react@4.1.2@@umijs/renderer-react/dist/appContext.js ***!
\********************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Il: function() { return /* binding */ AppContext; },
/* harmony export */ Ov: function() { return /* binding */ useAppData; }
/* harmony export */ });
/* unused harmony exports useSelectedRoutes, useRouteProps, useServerLoaderData, useClientLoaderData */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
var _excluded = (/* unused pure expression or super */ null && (["element"]));
var AppContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});
function useAppData() {
return react__WEBPACK_IMPORTED_MODULE_0__.useContext(AppContext);
}
function useSelectedRoutes() {
var location = useLocation();
var _useAppData = useAppData(),
clientRoutes = _useAppData.clientRoutes;
// use `useLocation` get location without `basename`, not need `basename` param
var routes = matchRoutes(clientRoutes, location.pathname);
return routes || [];
}
function useRouteProps() {
var _currentRoute$;
var currentRoute = useSelectedRoutes().slice(-1);
var _ref = ((_currentRoute$ = currentRoute[0]) === null || _currentRoute$ === void 0 ? void 0 : _currentRoute$.route) || {},
_ = _ref.element,
props = _objectWithoutProperties(_ref, _excluded);
return props;
}
function useServerLoaderData() {
var routes = useSelectedRoutes();
var _useAppData2 = useAppData(),
serverLoaderData = _useAppData2.serverLoaderData,
basename = _useAppData2.basename;
var _React$useState = React.useState(function () {
var ret = {};
var has = false;
routes.forEach(function (route) {
// 多级路由嵌套时,需要合并多级路由 serverLoader 的数据
var routeData = serverLoaderData[route.route.id];
if (routeData) {
Object.assign(ret, routeData);
has = true;
}
});
return has ? ret : undefined;
}),
_React$useState2 = _slicedToArray(_React$useState, 2),
data = _React$useState2[0],
setData = _React$useState2[1];
React.useEffect(function () {
// @ts-ignore
if (!window.__UMI_LOADER_DATA__) {
// 支持 ssr 降级,客户端兜底加载 serverLoader 数据
Promise.all(routes.filter(function (route) {
return route.route.hasServerLoader;
}).map(function (route) {
return new Promise(function (resolve) {
fetchServerLoader({
id: route.route.id,
basename: basename,
cb: resolve
});
});
})).then(function (datas) {
if (datas.length) {
var res = {};
datas.forEach(function (data) {
Object.assign(res, data);
});
setData(res);
}
});
}
}, []);
return {
data: data
};
}
function useClientLoaderData() {
var route = useRouteData();
var appData = useAppData();
return {
data: appData.clientLoaderData[route.route.id]
};
}
/***/ }),
/***/ 91392:
/*!****************************************************************************************************!*\
!*** ./node_modules/_antd-dayjs-webpack-plugin@1.0.6@antd-dayjs-webpack-plugin/src/antd-plugin.js ***!
\****************************************************************************************************/
/***/ (function(module) {
var localeMap = {
en_GB: 'en-gb',
en_US: 'en',
zh_CN: 'zh-cn',
zh_TW: 'zh-tw'
};
var parseLocale = function parseLocale(locale) {
var mapLocale = localeMap[locale];
return mapLocale || locale.split('_')[0];
};
module.exports = function (option, dayjsClass, dayjsFactory) {
var oldLocale = dayjsClass.prototype.locale
dayjsClass.prototype.locale = function(arg) {
if (typeof arg === 'string') {
arg = parseLocale(arg)
}
return oldLocale.call(this, arg)
}
}
/***/ }),
/***/ 92806:
/*!****************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/ActionButton.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var rc_util_es_hooks_useState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/hooks/useState */ 37423);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../button */ 3113);
/* harmony import */ var _button_button__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../button/button */ 67797);
"use client";
function isThenable(thing) {
return !!(thing && thing.then);
}
const ActionButton = props => {
const {
type,
children,
prefixCls,
buttonProps,
close,
autoFocus,
emitEvent,
isSilent,
quitOnNullishReturnValue,
actionFn
} = props;
const clickedRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef(false);
const buttonRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef(null);
const [loading, setLoading] = (0,rc_util_es_hooks_useState__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(false);
const onInternalClose = function () {
close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);
};
react__WEBPACK_IMPORTED_MODULE_1__.useEffect(() => {
let timeoutId = null;
if (autoFocus) {
timeoutId = setTimeout(() => {
var _a;
(_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus();
});
}
return () => {
if (timeoutId) {
clearTimeout(timeoutId);
}
};
}, []);
const handlePromiseOnOk = returnValueOfOnOk => {
if (!isThenable(returnValueOfOnOk)) {
return;
}
setLoading(true);
returnValueOfOnOk.then(function () {
setLoading(false, true);
onInternalClose.apply(void 0, arguments);
clickedRef.current = false;
}, e => {
// See: https://github.com/ant-design/ant-design/issues/6183
setLoading(false, true);
clickedRef.current = false;
// Do not throw if is `await` mode
if (isSilent === null || isSilent === void 0 ? void 0 : isSilent()) {
return;
}
return Promise.reject(e);
});
};
const onClick = e => {
if (clickedRef.current) {
return;
}
clickedRef.current = true;
if (!actionFn) {
onInternalClose();
return;
}
let returnValueOfOnOk;
if (emitEvent) {
returnValueOfOnOk = actionFn(e);
if (quitOnNullishReturnValue && !isThenable(returnValueOfOnOk)) {
clickedRef.current = false;
onInternalClose(e);
return;
}
} else if (actionFn.length) {
returnValueOfOnOk = actionFn(close);
// https://github.com/ant-design/ant-design/issues/23358
clickedRef.current = false;
} else {
returnValueOfOnOk = actionFn();
if (!returnValueOfOnOk) {
onInternalClose();
return;
}
}
handlePromiseOnOk(returnValueOfOnOk);
};
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_button__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP, Object.assign({}, (0,_button_button__WEBPACK_IMPORTED_MODULE_3__/* .convertLegacyProps */ .n)(type), {
onClick: onClick,
loading: loading,
prefixCls: prefixCls
}, buttonProps, {
ref: buttonRef
}), children);
};
/* harmony default export */ __webpack_exports__.Z = (ActionButton);
/***/ }),
/***/ 53487:
/*!*************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/PurePanel.js ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: function() { return /* binding */ genPurePanel; },
/* harmony export */ i: function() { return /* binding */ withPureRenderTheme; }
/* harmony export */ });
/* harmony import */ var rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util/es/hooks/useMergedState */ 89308);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 92736);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355);
"use client";
function withPureRenderTheme(Component) {
return function PureRenderThemeComponent(props) {
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP, {
theme: {
token: {
motion: false,
zIndexPopupBase: 0
}
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Component, Object.assign({}, props)));
};
}
/* istanbul ignore next */
function genPurePanel(Component, defaultPrefixCls, getDropdownCls, postProps) {
function PurePanel(props) {
const {
prefixCls: customizePrefixCls,
style
} = props;
const holderRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef(null);
const [popupHeight, setPopupHeight] = react__WEBPACK_IMPORTED_MODULE_1__.useState(0);
const [popupWidth, setPopupWidth] = react__WEBPACK_IMPORTED_MODULE_1__.useState(0);
const [open, setOpen] = (0,rc_util_es_hooks_useMergedState__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)(false, {
value: props.open
});
const {
getPrefixCls
} = react__WEBPACK_IMPORTED_MODULE_1__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
const prefixCls = getPrefixCls(defaultPrefixCls || 'select', customizePrefixCls);
react__WEBPACK_IMPORTED_MODULE_1__.useEffect(() => {
// We do not care about ssr
setOpen(true);
if (typeof ResizeObserver !== 'undefined') {
const resizeObserver = new ResizeObserver(entries => {
const element = entries[0].target;
setPopupHeight(element.offsetHeight + 8);
setPopupWidth(element.offsetWidth);
});
const interval = setInterval(() => {
var _a;
const dropdownCls = getDropdownCls ? `.${getDropdownCls(prefixCls)}` : `.${prefixCls}-dropdown`;
const popup = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.querySelector(dropdownCls);
if (popup) {
clearInterval(interval);
resizeObserver.observe(popup);
}
}, 10);
return () => {
clearInterval(interval);
resizeObserver.disconnect();
};
}
}, []);
let mergedProps = Object.assign(Object.assign({}, props), {
style: Object.assign(Object.assign({}, style), {
margin: 0
}),
open,
visible: open,
getPopupContainer: () => holderRef.current
});
if (postProps) {
mergedProps = postProps(mergedProps);
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement("div", {
ref: holderRef,
style: {
paddingBottom: popupHeight,
position: 'relative',
minWidth: popupWidth
}
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(Component, Object.assign({}, mergedProps)));
}
return withPureRenderTheme(PurePanel);
}
/***/ }),
/***/ 47729:
/*!*********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useClosable.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: function() { return /* binding */ useClosable; }
/* harmony export */ });
/* harmony import */ var _ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/icons/es/icons/CloseOutlined */ 3680);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
"use client";
function useInnerClosable(closable, closeIcon, defaultClosable) {
if (typeof closable === 'boolean') {
return closable;
}
if (closeIcon === undefined) {
return !!defaultClosable;
}
return closeIcon !== false && closeIcon !== null;
}
function useClosable(closable, closeIcon, customCloseIconRender) {
let defaultCloseIcon = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_ant_design_icons_es_icons_CloseOutlined__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, null);
let defaultClosable = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
const mergedClosable = useInnerClosable(closable, closeIcon, defaultClosable);
if (!mergedClosable) {
return [false, null];
}
const mergedCloseIcon = typeof closeIcon === 'boolean' || closeIcon === undefined || closeIcon === null ? defaultCloseIcon : closeIcon;
return [true, customCloseIconRender ? customCloseIconRender(mergedCloseIcon) : mergedCloseIcon];
}
/***/ }),
/***/ 62892:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/motion.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ m: function() { return /* binding */ getTransitionName; }
/* harmony export */ });
// ================== Collapse Motion ==================
const getCollapsedHeight = () => ({
height: 0,
opacity: 0
});
const getRealHeight = node => {
const {
scrollHeight
} = node;
return {
height: scrollHeight,
opacity: 1
};
};
const getCurrentHeight = node => ({
height: node ? node.offsetHeight : 0
});
const skipOpacityTransition = (_, event) => (event === null || event === void 0 ? void 0 : event.deadline) === true || event.propertyName === 'height';
const initCollapseMotion = function () {
let rootCls = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'ant';
return {
motionName: `${rootCls}-motion-collapse`,
onAppearStart: getCollapsedHeight,
onEnterStart: getCollapsedHeight,
onAppearActive: getRealHeight,
onEnterActive: getRealHeight,
onLeaveStart: getCurrentHeight,
onLeaveActive: getCollapsedHeight,
onAppearEnd: skipOpacityTransition,
onEnterEnd: skipOpacityTransition,
onLeaveEnd: skipOpacityTransition,
motionDeadline: 500
};
};
const SelectPlacements = (/* unused pure expression or super */ null && (['bottomLeft', 'bottomRight', 'topLeft', 'topRight']));
const getTransitionName = (rootPrefixCls, motion, transitionName) => {
if (transitionName !== undefined) {
return transitionName;
}
return `${rootPrefixCls}-${motion}`;
};
/* harmony default export */ __webpack_exports__.Z = (initCollapseMotion);
/***/ }),
/***/ 92343:
/*!*************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
var react__WEBPACK_IMPORTED_MODULE_0___namespace_cache;
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ M2: function() { return /* binding */ isFragment; },
/* harmony export */ Tm: function() { return /* binding */ cloneElement; },
/* harmony export */ l$: function() { return /* binding */ isValidElement; },
/* harmony export */ wm: function() { return /* binding */ replaceElement; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
const {
isValidElement
} = /*#__PURE__*/ (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache || (react__WEBPACK_IMPORTED_MODULE_0___namespace_cache = __webpack_require__.t(react__WEBPACK_IMPORTED_MODULE_0__, 2)));
function isFragment(child) {
return child && isValidElement(child) && child.type === react__WEBPACK_IMPORTED_MODULE_0__.Fragment;
}
function replaceElement(element, replacement, props) {
if (!isValidElement(element)) {
return replacement;
}
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.cloneElement(element, typeof props === 'function' ? props(element.props || {}) : props);
}
function cloneElement(element, props) {
return replaceElement(element, element, props);
}
/***/ }),
/***/ 69507:
/*!**********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/responsiveObserver.js ***!
\**********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ ZP: function() { return /* binding */ useResponsiveObserver; },
/* harmony export */ c4: function() { return /* binding */ responsiveArray; }
/* harmony export */ });
/* unused harmony export matchScreen */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../theme/internal */ 88088);
const responsiveArray = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
const getResponsiveMap = token => ({
xs: `(max-width: ${token.screenXSMax}px)`,
sm: `(min-width: ${token.screenSM}px)`,
md: `(min-width: ${token.screenMD}px)`,
lg: `(min-width: ${token.screenLG}px)`,
xl: `(min-width: ${token.screenXL}px)`,
xxl: `(min-width: ${token.screenXXL}px)`
});
/**
* Ensures that the breakpoints token are valid, in good order
* For each breakpoint : screenMin <= screen <= screenMax and screenMax <= nextScreenMin
*/
const validateBreakpoints = token => {
const indexableToken = token;
const revBreakpoints = [].concat(responsiveArray).reverse();
revBreakpoints.forEach((breakpoint, i) => {
const breakpointUpper = breakpoint.toUpperCase();
const screenMin = `screen${breakpointUpper}Min`;
const screen = `screen${breakpointUpper}`;
if (!(indexableToken[screenMin] <= indexableToken[screen])) {
throw new Error(`${screenMin}<=${screen} fails : !(${indexableToken[screenMin]}<=${indexableToken[screen]})`);
}
if (i < revBreakpoints.length - 1) {
const screenMax = `screen${breakpointUpper}Max`;
if (!(indexableToken[screen] <= indexableToken[screenMax])) {
throw new Error(`${screen}<=${screenMax} fails : !(${indexableToken[screen]}<=${indexableToken[screenMax]})`);
}
const nextBreakpointUpperMin = revBreakpoints[i + 1].toUpperCase();
const nextScreenMin = `screen${nextBreakpointUpperMin}Min`;
if (!(indexableToken[screenMax] <= indexableToken[nextScreenMin])) {
throw new Error(`${screenMax}<=${nextScreenMin} fails : !(${indexableToken[screenMax]}<=${indexableToken[nextScreenMin]})`);
}
}
});
return token;
};
function useResponsiveObserver() {
const [, token] = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)();
const responsiveMap = getResponsiveMap(validateBreakpoints(token));
// To avoid repeat create instance, we add `useMemo` here.
return react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
const subscribers = new Map();
let subUid = -1;
let screens = {};
return {
matchHandlers: {},
dispatch(pointMap) {
screens = pointMap;
subscribers.forEach(func => func(screens));
return subscribers.size >= 1;
},
subscribe(func) {
if (!subscribers.size) this.register();
subUid += 1;
subscribers.set(subUid, func);
func(screens);
return subUid;
},
unsubscribe(paramToken) {
subscribers.delete(paramToken);
if (!subscribers.size) this.unregister();
},
unregister() {
Object.keys(responsiveMap).forEach(screen => {
const matchMediaQuery = responsiveMap[screen];
const 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() {
Object.keys(responsiveMap).forEach(screen => {
const matchMediaQuery = responsiveMap[screen];
const listener = _ref => {
let {
matches
} = _ref;
this.dispatch(Object.assign(Object.assign({}, screens), {
[screen]: matches
}));
};
const mql = window.matchMedia(matchMediaQuery);
mql.addListener(listener);
this.matchHandlers[matchMediaQuery] = {
mql,
listener
};
listener(mql);
});
},
responsiveMap
};
}, [token]);
}
const matchScreen = (screens, screenSizes) => {
if (screenSizes && typeof screenSizes === 'object') {
for (let i = 0; i < responsiveArray.length; i++) {
const breakpoint = responsiveArray[i];
if (screens[breakpoint] && screenSizes[breakpoint] !== undefined) {
return screenSizes[breakpoint];
}
}
}
};
/***/ }),
/***/ 14088:
/*!**************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/wave/index.js + 4 modules ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ wave; }
});
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/ref.js
var es_ref = __webpack_require__(17763);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/Dom/isVisible.js
var isVisible = __webpack_require__(66209);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
var reactNode = __webpack_require__(92343);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/style.js
const genWaveStyle = token => {
const {
componentCls,
colorPrimary
} = token;
return {
[componentCls]: {
position: 'absolute',
background: 'transparent',
pointerEvents: 'none',
boxSizing: 'border-box',
color: `var(--wave-color, ${colorPrimary})`,
boxShadow: `0 0 0 0 currentcolor`,
opacity: 0.2,
// =================== Motion ===================
'&.wave-motion-appear': {
transition: [`box-shadow 0.4s ${token.motionEaseOutCirc}`, `opacity 2s ${token.motionEaseOutCirc}`].join(','),
'&-active': {
boxShadow: `0 0 0 6px currentcolor`,
opacity: 0
},
'&.wave-quick': {
transition: [`box-shadow 0.3s ${token.motionEaseInOut}`, `opacity 0.35s ${token.motionEaseInOut}`].join(',')
}
}
}
};
};
/* harmony default export */ var style = ((0,genComponentStyleHook/* default */.Z)('Wave', token => [genWaveStyle(token)]));
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/index.js
var es = __webpack_require__(46142);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/raf.js
var raf = __webpack_require__(74570);
// EXTERNAL MODULE: ./node_modules/_rc-motion@2.9.0@rc-motion/es/index.js + 12 modules
var _rc_motion_2_9_0_rc_motion_es = __webpack_require__(44516);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/React/render.js
var render = __webpack_require__(59905);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/util.js
function isNotGrey(color) {
// eslint-disable-next-line no-useless-escape
const match = (color || '').match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);
if (match && match[1] && match[2] && match[3]) {
return !(match[1] === match[2] && match[2] === match[3]);
}
return true;
}
function isValidWaveColor(color) {
return color && color !== '#fff' && color !== '#ffffff' && color !== 'rgb(255, 255, 255)' && color !== 'rgba(255, 255, 255, 1)' && isNotGrey(color) && !/rgba\((?:\d*, ){3}0\)/.test(color) &&
// any transparent rgba color
color !== 'transparent';
}
function getTargetWaveColor(node) {
const {
borderTopColor,
borderColor,
backgroundColor
} = getComputedStyle(node);
if (isValidWaveColor(borderTopColor)) {
return borderTopColor;
}
if (isValidWaveColor(borderColor)) {
return borderColor;
}
if (isValidWaveColor(backgroundColor)) {
return backgroundColor;
}
return null;
}
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/interface.js
var wave_interface = __webpack_require__(4572);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/WaveEffect.js
"use client";
function validateNum(value) {
return Number.isNaN(value) ? 0 : value;
}
const WaveEffect = props => {
const {
className,
target,
component
} = props;
const divRef = _react_17_0_2_react.useRef(null);
const [color, setWaveColor] = _react_17_0_2_react.useState(null);
const [borderRadius, setBorderRadius] = _react_17_0_2_react.useState([]);
const [left, setLeft] = _react_17_0_2_react.useState(0);
const [top, setTop] = _react_17_0_2_react.useState(0);
const [width, setWidth] = _react_17_0_2_react.useState(0);
const [height, setHeight] = _react_17_0_2_react.useState(0);
const [enabled, setEnabled] = _react_17_0_2_react.useState(false);
const waveStyle = {
left,
top,
width,
height,
borderRadius: borderRadius.map(radius => `${radius}px`).join(' ')
};
if (color) {
waveStyle['--wave-color'] = color;
}
function syncPos() {
const nodeStyle = getComputedStyle(target);
// Get wave color from target
setWaveColor(getTargetWaveColor(target));
const isStatic = nodeStyle.position === 'static';
// Rect
const {
borderLeftWidth,
borderTopWidth
} = nodeStyle;
setLeft(isStatic ? target.offsetLeft : validateNum(-parseFloat(borderLeftWidth)));
setTop(isStatic ? target.offsetTop : validateNum(-parseFloat(borderTopWidth)));
setWidth(target.offsetWidth);
setHeight(target.offsetHeight);
// Get border radius
const {
borderTopLeftRadius,
borderTopRightRadius,
borderBottomLeftRadius,
borderBottomRightRadius
} = nodeStyle;
setBorderRadius([borderTopLeftRadius, borderTopRightRadius, borderBottomRightRadius, borderBottomLeftRadius].map(radius => validateNum(parseFloat(radius))));
}
_react_17_0_2_react.useEffect(() => {
if (target) {
// We need delay to check position here
// since UI may change after click
const id = (0,raf/* default */.Z)(() => {
syncPos();
setEnabled(true);
});
// Add resize observer to follow size
let resizeObserver;
if (typeof ResizeObserver !== 'undefined') {
resizeObserver = new ResizeObserver(syncPos);
resizeObserver.observe(target);
}
return () => {
raf/* default */.Z.cancel(id);
resizeObserver === null || resizeObserver === void 0 ? void 0 : resizeObserver.disconnect();
};
}
}, []);
if (!enabled) {
return null;
}
const isSmallComponent = (component === 'Checkbox' || component === 'Radio') && (target === null || target === void 0 ? void 0 : target.classList.contains(wave_interface/* TARGET_CLS */.A));
return /*#__PURE__*/_react_17_0_2_react.createElement(_rc_motion_2_9_0_rc_motion_es["default"], {
visible: true,
motionAppear: true,
motionName: "wave-motion",
motionDeadline: 5000,
onAppearEnd: (_, event) => {
var _a;
if (event.deadline || event.propertyName === 'opacity') {
const holder = (_a = divRef.current) === null || _a === void 0 ? void 0 : _a.parentElement;
(0,render/* unmount */.v)(holder).then(() => {
holder === null || holder === void 0 ? void 0 : holder.remove();
});
}
return false;
}
}, _ref => {
let {
className: motionClassName
} = _ref;
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
ref: divRef,
className: _classnames_2_5_1_classnames_default()(className, {
'wave-quick': isSmallComponent
}, motionClassName),
style: waveStyle
});
});
};
const showWaveEffect = (target, info) => {
var _a;
const {
component
} = info;
// Skip for unchecked checkbox
if (component === 'Checkbox' && !((_a = target.querySelector('input')) === null || _a === void 0 ? void 0 : _a.checked)) {
return;
}
// Create holder
const holder = document.createElement('div');
holder.style.position = 'absolute';
holder.style.left = '0px';
holder.style.top = '0px';
target === null || target === void 0 ? void 0 : target.insertBefore(holder, target === null || target === void 0 ? void 0 : target.firstChild);
(0,render/* render */.s)( /*#__PURE__*/_react_17_0_2_react.createElement(WaveEffect, Object.assign({}, info, {
target: target
})), holder);
};
/* harmony default export */ var wave_WaveEffect = (showWaveEffect);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/useToken.js + 4 modules
var useToken = __webpack_require__(88088);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/useWave.js
function useWave(nodeRef, className, component) {
const {
wave
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const [, token, hashId] = (0,useToken/* default */.Z)();
const showWave = (0,es.useEvent)(event => {
const node = nodeRef.current;
if ((wave === null || wave === void 0 ? void 0 : wave.disabled) || !node) {
return;
}
const targetNode = node.querySelector(`.${wave_interface/* TARGET_CLS */.A}`) || node;
const {
showEffect
} = wave || {};
// Customize wave effect
(showEffect || wave_WaveEffect)(targetNode, {
className,
token,
component,
event,
hashId
});
});
const rafId = _react_17_0_2_react.useRef();
// Merge trigger event into one for each frame
const showDebounceWave = event => {
raf/* default */.Z.cancel(rafId.current);
rafId.current = (0,raf/* default */.Z)(() => {
showWave(event);
});
};
return showDebounceWave;
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/index.js
const Wave = props => {
const {
children,
disabled,
component
} = props;
const {
getPrefixCls
} = (0,_react_17_0_2_react.useContext)(context/* ConfigContext */.E_);
const containerRef = (0,_react_17_0_2_react.useRef)(null);
// ============================== Style ===============================
const prefixCls = getPrefixCls('wave');
const [, hashId] = style(prefixCls);
// =============================== Wave ===============================
const showWave = useWave(containerRef, _classnames_2_5_1_classnames_default()(prefixCls, hashId), component);
// ============================== Effect ==============================
_react_17_0_2_react.useEffect(() => {
const node = containerRef.current;
if (!node || node.nodeType !== 1 || disabled) {
return;
}
// Click handler
const onClick = e => {
// Fix radio button click twice
if (!(0,isVisible/* default */.Z)(e.target) ||
// No need wave
!node.getAttribute || node.getAttribute('disabled') || node.disabled || node.className.includes('disabled') || node.className.includes('-leave')) {
return;
}
showWave(e);
};
// Bind events
node.addEventListener('click', onClick, true);
return () => {
node.removeEventListener('click', onClick, true);
};
}, [disabled]);
// ============================== Render ==============================
if (! /*#__PURE__*/_react_17_0_2_react.isValidElement(children)) {
return children !== null && children !== void 0 ? children : null;
}
const ref = (0,es_ref/* supportRef */.Yr)(children) ? (0,es_ref/* composeRef */.sQ)(children.ref, containerRef) : containerRef;
return (0,reactNode/* cloneElement */.Tm)(children, {
ref
});
};
if (false) {}
/* harmony default export */ var wave = (Wave);
/***/ }),
/***/ 4572:
/*!******************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/_util/wave/interface.js ***!
\******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ A: function() { return /* binding */ TARGET_CLS; }
/* harmony export */ });
const TARGET_CLS = 'ant-wave-target';
/***/ }),
/***/ 67797:
/*!***********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/button/button.js + 8 modules ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
n: function() { return /* binding */ convertLegacyProps; },
Z: function() { return /* binding */ button_button; }
});
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/omit.js
var omit = __webpack_require__(41123);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/ref.js
var es_ref = __webpack_require__(17763);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/wave/index.js + 4 modules
var wave = __webpack_require__(14088);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js
var DisabledContext = __webpack_require__(1684);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js
var useSize = __webpack_require__(19716);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
var Compact = __webpack_require__(33234);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/useToken.js + 4 modules
var useToken = __webpack_require__(88088);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/button/button-group.js
"use client";
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;
};
const GroupSizeContext = /*#__PURE__*/_react_17_0_2_react.createContext(undefined);
const ButtonGroup = props => {
const {
getPrefixCls,
direction
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const {
prefixCls: customizePrefixCls,
size,
className
} = props,
others = __rest(props, ["prefixCls", "size", "className"]);
const prefixCls = getPrefixCls('btn-group', customizePrefixCls);
const [,, hashId] = (0,useToken/* default */.Z)();
let sizeCls = '';
switch (size) {
case 'large':
sizeCls = 'lg';
break;
case 'small':
sizeCls = 'sm';
break;
case 'middle':
case undefined:
break;
default:
false ? 0 : void 0;
}
const classes = _classnames_2_5_1_classnames_default()(prefixCls, {
[`${prefixCls}-${sizeCls}`]: sizeCls,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, hashId);
return /*#__PURE__*/_react_17_0_2_react.createElement(GroupSizeContext.Provider, {
value: size
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({}, others, {
className: classes
})));
};
/* harmony default export */ var button_group = (ButtonGroup);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
var reactNode = __webpack_require__(92343);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/button/buttonHelpers.js
"use client";
const rxTwoCNChar = /^[\u4e00-\u9fa5]{2}$/;
const isTwoCNChar = rxTwoCNChar.test.bind(rxTwoCNChar);
function isString(str) {
return typeof str === 'string';
}
function isUnBorderedButtonType(type) {
return type === 'text' || type === 'link';
}
function splitCNCharsBySpace(child, needInserted) {
if (child === null || child === undefined) {
return;
}
const SPACE = needInserted ? ' ' : '';
if (typeof child !== 'string' && typeof child !== 'number' && isString(child.type) && isTwoCNChar(child.props.children)) {
return (0,reactNode/* cloneElement */.Tm)(child, {
children: child.props.children.split('').join(SPACE)
});
}
if (isString(child)) {
return isTwoCNChar(child) ? /*#__PURE__*/_react_17_0_2_react.createElement("span", null, child.split('').join(SPACE)) : /*#__PURE__*/_react_17_0_2_react.createElement("span", null, child);
}
if ((0,reactNode/* isFragment */.M2)(child)) {
return /*#__PURE__*/_react_17_0_2_react.createElement("span", null, child);
}
return child;
}
function spaceChildren(children, needInserted) {
let isPrevChildPure = false;
const childList = [];
_react_17_0_2_react.Children.forEach(children, child => {
const type = typeof child;
const isCurrentChildPure = type === 'string' || type === 'number';
if (isPrevChildPure && isCurrentChildPure) {
const lastIndex = childList.length - 1;
const lastChild = childList[lastIndex];
childList[lastIndex] = `${lastChild}${child}`;
} else {
childList.push(child);
}
isPrevChildPure = isCurrentChildPure;
});
return _react_17_0_2_react.Children.map(childList, child => splitCNCharsBySpace(child, needInserted));
}
const ButtonTypes = (/* unused pure expression or super */ null && (['default', 'primary', 'dashed', 'link', 'text']));
const ButtonShapes = (/* unused pure expression or super */ null && (['default', 'circle', 'round']));
const ButtonHTMLTypes = (/* unused pure expression or super */ null && (['submit', 'button', 'reset']));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/button/IconWrapper.js
"use client";
const IconWrapper = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)((props, ref) => {
const {
className,
style,
children,
prefixCls
} = props;
const iconWrapperCls = _classnames_2_5_1_classnames_default()(`${prefixCls}-icon`, className);
return /*#__PURE__*/_react_17_0_2_react.createElement("span", {
ref: ref,
className: iconWrapperCls,
style: style
}, children);
});
/* harmony default export */ var button_IconWrapper = (IconWrapper);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
var LoadingOutlined = __webpack_require__(45161);
// EXTERNAL MODULE: ./node_modules/_rc-motion@2.9.0@rc-motion/es/index.js + 12 modules
var es = __webpack_require__(44516);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/button/LoadingIcon.js
"use client";
const InnerLoadingIcon = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)((_ref, ref) => {
let {
prefixCls,
className,
style,
iconClassName
} = _ref;
const mergedIconCls = _classnames_2_5_1_classnames_default()(`${prefixCls}-loading-icon`, className);
return /*#__PURE__*/_react_17_0_2_react.createElement(button_IconWrapper, {
prefixCls: prefixCls,
className: mergedIconCls,
style: style,
ref: ref
}, /*#__PURE__*/_react_17_0_2_react.createElement(LoadingOutlined/* default */.Z, {
className: iconClassName
}));
});
const getCollapsedWidth = () => ({
width: 0,
opacity: 0,
transform: 'scale(0)'
});
const getRealWidth = node => ({
width: node.scrollWidth,
opacity: 1,
transform: 'scale(1)'
});
const LoadingIcon = props => {
const {
prefixCls,
loading,
existIcon,
className,
style
} = props;
const visible = !!loading;
if (existIcon) {
return /*#__PURE__*/_react_17_0_2_react.createElement(InnerLoadingIcon, {
prefixCls: prefixCls,
className: className,
style: style
});
}
return /*#__PURE__*/_react_17_0_2_react.createElement(es["default"], {
visible: visible,
// We do not really use this motionName
motionName: `${prefixCls}-loading-icon-motion`,
removeOnLeave: true,
onAppearStart: getCollapsedWidth,
onAppearActive: getRealWidth,
onEnterStart: getCollapsedWidth,
onEnterActive: getRealWidth,
onLeaveStart: getRealWidth,
onLeaveActive: getCollapsedWidth
}, (_ref2, ref) => {
let {
className: motionCls,
style: motionStyle
} = _ref2;
return /*#__PURE__*/_react_17_0_2_react.createElement(InnerLoadingIcon, {
prefixCls: prefixCls,
className: className,
style: Object.assign(Object.assign({}, style), motionStyle),
ref: ref,
iconClassName: motionCls
});
});
};
/* harmony default export */ var button_LoadingIcon = (LoadingIcon);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/button/style/group.js
const genButtonBorderStyle = (buttonTypeCls, borderColor) => ({
// Border
[`> span, > ${buttonTypeCls}`]: {
'&:not(:last-child)': {
[`&, & > ${buttonTypeCls}`]: {
'&:not(:disabled)': {
borderInlineEndColor: borderColor
}
}
},
'&:not(:first-child)': {
[`&, & > ${buttonTypeCls}`]: {
'&:not(:disabled)': {
borderInlineStartColor: borderColor
}
}
}
}
});
const genGroupStyle = token => {
const {
componentCls,
fontSize,
lineWidth,
groupBorderColor,
colorErrorHover
} = token;
return {
[`${componentCls}-group`]: [{
position: 'relative',
display: 'inline-flex',
// Border
[`> span, > ${componentCls}`]: {
'&:not(:last-child)': {
[`&, & > ${componentCls}`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
'&:not(:first-child)': {
marginInlineStart: -lineWidth,
[`&, & > ${componentCls}`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
}
},
[componentCls]: {
position: 'relative',
zIndex: 1,
[`&:hover,
&:focus,
&:active`]: {
zIndex: 2
},
'&[disabled]': {
zIndex: 0
}
},
[`${componentCls}-icon-only`]: {
fontSize
}
},
// Border Color
genButtonBorderStyle(`${componentCls}-primary`, groupBorderColor), genButtonBorderStyle(`${componentCls}-danger`, colorErrorHover)]
};
};
/* harmony default export */ var group = (genGroupStyle);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/button/style/index.js
// ============================== Shared ==============================
const genSharedButtonStyle = token => {
const {
componentCls,
iconCls,
fontWeight
} = token;
return {
[componentCls]: {
outline: 'none',
position: 'relative',
display: 'inline-block',
fontWeight,
whiteSpace: 'nowrap',
textAlign: 'center',
backgroundImage: 'none',
backgroundColor: 'transparent',
border: `${token.lineWidth}px ${token.lineType} transparent`,
cursor: 'pointer',
transition: `all ${token.motionDurationMid} ${token.motionEaseInOut}`,
userSelect: 'none',
touchAction: 'manipulation',
lineHeight: token.lineHeight,
color: token.colorText,
'&:disabled > *': {
pointerEvents: 'none'
},
'> span': {
display: 'inline-block'
},
[`${componentCls}-icon`]: {
lineHeight: 0
},
// Leave a space between icon and text.
[`> ${iconCls} + span, > span + ${iconCls}`]: {
marginInlineStart: token.marginXS
},
[`&:not(${componentCls}-icon-only) > ${componentCls}-icon`]: {
[`&${componentCls}-loading-icon, &:not(:last-child)`]: {
marginInlineEnd: token.marginXS
}
},
'> a': {
color: 'currentColor'
},
'&:not(:disabled)': Object.assign({}, (0,style/* genFocusStyle */.Qy)(token)),
// make `btn-icon-only` not too narrow
[`&-icon-only${componentCls}-compact-item`]: {
flex: 'none'
},
// Special styles for Primary Button
[`&-compact-item${componentCls}-primary`]: {
[`&:not([disabled]) + ${componentCls}-compact-item${componentCls}-primary:not([disabled])`]: {
position: 'relative',
'&:before': {
position: 'absolute',
top: -token.lineWidth,
insetInlineStart: -token.lineWidth,
display: 'inline-block',
width: token.lineWidth,
height: `calc(100% + ${token.lineWidth * 2}px)`,
backgroundColor: token.colorPrimaryHover,
content: '""'
}
}
},
// Special styles for Primary Button
'&-compact-vertical-item': {
[`&${componentCls}-primary`]: {
[`&:not([disabled]) + ${componentCls}-compact-vertical-item${componentCls}-primary:not([disabled])`]: {
position: 'relative',
'&:before': {
position: 'absolute',
top: -token.lineWidth,
insetInlineStart: -token.lineWidth,
display: 'inline-block',
width: `calc(100% + ${token.lineWidth * 2}px)`,
height: token.lineWidth,
backgroundColor: token.colorPrimaryHover,
content: '""'
}
}
}
}
}
};
};
const genHoverActiveButtonStyle = (btnCls, hoverStyle, activeStyle) => ({
[`&:not(:disabled):not(${btnCls}-disabled)`]: {
'&:hover': hoverStyle,
'&:active': activeStyle
}
});
// ============================== Shape ===============================
const genCircleButtonStyle = token => ({
minWidth: token.controlHeight,
paddingInlineStart: 0,
paddingInlineEnd: 0,
borderRadius: '50%'
});
const genRoundButtonStyle = token => ({
borderRadius: token.controlHeight,
paddingInlineStart: token.controlHeight / 2,
paddingInlineEnd: token.controlHeight / 2
});
// =============================== Type ===============================
const genDisabledStyle = token => ({
cursor: 'not-allowed',
borderColor: token.borderColorDisabled,
color: token.colorTextDisabled,
backgroundColor: token.colorBgContainerDisabled,
boxShadow: 'none'
});
const genGhostButtonStyle = (btnCls, background, textColor, borderColor, textColorDisabled, borderColorDisabled, hoverStyle, activeStyle) => ({
[`&${btnCls}-background-ghost`]: Object.assign(Object.assign({
color: textColor || undefined,
backgroundColor: background,
borderColor: borderColor || undefined,
boxShadow: 'none'
}, genHoverActiveButtonStyle(btnCls, Object.assign({
backgroundColor: background
}, hoverStyle), Object.assign({
backgroundColor: background
}, activeStyle))), {
'&:disabled': {
cursor: 'not-allowed',
color: textColorDisabled || undefined,
borderColor: borderColorDisabled || undefined
}
})
});
const genSolidDisabledButtonStyle = token => ({
[`&:disabled, &${token.componentCls}-disabled`]: Object.assign({}, genDisabledStyle(token))
});
const genSolidButtonStyle = token => Object.assign({}, genSolidDisabledButtonStyle(token));
const genPureDisabledButtonStyle = token => ({
[`&:disabled, &${token.componentCls}-disabled`]: {
cursor: 'not-allowed',
color: token.colorTextDisabled
}
});
// Type: Default
const genDefaultButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genSolidButtonStyle(token)), {
backgroundColor: token.defaultBg,
borderColor: token.defaultBorderColor,
color: token.defaultColor,
boxShadow: token.defaultShadow
}), genHoverActiveButtonStyle(token.componentCls, {
color: token.colorPrimaryHover,
borderColor: token.colorPrimaryHover
}, {
color: token.colorPrimaryActive,
borderColor: token.colorPrimaryActive
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.defaultGhostColor, token.defaultGhostBorderColor, token.colorTextDisabled, token.colorBorder)), {
[`&${token.componentCls}-dangerous`]: Object.assign(Object.assign(Object.assign({
color: token.colorError,
borderColor: token.colorError
}, genHoverActiveButtonStyle(token.componentCls, {
color: token.colorErrorHover,
borderColor: token.colorErrorBorderHover
}, {
color: token.colorErrorActive,
borderColor: token.colorErrorActive
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder)), genSolidDisabledButtonStyle(token))
});
// Type: Primary
const genPrimaryButtonStyle = token => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, genSolidButtonStyle(token)), {
color: token.primaryColor,
backgroundColor: token.colorPrimary,
boxShadow: token.primaryShadow
}), genHoverActiveButtonStyle(token.componentCls, {
color: token.colorTextLightSolid,
backgroundColor: token.colorPrimaryHover
}, {
color: token.colorTextLightSolid,
backgroundColor: token.colorPrimaryActive
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorPrimary, token.colorPrimary, token.colorTextDisabled, token.colorBorder, {
color: token.colorPrimaryHover,
borderColor: token.colorPrimaryHover
}, {
color: token.colorPrimaryActive,
borderColor: token.colorPrimaryActive
})), {
[`&${token.componentCls}-dangerous`]: Object.assign(Object.assign(Object.assign({
backgroundColor: token.colorError,
boxShadow: token.dangerShadow,
color: token.dangerColor
}, genHoverActiveButtonStyle(token.componentCls, {
backgroundColor: token.colorErrorHover
}, {
backgroundColor: token.colorErrorActive
})), genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorError, token.colorError, token.colorTextDisabled, token.colorBorder, {
color: token.colorErrorHover,
borderColor: token.colorErrorHover
}, {
color: token.colorErrorActive,
borderColor: token.colorErrorActive
})), genSolidDisabledButtonStyle(token))
});
// Type: Dashed
const genDashedButtonStyle = token => Object.assign(Object.assign({}, genDefaultButtonStyle(token)), {
borderStyle: 'dashed'
});
// Type: Link
const genLinkButtonStyle = token => Object.assign(Object.assign(Object.assign({
color: token.colorLink
}, genHoverActiveButtonStyle(token.componentCls, {
color: token.colorLinkHover,
backgroundColor: token.linkHoverBg
}, {
color: token.colorLinkActive
})), genPureDisabledButtonStyle(token)), {
[`&${token.componentCls}-dangerous`]: Object.assign(Object.assign({
color: token.colorError
}, genHoverActiveButtonStyle(token.componentCls, {
color: token.colorErrorHover
}, {
color: token.colorErrorActive
})), genPureDisabledButtonStyle(token))
});
// Type: Text
const genTextButtonStyle = token => Object.assign(Object.assign(Object.assign({}, genHoverActiveButtonStyle(token.componentCls, {
color: token.colorText,
backgroundColor: token.textHoverBg
}, {
color: token.colorText,
backgroundColor: token.colorBgTextActive
})), genPureDisabledButtonStyle(token)), {
[`&${token.componentCls}-dangerous`]: Object.assign(Object.assign({
color: token.colorError
}, genPureDisabledButtonStyle(token)), genHoverActiveButtonStyle(token.componentCls, {
color: token.colorErrorHover,
backgroundColor: token.colorErrorBg
}, {
color: token.colorErrorHover,
backgroundColor: token.colorErrorBg
}))
});
const genTypeButtonStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-default`]: genDefaultButtonStyle(token),
[`${componentCls}-primary`]: genPrimaryButtonStyle(token),
[`${componentCls}-dashed`]: genDashedButtonStyle(token),
[`${componentCls}-link`]: genLinkButtonStyle(token),
[`${componentCls}-text`]: genTextButtonStyle(token),
[`${componentCls}-ghost`]: genGhostButtonStyle(token.componentCls, token.ghostBg, token.colorBgContainer, token.colorBgContainer, token.colorTextDisabled, token.colorBorder)
};
};
// =============================== Size ===============================
const genSizeButtonStyle = function (token) {
let sizePrefixCls = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
const {
componentCls,
controlHeight,
fontSize,
lineHeight,
lineWidth,
borderRadius,
buttonPaddingHorizontal,
iconCls
} = token;
const paddingVertical = Math.max(0, (controlHeight - fontSize * lineHeight) / 2 - lineWidth);
const iconOnlyCls = `${componentCls}-icon-only`;
return [
// Size
{
[`${componentCls}${sizePrefixCls}`]: {
fontSize,
height: controlHeight,
padding: `${paddingVertical}px ${buttonPaddingHorizontal}px`,
borderRadius,
[`&${iconOnlyCls}`]: {
width: controlHeight,
paddingInlineStart: 0,
paddingInlineEnd: 0,
[`&${componentCls}-round`]: {
width: 'auto'
},
[iconCls]: {
fontSize: token.buttonIconOnlyFontSize
}
},
// Loading
[`&${componentCls}-loading`]: {
opacity: token.opacityLoading,
cursor: 'default'
},
[`${componentCls}-loading-icon`]: {
transition: `width ${token.motionDurationSlow} ${token.motionEaseInOut}, opacity ${token.motionDurationSlow} ${token.motionEaseInOut}`
}
}
},
// Shape - patch prefixCls again to override solid border radius style
{
[`${componentCls}${componentCls}-circle${sizePrefixCls}`]: genCircleButtonStyle(token)
}, {
[`${componentCls}${componentCls}-round${sizePrefixCls}`]: genRoundButtonStyle(token)
}];
};
const genSizeBaseButtonStyle = token => genSizeButtonStyle((0,statistic/* merge */.TS)(token, {
fontSize: token.contentFontSize
}));
const genSizeSmallButtonStyle = token => {
const smallToken = (0,statistic/* merge */.TS)(token, {
controlHeight: token.controlHeightSM,
fontSize: token.contentFontSizeSM,
padding: token.paddingXS,
buttonPaddingHorizontal: token.paddingInlineSM,
borderRadius: token.borderRadiusSM,
buttonIconOnlyFontSize: token.onlyIconSizeSM
});
return genSizeButtonStyle(smallToken, `${token.componentCls}-sm`);
};
const genSizeLargeButtonStyle = token => {
const largeToken = (0,statistic/* merge */.TS)(token, {
controlHeight: token.controlHeightLG,
fontSize: token.contentFontSizeLG,
buttonPaddingHorizontal: token.paddingInlineLG,
borderRadius: token.borderRadiusLG,
buttonIconOnlyFontSize: token.onlyIconSizeLG
});
return genSizeButtonStyle(largeToken, `${token.componentCls}-lg`);
};
const genBlockButtonStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
[`&${componentCls}-block`]: {
width: '100%'
}
}
};
};
// ============================== Export ==============================
const prepareToken = token => {
const {
paddingInline,
onlyIconSize
} = token;
const buttonToken = (0,statistic/* merge */.TS)(token, {
buttonPaddingHorizontal: paddingInline,
buttonIconOnlyFontSize: onlyIconSize
});
return buttonToken;
};
const prepareComponentToken = token => ({
fontWeight: 400,
defaultShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlTmpOutline}`,
primaryShadow: `0 ${token.controlOutlineWidth}px 0 ${token.controlOutline}`,
dangerShadow: `0 ${token.controlOutlineWidth}px 0 ${token.colorErrorOutline}`,
primaryColor: token.colorTextLightSolid,
dangerColor: token.colorTextLightSolid,
borderColorDisabled: token.colorBorder,
defaultGhostColor: token.colorBgContainer,
ghostBg: 'transparent',
defaultGhostBorderColor: token.colorBgContainer,
paddingInline: token.paddingContentHorizontal - token.lineWidth,
paddingInlineLG: token.paddingContentHorizontal - token.lineWidth,
paddingInlineSM: 8 - token.lineWidth,
onlyIconSize: token.fontSizeLG,
onlyIconSizeSM: token.fontSizeLG - 2,
onlyIconSizeLG: token.fontSizeLG + 2,
groupBorderColor: token.colorPrimaryHover,
linkHoverBg: 'transparent',
textHoverBg: token.colorBgTextHover,
defaultColor: token.colorText,
defaultBg: token.colorBgContainer,
defaultBorderColor: token.colorBorder,
defaultBorderColorDisabled: token.colorBorder,
contentFontSize: token.fontSize,
contentFontSizeSM: token.fontSize,
contentFontSizeLG: token.fontSizeLG
});
/* harmony default export */ var button_style = ((0,genComponentStyleHook/* default */.Z)('Button', token => {
const buttonToken = prepareToken(token);
return [
// Shared
genSharedButtonStyle(buttonToken),
// Size
genSizeSmallButtonStyle(buttonToken), genSizeBaseButtonStyle(buttonToken), genSizeLargeButtonStyle(buttonToken),
// Block
genBlockButtonStyle(buttonToken),
// Group (type, ghost, danger, loading)
genTypeButtonStyle(buttonToken),
// Button Group
group(buttonToken)];
}, prepareComponentToken));
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/compact-item.js
var compact_item = __webpack_require__(74207);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/style/compact-item-vertical.js
function compactItemVerticalBorder(token, parentCls) {
return {
// border collapse
[`&-item:not(${parentCls}-last-item)`]: {
marginBottom: -token.lineWidth
},
'&-item': {
'&:hover,&:focus,&:active': {
zIndex: 2
},
'&[disabled]': {
zIndex: 0
}
}
};
}
function compactItemBorderVerticalRadius(prefixCls, parentCls) {
return {
[`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item)`]: {
borderRadius: 0
},
[`&-item${parentCls}-first-item:not(${parentCls}-last-item)`]: {
[`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
borderEndEndRadius: 0,
borderEndStartRadius: 0
}
},
[`&-item${parentCls}-last-item:not(${parentCls}-first-item)`]: {
[`&, &${prefixCls}-sm, &${prefixCls}-lg`]: {
borderStartStartRadius: 0,
borderStartEndRadius: 0
}
}
};
}
function genCompactItemVerticalStyle(token) {
const compactCls = `${token.componentCls}-compact-vertical`;
return {
[compactCls]: Object.assign(Object.assign({}, compactItemVerticalBorder(token, compactCls)), compactItemBorderVerticalRadius(token.componentCls, compactCls))
};
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/button/style/compactCmp.js
// Style as inline component
// ============================== Export ==============================
/* harmony default export */ var compactCmp = ((0,genComponentStyleHook/* genSubStyleComponent */.b)(['Button', 'compact'], token => {
const buttonToken = prepareToken(token);
return [
// Space Compact
(0,compact_item/* genCompactItemStyle */.c)(buttonToken), genCompactItemVerticalStyle(buttonToken)];
}, prepareComponentToken));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/button/button.js
"use client";
var button_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
/* eslint-disable react/button-has-type */
function convertLegacyProps(type) {
if (type === 'danger') {
return {
danger: true
};
}
return {
type
};
}
function getLoadingConfig(loading) {
if (typeof loading === 'object' && loading) {
const delay = loading === null || loading === void 0 ? void 0 : loading.delay;
const isDelay = !Number.isNaN(delay) && typeof delay === 'number';
return {
loading: false,
delay: isDelay ? delay : 0
};
}
return {
loading: !!loading,
delay: 0
};
}
const InternalButton = (props, ref) => {
var _a, _b;
const {
loading = false,
prefixCls: customizePrefixCls,
type = 'default',
danger,
shape = 'default',
size: customizeSize,
styles,
disabled: customDisabled,
className,
rootClassName,
children,
icon,
ghost = false,
block = false,
// React does not recognize the `htmlType` prop on a DOM element. Here we pick it out of `rest`.
htmlType = 'button',
classNames: customClassNames,
style: customStyle = {}
} = props,
rest = button_rest(props, ["loading", "prefixCls", "type", "danger", "shape", "size", "styles", "disabled", "className", "rootClassName", "children", "icon", "ghost", "block", "htmlType", "classNames", "style"]);
const {
getPrefixCls,
autoInsertSpaceInButton,
direction,
button
} = (0,_react_17_0_2_react.useContext)(context/* ConfigContext */.E_);
const prefixCls = getPrefixCls('btn', customizePrefixCls);
const [wrapSSR, hashId] = button_style(prefixCls);
const disabled = (0,_react_17_0_2_react.useContext)(DisabledContext/* default */.Z);
const mergedDisabled = customDisabled !== null && customDisabled !== void 0 ? customDisabled : disabled;
const groupSize = (0,_react_17_0_2_react.useContext)(GroupSizeContext);
const loadingOrDelay = (0,_react_17_0_2_react.useMemo)(() => getLoadingConfig(loading), [loading]);
const [innerLoading, setLoading] = (0,_react_17_0_2_react.useState)(loadingOrDelay.loading);
const [hasTwoCNChar, setHasTwoCNChar] = (0,_react_17_0_2_react.useState)(false);
const internalRef = /*#__PURE__*/(0,_react_17_0_2_react.createRef)();
const buttonRef = (0,es_ref/* composeRef */.sQ)(ref, internalRef);
const needInserted = _react_17_0_2_react.Children.count(children) === 1 && !icon && !isUnBorderedButtonType(type);
(0,_react_17_0_2_react.useEffect)(() => {
let delayTimer = null;
if (loadingOrDelay.delay > 0) {
delayTimer = setTimeout(() => {
delayTimer = null;
setLoading(true);
}, loadingOrDelay.delay);
} else {
setLoading(loadingOrDelay.loading);
}
function cleanupTimer() {
if (delayTimer) {
clearTimeout(delayTimer);
delayTimer = null;
}
}
return cleanupTimer;
}, [loadingOrDelay]);
(0,_react_17_0_2_react.useEffect)(() => {
// FIXME: for HOC usage like
if (!buttonRef || !buttonRef.current || autoInsertSpaceInButton === false) {
return;
}
const buttonText = buttonRef.current.textContent;
if (needInserted && isTwoCNChar(buttonText)) {
if (!hasTwoCNChar) {
setHasTwoCNChar(true);
}
} else if (hasTwoCNChar) {
setHasTwoCNChar(false);
}
}, [buttonRef]);
const handleClick = e => {
const {
onClick
} = props;
// FIXME: https://github.com/ant-design/ant-design/issues/30207
if (innerLoading || mergedDisabled) {
e.preventDefault();
return;
}
onClick === null || onClick === void 0 ? void 0 : onClick(e);
};
false ? 0 : void 0;
false ? 0 : void 0;
const autoInsertSpace = autoInsertSpaceInButton !== false;
const {
compactSize,
compactItemClassnames
} = (0,Compact/* useCompactItemContext */.ri)(prefixCls, direction);
const sizeClassNameMap = {
large: 'lg',
small: 'sm',
middle: undefined
};
const sizeFullName = (0,useSize/* default */.Z)(ctxSize => {
var _a, _b;
return (_b = (_a = customizeSize !== null && customizeSize !== void 0 ? customizeSize : compactSize) !== null && _a !== void 0 ? _a : groupSize) !== null && _b !== void 0 ? _b : ctxSize;
});
const sizeCls = sizeFullName ? sizeClassNameMap[sizeFullName] || '' : '';
const iconType = innerLoading ? 'loading' : icon;
const linkButtonRestProps = (0,omit/* default */.Z)(rest, ['navigate']);
const classes = _classnames_2_5_1_classnames_default()(prefixCls, hashId, {
[`${prefixCls}-${shape}`]: shape !== 'default' && shape,
[`${prefixCls}-${type}`]: type,
[`${prefixCls}-${sizeCls}`]: sizeCls,
[`${prefixCls}-icon-only`]: !children && children !== 0 && !!iconType,
[`${prefixCls}-background-ghost`]: ghost && !isUnBorderedButtonType(type),
[`${prefixCls}-loading`]: innerLoading,
[`${prefixCls}-two-chinese-chars`]: hasTwoCNChar && autoInsertSpace && !innerLoading,
[`${prefixCls}-block`]: block,
[`${prefixCls}-dangerous`]: !!danger,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, compactItemClassnames, className, rootClassName, button === null || button === void 0 ? void 0 : button.className);
const fullStyle = Object.assign(Object.assign({}, button === null || button === void 0 ? void 0 : button.style), customStyle);
const iconClasses = _classnames_2_5_1_classnames_default()(customClassNames === null || customClassNames === void 0 ? void 0 : customClassNames.icon, (_a = button === null || button === void 0 ? void 0 : button.classNames) === null || _a === void 0 ? void 0 : _a.icon);
const iconStyle = Object.assign(Object.assign({}, (styles === null || styles === void 0 ? void 0 : styles.icon) || {}), ((_b = button === null || button === void 0 ? void 0 : button.styles) === null || _b === void 0 ? void 0 : _b.icon) || {});
const iconNode = icon && !innerLoading ? /*#__PURE__*/_react_17_0_2_react.createElement(button_IconWrapper, {
prefixCls: prefixCls,
className: iconClasses,
style: iconStyle
}, icon) : /*#__PURE__*/_react_17_0_2_react.createElement(button_LoadingIcon, {
existIcon: !!icon,
prefixCls: prefixCls,
loading: !!innerLoading
});
const kids = children || children === 0 ? spaceChildren(children, needInserted && autoInsertSpace) : null;
if (linkButtonRestProps.href !== undefined) {
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement("a", Object.assign({}, linkButtonRestProps, {
className: _classnames_2_5_1_classnames_default()(classes, {
[`${prefixCls}-disabled`]: mergedDisabled
}),
style: fullStyle,
onClick: handleClick,
ref: buttonRef
}), iconNode, kids));
}
let buttonNode = /*#__PURE__*/_react_17_0_2_react.createElement("button", Object.assign({}, rest, {
type: htmlType,
className: classes,
style: fullStyle,
onClick: handleClick,
disabled: mergedDisabled,
ref: buttonRef
}), iconNode, kids, compactItemClassnames && /*#__PURE__*/_react_17_0_2_react.createElement(compactCmp, {
key: "compact",
prefixCls: prefixCls
}));
if (!isUnBorderedButtonType(type)) {
buttonNode = /*#__PURE__*/_react_17_0_2_react.createElement(wave/* default */.Z, {
component: "Button",
disabled: !!innerLoading
}, buttonNode);
}
return wrapSSR(buttonNode);
};
const Button = /*#__PURE__*/(0,_react_17_0_2_react.forwardRef)(InternalButton);
if (false) {}
Button.Group = button_group;
Button.__ANT_BUTTON = true;
/* harmony default export */ var button_button = (Button);
/***/ }),
/***/ 3113:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/button/index.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _button__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./button */ 67797);
"use client";
/* harmony default export */ __webpack_exports__.ZP = (_button__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z);
/***/ }),
/***/ 43604:
/*!*******************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/col/index.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../grid */ 37028);
"use client";
/* harmony default export */ __webpack_exports__.Z = (_grid__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z);
/***/ }),
/***/ 1684:
/*!*****************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js ***!
\*****************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ n: function() { return /* binding */ DisabledContextProvider; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
"use client";
const DisabledContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(false);
const DisabledContextProvider = _ref => {
let {
children,
disabled
} = _ref;
const originDisabled = react__WEBPACK_IMPORTED_MODULE_0__.useContext(DisabledContext);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(DisabledContext.Provider, {
value: disabled !== null && disabled !== void 0 ? disabled : originDisabled
}, children);
};
/* harmony default export */ __webpack_exports__.Z = (DisabledContext);
/***/ }),
/***/ 52946:
/*!*************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/config-provider/SizeContext.js ***!
\*************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ q: function() { return /* binding */ SizeContextProvider; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
"use client";
const SizeContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(undefined);
const SizeContextProvider = _ref => {
let {
children,
size
} = _ref;
const originSize = react__WEBPACK_IMPORTED_MODULE_0__.useContext(SizeContext);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(SizeContext.Provider, {
value: size || originSize
}, children);
};
/* harmony default export */ __webpack_exports__.Z = (SizeContext);
/***/ }),
/***/ 36355:
/*!*********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js ***!
\*********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ E_: function() { return /* binding */ ConfigContext; },
/* harmony export */ oR: function() { return /* binding */ defaultIconPrefixCls; }
/* harmony export */ });
/* unused harmony export ConfigConsumer */
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
const defaultIconPrefixCls = 'anticon';
const defaultGetPrefixCls = (suffixCls, customizePrefixCls) => {
if (customizePrefixCls) {
return customizePrefixCls;
}
return suffixCls ? `ant-${suffixCls}` : 'ant';
};
// zombieJ: 🚨 Do not pass `defaultRenderEmpty` here since it will cause circular dependency.
const ConfigContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({
// We provide a default function for Context without provider
getPrefixCls: defaultGetPrefixCls,
iconPrefixCls: defaultIconPrefixCls
});
const {
Consumer: ConfigConsumer
} = ConfigContext;
/***/ }),
/***/ 19716:
/*!***************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useSize.js ***!
\***************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _SizeContext__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../SizeContext */ 52946);
const useSize = customSize => {
const size = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_SizeContext__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z);
const mergedSize = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
if (!customSize) {
return size;
}
if (typeof customSize === 'string') {
return customSize !== null && customSize !== void 0 ? customSize : size;
}
if (customSize instanceof Function) {
return customSize(size);
}
return size;
}, [customSize, size]);
return mergedSize;
};
/* harmony default export */ __webpack_exports__.Z = (useSize);
/***/ }),
/***/ 92736:
/*!*******************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/config-provider/index.js + 5 modules ***!
\*******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
ZP: function() { return /* binding */ config_provider; },
w6: function() { return /* binding */ globalConfig; }
});
// UNUSED EXPORTS: ConfigConsumer, ConfigContext, configConsumerProps, defaultIconPrefixCls, defaultPrefixCls, warnContext
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.4@@ant-design/cssinjs/es/index.js + 35 modules
var es = __webpack_require__(78600);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/components/Context.js
var Context = __webpack_require__(11260);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/hooks/useMemo.js
var useMemo = __webpack_require__(64913);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/utils/set.js
var set = __webpack_require__(1635);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/validateMessagesContext.js
var validateMessagesContext = __webpack_require__(28726);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/locale.js
var modal_locale = __webpack_require__(98044);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/context.js
var locale_context = __webpack_require__(41887);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/index.js
"use client";
const ANT_MARK = 'internalMark';
const LocaleProvider = props => {
const {
locale = {},
children,
_ANT_MARK__
} = props;
if (false) {}
_react_17_0_2_react.useEffect(() => {
const clearLocale = (0,modal_locale/* changeConfirmLocale */.f)(locale && locale.Modal);
return clearLocale;
}, [locale]);
const getMemoizedContextValue = _react_17_0_2_react.useMemo(() => Object.assign(Object.assign({}, locale), {
exist: true
}), [locale]);
return /*#__PURE__*/_react_17_0_2_react.createElement(locale_context/* default */.Z.Provider, {
value: getMemoizedContextValue
}, children);
};
if (false) {}
/* harmony default export */ var es_locale = (LocaleProvider);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/en_US.js + 1 modules
var en_US = __webpack_require__(31724);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/context.js + 10 modules
var context = __webpack_require__(45246);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/seed.js
var seed = __webpack_require__(34117);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var config_provider_context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_@ant-design_colors@7.0.2@@ant-design/colors/es/index.js + 1 modules
var colors_es = __webpack_require__(10129);
// EXTERNAL MODULE: ./node_modules/_@ctrl_tinycolor@3.6.1@@ctrl/tinycolor/dist/module/index.js
var dist_module = __webpack_require__(64993);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/Dom/canUseDom.js
var canUseDom = __webpack_require__(10254);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/Dom/dynamicCSS.js
var dynamicCSS = __webpack_require__(98052);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/cssVariables.js
/* eslint-disable import/prefer-default-export, prefer-destructuring */
const dynamicStyleMark = `-ant-${Date.now()}-${Math.random()}`;
function getStyle(globalPrefixCls, theme) {
const variables = {};
const formatColor = (color, updater) => {
let clone = color.clone();
clone = (updater === null || updater === void 0 ? void 0 : updater(clone)) || clone;
return clone.toRgbString();
};
const fillColor = (colorVal, type) => {
const baseColor = new dist_module/* TinyColor */.C(colorVal);
const colorPalettes = (0,colors_es.generate)(baseColor.toRgbString());
variables[`${type}-color`] = formatColor(baseColor);
variables[`${type}-color-disabled`] = colorPalettes[1];
variables[`${type}-color-hover`] = colorPalettes[4];
variables[`${type}-color-active`] = colorPalettes[6];
variables[`${type}-color-outline`] = baseColor.clone().setAlpha(0.2).toRgbString();
variables[`${type}-color-deprecated-bg`] = colorPalettes[0];
variables[`${type}-color-deprecated-border`] = colorPalettes[2];
};
// ================ Primary Color ================
if (theme.primaryColor) {
fillColor(theme.primaryColor, 'primary');
const primaryColor = new dist_module/* TinyColor */.C(theme.primaryColor);
const primaryColors = (0,colors_es.generate)(primaryColor.toRgbString());
// Legacy - We should use semantic naming standard
primaryColors.forEach((color, index) => {
variables[`primary-${index + 1}`] = color;
});
// Deprecated
variables['primary-color-deprecated-l-35'] = formatColor(primaryColor, c => c.lighten(35));
variables['primary-color-deprecated-l-20'] = formatColor(primaryColor, c => c.lighten(20));
variables['primary-color-deprecated-t-20'] = formatColor(primaryColor, c => c.tint(20));
variables['primary-color-deprecated-t-50'] = formatColor(primaryColor, c => c.tint(50));
variables['primary-color-deprecated-f-12'] = formatColor(primaryColor, c => c.setAlpha(c.getAlpha() * 0.12));
const primaryActiveColor = new dist_module/* TinyColor */.C(primaryColors[0]);
variables['primary-color-active-deprecated-f-30'] = formatColor(primaryActiveColor, c => c.setAlpha(c.getAlpha() * 0.3));
variables['primary-color-active-deprecated-d-02'] = formatColor(primaryActiveColor, c => c.darken(2));
}
// ================ Success Color ================
if (theme.successColor) {
fillColor(theme.successColor, 'success');
}
// ================ Warning Color ================
if (theme.warningColor) {
fillColor(theme.warningColor, 'warning');
}
// ================= Error Color =================
if (theme.errorColor) {
fillColor(theme.errorColor, 'error');
}
// ================= Info Color ==================
if (theme.infoColor) {
fillColor(theme.infoColor, 'info');
}
// Convert to css variables
const cssList = Object.keys(variables).map(key => `--${globalPrefixCls}-${key}: ${variables[key]};`);
return `
:root {
${cssList.join('\n')}
}
`.trim();
}
function registerTheme(globalPrefixCls, theme) {
const style = getStyle(globalPrefixCls, theme);
if ((0,canUseDom/* default */.Z)()) {
(0,dynamicCSS/* updateCSS */.hq)(style, `${dynamicStyleMark}-dynamic-theme`);
} else {
false ? 0 : void 0;
}
}
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js
var DisabledContext = __webpack_require__(1684);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/SizeContext.js
var SizeContext = __webpack_require__(52946);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useConfig.js
function useConfig() {
const componentDisabled = (0,_react_17_0_2_react.useContext)(DisabledContext/* default */.Z);
const componentSize = (0,_react_17_0_2_react.useContext)(SizeContext/* default */.Z);
return {
componentDisabled,
componentSize
};
}
/* harmony default export */ var hooks_useConfig = (useConfig);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/isEqual.js
var isEqual = __webpack_require__(48897);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/hooks/useTheme.js
function useTheme(theme, parentTheme) {
const themeConfig = theme || {};
const parentThemeConfig = themeConfig.inherit === false || !parentTheme ? context/* defaultConfig */.u_ : parentTheme;
return (0,useMemo/* default */.Z)(() => {
if (!theme) {
return parentTheme;
}
// Override
const mergedComponents = Object.assign({}, parentThemeConfig.components);
Object.keys(theme.components || {}).forEach(componentName => {
mergedComponents[componentName] = Object.assign(Object.assign({}, mergedComponents[componentName]), theme.components[componentName]);
});
// Base token
return Object.assign(Object.assign(Object.assign({}, parentThemeConfig), themeConfig), {
token: Object.assign(Object.assign({}, parentThemeConfig.token), themeConfig.token),
components: mergedComponents
});
}, [themeConfig, parentThemeConfig], (prev, next) => prev.some((prevTheme, index) => {
const nextTheme = next[index];
return !(0,isEqual/* default */.Z)(prevTheme, nextTheme, true);
}));
}
// EXTERNAL MODULE: ./node_modules/_rc-motion@2.9.0@rc-motion/es/index.js + 12 modules
var _rc_motion_2_9_0_rc_motion_es = __webpack_require__(44516);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/useToken.js + 4 modules
var useToken = __webpack_require__(88088);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/MotionWrapper.js
"use client";
function MotionWrapper(props) {
const {
children
} = props;
const [, token] = (0,useToken/* default */.Z)();
const {
motion
} = token;
const needWrapMotionProviderRef = _react_17_0_2_react.useRef(false);
needWrapMotionProviderRef.current = needWrapMotionProviderRef.current || motion === false;
if (needWrapMotionProviderRef.current) {
return /*#__PURE__*/_react_17_0_2_react.createElement(_rc_motion_2_9_0_rc_motion_es.Provider, {
motion: motion
}, children);
}
return children;
}
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/useResetIconStyle.js
var useResetIconStyle = __webpack_require__(73040);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/index.js
"use client";
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;
};
/**
* Since too many feedback using static method like `Modal.confirm` not getting theme, we record the
* theme register info here to help developer get warning info.
*/
let existThemeConfig = false;
const warnContext = (/* unused pure expression or super */ null && ( false ? 0 : /* istanbul ignore next */
null));
const configConsumerProps = (/* unused pure expression or super */ null && (['getTargetContainer', 'getPopupContainer', 'rootPrefixCls', 'getPrefixCls', 'renderEmpty', 'csp', 'autoInsertSpaceInButton', 'locale', 'pageHeader']));
// These props is used by `useContext` directly in sub component
const PASSED_PROPS = ['getTargetContainer', 'getPopupContainer', 'renderEmpty', 'pageHeader', 'input', 'pagination', 'form', 'select', 'button'];
const defaultPrefixCls = 'ant';
let globalPrefixCls;
let globalIconPrefixCls;
let globalTheme;
function getGlobalPrefixCls() {
return globalPrefixCls || defaultPrefixCls;
}
function getGlobalIconPrefixCls() {
return globalIconPrefixCls || config_provider_context/* defaultIconPrefixCls */.oR;
}
function isLegacyTheme(theme) {
return Object.keys(theme).some(key => key.endsWith('Color'));
}
const setGlobalConfig = _ref => {
let {
prefixCls,
iconPrefixCls,
theme
} = _ref;
if (prefixCls !== undefined) {
globalPrefixCls = prefixCls;
}
if (iconPrefixCls !== undefined) {
globalIconPrefixCls = iconPrefixCls;
}
if (theme) {
if (isLegacyTheme(theme)) {
false ? 0 : void 0;
registerTheme(getGlobalPrefixCls(), theme);
} else {
globalTheme = theme;
}
}
};
const globalConfig = () => ({
getPrefixCls: (suffixCls, customizePrefixCls) => {
if (customizePrefixCls) {
return customizePrefixCls;
}
return suffixCls ? `${getGlobalPrefixCls()}-${suffixCls}` : getGlobalPrefixCls();
},
getIconPrefixCls: getGlobalIconPrefixCls,
getRootPrefixCls: () => {
// If Global prefixCls provided, use this
if (globalPrefixCls) {
return globalPrefixCls;
}
// Fallback to default prefixCls
return getGlobalPrefixCls();
},
getTheme: () => globalTheme
});
const ProviderChildren = props => {
const {
children,
csp: customCsp,
autoInsertSpaceInButton,
alert,
anchor,
form,
locale,
componentSize,
direction,
space,
virtual,
dropdownMatchSelectWidth,
popupMatchSelectWidth,
popupOverflow,
legacyLocale,
parentContext,
iconPrefixCls: customIconPrefixCls,
theme,
componentDisabled,
segmented,
statistic,
spin,
calendar,
carousel,
cascader,
collapse,
typography,
checkbox,
descriptions,
divider,
drawer,
skeleton,
steps,
image,
layout,
list,
mentions,
modal,
progress,
result,
slider,
breadcrumb,
menu,
pagination,
input,
empty,
badge,
radio,
rate,
switch: SWITCH,
transfer,
avatar,
message,
tag,
table,
card,
tabs,
timeline,
timePicker,
upload,
notification,
tree,
colorPicker,
datePicker,
wave
} = props;
// =================================== Warning ===================================
if (false) {}
// =================================== Context ===================================
const getPrefixCls = _react_17_0_2_react.useCallback((suffixCls, customizePrefixCls) => {
const {
prefixCls
} = props;
if (customizePrefixCls) {
return customizePrefixCls;
}
const mergedPrefixCls = prefixCls || parentContext.getPrefixCls('');
return suffixCls ? `${mergedPrefixCls}-${suffixCls}` : mergedPrefixCls;
}, [parentContext.getPrefixCls, props.prefixCls]);
const iconPrefixCls = customIconPrefixCls || parentContext.iconPrefixCls || config_provider_context/* defaultIconPrefixCls */.oR;
const shouldWrapSSR = iconPrefixCls !== parentContext.iconPrefixCls;
const csp = customCsp || parentContext.csp;
const wrapSSR = (0,useResetIconStyle/* default */.Z)(iconPrefixCls, csp);
const mergedTheme = useTheme(theme, parentContext.theme);
if (false) {}
const baseConfig = {
csp,
autoInsertSpaceInButton,
alert,
anchor,
locale: locale || legacyLocale,
direction,
space,
virtual,
popupMatchSelectWidth: popupMatchSelectWidth !== null && popupMatchSelectWidth !== void 0 ? popupMatchSelectWidth : dropdownMatchSelectWidth,
popupOverflow,
getPrefixCls,
iconPrefixCls,
theme: mergedTheme,
segmented,
statistic,
spin,
calendar,
carousel,
cascader,
collapse,
typography,
checkbox,
descriptions,
divider,
drawer,
skeleton,
steps,
image,
input,
layout,
list,
mentions,
modal,
progress,
result,
slider,
breadcrumb,
menu,
pagination,
empty,
badge,
radio,
rate,
switch: SWITCH,
transfer,
avatar,
message,
tag,
table,
card,
tabs,
timeline,
timePicker,
upload,
notification,
tree,
colorPicker,
datePicker,
wave
};
const config = Object.assign({}, parentContext);
Object.keys(baseConfig).forEach(key => {
if (baseConfig[key] !== undefined) {
config[key] = baseConfig[key];
}
});
// Pass the props used by `useContext` directly with child component.
// These props should merged into `config`.
PASSED_PROPS.forEach(propName => {
const propValue = props[propName];
if (propValue) {
config[propName] = propValue;
}
});
// https://github.com/ant-design/ant-design/issues/27617
const memoedConfig = (0,useMemo/* default */.Z)(() => config, config, (prevConfig, currentConfig) => {
const prevKeys = Object.keys(prevConfig);
const currentKeys = Object.keys(currentConfig);
return prevKeys.length !== currentKeys.length || prevKeys.some(key => prevConfig[key] !== currentConfig[key]);
});
const memoIconContextValue = _react_17_0_2_react.useMemo(() => ({
prefixCls: iconPrefixCls,
csp
}), [iconPrefixCls, csp]);
let childNode = shouldWrapSSR ? wrapSSR(children) : children;
const validateMessages = _react_17_0_2_react.useMemo(() => {
var _a, _b, _c, _d;
return (0,set/* merge */.T)(((_a = en_US/* default */.Z.Form) === null || _a === void 0 ? void 0 : _a.defaultValidateMessages) || {}, ((_c = (_b = memoedConfig.locale) === null || _b === void 0 ? void 0 : _b.Form) === null || _c === void 0 ? void 0 : _c.defaultValidateMessages) || {}, ((_d = memoedConfig.form) === null || _d === void 0 ? void 0 : _d.validateMessages) || {}, (form === null || form === void 0 ? void 0 : form.validateMessages) || {});
}, [memoedConfig, form === null || form === void 0 ? void 0 : form.validateMessages]);
if (Object.keys(validateMessages).length > 0) {
childNode = /*#__PURE__*/_react_17_0_2_react.createElement(validateMessagesContext/* default */.Z.Provider, {
value: validateMessages
}, children);
}
if (locale) {
childNode = /*#__PURE__*/_react_17_0_2_react.createElement(es_locale, {
locale: locale,
_ANT_MARK__: ANT_MARK
}, childNode);
}
if (iconPrefixCls || csp) {
childNode = /*#__PURE__*/_react_17_0_2_react.createElement(Context/* default */.Z.Provider, {
value: memoIconContextValue
}, childNode);
}
if (componentSize) {
childNode = /*#__PURE__*/_react_17_0_2_react.createElement(SizeContext/* SizeContextProvider */.q, {
size: componentSize
}, childNode);
}
// =================================== Motion ===================================
childNode = /*#__PURE__*/_react_17_0_2_react.createElement(MotionWrapper, null, childNode);
// ================================ Dynamic theme ================================
const memoTheme = _react_17_0_2_react.useMemo(() => {
const _a = mergedTheme || {},
{
algorithm,
token,
components
} = _a,
rest = __rest(_a, ["algorithm", "token", "components"]);
const themeObj = algorithm && (!Array.isArray(algorithm) || algorithm.length > 0) ? (0,es.createTheme)(algorithm) : context/* defaultTheme */.uH;
const parsedComponents = {};
Object.entries(components || {}).forEach(_ref2 => {
let [componentName, componentToken] = _ref2;
const parsedToken = Object.assign({}, componentToken);
if ('algorithm' in parsedToken) {
if (parsedToken.algorithm === true) {
parsedToken.theme = themeObj;
} else if (Array.isArray(parsedToken.algorithm) || typeof parsedToken.algorithm === 'function') {
parsedToken.theme = (0,es.createTheme)(parsedToken.algorithm);
}
delete parsedToken.algorithm;
}
parsedComponents[componentName] = parsedToken;
});
return Object.assign(Object.assign({}, rest), {
theme: themeObj,
token: Object.assign(Object.assign({}, seed/* default */.Z), token),
components: parsedComponents
});
}, [mergedTheme]);
if (theme) {
childNode = /*#__PURE__*/_react_17_0_2_react.createElement(context/* DesignTokenContext */.Mj.Provider, {
value: memoTheme
}, childNode);
}
// =================================== Render ===================================
if (componentDisabled !== undefined) {
childNode = /*#__PURE__*/_react_17_0_2_react.createElement(DisabledContext/* DisabledContextProvider */.n, {
disabled: componentDisabled
}, childNode);
}
return /*#__PURE__*/_react_17_0_2_react.createElement(config_provider_context/* ConfigContext */.E_.Provider, {
value: memoedConfig
}, childNode);
};
const ConfigProvider = props => {
const context = _react_17_0_2_react.useContext(config_provider_context/* ConfigContext */.E_);
const antLocale = _react_17_0_2_react.useContext(locale_context/* default */.Z);
return /*#__PURE__*/_react_17_0_2_react.createElement(ProviderChildren, Object.assign({
parentContext: context,
legacyLocale: antLocale
}, props));
};
ConfigProvider.ConfigContext = config_provider_context/* ConfigContext */.E_;
ConfigProvider.SizeContext = SizeContext/* default */.Z;
ConfigProvider.config = setGlobalConfig;
ConfigProvider.useConfig = hooks_useConfig;
Object.defineProperty(ConfigProvider, 'SizeContext', {
get: () => {
false ? 0 : void 0;
return SizeContext/* default */.Z;
}
});
if (false) {}
/* harmony default export */ var config_provider = (ConfigProvider);
/***/ }),
/***/ 48183:
/*!**********************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/date-picker/locale/en_US.js + 1 modules ***!
\**********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ date_picker_locale_en_US; }
});
;// CONCATENATED MODULE: ./node_modules/_rc-picker@3.13.2@rc-picker/es/locale/en_US.js
var locale = {
locale: 'en_US',
today: 'Today',
now: 'Now',
backToToday: 'Back to today',
ok: 'OK',
clear: 'Clear',
month: 'Month',
year: 'Year',
timeSelect: 'select time',
dateSelect: 'select date',
weekSelect: 'Choose a week',
monthSelect: 'Choose a month',
yearSelect: 'Choose a year',
decadeSelect: 'Choose a decade',
yearFormat: 'YYYY',
dateFormat: 'M/D/YYYY',
dayFormat: 'D',
dateTimeFormat: 'M/D/YYYY HH:mm:ss',
monthBeforeYear: true,
previousMonth: 'Previous month (PageUp)',
nextMonth: 'Next month (PageDown)',
previousYear: 'Last year (Control + left)',
nextYear: 'Next year (Control + right)',
previousDecade: 'Last decade',
nextDecade: 'Next decade',
previousCentury: 'Last century',
nextCentury: 'Next century'
};
/* harmony default export */ var en_US = (locale);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/time-picker/locale/en_US.js
var locale_en_US = __webpack_require__(67532);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/locale/en_US.js
// Merge into a locale object
const en_US_locale = {
lang: Object.assign({
placeholder: 'Select date',
yearPlaceholder: 'Select year',
quarterPlaceholder: 'Select quarter',
monthPlaceholder: 'Select month',
weekPlaceholder: 'Select week',
rangePlaceholder: ['Start date', 'End date'],
rangeYearPlaceholder: ['Start year', 'End year'],
rangeQuarterPlaceholder: ['Start quarter', 'End quarter'],
rangeMonthPlaceholder: ['Start month', 'End month'],
rangeWeekPlaceholder: ['Start week', 'End week']
}, en_US),
timePickerLocale: Object.assign({}, locale_en_US/* default */.Z)
};
// All settings at:
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
/* harmony default export */ var date_picker_locale_en_US = (en_US_locale);
/***/ }),
/***/ 32441:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/form/context.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ RV: function() { return /* binding */ FormProvider; },
/* harmony export */ Rk: function() { return /* binding */ FormItemPrefixContext; },
/* harmony export */ Ux: function() { return /* binding */ NoFormStyle; },
/* harmony export */ aM: function() { return /* binding */ FormItemInputContext; },
/* harmony export */ q3: function() { return /* binding */ FormContext; },
/* harmony export */ qI: function() { return /* binding */ NoStyleItemContext; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var rc_field_form__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-field-form */ 95013);
/* harmony import */ var rc_util_es_omit__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util/es/omit */ 41123);
"use client";
const FormContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({
labelAlign: 'right',
vertical: false,
itemRef: () => {}
});
const NoStyleItemContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext(null);
const FormProvider = props => {
const providerProps = (0,rc_util_es_omit__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(props, ['prefixCls']);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(rc_field_form__WEBPACK_IMPORTED_MODULE_1__.FormProvider, Object.assign({}, providerProps));
};
const FormItemPrefixContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({
prefixCls: ''
});
const FormItemInputContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createContext({});
if (false) {}
const NoFormStyle = _ref => {
let {
children,
status,
override
} = _ref;
const formItemInputContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(FormItemInputContext);
const newFormItemInputContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(() => {
const newContext = Object.assign({}, formItemInputContext);
if (override) {
delete newContext.isFormItemInput;
}
if (status) {
delete newContext.status;
delete newContext.hasFeedback;
delete newContext.feedbackIcon;
}
return newContext;
}, [status, override, formItemInputContext]);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(FormItemInputContext.Provider, {
value: newFormItemInputContext
}, children);
};
/***/ }),
/***/ 28726:
/*!**************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/form/validateMessagesContext.js ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
"use client";
// ZombieJ: We export single file here since
// ConfigProvider use this which will make loop deps
// to import whole `rc-field-form`
/* harmony default export */ __webpack_exports__.Z = (/*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(undefined));
/***/ }),
/***/ 6700:
/*!*************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/grid/RowContext.js ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
const RowContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)({});
/* harmony default export */ __webpack_exports__.Z = (RowContext);
/***/ }),
/***/ 37028:
/*!******************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/grid/col.js ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ 92310);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../config-provider */ 36355);
/* harmony import */ var _RowContext__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./RowContext */ 6700);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style */ 98242);
"use client";
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 `${flex} ${flex} auto`;
}
if (/^\d+(\.\d+)?(px|em|rem|%)$/.test(flex)) {
return `0 0 ${flex}`;
}
return flex;
}
const sizes = ['xs', 'sm', 'md', 'lg', 'xl', 'xxl'];
const Col = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, ref) => {
const {
getPrefixCls,
direction
} = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_2__/* .ConfigContext */ .E_);
const {
gutter,
wrap
} = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_RowContext__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z);
const {
prefixCls: customizePrefixCls,
span,
order,
offset,
push,
pull,
className,
children,
flex,
style
} = props,
others = __rest(props, ["prefixCls", "span", "order", "offset", "push", "pull", "className", "children", "flex", "style"]);
const prefixCls = getPrefixCls('col', customizePrefixCls);
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_4__/* .useColStyle */ .c)(prefixCls);
let sizeClassObj = {};
sizes.forEach(size => {
let sizeProps = {};
const propSize = props[size];
if (typeof propSize === 'number') {
sizeProps.span = propSize;
} else if (typeof propSize === 'object') {
sizeProps = propSize || {};
}
delete others[size];
sizeClassObj = Object.assign(Object.assign({}, sizeClassObj), {
[`${prefixCls}-${size}-${sizeProps.span}`]: sizeProps.span !== undefined,
[`${prefixCls}-${size}-order-${sizeProps.order}`]: sizeProps.order || sizeProps.order === 0,
[`${prefixCls}-${size}-offset-${sizeProps.offset}`]: sizeProps.offset || sizeProps.offset === 0,
[`${prefixCls}-${size}-push-${sizeProps.push}`]: sizeProps.push || sizeProps.push === 0,
[`${prefixCls}-${size}-pull-${sizeProps.pull}`]: sizeProps.pull || sizeProps.pull === 0,
[`${prefixCls}-${size}-flex-${sizeProps.flex}`]: sizeProps.flex || sizeProps.flex === 'auto',
[`${prefixCls}-rtl`]: direction === 'rtl'
});
});
const classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()(prefixCls, {
[`${prefixCls}-${span}`]: span !== undefined,
[`${prefixCls}-order-${order}`]: order,
[`${prefixCls}-offset-${offset}`]: offset,
[`${prefixCls}-push-${push}`]: push,
[`${prefixCls}-pull-${pull}`]: pull
}, className, sizeClassObj, hashId);
const mergedStyle = {};
// Horizontal gutter use padding
if (gutter && gutter[0] > 0) {
const horizontalGutter = gutter[0] / 2;
mergedStyle.paddingLeft = horizontalGutter;
mergedStyle.paddingRight = horizontalGutter;
}
if (flex) {
mergedStyle.flex = parseFlex(flex);
// Hack for Firefox to avoid size issue
// https://github.com/ant-design/ant-design/pull/20023#issuecomment-564389553
if (wrap === false && !mergedStyle.minWidth) {
mergedStyle.minWidth = 0;
}
}
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", Object.assign({}, others, {
style: Object.assign(Object.assign({}, mergedStyle), style),
className: classes,
ref: ref
}), children));
});
if (false) {}
/* harmony default export */ __webpack_exports__.Z = (Col);
/***/ }),
/***/ 27382:
/*!******************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/grid/row.js ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ 92310);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _util_responsiveObserver__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../_util/responsiveObserver */ 69507);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355);
/* harmony import */ var _RowContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./RowContext */ 6700);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./style */ 98242);
"use client";
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;
};
const RowAligns = (/* unused pure expression or super */ null && (['top', 'middle', 'bottom', 'stretch']));
const RowJustify = (/* unused pure expression or super */ null && (['start', 'end', 'center', 'space-around', 'space-between', 'space-evenly']));
function useMergePropByScreen(oriProp, screen) {
const [prop, setProp] = react__WEBPACK_IMPORTED_MODULE_0__.useState(typeof oriProp === 'string' ? oriProp : '');
const calcMergeAlignOrJustify = () => {
if (typeof oriProp === 'string') {
setProp(oriProp);
}
if (typeof oriProp !== 'object') {
return;
}
for (let i = 0; i < _util_responsiveObserver__WEBPACK_IMPORTED_MODULE_2__/* .responsiveArray */ .c4.length; i++) {
const breakpoint = _util_responsiveObserver__WEBPACK_IMPORTED_MODULE_2__/* .responsiveArray */ .c4[i];
// if do not match, do nothing
if (!screen[breakpoint]) {
continue;
}
const curVal = oriProp[breakpoint];
if (curVal !== undefined) {
setProp(curVal);
return;
}
}
};
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
calcMergeAlignOrJustify();
}, [JSON.stringify(oriProp), screen]);
return prop;
}
const Row = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.forwardRef((props, ref) => {
const {
prefixCls: customizePrefixCls,
justify,
align,
className,
style,
children,
gutter = 0,
wrap
} = props,
others = __rest(props, ["prefixCls", "justify", "align", "className", "style", "children", "gutter", "wrap"]);
const {
getPrefixCls,
direction
} = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
const [screens, setScreens] = react__WEBPACK_IMPORTED_MODULE_0__.useState({
xs: true,
sm: true,
md: true,
lg: true,
xl: true,
xxl: true
});
// to save screens info when responsiveObserve callback had been call
const [curScreens, setCurScreens] = react__WEBPACK_IMPORTED_MODULE_0__.useState({
xs: false,
sm: false,
md: false,
lg: false,
xl: false,
xxl: false
});
// ================================== calc responsive data ==================================
const mergeAlign = useMergePropByScreen(align, curScreens);
const mergeJustify = useMergePropByScreen(justify, curScreens);
const gutterRef = react__WEBPACK_IMPORTED_MODULE_0__.useRef(gutter);
const responsiveObserver = (0,_util_responsiveObserver__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .ZP)();
// ================================== Effect ==================================
react__WEBPACK_IMPORTED_MODULE_0__.useEffect(() => {
const token = responsiveObserver.subscribe(screen => {
setCurScreens(screen);
const currentGutter = gutterRef.current || 0;
if (!Array.isArray(currentGutter) && typeof currentGutter === 'object' || Array.isArray(currentGutter) && (typeof currentGutter[0] === 'object' || typeof currentGutter[1] === 'object')) {
setScreens(screen);
}
});
return () => responsiveObserver.unsubscribe(token);
}, []);
// ================================== Render ==================================
const getGutter = () => {
const results = [undefined, undefined];
const normalizedGutter = Array.isArray(gutter) ? gutter : [gutter, undefined];
normalizedGutter.forEach((g, index) => {
if (typeof g === 'object') {
for (let i = 0; i < _util_responsiveObserver__WEBPACK_IMPORTED_MODULE_2__/* .responsiveArray */ .c4.length; i++) {
const breakpoint = _util_responsiveObserver__WEBPACK_IMPORTED_MODULE_2__/* .responsiveArray */ .c4[i];
if (screens[breakpoint] && g[breakpoint] !== undefined) {
results[index] = g[breakpoint];
break;
}
}
} else {
results[index] = g;
}
});
return results;
};
const prefixCls = getPrefixCls('row', customizePrefixCls);
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_4__/* .useRowStyle */ .V)(prefixCls);
const gutters = getGutter();
const classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()(prefixCls, {
[`${prefixCls}-no-wrap`]: wrap === false,
[`${prefixCls}-${mergeJustify}`]: mergeJustify,
[`${prefixCls}-${mergeAlign}`]: mergeAlign,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, hashId);
// Add gutter related style
const rowStyle = {};
const horizontalGutter = gutters[0] != null && gutters[0] > 0 ? gutters[0] / -2 : undefined;
if (horizontalGutter) {
rowStyle.marginLeft = horizontalGutter;
rowStyle.marginRight = horizontalGutter;
}
[, rowStyle.rowGap] = gutters;
// "gutters" is a new array in each rendering phase, it'll make 'React.useMemo' effectless.
// So we deconstruct "gutters" variable here.
const [gutterH, gutterV] = gutters;
const rowContext = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => ({
gutter: [gutterH, gutterV],
wrap
}), [gutterH, gutterV, wrap]);
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement(_RowContext__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z.Provider, {
value: rowContext
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0__.createElement("div", Object.assign({}, others, {
className: classes,
style: Object.assign(Object.assign({}, rowStyle), style),
ref: ref
}), children)));
});
if (false) {}
/* harmony default export */ __webpack_exports__.Z = (Row);
/***/ }),
/***/ 98242:
/*!**************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/grid/style/index.js ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ V: function() { return /* binding */ useRowStyle; },
/* harmony export */ c: function() { return /* binding */ useColStyle; }
/* harmony export */ });
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../theme/internal */ 83116);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../theme/internal */ 37613);
// ============================== Row-Shared ==============================
const genGridRowStyle = token => {
const {
componentCls
} = token;
return {
// Grid system
[componentCls]: {
display: 'flex',
flexFlow: 'row wrap',
minWidth: 0,
'&::before, &::after': {
display: 'flex'
},
'&-no-wrap': {
flexWrap: 'nowrap'
},
// The origin of the X-axis
'&-start': {
justifyContent: 'flex-start'
},
// The center of the X-axis
'&-center': {
justifyContent: 'center'
},
// The opposite of the X-axis
'&-end': {
justifyContent: 'flex-end'
},
'&-space-between': {
justifyContent: 'space-between'
},
'&-space-around': {
justifyContent: 'space-around'
},
'&-space-evenly': {
justifyContent: 'space-evenly'
},
// Align at the top
'&-top': {
alignItems: 'flex-start'
},
// Align at the center
'&-middle': {
alignItems: 'center'
},
'&-bottom': {
alignItems: 'flex-end'
}
}
};
};
// ============================== Col-Shared ==============================
const genGridColStyle = token => {
const {
componentCls
} = token;
return {
// Grid system
[componentCls]: {
position: 'relative',
maxWidth: '100%',
// Prevent columns from collapsing when empty
minHeight: 1
}
};
};
const genLoopGridColumnsStyle = (token, sizeCls) => {
const {
componentCls,
gridColumns
} = token;
const gridColumnsStyle = {};
for (let i = gridColumns; i >= 0; i--) {
if (i === 0) {
gridColumnsStyle[`${componentCls}${sizeCls}-${i}`] = {
display: 'none'
};
gridColumnsStyle[`${componentCls}-push-${i}`] = {
insetInlineStart: 'auto'
};
gridColumnsStyle[`${componentCls}-pull-${i}`] = {
insetInlineEnd: 'auto'
};
gridColumnsStyle[`${componentCls}${sizeCls}-push-${i}`] = {
insetInlineStart: 'auto'
};
gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i}`] = {
insetInlineEnd: 'auto'
};
gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i}`] = {
marginInlineStart: 0
};
gridColumnsStyle[`${componentCls}${sizeCls}-order-${i}`] = {
order: 0
};
} else {
gridColumnsStyle[`${componentCls}${sizeCls}-${i}`] = [
// https://github.com/ant-design/ant-design/issues/44456
// Form set `display: flex` on Col which will override `display: block`.
// Let's get it from css variable to support override.
{
['--ant-display']: 'block',
// Fallback to display if variable not support
display: 'block'
}, {
display: 'var(--ant-display)',
flex: `0 0 ${i / gridColumns * 100}%`,
maxWidth: `${i / gridColumns * 100}%`
}];
gridColumnsStyle[`${componentCls}${sizeCls}-push-${i}`] = {
insetInlineStart: `${i / gridColumns * 100}%`
};
gridColumnsStyle[`${componentCls}${sizeCls}-pull-${i}`] = {
insetInlineEnd: `${i / gridColumns * 100}%`
};
gridColumnsStyle[`${componentCls}${sizeCls}-offset-${i}`] = {
marginInlineStart: `${i / gridColumns * 100}%`
};
gridColumnsStyle[`${componentCls}${sizeCls}-order-${i}`] = {
order: i
};
}
}
return gridColumnsStyle;
};
const genGridStyle = (token, sizeCls) => genLoopGridColumnsStyle(token, sizeCls);
const genGridMediaStyle = (token, screenSize, sizeCls) => ({
[`@media (min-width: ${screenSize}px)`]: Object.assign({}, genGridStyle(token, sizeCls))
});
// ============================== Export ==============================
const useRowStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)('Grid', token => [genGridRowStyle(token)]);
const useColStyle = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)('Grid', token => {
const gridToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_1__/* .merge */ .TS)(token, {
gridColumns: 24 // Row is divided into 24 parts in Grid
});
const gridMediaSizesMap = {
'-sm': gridToken.screenSMMin,
'-md': gridToken.screenMDMin,
'-lg': gridToken.screenLGMin,
'-xl': gridToken.screenXLMin,
'-xxl': gridToken.screenXXLMin
};
return [genGridColStyle(gridToken), genGridStyle(gridToken, ''), genGridStyle(gridToken, '-xs'), Object.keys(gridMediaSizesMap).map(key => genGridMediaStyle(gridToken, gridMediaSizesMap[key], key)).reduce((pre, cur) => Object.assign(Object.assign({}, pre), cur), {})];
});
/***/ }),
/***/ 41887:
/*!************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/locale/context.js ***!
\************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
const LocaleContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)(undefined);
/* harmony default export */ __webpack_exports__.Z = (LocaleContext);
/***/ }),
/***/ 31724:
/*!**********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/locale/en_US.js + 1 modules ***!
\**********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ es_locale_en_US; }
});
// EXTERNAL MODULE: ./node_modules/_rc-pagination@3.6.1@rc-pagination/es/locale/en_US.js
var en_US = __webpack_require__(22075);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/locale/en_US.js + 1 modules
var locale_en_US = __webpack_require__(48183);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/calendar/locale/en_US.js
/* harmony default export */ var calendar_locale_en_US = (locale_en_US/* default */.Z);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/time-picker/locale/en_US.js
var time_picker_locale_en_US = __webpack_require__(67532);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/en_US.js
/* eslint-disable no-template-curly-in-string */
const typeTemplate = '${label} is not a valid ${type}';
const localeValues = {
locale: 'en',
Pagination: en_US/* default */.Z,
DatePicker: locale_en_US/* default */.Z,
TimePicker: time_picker_locale_en_US/* default */.Z,
Calendar: calendar_locale_en_US,
global: {
placeholder: 'Please select'
},
Table: {
filterTitle: 'Filter menu',
filterConfirm: 'OK',
filterReset: 'Reset',
filterEmptyText: 'No filters',
filterCheckall: 'Select all items',
filterSearchPlaceholder: 'Search in filters',
emptyText: 'No data',
selectAll: 'Select current page',
selectInvert: 'Invert current page',
selectNone: 'Clear all data',
selectionAll: 'Select all data',
sortTitle: 'Sort',
expand: 'Expand row',
collapse: 'Collapse row',
triggerDesc: 'Click to sort descending',
triggerAsc: 'Click to sort ascending',
cancelSort: 'Click to cancel sorting'
},
Tour: {
Next: 'Next',
Previous: 'Previous',
Finish: 'Finish'
},
Modal: {
okText: 'OK',
cancelText: 'Cancel',
justOkText: 'OK'
},
Popconfirm: {
okText: 'OK',
cancelText: 'Cancel'
},
Transfer: {
titles: ['', ''],
searchPlaceholder: 'Search here',
itemUnit: 'item',
itemsUnit: 'items',
remove: 'Remove',
selectCurrent: 'Select current page',
removeCurrent: 'Remove current page',
selectAll: 'Select all data',
removeAll: 'Remove all data',
selectInvert: 'Invert current page'
},
Upload: {
uploading: 'Uploading...',
removeFile: 'Remove file',
uploadError: 'Upload error',
previewFile: 'Preview file',
downloadFile: 'Download file'
},
Empty: {
description: 'No data'
},
Icon: {
icon: 'icon'
},
Text: {
edit: 'Edit',
copy: 'Copy',
copied: 'Copied',
expand: 'Expand'
},
PageHeader: {
back: 'Back'
},
Form: {
optional: '(optional)',
defaultValidateMessages: {
default: 'Field validation error for ${label}',
required: 'Please enter ${label}',
enum: '${label} must be one of [${enum}]',
whitespace: '${label} cannot be a blank character',
date: {
format: '${label} date format is invalid',
parse: '${label} cannot be converted to a date',
invalid: '${label} is an invalid date'
},
types: {
string: typeTemplate,
method: typeTemplate,
array: typeTemplate,
object: typeTemplate,
number: typeTemplate,
date: typeTemplate,
boolean: typeTemplate,
integer: typeTemplate,
float: typeTemplate,
regexp: typeTemplate,
email: typeTemplate,
url: typeTemplate,
hex: typeTemplate
},
string: {
len: '${label} must be ${len} characters',
min: '${label} must be at least ${min} characters',
max: '${label} must be up to ${max} characters',
range: '${label} must be between ${min}-${max} characters'
},
number: {
len: '${label} must be equal to ${len}',
min: '${label} must be minimum ${min}',
max: '${label} must be maximum ${max}',
range: '${label} must be between ${min}-${max}'
},
array: {
len: 'Must be ${len} ${label}',
min: 'At least ${min} ${label}',
max: 'At most ${max} ${label}',
range: 'The amount of ${label} must be between ${min}-${max}'
},
pattern: {
mismatch: '${label} does not match the pattern ${pattern}'
}
}
},
Image: {
preview: 'Preview'
},
QRCode: {
expired: 'QR code expired',
refresh: 'Refresh'
},
ColorPicker: {
presetEmpty: 'Empty'
}
};
/* harmony default export */ var es_locale_en_US = (localeValues);
/***/ }),
/***/ 9763:
/*!**************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/locale/useLocale.js ***!
\**************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./context */ 41887);
/* harmony import */ var _en_US__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./en_US */ 31724);
const useLocale = (componentName, defaultLocale) => {
const fullLocale = react__WEBPACK_IMPORTED_MODULE_0__.useContext(_context__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z);
const getLocale = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
var _a;
const locale = defaultLocale || _en_US__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z[componentName];
const localeFromContext = (_a = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale[componentName]) !== null && _a !== void 0 ? _a : {};
return Object.assign(Object.assign({}, typeof locale === 'function' ? locale() : locale), localeFromContext || {});
}, [componentName, defaultLocale, fullLocale]);
const getLocaleCode = react__WEBPACK_IMPORTED_MODULE_0__.useMemo(() => {
const localeCode = fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.locale;
// Had use LocaleProvide but didn't set locale
if ((fullLocale === null || fullLocale === void 0 ? void 0 : fullLocale.exist) && !localeCode) {
return _en_US__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z.locale;
}
return localeCode;
}, [fullLocale]);
return [getLocale, getLocaleCode];
};
/* harmony default export */ __webpack_exports__.Z = (useLocale);
/***/ }),
/***/ 81863:
/*!**********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/locale/zh_CN.js + 4 modules ***!
\**********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ es_locale_zh_CN; }
});
// EXTERNAL MODULE: ./node_modules/_rc-pagination@3.6.1@rc-pagination/es/locale/zh_CN.js
var zh_CN = __webpack_require__(91735);
;// CONCATENATED MODULE: ./node_modules/_rc-picker@3.13.2@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@5.9.0@antd/es/time-picker/locale/zh_CN.js
const zh_CN_locale = {
placeholder: '请选择时间',
rangePlaceholder: ['开始时间', '结束时间']
};
/* harmony default export */ var time_picker_locale_zh_CN = (zh_CN_locale);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/locale/zh_CN.js
// 统一合并为完整的 Locale
const locale_zh_CN_locale = {
lang: Object.assign({
placeholder: '请选择日期',
yearPlaceholder: '请选择年份',
quarterPlaceholder: '请选择季度',
monthPlaceholder: '请选择月份',
weekPlaceholder: '请选择周',
rangePlaceholder: ['开始日期', '结束日期'],
rangeYearPlaceholder: ['开始年份', '结束年份'],
rangeMonthPlaceholder: ['开始月份', '结束月份'],
rangeQuarterPlaceholder: ['开始季度', '结束季度'],
rangeWeekPlaceholder: ['开始周', '结束周']
}, locale_zh_CN),
timePickerLocale: Object.assign({}, 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@5.9.0@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@5.9.0@antd/es/locale/zh_CN.js
/* eslint-disable no-template-curly-in-string */
const typeTemplate = '${label}不是一个有效的${type}';
const localeValues = {
locale: 'zh-cn',
Pagination: zh_CN/* default */.Z,
DatePicker: date_picker_locale_zh_CN,
TimePicker: time_picker_locale_zh_CN,
Calendar: calendar_locale_zh_CN,
// locales for all components
global: {
placeholder: '请选择'
},
Table: {
filterTitle: '筛选',
filterConfirm: '确定',
filterReset: '重置',
filterEmptyText: '无筛选项',
filterCheckall: '全选',
filterSearchPlaceholder: '在筛选项中搜索',
selectAll: '全选当页',
selectInvert: '反选当页',
selectNone: '清空所有',
selectionAll: '全选所有',
sortTitle: '排序',
expand: '展开行',
collapse: '关闭行',
triggerDesc: '点击降序',
triggerAsc: '点击升序',
cancelSort: '取消排序'
},
Modal: {
okText: '确定',
cancelText: '取消',
justOkText: '知道了'
},
Tour: {
Next: '下一步',
Previous: '上一步',
Finish: '结束导览'
},
Popconfirm: {
cancelText: '取消',
okText: '确定'
},
Transfer: {
titles: ['', ''],
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}'
}
}
},
Image: {
preview: '预览'
},
QRCode: {
expired: '二维码过期',
refresh: '点击刷新'
},
ColorPicker: {
presetEmpty: '暂无'
}
};
/* harmony default export */ var es_locale_zh_CN = (localeValues);
/***/ }),
/***/ 8591:
/*!***********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules ***!
\***********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
ZP: function() { return /* binding */ es_message; }
});
// UNUSED EXPORTS: actDestroy, actWrapper
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.0@@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__(41411);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/React/render.js
var render = __webpack_require__(59905);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/index.js + 5 modules
var config_provider = __webpack_require__(92736);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
var CheckCircleFilled = __webpack_require__(99019);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
var CloseCircleFilled = __webpack_require__(23411);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/ExclamationCircleFilled.js + 1 modules
var ExclamationCircleFilled = __webpack_require__(31034);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/InfoCircleFilled.js + 1 modules
var InfoCircleFilled = __webpack_require__(35941);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
var LoadingOutlined = __webpack_require__(45161);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_rc-notification@5.1.1@rc-notification/es/index.js + 5 modules
var es = __webpack_require__(581);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.4@@ant-design/cssinjs/es/index.js + 35 modules
var cssinjs_es = __webpack_require__(78600);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/message/style/index.js
"use client";
const genMessageStyle = token => {
const {
componentCls,
iconCls,
boxShadow,
colorText,
colorSuccess,
colorError,
colorWarning,
colorInfo,
fontSizeLG,
motionEaseInOutCirc,
motionDurationSlow,
marginXS,
paddingXS,
borderRadiusLG,
zIndexPopup,
// Custom token
contentPadding,
contentBg
} = token;
const noticeCls = `${componentCls}-notice`;
const messageMoveIn = new cssinjs_es.Keyframes('MessageMoveIn', {
'0%': {
padding: 0,
transform: 'translateY(-100%)',
opacity: 0
},
'100%': {
padding: paddingXS,
transform: 'translateY(0)',
opacity: 1
}
});
const messageMoveOut = new cssinjs_es.Keyframes('MessageMoveOut', {
'0%': {
maxHeight: token.height,
padding: paddingXS,
opacity: 1
},
'100%': {
maxHeight: 0,
padding: 0,
opacity: 0
}
});
const noticeStyle = {
padding: paddingXS,
textAlign: 'center',
[`${componentCls}-custom-content > ${iconCls}`]: {
verticalAlign: 'text-bottom',
marginInlineEnd: marginXS,
fontSize: fontSizeLG
},
[`${noticeCls}-content`]: {
display: 'inline-block',
padding: contentPadding,
background: contentBg,
borderRadius: borderRadiusLG,
boxShadow,
pointerEvents: 'all'
},
[`${componentCls}-success > ${iconCls}`]: {
color: colorSuccess
},
[`${componentCls}-error > ${iconCls}`]: {
color: colorError
},
[`${componentCls}-warning > ${iconCls}`]: {
color: colorWarning
},
[`${componentCls}-info > ${iconCls},
${componentCls}-loading > ${iconCls}`]: {
color: colorInfo
}
};
return [
// ============================ Holder ============================
{
[componentCls]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
color: colorText,
position: 'fixed',
top: marginXS,
width: '100%',
pointerEvents: 'none',
zIndex: zIndexPopup,
[`${componentCls}-move-up`]: {
animationFillMode: 'forwards'
},
[`
${componentCls}-move-up-appear,
${componentCls}-move-up-enter
`]: {
animationName: messageMoveIn,
animationDuration: motionDurationSlow,
animationPlayState: 'paused',
animationTimingFunction: motionEaseInOutCirc
},
[`
${componentCls}-move-up-appear${componentCls}-move-up-appear-active,
${componentCls}-move-up-enter${componentCls}-move-up-enter-active
`]: {
animationPlayState: 'running'
},
[`${componentCls}-move-up-leave`]: {
animationName: messageMoveOut,
animationDuration: motionDurationSlow,
animationPlayState: 'paused',
animationTimingFunction: motionEaseInOutCirc
},
[`${componentCls}-move-up-leave${componentCls}-move-up-leave-active`]: {
animationPlayState: 'running'
},
'&-rtl': {
direction: 'rtl',
span: {
direction: 'rtl'
}
}
})
},
// ============================ Notice ============================
{
[componentCls]: {
[noticeCls]: Object.assign({}, noticeStyle)
}
},
// ============================= Pure =============================
{
[`${componentCls}-notice-pure-panel`]: Object.assign(Object.assign({}, noticeStyle), {
padding: 0,
textAlign: 'start'
})
}];
};
// ============================== Export ==============================
/* harmony default export */ var message_style = ((0,genComponentStyleHook/* default */.Z)('Message', token => {
// Gen-style functions here
const combinedToken = (0,statistic/* merge */.TS)(token, {
height: 150
});
return [genMessageStyle(combinedToken)];
}, token => ({
zIndexPopup: token.zIndexPopupBase + 10,
contentBg: token.colorBgElevated,
contentPadding: `${(token.controlHeightLG - token.fontSize * token.lineHeight) / 2}px ${token.paddingSM}px`
})));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/message/PurePanel.js
"use client";
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;
};
const TypeIcon = {
info: /*#__PURE__*/_react_17_0_2_react.createElement(InfoCircleFilled/* default */.Z, null),
success: /*#__PURE__*/_react_17_0_2_react.createElement(CheckCircleFilled/* default */.Z, null),
error: /*#__PURE__*/_react_17_0_2_react.createElement(CloseCircleFilled/* default */.Z, null),
warning: /*#__PURE__*/_react_17_0_2_react.createElement(ExclamationCircleFilled/* default */.Z, null),
loading: /*#__PURE__*/_react_17_0_2_react.createElement(LoadingOutlined/* default */.Z, null)
};
const PureContent = _ref => {
let {
prefixCls,
type,
icon,
children
} = _ref;
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: _classnames_2_5_1_classnames_default()(`${prefixCls}-custom-content`, `${prefixCls}-${type}`)
}, icon || TypeIcon[type], /*#__PURE__*/_react_17_0_2_react.createElement("span", null, children));
};
/** @private Internal Component. Do not use in your production. */
const PurePanel = props => {
const {
prefixCls: staticPrefixCls,
className,
type,
icon,
content
} = props,
restProps = __rest(props, ["prefixCls", "className", "type", "icon", "content"]);
const {
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = staticPrefixCls || getPrefixCls('message');
const [, hashId] = message_style(prefixCls);
return /*#__PURE__*/_react_17_0_2_react.createElement(es/* Notice */.qX, Object.assign({}, restProps, {
prefixCls: prefixCls,
className: _classnames_2_5_1_classnames_default()(className, hashId, `${prefixCls}-notice-pure-panel`),
eventKey: "pure",
duration: null,
content: /*#__PURE__*/_react_17_0_2_react.createElement(PureContent, {
prefixCls: prefixCls,
type: type,
icon: icon
}, content)
}));
};
/* harmony default export */ var message_PurePanel = (PurePanel);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
var CloseOutlined = __webpack_require__(3680);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/message/util.js
function getMotion(prefixCls, transitionName) {
return {
motionName: transitionName !== null && transitionName !== void 0 ? transitionName : `${prefixCls}-move-up`
};
}
/** Wrap message open with promise like function */
function wrapPromiseFn(openFn) {
let closeFn;
const closePromise = new Promise(resolve => {
closeFn = openFn(() => {
resolve(true);
});
});
const result = () => {
closeFn === null || closeFn === void 0 ? void 0 : closeFn();
};
result.then = (filled, rejected) => closePromise.then(filled, rejected);
result.promise = closePromise;
return result;
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/message/useMessage.js
"use client";
var useMessage_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;
};
const DEFAULT_OFFSET = 8;
const DEFAULT_DURATION = 3;
const Wrapper = _ref => {
let {
children,
prefixCls
} = _ref;
const [, hashId] = message_style(prefixCls);
return /*#__PURE__*/_react_17_0_2_react.createElement(es/* NotificationProvider */.JB, {
classNames: {
list: hashId,
notice: hashId
}
}, children);
};
const renderNotifications = (node, _ref2) => {
let {
prefixCls,
key
} = _ref2;
return /*#__PURE__*/_react_17_0_2_react.createElement(Wrapper, {
prefixCls: prefixCls,
key: key
}, node);
};
const Holder = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
const {
top,
prefixCls: staticPrefixCls,
getContainer: staticGetContainer,
maxCount,
duration = DEFAULT_DURATION,
rtl,
transitionName,
onAllRemoved
} = props;
const {
getPrefixCls,
getPopupContainer,
message
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = staticPrefixCls || getPrefixCls('message');
// =============================== Style ===============================
const getStyle = () => ({
left: '50%',
transform: 'translateX(-50%)',
top: top !== null && top !== void 0 ? top : DEFAULT_OFFSET
});
const getClassName = () => _classnames_2_5_1_classnames_default()({
[`${prefixCls}-rtl`]: rtl
});
// ============================== Motion ===============================
const getNotificationMotion = () => getMotion(prefixCls, transitionName);
// ============================ Close Icon =============================
const mergedCloseIcon = /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-close-x`
}, /*#__PURE__*/_react_17_0_2_react.createElement(CloseOutlined/* default */.Z, {
className: `${prefixCls}-close-icon`
}));
// ============================== Origin ===============================
const [api, holder] = (0,es/* useNotification */.lm)({
prefixCls,
style: getStyle,
className: getClassName,
motion: getNotificationMotion,
closable: false,
closeIcon: mergedCloseIcon,
duration,
getContainer: () => (staticGetContainer === null || staticGetContainer === void 0 ? void 0 : staticGetContainer()) || (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer()) || document.body,
maxCount,
onAllRemoved,
renderNotifications
});
// ================================ Ref ================================
_react_17_0_2_react.useImperativeHandle(ref, () => Object.assign(Object.assign({}, api), {
prefixCls,
message
}));
return holder;
});
// ==============================================================================
// == Hook ==
// ==============================================================================
let keyIndex = 0;
function useInternalMessage(messageConfig) {
const holderRef = _react_17_0_2_react.useRef(null);
// ================================ API ================================
const wrapAPI = _react_17_0_2_react.useMemo(() => {
// Wrap with notification content
// >>> close
const close = key => {
var _a;
(_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.close(key);
};
// >>> Open
const open = config => {
if (!holderRef.current) {
false ? 0 : void 0;
const fakeResult = () => {};
fakeResult.then = () => {};
return fakeResult;
}
const {
open: originOpen,
prefixCls,
message
} = holderRef.current;
const noticePrefixCls = `${prefixCls}-notice`;
const {
content,
icon,
type,
key,
className,
style,
onClose
} = config,
restConfig = useMessage_rest(config, ["content", "icon", "type", "key", "className", "style", "onClose"]);
let mergedKey = key;
if (mergedKey === undefined || mergedKey === null) {
keyIndex += 1;
mergedKey = `antd-message-${keyIndex}`;
}
return wrapPromiseFn(resolve => {
originOpen(Object.assign(Object.assign({}, restConfig), {
key: mergedKey,
content: /*#__PURE__*/_react_17_0_2_react.createElement(PureContent, {
prefixCls: prefixCls,
type: type,
icon: icon
}, content),
placement: 'top',
className: _classnames_2_5_1_classnames_default()(type && `${noticePrefixCls}-${type}`, className, message === null || message === void 0 ? void 0 : message.className),
style: Object.assign(Object.assign({}, message === null || message === void 0 ? void 0 : message.style), style),
onClose: () => {
onClose === null || onClose === void 0 ? void 0 : onClose();
resolve();
}
}));
// Return close function
return () => {
close(mergedKey);
};
});
};
// >>> destroy
const destroy = key => {
var _a;
if (key !== undefined) {
close(key);
} else {
(_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.destroy();
}
};
const clone = {
open,
destroy
};
const keys = ['info', 'success', 'warning', 'error', 'loading'];
keys.forEach(type => {
const typeOpen = (jointContent, duration, onClose) => {
let config;
if (jointContent && typeof jointContent === 'object' && 'content' in jointContent) {
config = jointContent;
} else {
config = {
content: jointContent
};
}
// Params
let mergedDuration;
let mergedOnClose;
if (typeof duration === 'function') {
mergedOnClose = duration;
} else {
mergedDuration = duration;
mergedOnClose = onClose;
}
const mergedConfig = Object.assign(Object.assign({
onClose: mergedOnClose,
duration: mergedDuration
}, config), {
type
});
return open(mergedConfig);
};
clone[type] = typeOpen;
});
return clone;
}, []);
// ============================== Return ===============================
return [wrapAPI, /*#__PURE__*/_react_17_0_2_react.createElement(Holder, Object.assign({
key: "message-holder"
}, messageConfig, {
ref: holderRef
}))];
}
function useMessage(messageConfig) {
return useInternalMessage(messageConfig);
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js
"use client";
let message = null;
let act = callback => callback();
let taskQueue = [];
let defaultGlobalConfig = {};
function getGlobalContext() {
const {
prefixCls: globalPrefixCls,
getContainer: globalGetContainer,
duration,
rtl,
maxCount,
top
} = defaultGlobalConfig;
const mergedPrefixCls = globalPrefixCls !== null && globalPrefixCls !== void 0 ? globalPrefixCls : (0,config_provider/* globalConfig */.w6)().getPrefixCls('message');
const mergedContainer = (globalGetContainer === null || globalGetContainer === void 0 ? void 0 : globalGetContainer()) || document.body;
return {
prefixCls: mergedPrefixCls,
getContainer: () => mergedContainer,
duration,
rtl,
maxCount,
top
};
}
const GlobalHolder = /*#__PURE__*/_react_17_0_2_react.forwardRef((_, ref) => {
const [messageConfig, setMessageConfig] = _react_17_0_2_react.useState(getGlobalContext);
const [api, holder] = useInternalMessage(messageConfig);
const global = (0,config_provider/* globalConfig */.w6)();
const rootPrefixCls = global.getRootPrefixCls();
const rootIconPrefixCls = global.getIconPrefixCls();
const theme = global.getTheme();
const sync = () => {
setMessageConfig(getGlobalContext);
};
_react_17_0_2_react.useEffect(sync, []);
_react_17_0_2_react.useImperativeHandle(ref, () => {
const instance = Object.assign({}, api);
Object.keys(instance).forEach(method => {
instance[method] = function () {
sync();
return api[method].apply(api, arguments);
};
});
return {
instance,
sync
};
});
return /*#__PURE__*/_react_17_0_2_react.createElement(config_provider/* default */.ZP, {
prefixCls: rootPrefixCls,
iconPrefixCls: rootIconPrefixCls,
theme: theme
}, holder);
});
function flushNotice() {
if (!message) {
const holderFragment = document.createDocumentFragment();
const newMessage = {
fragment: holderFragment
};
message = newMessage;
// Delay render to avoid sync issue
act(() => {
(0,render/* render */.s)( /*#__PURE__*/_react_17_0_2_react.createElement(GlobalHolder, {
ref: node => {
const {
instance,
sync
} = node || {};
// React 18 test env will throw if call immediately in ref
Promise.resolve().then(() => {
if (!newMessage.instance && instance) {
newMessage.instance = instance;
newMessage.sync = sync;
flushNotice();
}
});
}
}), holderFragment);
});
return;
}
// Notification not ready
if (!message.instance) {
return;
}
// >>> Execute task
taskQueue.forEach(task => {
const {
type,
skipped
} = task;
// Only `skipped` when user call notice but cancel it immediately
// and instance not ready
if (!skipped) {
switch (type) {
case 'open':
{
act(() => {
const closeFn = message.instance.open(Object.assign(Object.assign({}, defaultGlobalConfig), task.config));
closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);
task.setCloseFn(closeFn);
});
break;
}
case 'destroy':
act(() => {
message === null || message === void 0 ? void 0 : message.instance.destroy(task.key);
});
break;
// Other type open
default:
{
act(() => {
var _message$instance;
const closeFn = (_message$instance = message.instance)[type].apply(_message$instance, (0,toConsumableArray/* default */.Z)(task.args));
closeFn === null || closeFn === void 0 ? void 0 : closeFn.then(task.resolve);
task.setCloseFn(closeFn);
});
}
}
}
});
// Clean up
taskQueue = [];
}
// ==============================================================================
// == Export ==
// ==============================================================================
function setMessageGlobalConfig(config) {
defaultGlobalConfig = Object.assign(Object.assign({}, defaultGlobalConfig), config);
// Trigger sync for it
act(() => {
var _a;
(_a = message === null || message === void 0 ? void 0 : message.sync) === null || _a === void 0 ? void 0 : _a.call(message);
});
}
function message_open(config) {
const result = wrapPromiseFn(resolve => {
let closeFn;
const task = {
type: 'open',
config,
resolve,
setCloseFn: fn => {
closeFn = fn;
}
};
taskQueue.push(task);
return () => {
if (closeFn) {
act(() => {
closeFn();
});
} else {
task.skipped = true;
}
};
});
flushNotice();
return result;
}
function typeOpen(type, args) {
// Warning if exist theme
if (false) {}
const result = wrapPromiseFn(resolve => {
let closeFn;
const task = {
type,
args,
resolve,
setCloseFn: fn => {
closeFn = fn;
}
};
taskQueue.push(task);
return () => {
if (closeFn) {
act(() => {
closeFn();
});
} else {
task.skipped = true;
}
};
});
flushNotice();
return result;
}
function destroy(key) {
taskQueue.push({
type: 'destroy',
key
});
flushNotice();
}
const methods = ['success', 'info', 'warning', 'error', 'loading'];
const baseStaticMethods = {
open: message_open,
destroy,
config: setMessageGlobalConfig,
useMessage: useMessage,
_InternalPanelDoNotUseOrYouWillBeFired: message_PurePanel
};
const staticMethods = baseStaticMethods;
methods.forEach(type => {
staticMethods[type] = function () {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return typeOpen(type, args);
};
});
// ==============================================================================
// == Test ==
// ==============================================================================
const noop = () => {};
/** @internal Only Work in test env */
// eslint-disable-next-line import/no-mutable-exports
let actWrapper = (/* unused pure expression or super */ null && (noop));
if (false) {}
/** @internal Only Work in test env */
// eslint-disable-next-line import/no-mutable-exports
let actDestroy = (/* unused pure expression or super */ null && (noop));
if (false) {}
/* harmony default export */ var es_message = (staticMethods);
/***/ }),
/***/ 43418:
/*!**********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules ***!
\**********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ modal; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.0@@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules
var toConsumableArray = __webpack_require__(41411);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/React/render.js
var React_render = __webpack_require__(59905);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/index.js + 5 modules
var config_provider = __webpack_require__(92736);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
var CheckCircleFilled = __webpack_require__(99019);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
var CloseCircleFilled = __webpack_require__(23411);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/ExclamationCircleFilled.js + 1 modules
var ExclamationCircleFilled = __webpack_require__(31034);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/InfoCircleFilled.js + 1 modules
var InfoCircleFilled = __webpack_require__(35941);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/motion.js
var motion = __webpack_require__(62892);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/useLocale.js
var useLocale = __webpack_require__(9763);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/ActionButton.js
var ActionButton = __webpack_require__(92806);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/context.js
const ModalContext = /*#__PURE__*/_react_17_0_2_react.createContext({});
const {
Provider: ModalContextProvider
} = ModalContext;
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/components/ConfirmCancelBtn.js
"use client";
const ConfirmCancelBtn = () => {
const {
autoFocusButton,
cancelButtonProps,
cancelTextLocale,
isSilent,
mergedOkCancel,
rootPrefixCls,
close,
onCancel,
onConfirm
} = (0,_react_17_0_2_react.useContext)(ModalContext);
return mergedOkCancel ? /*#__PURE__*/_react_17_0_2_react.createElement(ActionButton/* default */.Z, {
isSilent: isSilent,
actionFn: onCancel,
close: function () {
close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);
},
autoFocus: autoFocusButton === 'cancel',
buttonProps: cancelButtonProps,
prefixCls: `${rootPrefixCls}-btn`
}, cancelTextLocale) : null;
};
/* harmony default export */ var components_ConfirmCancelBtn = (ConfirmCancelBtn);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/components/ConfirmOkBtn.js
"use client";
const ConfirmOkBtn = () => {
const {
autoFocusButton,
close,
isSilent,
okButtonProps,
rootPrefixCls,
okTextLocale,
okType,
onConfirm,
onOk
} = (0,_react_17_0_2_react.useContext)(ModalContext);
return /*#__PURE__*/_react_17_0_2_react.createElement(ActionButton/* default */.Z, {
isSilent: isSilent,
type: okType || 'primary',
actionFn: onOk,
close: function () {
close === null || close === void 0 ? void 0 : close.apply(void 0, arguments);
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(true);
},
autoFocus: autoFocusButton === 'ok',
buttonProps: okButtonProps,
prefixCls: `${rootPrefixCls}-btn`
}, okTextLocale);
};
/* harmony default export */ var components_ConfirmOkBtn = (ConfirmOkBtn);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
var CloseOutlined = __webpack_require__(3680);
// EXTERNAL MODULE: ./node_modules/_rc-dialog@9.2.0@rc-dialog/es/index.js + 8 modules
var es = __webpack_require__(86923);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/hooks/useClosable.js
var useClosable = __webpack_require__(47729);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/Dom/canUseDom.js
var canUseDom = __webpack_require__(10254);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/styleChecker.js
const canUseDocElement = () => (0,canUseDom/* default */.Z)() && window.document.documentElement;
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/context.js
var form_context = __webpack_require__(32441);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/space/Compact.js
var Compact = __webpack_require__(33234);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/watermark/context.js
var watermark_context = __webpack_require__(11575);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/DisabledContext.js
var DisabledContext = __webpack_require__(1684);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/components/NormalCancelBtn.js
"use client";
const NormalCancelBtn = () => {
const {
cancelButtonProps,
cancelTextLocale,
onCancel
} = (0,_react_17_0_2_react.useContext)(ModalContext);
return /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, Object.assign({
onClick: onCancel
}, cancelButtonProps), cancelTextLocale);
};
/* harmony default export */ var components_NormalCancelBtn = (NormalCancelBtn);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/button.js + 8 modules
var button_button = __webpack_require__(67797);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/components/NormalOkBtn.js
"use client";
const NormalOkBtn = () => {
const {
confirmLoading,
okButtonProps,
okType,
okTextLocale,
onOk
} = (0,_react_17_0_2_react.useContext)(ModalContext);
return /*#__PURE__*/_react_17_0_2_react.createElement(es_button/* default */.ZP, Object.assign({}, (0,button_button/* convertLegacyProps */.n)(okType), {
loading: confirmLoading,
onClick: onOk
}, okButtonProps), okTextLocale);
};
/* harmony default export */ var components_NormalOkBtn = (NormalOkBtn);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/locale.js
var modal_locale = __webpack_require__(98044);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/shared.js
"use client";
function renderCloseIcon(prefixCls, closeIcon) {
return /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-close-x`
}, closeIcon || /*#__PURE__*/_react_17_0_2_react.createElement(CloseOutlined/* default */.Z, {
className: `${prefixCls}-close-icon`
}));
}
const Footer = props => {
const {
okText,
okType = 'primary',
cancelText,
confirmLoading,
onOk,
onCancel,
okButtonProps,
cancelButtonProps,
footer
} = props;
const [locale] = (0,useLocale/* default */.Z)('Modal', (0,modal_locale/* getConfirmLocale */.A)());
// ================== Locale Text ==================
const okTextLocale = okText || (locale === null || locale === void 0 ? void 0 : locale.okText);
const cancelTextLocale = cancelText || (locale === null || locale === void 0 ? void 0 : locale.cancelText);
// ================= Context Value =================
const btnCtxValue = {
confirmLoading,
okButtonProps,
cancelButtonProps,
okTextLocale,
cancelTextLocale,
okType,
onOk,
onCancel
};
const btnCtxValueMemo = _react_17_0_2_react.useMemo(() => btnCtxValue, (0,toConsumableArray/* default */.Z)(Object.values(btnCtxValue)));
let footerNode;
if (typeof footer === 'function' || typeof footer === 'undefined') {
footerNode = /*#__PURE__*/_react_17_0_2_react.createElement(ModalContextProvider, {
value: btnCtxValueMemo
}, /*#__PURE__*/_react_17_0_2_react.createElement(components_NormalCancelBtn, null), /*#__PURE__*/_react_17_0_2_react.createElement(components_NormalOkBtn, null));
if (typeof footer === 'function') {
footerNode = footer(footerNode, {
OkBtn: components_NormalOkBtn,
CancelBtn: components_NormalCancelBtn
});
}
} else {
footerNode = footer;
}
return /*#__PURE__*/_react_17_0_2_react.createElement(DisabledContext/* DisabledContextProvider */.n, {
disabled: false
}, footerNode);
};
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/style/index.js
var modal_style = __webpack_require__(73819);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/Modal.js
"use client";
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;
};
let mousePosition;
// ref: https://github.com/ant-design/ant-design/issues/15795
const getClickPosition = e => {
mousePosition = {
x: e.pageX,
y: e.pageY
};
// 100ms 内发生过点击事件,则从点击位置动画展示
// 否则直接 zoom 展示
// 这样可以兼容非点击方式展开
setTimeout(() => {
mousePosition = null;
}, 100);
};
// 只有点击事件支持从鼠标位置动画展开
if (canUseDocElement()) {
document.documentElement.addEventListener('click', getClickPosition, true);
}
const Modal = props => {
var _a;
const {
getPopupContainer: getContextPopupContainer,
getPrefixCls,
direction,
modal
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const handleCancel = e => {
const {
onCancel
} = props;
onCancel === null || onCancel === void 0 ? void 0 : onCancel(e);
};
const handleOk = e => {
const {
onOk
} = props;
onOk === null || onOk === void 0 ? void 0 : onOk(e);
};
false ? 0 : void 0;
const {
prefixCls: customizePrefixCls,
className,
rootClassName,
open,
wrapClassName,
centered,
getContainer,
closeIcon,
closable,
focusTriggerAfterClose = true,
style,
// Deprecated
visible,
width = 520,
footer
} = props,
restProps = __rest(props, ["prefixCls", "className", "rootClassName", "open", "wrapClassName", "centered", "getContainer", "closeIcon", "closable", "focusTriggerAfterClose", "style", "visible", "width", "footer"]);
const prefixCls = getPrefixCls('modal', customizePrefixCls);
const rootPrefixCls = getPrefixCls();
// Style
const [wrapSSR, hashId] = (0,modal_style/* default */.ZP)(prefixCls);
const wrapClassNameExtended = _classnames_2_5_1_classnames_default()(wrapClassName, {
[`${prefixCls}-centered`]: !!centered,
[`${prefixCls}-wrap-rtl`]: direction === 'rtl'
});
if (false) {}
const dialogFooter = footer !== null && /*#__PURE__*/_react_17_0_2_react.createElement(Footer, Object.assign({}, props, {
onOk: handleOk,
onCancel: handleCancel
}));
const [mergedClosable, mergedCloseIcon] = (0,useClosable/* default */.Z)(closable, closeIcon, icon => renderCloseIcon(prefixCls, icon), /*#__PURE__*/_react_17_0_2_react.createElement(CloseOutlined/* default */.Z, {
className: `${prefixCls}-close-icon`
}), true);
// ============================ Refs ============================
// Select `ant-modal-content` by `panelRef`
const panelRef = (0,watermark_context/* usePanelRef */.H)(`.${prefixCls}-content`);
// =========================== Render ===========================
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(Compact/* NoCompactStyle */.BR, null, /*#__PURE__*/_react_17_0_2_react.createElement(form_context/* NoFormStyle */.Ux, {
status: true,
override: true
}, /*#__PURE__*/_react_17_0_2_react.createElement(es/* default */.Z, Object.assign({
width: width
}, restProps, {
getContainer: getContainer === undefined ? getContextPopupContainer : getContainer,
prefixCls: prefixCls,
rootClassName: _classnames_2_5_1_classnames_default()(hashId, rootClassName),
wrapClassName: wrapClassNameExtended,
footer: dialogFooter,
visible: open !== null && open !== void 0 ? open : visible,
mousePosition: (_a = restProps.mousePosition) !== null && _a !== void 0 ? _a : mousePosition,
onClose: handleCancel,
closable: mergedClosable,
closeIcon: mergedCloseIcon,
focusTriggerAfterClose: focusTriggerAfterClose,
transitionName: (0,motion/* getTransitionName */.m)(rootPrefixCls, 'zoom', props.transitionName),
maskTransitionName: (0,motion/* getTransitionName */.m)(rootPrefixCls, 'fade', props.maskTransitionName),
className: _classnames_2_5_1_classnames_default()(hashId, className, modal === null || modal === void 0 ? void 0 : modal.className),
style: Object.assign(Object.assign({}, modal === null || modal === void 0 ? void 0 : modal.style), style),
panelRef: panelRef
})))));
};
/* harmony default export */ var modal_Modal = (Modal);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/style/confirmCmp.js
"use client";
// Style as confirm component
// ============================= Confirm ==============================
const genModalConfirmStyle = token => {
const {
componentCls,
titleFontSize,
titleLineHeight,
modalConfirmIconSize,
fontSize,
lineHeight
} = token;
const confirmComponentCls = `${componentCls}-confirm`;
const titleHeight = Math.round(titleFontSize * titleLineHeight);
const contentHeight = Math.round(fontSize * lineHeight);
return {
[confirmComponentCls]: {
'&-rtl': {
direction: 'rtl'
},
[`${token.antCls}-modal-header`]: {
display: 'none'
},
[`${confirmComponentCls}-body-wrapper`]: Object.assign({}, (0,style/* clearFix */.dF)()),
// ====================== Body ======================
[`${confirmComponentCls}-body`]: {
display: 'flex',
flexWrap: 'nowrap',
alignItems: 'start',
[`> ${token.iconCls}`]: {
flex: 'none',
fontSize: modalConfirmIconSize,
marginInlineEnd: token.marginSM,
marginTop: (contentHeight - modalConfirmIconSize) / 2
},
[`&-has-title > ${token.iconCls}`]: {
marginTop: (titleHeight - modalConfirmIconSize) / 2
}
},
[`${confirmComponentCls}-paragraph`]: {
display: 'flex',
flexDirection: 'column',
flex: 'auto',
rowGap: token.marginXS
},
[`${confirmComponentCls}-title`]: {
color: token.colorTextHeading,
fontWeight: token.fontWeightStrong,
fontSize: titleFontSize,
lineHeight: titleLineHeight
},
[`${confirmComponentCls}-content`]: {
color: token.colorText,
fontSize,
lineHeight
},
// ===================== Footer =====================
[`${confirmComponentCls}-btns`]: {
textAlign: 'end',
marginTop: token.marginSM,
[`${token.antCls}-btn + ${token.antCls}-btn`]: {
marginBottom: 0,
marginInlineStart: token.marginXS
}
}
},
[`${confirmComponentCls}-error ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorError
},
[`${confirmComponentCls}-warning ${confirmComponentCls}-body > ${token.iconCls},
${confirmComponentCls}-confirm ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorWarning
},
[`${confirmComponentCls}-info ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorInfo
},
[`${confirmComponentCls}-success ${confirmComponentCls}-body > ${token.iconCls}`]: {
color: token.colorSuccess
}
};
};
// ============================== Export ==============================
/* harmony default export */ var confirmCmp = ((0,genComponentStyleHook/* genSubStyleComponent */.b)(['Modal', 'confirm'], token => {
const modalToken = (0,modal_style/* prepareToken */.B4)(token);
return [genModalConfirmStyle(modalToken)];
}, modal_style/* prepareComponentToken */.eh, {
// confirm is weak than modal since no conflict here
order: -1000
}));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/ConfirmDialog.js
"use client";
var ConfirmDialog_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 ConfirmContent(props) {
const {
prefixCls,
icon,
okText,
cancelText,
confirmPrefixCls,
type,
okCancel,
footer,
// Legacy for static function usage
locale: staticLocale
} = props,
resetProps = ConfirmDialog_rest(props, ["prefixCls", "icon", "okText", "cancelText", "confirmPrefixCls", "type", "okCancel", "footer", "locale"]);
false ? 0 : void 0;
// Icon
let mergedIcon = icon;
// 支持传入{ icon: null }来隐藏`Modal.confirm`默认的Icon
if (!icon && icon !== null) {
switch (type) {
case 'info':
mergedIcon = /*#__PURE__*/_react_17_0_2_react.createElement(InfoCircleFilled/* default */.Z, null);
break;
case 'success':
mergedIcon = /*#__PURE__*/_react_17_0_2_react.createElement(CheckCircleFilled/* default */.Z, null);
break;
case 'error':
mergedIcon = /*#__PURE__*/_react_17_0_2_react.createElement(CloseCircleFilled/* default */.Z, null);
break;
default:
mergedIcon = /*#__PURE__*/_react_17_0_2_react.createElement(ExclamationCircleFilled/* default */.Z, null);
}
}
// 默认为 true,保持向下兼容
const mergedOkCancel = okCancel !== null && okCancel !== void 0 ? okCancel : type === 'confirm';
const autoFocusButton = props.autoFocusButton === null ? false : props.autoFocusButton || 'ok';
const [locale] = (0,useLocale/* default */.Z)('Modal');
const mergedLocale = staticLocale || locale;
// ================== Locale Text ==================
const okTextLocale = okText || (mergedOkCancel ? mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.okText : mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.justOkText);
const cancelTextLocale = cancelText || (mergedLocale === null || mergedLocale === void 0 ? void 0 : mergedLocale.cancelText);
// ================= Context Value =================
const btnCtxValue = Object.assign({
autoFocusButton,
cancelTextLocale,
okTextLocale,
mergedOkCancel
}, resetProps);
const btnCtxValueMemo = _react_17_0_2_react.useMemo(() => btnCtxValue, (0,toConsumableArray/* default */.Z)(Object.values(btnCtxValue)));
// ====================== Footer Origin Node ======================
const footerOriginNode = /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, /*#__PURE__*/_react_17_0_2_react.createElement(components_ConfirmCancelBtn, null), /*#__PURE__*/_react_17_0_2_react.createElement(components_ConfirmOkBtn, null));
const hasTitle = props.title !== undefined && props.title !== null;
const bodyCls = `${confirmPrefixCls}-body`;
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${confirmPrefixCls}-body-wrapper`
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: _classnames_2_5_1_classnames_default()(bodyCls, {
[`${bodyCls}-has-title`]: hasTitle
})
}, mergedIcon, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${confirmPrefixCls}-paragraph`
}, hasTitle && /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${confirmPrefixCls}-title`
}, props.title), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${confirmPrefixCls}-content`
}, props.content))), footer === undefined || typeof footer === 'function' ? /*#__PURE__*/_react_17_0_2_react.createElement(ModalContextProvider, {
value: btnCtxValueMemo
}, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${confirmPrefixCls}-btns`
}, typeof footer === 'function' ? footer(footerOriginNode, {
OkBtn: components_ConfirmOkBtn,
CancelBtn: components_ConfirmCancelBtn
}) : footerOriginNode)) : footer, /*#__PURE__*/_react_17_0_2_react.createElement(confirmCmp, {
prefixCls: prefixCls
}));
}
const ConfirmDialog = props => {
const {
close,
zIndex,
afterClose,
visible,
open,
keyboard,
centered,
getContainer,
maskStyle,
direction,
prefixCls,
wrapClassName,
rootPrefixCls,
iconPrefixCls,
theme,
bodyStyle,
closable = false,
closeIcon,
modalRender,
focusTriggerAfterClose,
onConfirm
} = props;
if (false) {}
const confirmPrefixCls = `${prefixCls}-confirm`;
const width = props.width || 416;
const style = props.style || {};
const mask = props.mask === undefined ? true : props.mask;
// 默认为 false,保持旧版默认行为
const maskClosable = props.maskClosable === undefined ? false : props.maskClosable;
const classString = _classnames_2_5_1_classnames_default()(confirmPrefixCls, `${confirmPrefixCls}-${props.type}`, {
[`${confirmPrefixCls}-rtl`]: direction === 'rtl'
}, props.className);
return /*#__PURE__*/_react_17_0_2_react.createElement(config_provider/* default */.ZP, {
prefixCls: rootPrefixCls,
iconPrefixCls: iconPrefixCls,
direction: direction,
theme: theme
}, /*#__PURE__*/_react_17_0_2_react.createElement(modal_Modal, {
prefixCls: prefixCls,
className: classString,
wrapClassName: _classnames_2_5_1_classnames_default()({
[`${confirmPrefixCls}-centered`]: !!props.centered
}, wrapClassName),
onCancel: () => {
close === null || close === void 0 ? void 0 : close({
triggerCancel: true
});
onConfirm === null || onConfirm === void 0 ? void 0 : onConfirm(false);
},
open: open,
title: "",
footer: null,
transitionName: (0,motion/* getTransitionName */.m)(rootPrefixCls || '', 'zoom', props.transitionName),
maskTransitionName: (0,motion/* getTransitionName */.m)(rootPrefixCls || '', 'fade', props.maskTransitionName),
mask: mask,
maskClosable: maskClosable,
maskStyle: maskStyle,
style: style,
bodyStyle: bodyStyle,
width: width,
zIndex: zIndex,
afterClose: afterClose,
keyboard: keyboard,
centered: centered,
getContainer: getContainer,
closable: closable,
closeIcon: closeIcon,
modalRender: modalRender,
focusTriggerAfterClose: focusTriggerAfterClose
}, /*#__PURE__*/_react_17_0_2_react.createElement(ConfirmContent, Object.assign({}, props, {
confirmPrefixCls: confirmPrefixCls
}))));
};
if (false) {}
/* harmony default export */ var modal_ConfirmDialog = (ConfirmDialog);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/destroyFns.js
const destroyFns = [];
/* harmony default export */ var modal_destroyFns = (destroyFns);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/confirm.js
"use client";
var confirm_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
let defaultRootPrefixCls = '';
function getRootPrefixCls() {
return defaultRootPrefixCls;
}
function confirm_confirm(config) {
// Warning if exist theme
if (false) {}
const container = document.createDocumentFragment();
// eslint-disable-next-line @typescript-eslint/no-use-before-define
let currentConfig = Object.assign(Object.assign({}, config), {
close,
open: true
});
let timeoutId;
function destroy() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
const triggerCancel = args.some(param => param && param.triggerCancel);
if (config.onCancel && triggerCancel) {
config.onCancel.apply(config, [() => {}].concat((0,toConsumableArray/* default */.Z)(args.slice(1))));
}
for (let i = 0; i < modal_destroyFns.length; i++) {
const fn = modal_destroyFns[i];
// eslint-disable-next-line @typescript-eslint/no-use-before-define
if (fn === close) {
modal_destroyFns.splice(i, 1);
break;
}
}
(0,React_render/* unmount */.v)(container);
}
function render(_a) {
var {
okText,
cancelText,
prefixCls: customizePrefixCls,
getContainer
} = _a,
props = confirm_rest(_a, ["okText", "cancelText", "prefixCls", "getContainer"]);
clearTimeout(timeoutId);
/**
* https://github.com/ant-design/ant-design/issues/23623
*
* Sync render blocks React event. Let's make this async.
*/
timeoutId = setTimeout(() => {
const runtimeLocale = (0,modal_locale/* getConfirmLocale */.A)();
const {
getPrefixCls,
getIconPrefixCls,
getTheme
} = (0,config_provider/* globalConfig */.w6)();
// because Modal.config set rootPrefixCls, which is different from other components
const rootPrefixCls = getPrefixCls(undefined, getRootPrefixCls());
const prefixCls = customizePrefixCls || `${rootPrefixCls}-modal`;
const iconPrefixCls = getIconPrefixCls();
const theme = getTheme();
let mergedGetContainer = getContainer;
if (mergedGetContainer === false) {
mergedGetContainer = undefined;
if (false) {}
}
(0,React_render/* render */.s)( /*#__PURE__*/_react_17_0_2_react.createElement(modal_ConfirmDialog, Object.assign({}, props, {
getContainer: mergedGetContainer,
prefixCls: prefixCls,
rootPrefixCls: rootPrefixCls,
iconPrefixCls: iconPrefixCls,
okText: okText,
locale: runtimeLocale,
theme: theme,
cancelText: cancelText || runtimeLocale.cancelText
})), container);
});
}
function close() {
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
args[_key2] = arguments[_key2];
}
currentConfig = Object.assign(Object.assign({}, currentConfig), {
open: false,
afterClose: () => {
if (typeof config.afterClose === 'function') {
config.afterClose();
}
destroy.apply(this, args);
}
});
// Legacy support
if (currentConfig.visible) {
delete currentConfig.visible;
}
render(currentConfig);
}
function update(configUpdate) {
if (typeof configUpdate === 'function') {
currentConfig = configUpdate(currentConfig);
} else {
currentConfig = Object.assign(Object.assign({}, currentConfig), configUpdate);
}
render(currentConfig);
}
render(currentConfig);
modal_destroyFns.push(close);
return {
destroy: close,
update
};
}
function withWarn(props) {
return Object.assign(Object.assign({}, props), {
type: 'warning'
});
}
function withInfo(props) {
return Object.assign(Object.assign({}, props), {
type: 'info'
});
}
function withSuccess(props) {
return Object.assign(Object.assign({}, props), {
type: 'success'
});
}
function withError(props) {
return Object.assign(Object.assign({}, props), {
type: 'error'
});
}
function withConfirm(props) {
return Object.assign(Object.assign({}, props), {
type: 'confirm'
});
}
function modalGlobalConfig(_ref) {
let {
rootPrefixCls
} = _ref;
false ? 0 : void 0;
defaultRootPrefixCls = rootPrefixCls;
}
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/PurePanel.js
var PurePanel = __webpack_require__(53487);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/PurePanel.js
"use client";
var PurePanel_rest = undefined && undefined.__rest || function (s, e) {
var t = {};
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
}
return t;
};
/* eslint-disable react/jsx-no-useless-fragment */
const PurePanel_PurePanel = props => {
const {
prefixCls: customizePrefixCls,
className,
closeIcon,
closable,
type,
title,
children
} = props,
restProps = PurePanel_rest(props, ["prefixCls", "className", "closeIcon", "closable", "type", "title", "children"]);
const {
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const rootPrefixCls = getPrefixCls();
const prefixCls = customizePrefixCls || getPrefixCls('modal');
const [, hashId] = (0,modal_style/* default */.ZP)(prefixCls);
const confirmPrefixCls = `${prefixCls}-confirm`;
// Choose target props by confirm mark
let additionalProps = {};
if (type) {
additionalProps = {
closable: closable !== null && closable !== void 0 ? closable : false,
title: '',
footer: '',
children: /*#__PURE__*/_react_17_0_2_react.createElement(ConfirmContent, Object.assign({}, props, {
prefixCls: prefixCls,
confirmPrefixCls: confirmPrefixCls,
rootPrefixCls: rootPrefixCls,
content: children
}))
};
} else {
additionalProps = {
closable: closable !== null && closable !== void 0 ? closable : true,
title,
footer: props.footer === undefined ? /*#__PURE__*/_react_17_0_2_react.createElement(Footer, Object.assign({}, props)) : props.footer,
children
};
}
return /*#__PURE__*/_react_17_0_2_react.createElement(es/* Panel */.s, Object.assign({
prefixCls: prefixCls,
className: _classnames_2_5_1_classnames_default()(hashId, `${prefixCls}-pure-panel`, type && confirmPrefixCls, type && `${confirmPrefixCls}-${type}`, className)
}, restProps, {
closeIcon: renderCloseIcon(prefixCls, closeIcon),
closable: closable
}, additionalProps));
};
/* harmony default export */ var modal_PurePanel = ((0,PurePanel/* withPureRenderTheme */.i)(PurePanel_PurePanel));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/hooks/usePatchElement.js
"use client";
function usePatchElement() {
const [elements, setElements] = _react_17_0_2_react.useState([]);
const patchElement = _react_17_0_2_react.useCallback(element => {
// append a new element to elements (and create a new ref)
setElements(originElements => [].concat((0,toConsumableArray/* default */.Z)(originElements), [element]));
// return a function that removes the new element out of elements (and create a new ref)
// it works a little like useEffect
return () => {
setElements(originElements => originElements.filter(ele => ele !== element));
};
}, []);
return [elements, patchElement];
}
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/locale/en_US.js + 1 modules
var en_US = __webpack_require__(31724);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/useModal/HookModal.js
"use client";
var HookModal_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;
};
const HookModal = (_a, ref) => {
var _b;
var {
afterClose: hookAfterClose,
config
} = _a,
restProps = HookModal_rest(_a, ["afterClose", "config"]);
const [open, setOpen] = _react_17_0_2_react.useState(true);
const [innerConfig, setInnerConfig] = _react_17_0_2_react.useState(config);
const {
direction,
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = getPrefixCls('modal');
const rootPrefixCls = getPrefixCls();
const afterClose = () => {
var _a;
hookAfterClose();
(_a = innerConfig.afterClose) === null || _a === void 0 ? void 0 : _a.call(innerConfig);
};
const close = function () {
setOpen(false);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
const triggerCancel = args.some(param => param && param.triggerCancel);
if (innerConfig.onCancel && triggerCancel) {
innerConfig.onCancel.apply(innerConfig, [() => {}].concat((0,toConsumableArray/* default */.Z)(args.slice(1))));
}
};
_react_17_0_2_react.useImperativeHandle(ref, () => ({
destroy: close,
update: newConfig => {
setInnerConfig(originConfig => Object.assign(Object.assign({}, originConfig), newConfig));
}
}));
const mergedOkCancel = (_b = innerConfig.okCancel) !== null && _b !== void 0 ? _b : innerConfig.type === 'confirm';
const [contextLocale] = (0,useLocale/* default */.Z)('Modal', en_US/* default */.Z.Modal);
return /*#__PURE__*/_react_17_0_2_react.createElement(modal_ConfirmDialog, Object.assign({
prefixCls: prefixCls,
rootPrefixCls: rootPrefixCls
}, innerConfig, {
close: close,
open: open,
afterClose: afterClose,
okText: innerConfig.okText || (mergedOkCancel ? contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.okText : contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.justOkText),
direction: innerConfig.direction || direction,
cancelText: innerConfig.cancelText || (contextLocale === null || contextLocale === void 0 ? void 0 : contextLocale.cancelText)
}, restProps));
};
/* harmony default export */ var useModal_HookModal = (/*#__PURE__*/_react_17_0_2_react.forwardRef(HookModal));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/useModal/index.js
"use client";
let uuid = 0;
const ElementsHolder = /*#__PURE__*/_react_17_0_2_react.memo( /*#__PURE__*/_react_17_0_2_react.forwardRef((_props, ref) => {
const [elements, patchElement] = usePatchElement();
_react_17_0_2_react.useImperativeHandle(ref, () => ({
patchElement
}), []);
// eslint-disable-next-line react/jsx-no-useless-fragment
return /*#__PURE__*/_react_17_0_2_react.createElement(_react_17_0_2_react.Fragment, null, elements);
}));
function useModal() {
const holderRef = _react_17_0_2_react.useRef(null);
// ========================== Effect ==========================
const [actionQueue, setActionQueue] = _react_17_0_2_react.useState([]);
_react_17_0_2_react.useEffect(() => {
if (actionQueue.length) {
const cloneQueue = (0,toConsumableArray/* default */.Z)(actionQueue);
cloneQueue.forEach(action => {
action();
});
setActionQueue([]);
}
}, [actionQueue]);
// =========================== Hook ===========================
const getConfirmFunc = _react_17_0_2_react.useCallback(withFunc => function hookConfirm(config) {
var _a;
uuid += 1;
const modalRef = /*#__PURE__*/_react_17_0_2_react.createRef();
// Proxy to promise with `onClose`
let resolvePromise;
const promise = new Promise(resolve => {
resolvePromise = resolve;
});
let silent = false;
let closeFunc;
const modal = /*#__PURE__*/_react_17_0_2_react.createElement(useModal_HookModal, {
key: `modal-${uuid}`,
config: withFunc(config),
ref: modalRef,
afterClose: () => {
closeFunc === null || closeFunc === void 0 ? void 0 : closeFunc();
},
isSilent: () => silent,
onConfirm: confirmed => {
resolvePromise(confirmed);
}
});
closeFunc = (_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.patchElement(modal);
if (closeFunc) {
modal_destroyFns.push(closeFunc);
}
const instance = {
destroy: () => {
function destroyAction() {
var _a;
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.destroy();
}
if (modalRef.current) {
destroyAction();
} else {
setActionQueue(prev => [].concat((0,toConsumableArray/* default */.Z)(prev), [destroyAction]));
}
},
update: newConfig => {
function updateAction() {
var _a;
(_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.update(newConfig);
}
if (modalRef.current) {
updateAction();
} else {
setActionQueue(prev => [].concat((0,toConsumableArray/* default */.Z)(prev), [updateAction]));
}
},
then: resolve => {
silent = true;
return promise.then(resolve);
}
};
return instance;
}, []);
const fns = _react_17_0_2_react.useMemo(() => ({
info: getConfirmFunc(withInfo),
success: getConfirmFunc(withSuccess),
error: getConfirmFunc(withError),
warning: getConfirmFunc(withWarn),
confirm: getConfirmFunc(withConfirm)
}), []);
return [fns, /*#__PURE__*/_react_17_0_2_react.createElement(ElementsHolder, {
key: "modal-holder",
ref: holderRef
})];
}
/* harmony default export */ var modal_useModal = (useModal);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js
"use client";
function modalWarn(props) {
return confirm_confirm(withWarn(props));
}
const es_modal_Modal = modal_Modal;
es_modal_Modal.useModal = modal_useModal;
es_modal_Modal.info = function infoFn(props) {
return confirm_confirm(withInfo(props));
};
es_modal_Modal.success = function successFn(props) {
return confirm_confirm(withSuccess(props));
};
es_modal_Modal.error = function errorFn(props) {
return confirm_confirm(withError(props));
};
es_modal_Modal.warning = modalWarn;
es_modal_Modal.warn = modalWarn;
es_modal_Modal.confirm = function confirmFn(props) {
return confirm_confirm(withConfirm(props));
};
es_modal_Modal.destroyAll = function destroyAllFn() {
while (modal_destroyFns.length) {
const close = modal_destroyFns.pop();
if (close) {
close();
}
}
};
es_modal_Modal.config = modalGlobalConfig;
es_modal_Modal._InternalPanelDoNotUseOrYouWillBeFired = modal_PurePanel;
if (false) {}
/* harmony default export */ var modal = (es_modal_Modal);
/***/ }),
/***/ 98044:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/modal/locale.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ A: function() { return /* binding */ getConfirmLocale; },
/* harmony export */ f: function() { return /* binding */ changeConfirmLocale; }
/* harmony export */ });
/* harmony import */ var _locale_en_US__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../locale/en_US */ 31724);
"use client";
let runtimeLocale = Object.assign({}, _locale_en_US__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.Modal);
let localeList = [];
const generateLocale = () => localeList.reduce((merged, locale) => Object.assign(Object.assign({}, merged), locale), _locale_en_US__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.Modal);
function changeConfirmLocale(newLocale) {
if (newLocale) {
const cloneLocale = Object.assign({}, newLocale);
localeList.push(cloneLocale);
runtimeLocale = generateLocale();
return () => {
localeList = localeList.filter(locale => locale !== cloneLocale);
runtimeLocale = generateLocale();
};
}
runtimeLocale = Object.assign({}, _locale_en_US__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z.Modal);
}
function getConfirmLocale() {
return runtimeLocale;
}
/***/ }),
/***/ 73819:
/*!***************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/modal/style/index.js ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ B4: function() { return /* binding */ prepareToken; },
/* harmony export */ QA: function() { return /* binding */ genModalMaskStyle; },
/* harmony export */ eh: function() { return /* binding */ prepareComponentToken; }
/* harmony export */ });
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../style */ 17313);
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../style/motion */ 1950);
/* harmony import */ var _style_motion__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../style/motion */ 29878);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../theme/internal */ 37613);
/* harmony import */ var _theme_internal__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../theme/internal */ 83116);
"use client";
function box(position) {
return {
position,
inset: 0
};
}
const genModalMaskStyle = token => {
const {
componentCls,
antCls
} = token;
return [{
[`${componentCls}-root`]: {
[`${componentCls}${antCls}-zoom-enter, ${componentCls}${antCls}-zoom-appear`]: {
// reset scale avoid mousePosition bug
transform: 'none',
opacity: 0,
animationDuration: token.motionDurationSlow,
// https://github.com/ant-design/ant-design/issues/11777
userSelect: 'none'
},
// https://github.com/ant-design/ant-design/issues/37329
// https://github.com/ant-design/ant-design/issues/40272
[`${componentCls}${antCls}-zoom-leave ${componentCls}-content`]: {
pointerEvents: 'none'
},
[`${componentCls}-mask`]: Object.assign(Object.assign({}, box('fixed')), {
zIndex: token.zIndexPopupBase,
height: '100%',
backgroundColor: token.colorBgMask,
pointerEvents: 'none',
[`${componentCls}-hidden`]: {
display: 'none'
}
}),
[`${componentCls}-wrap`]: Object.assign(Object.assign({}, box('fixed')), {
zIndex: token.zIndexPopupBase,
overflow: 'auto',
outline: 0,
WebkitOverflowScrolling: 'touch',
// Note: Firefox not support `:has` yet
[`&:has(${componentCls}${antCls}-zoom-enter), &:has(${componentCls}${antCls}-zoom-appear)`]: {
pointerEvents: 'none'
}
})
}
}, {
[`${componentCls}-root`]: (0,_style_motion__WEBPACK_IMPORTED_MODULE_0__/* .initFadeMotion */ .J$)(token)
}];
};
const genModalStyle = token => {
const {
componentCls
} = token;
return [
// ======================== Root =========================
{
[`${componentCls}-root`]: {
[`${componentCls}-wrap-rtl`]: {
direction: 'rtl'
},
[`${componentCls}-centered`]: {
textAlign: 'center',
'&::before': {
display: 'inline-block',
width: 0,
height: '100%',
verticalAlign: 'middle',
content: '""'
},
[componentCls]: {
top: 0,
display: 'inline-block',
paddingBottom: 0,
textAlign: 'start',
verticalAlign: 'middle'
}
},
[`@media (max-width: ${token.screenSMMax})`]: {
[componentCls]: {
maxWidth: 'calc(100vw - 16px)',
margin: `${token.marginXS} auto`
},
[`${componentCls}-centered`]: {
[componentCls]: {
flex: 1
}
}
}
}
},
// ======================== Modal ========================
{
[componentCls]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_1__/* .resetComponent */ .Wf)(token)), {
pointerEvents: 'none',
position: 'relative',
top: 100,
width: 'auto',
maxWidth: `calc(100vw - ${token.margin * 2}px)`,
margin: '0 auto',
paddingBottom: token.paddingLG,
[`${componentCls}-title`]: {
margin: 0,
color: token.titleColor,
fontWeight: token.fontWeightStrong,
fontSize: token.titleFontSize,
lineHeight: token.titleLineHeight,
wordWrap: 'break-word'
},
[`${componentCls}-content`]: {
position: 'relative',
backgroundColor: token.contentBg,
backgroundClip: 'padding-box',
border: 0,
borderRadius: token.borderRadiusLG,
boxShadow: token.boxShadow,
pointerEvents: 'auto',
padding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`
},
[`${componentCls}-close`]: Object.assign({
position: 'absolute',
top: (token.modalHeaderHeight - token.modalCloseBtnSize) / 2,
insetInlineEnd: (token.modalHeaderHeight - token.modalCloseBtnSize) / 2,
zIndex: token.zIndexPopupBase + 10,
padding: 0,
color: token.modalCloseIconColor,
fontWeight: token.fontWeightStrong,
lineHeight: 1,
textDecoration: 'none',
background: 'transparent',
borderRadius: token.borderRadiusSM,
width: token.modalCloseBtnSize,
height: token.modalCloseBtnSize,
border: 0,
outline: 0,
cursor: 'pointer',
transition: `color ${token.motionDurationMid}, background-color ${token.motionDurationMid}`,
'&-x': {
display: 'flex',
fontSize: token.fontSizeLG,
fontStyle: 'normal',
lineHeight: `${token.modalCloseBtnSize}px`,
justifyContent: 'center',
textTransform: 'none',
textRendering: 'auto'
},
'&:hover': {
color: token.modalIconHoverColor,
backgroundColor: token.wireframe ? 'transparent' : token.colorFillContent,
textDecoration: 'none'
},
'&:active': {
backgroundColor: token.wireframe ? 'transparent' : token.colorFillContentHover
}
}, (0,_style__WEBPACK_IMPORTED_MODULE_1__/* .genFocusStyle */ .Qy)(token)),
[`${componentCls}-header`]: {
color: token.colorText,
background: token.headerBg,
borderRadius: `${token.borderRadiusLG}px ${token.borderRadiusLG}px 0 0`,
marginBottom: token.marginXS
},
[`${componentCls}-body`]: {
fontSize: token.fontSize,
lineHeight: token.lineHeight,
wordWrap: 'break-word'
},
[`${componentCls}-footer`]: {
textAlign: 'end',
background: token.footerBg,
marginTop: token.marginSM,
[`${token.antCls}-btn + ${token.antCls}-btn:not(${token.antCls}-dropdown-trigger)`]: {
marginBottom: 0,
marginInlineStart: token.marginXS
}
},
[`${componentCls}-open`]: {
overflow: 'hidden'
}
})
},
// ======================== Pure =========================
{
[`${componentCls}-pure-panel`]: {
top: 'auto',
padding: 0,
display: 'flex',
flexDirection: 'column',
[`${componentCls}-content,
${componentCls}-body,
${componentCls}-confirm-body-wrapper`]: {
display: 'flex',
flexDirection: 'column',
flex: 'auto'
},
[`${componentCls}-confirm-body`]: {
marginBottom: 'auto'
}
}
}];
};
const genWireframeStyle = token => {
const {
componentCls,
antCls
} = token;
const confirmComponentCls = `${componentCls}-confirm`;
return {
[componentCls]: {
[`${componentCls}-content`]: {
padding: 0
},
[`${componentCls}-header`]: {
padding: token.modalHeaderPadding,
borderBottom: `${token.modalHeaderBorderWidth}px ${token.modalHeaderBorderStyle} ${token.modalHeaderBorderColorSplit}`,
marginBottom: 0
},
[`${componentCls}-body`]: {
padding: token.modalBodyPadding
},
[`${componentCls}-footer`]: {
padding: `${token.modalFooterPaddingVertical}px ${token.modalFooterPaddingHorizontal}px`,
borderTop: `${token.modalFooterBorderWidth}px ${token.modalFooterBorderStyle} ${token.modalFooterBorderColorSplit}`,
borderRadius: `0 0 ${token.borderRadiusLG}px ${token.borderRadiusLG}px`,
marginTop: 0
}
},
[confirmComponentCls]: {
[`${antCls}-modal-body`]: {
padding: `${token.padding * 2}px ${token.padding * 2}px ${token.paddingLG}px`
},
[`${confirmComponentCls}-body`]: {
[`> ${token.iconCls}`]: {
marginInlineEnd: token.margin,
// `content` after `icon` should set marginLeft
[`+ ${confirmComponentCls}-title + ${confirmComponentCls}-content`]: {
marginInlineStart: token.modalConfirmIconSize + token.margin
}
}
},
[`${confirmComponentCls}-btns`]: {
marginTop: token.marginLG
}
}
};
};
const genRTLStyle = token => {
const {
componentCls
} = token;
return {
[`${componentCls}-root`]: {
[`${componentCls}-wrap-rtl`]: {
direction: 'rtl',
[`${componentCls}-confirm-body`]: {
direction: 'rtl'
}
}
}
};
};
// ============================== Export ==============================
const prepareToken = token => {
const headerPaddingVertical = token.padding;
const headerFontSize = token.fontSizeHeading5;
const headerLineHeight = token.lineHeightHeading5;
const modalToken = (0,_theme_internal__WEBPACK_IMPORTED_MODULE_2__/* .merge */ .TS)(token, {
modalBodyPadding: token.paddingLG,
modalHeaderPadding: `${headerPaddingVertical}px ${token.paddingLG}px`,
modalHeaderBorderWidth: token.lineWidth,
modalHeaderBorderStyle: token.lineType,
modalHeaderBorderColorSplit: token.colorSplit,
modalHeaderHeight: headerLineHeight * headerFontSize + headerPaddingVertical * 2,
modalFooterBorderColorSplit: token.colorSplit,
modalFooterBorderStyle: token.lineType,
modalFooterPaddingVertical: token.paddingXS,
modalFooterPaddingHorizontal: token.padding,
modalFooterBorderWidth: token.lineWidth,
modalIconHoverColor: token.colorIconHover,
modalCloseIconColor: token.colorIcon,
modalCloseBtnSize: token.fontSize * token.lineHeight,
modalConfirmIconSize: token.fontSize * token.lineHeight
});
return modalToken;
};
const prepareComponentToken = token => ({
footerBg: 'transparent',
headerBg: token.colorBgElevated,
titleLineHeight: token.lineHeightHeading5,
titleFontSize: token.fontSizeHeading5,
contentBg: token.colorBgElevated,
titleColor: token.colorTextHeading
});
/* harmony default export */ __webpack_exports__.ZP = ((0,_theme_internal__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)('Modal', token => {
const modalToken = prepareToken(token);
return [genModalStyle(modalToken), genRTLStyle(modalToken), genModalMaskStyle(modalToken), token.wireframe && genWireframeStyle(modalToken), (0,_style_motion__WEBPACK_IMPORTED_MODULE_4__/* .initZoomMotion */ ._y)(modalToken, 'zoom')];
}, prepareComponentToken));
/***/ }),
/***/ 28909:
/*!****************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/notification/index.js + 5 modules ***!
\****************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ es_notification; }
});
// UNUSED EXPORTS: actWrapper
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/React/render.js
var render = __webpack_require__(59905);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/index.js + 5 modules
var config_provider = __webpack_require__(92736);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CheckCircleFilled.js + 1 modules
var CheckCircleFilled = __webpack_require__(99019);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CloseCircleFilled.js + 1 modules
var CloseCircleFilled = __webpack_require__(23411);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/CloseOutlined.js + 1 modules
var CloseOutlined = __webpack_require__(3680);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/ExclamationCircleFilled.js + 1 modules
var ExclamationCircleFilled = __webpack_require__(31034);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/InfoCircleFilled.js + 1 modules
var InfoCircleFilled = __webpack_require__(35941);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/LoadingOutlined.js + 1 modules
var LoadingOutlined = __webpack_require__(45161);
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_rc-notification@5.1.1@rc-notification/es/index.js + 5 modules
var es = __webpack_require__(581);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.4@@ant-design/cssinjs/es/index.js + 35 modules
var cssinjs_es = __webpack_require__(78600);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/notification/style/placement.js
const genNotificationPlacementStyle = token => {
const {
componentCls,
width,
notificationMarginEdge
} = token;
const notificationTopFadeIn = new cssinjs_es.Keyframes('antNotificationTopFadeIn', {
'0%': {
marginTop: '-100%',
opacity: 0
},
'100%': {
marginTop: 0,
opacity: 1
}
});
const notificationBottomFadeIn = new cssinjs_es.Keyframes('antNotificationBottomFadeIn', {
'0%': {
marginBottom: '-100%',
opacity: 0
},
'100%': {
marginBottom: 0,
opacity: 1
}
});
const notificationLeftFadeIn = new cssinjs_es.Keyframes('antNotificationLeftFadeIn', {
'0%': {
right: {
_skip_check_: true,
value: width
},
opacity: 0
},
'100%': {
right: {
_skip_check_: true,
value: 0
},
opacity: 1
}
});
return {
[`&${componentCls}-top, &${componentCls}-bottom`]: {
marginInline: 0
},
[`&${componentCls}-top`]: {
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
animationName: notificationTopFadeIn
}
},
[`&${componentCls}-bottom`]: {
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
animationName: notificationBottomFadeIn
}
},
[`&${componentCls}-topLeft, &${componentCls}-bottomLeft`]: {
marginInlineEnd: 0,
marginInlineStart: notificationMarginEdge,
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
animationName: notificationLeftFadeIn
}
}
};
};
/* harmony default export */ var placement = (genNotificationPlacementStyle);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/notification/style/index.js
"use client";
const genNotificationStyle = token => {
const {
iconCls,
componentCls,
// .ant-notification
boxShadow,
fontSizeLG,
notificationMarginBottom,
borderRadiusLG,
colorSuccess,
colorInfo,
colorWarning,
colorError,
colorTextHeading,
notificationBg,
notificationPadding,
notificationMarginEdge,
motionDurationMid,
motionEaseInOut,
fontSize,
lineHeight,
width,
notificationIconSize,
colorText
} = token;
const noticeCls = `${componentCls}-notice`;
const notificationFadeIn = new cssinjs_es.Keyframes('antNotificationFadeIn', {
'0%': {
left: {
_skip_check_: true,
value: width
},
opacity: 0
},
'100%': {
left: {
_skip_check_: true,
value: 0
},
opacity: 1
}
});
const notificationFadeOut = new cssinjs_es.Keyframes('antNotificationFadeOut', {
'0%': {
maxHeight: token.animationMaxHeight,
marginBottom: notificationMarginBottom,
opacity: 1
},
'100%': {
maxHeight: 0,
marginBottom: 0,
paddingTop: 0,
paddingBottom: 0,
opacity: 0
}
});
const noticeStyle = {
position: 'relative',
width,
maxWidth: `calc(100vw - ${notificationMarginEdge * 2}px)`,
marginBottom: notificationMarginBottom,
marginInlineStart: 'auto',
padding: notificationPadding,
overflow: 'hidden',
lineHeight,
wordWrap: 'break-word',
background: notificationBg,
borderRadius: borderRadiusLG,
boxShadow,
[`${componentCls}-close-icon`]: {
fontSize,
cursor: 'pointer'
},
[`${noticeCls}-message`]: {
marginBottom: token.marginXS,
color: colorTextHeading,
fontSize: fontSizeLG,
lineHeight: token.lineHeightLG
},
[`${noticeCls}-description`]: {
fontSize,
color: colorText
},
[`&${noticeCls}-closable ${noticeCls}-message`]: {
paddingInlineEnd: token.paddingLG
},
[`${noticeCls}-with-icon ${noticeCls}-message`]: {
marginBottom: token.marginXS,
marginInlineStart: token.marginSM + notificationIconSize,
fontSize: fontSizeLG
},
[`${noticeCls}-with-icon ${noticeCls}-description`]: {
marginInlineStart: token.marginSM + notificationIconSize,
fontSize
},
// Icon & color style in different selector level
// https://github.com/ant-design/ant-design/issues/16503
// https://github.com/ant-design/ant-design/issues/15512
[`${noticeCls}-icon`]: {
position: 'absolute',
fontSize: notificationIconSize,
lineHeight: 0,
// icon-font
[`&-success${iconCls}`]: {
color: colorSuccess
},
[`&-info${iconCls}`]: {
color: colorInfo
},
[`&-warning${iconCls}`]: {
color: colorWarning
},
[`&-error${iconCls}`]: {
color: colorError
}
},
[`${noticeCls}-close`]: {
position: 'absolute',
top: token.notificationPaddingVertical,
insetInlineEnd: token.notificationPaddingHorizontal,
color: token.colorIcon,
outline: 'none',
width: token.notificationCloseButtonSize,
height: token.notificationCloseButtonSize,
borderRadius: token.borderRadiusSM,
transition: `background-color ${token.motionDurationMid}, color ${token.motionDurationMid}`,
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
'&:hover': {
color: token.colorIconHover,
backgroundColor: token.wireframe ? 'transparent' : token.colorFillContent
}
},
[`${noticeCls}-btn`]: {
float: 'right',
marginTop: token.marginSM
}
};
return [
// ============================ Holder ============================
{
[componentCls]: Object.assign(Object.assign(Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
position: 'fixed',
zIndex: token.zIndexPopup,
marginInlineEnd: notificationMarginEdge,
[`${componentCls}-hook-holder`]: {
position: 'relative'
},
[`&${componentCls}-top, &${componentCls}-bottom`]: {
[noticeCls]: {
marginInline: 'auto auto'
}
},
[`&${componentCls}-topLeft, &${componentCls}-bottomLeft`]: {
[noticeCls]: {
marginInlineEnd: 'auto',
marginInlineStart: 0
}
},
// animation
[`${componentCls}-fade-enter, ${componentCls}-fade-appear`]: {
animationDuration: token.motionDurationMid,
animationTimingFunction: motionEaseInOut,
animationFillMode: 'both',
opacity: 0,
animationPlayState: 'paused'
},
[`${componentCls}-fade-leave`]: {
animationTimingFunction: motionEaseInOut,
animationFillMode: 'both',
animationDuration: motionDurationMid,
animationPlayState: 'paused'
},
[`${componentCls}-fade-enter${componentCls}-fade-enter-active, ${componentCls}-fade-appear${componentCls}-fade-appear-active`]: {
animationName: notificationFadeIn,
animationPlayState: 'running'
},
[`${componentCls}-fade-leave${componentCls}-fade-leave-active`]: {
animationName: notificationFadeOut,
animationPlayState: 'running'
}
}), placement(token)), {
// RTL
'&-rtl': {
direction: 'rtl',
[`${noticeCls}-btn`]: {
float: 'left'
}
}
})
},
// ============================ Notice ============================
{
[componentCls]: {
[noticeCls]: Object.assign({}, noticeStyle)
}
},
// ============================= Pure =============================
{
[`${noticeCls}-pure-panel`]: Object.assign(Object.assign({}, noticeStyle), {
margin: 0
})
}];
};
// ============================== Export ==============================
/* harmony default export */ var notification_style = ((0,genComponentStyleHook/* default */.Z)('Notification', token => {
const notificationPaddingVertical = token.paddingMD;
const notificationPaddingHorizontal = token.paddingLG;
const notificationToken = (0,statistic/* merge */.TS)(token, {
// index.less variables
notificationBg: token.colorBgElevated,
notificationPaddingVertical,
notificationPaddingHorizontal,
notificationIconSize: token.fontSizeLG * token.lineHeightLG,
notificationCloseButtonSize: token.controlHeightLG * 0.55,
notificationMarginBottom: token.margin,
notificationPadding: `${token.paddingMD}px ${token.paddingContentHorizontalLG}px`,
notificationMarginEdge: token.marginLG,
animationMaxHeight: 150
});
return [genNotificationStyle(notificationToken)];
}, token => ({
zIndexPopup: token.zIndexPopupBase + 50,
width: 384
})));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/notification/PurePanel.js
"use client";
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;
};
const TypeIcon = {
info: /*#__PURE__*/_react_17_0_2_react.createElement(InfoCircleFilled/* default */.Z, null),
success: /*#__PURE__*/_react_17_0_2_react.createElement(CheckCircleFilled/* default */.Z, null),
error: /*#__PURE__*/_react_17_0_2_react.createElement(CloseCircleFilled/* default */.Z, null),
warning: /*#__PURE__*/_react_17_0_2_react.createElement(ExclamationCircleFilled/* default */.Z, null),
loading: /*#__PURE__*/_react_17_0_2_react.createElement(LoadingOutlined/* default */.Z, null)
};
function getCloseIcon(prefixCls, closeIcon) {
if (closeIcon === null || closeIcon === false) {
return null;
}
return closeIcon || /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-close-x`
}, /*#__PURE__*/_react_17_0_2_react.createElement(CloseOutlined/* default */.Z, {
className: `${prefixCls}-close-icon`
}));
}
const typeToIcon = {
success: CheckCircleFilled/* default */.Z,
info: InfoCircleFilled/* default */.Z,
error: CloseCircleFilled/* default */.Z,
warning: ExclamationCircleFilled/* default */.Z
};
const PureContent = props => {
const {
prefixCls,
icon,
type,
message,
description,
btn,
role = 'alert'
} = props;
let iconNode = null;
if (icon) {
iconNode = /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: `${prefixCls}-icon`
}, icon);
} else if (type) {
iconNode = /*#__PURE__*/_react_17_0_2_react.createElement(typeToIcon[type] || null, {
className: _classnames_2_5_1_classnames_default()(`${prefixCls}-icon`, `${prefixCls}-icon-${type}`)
});
}
return /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: _classnames_2_5_1_classnames_default()({
[`${prefixCls}-with-icon`]: iconNode
}),
role: role
}, iconNode, /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${prefixCls}-message`
}, message), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${prefixCls}-description`
}, description), btn && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${prefixCls}-btn`
}, btn));
};
/** @private Internal Component. Do not use in your production. */
const PurePanel = props => {
const {
prefixCls: staticPrefixCls,
className,
icon,
type,
message,
description,
btn,
closable = true,
closeIcon
} = props,
restProps = __rest(props, ["prefixCls", "className", "icon", "type", "message", "description", "btn", "closable", "closeIcon"]);
const {
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = staticPrefixCls || getPrefixCls('notification');
const noticePrefixCls = `${prefixCls}-notice`;
const [, hashId] = notification_style(prefixCls);
return /*#__PURE__*/_react_17_0_2_react.createElement(es/* Notice */.qX, Object.assign({}, restProps, {
prefixCls: prefixCls,
className: _classnames_2_5_1_classnames_default()(className, hashId, `${noticePrefixCls}-pure-panel`),
eventKey: "pure",
duration: null,
closable: closable,
closeIcon: getCloseIcon(prefixCls, closeIcon),
content: /*#__PURE__*/_react_17_0_2_react.createElement(PureContent, {
prefixCls: noticePrefixCls,
icon: icon,
type: type,
message: message,
description: description,
btn: btn
})
}));
};
/* harmony default export */ var notification_PurePanel = (PurePanel);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/notification/util.js
function getPlacementStyle(placement, top, bottom) {
let style;
switch (placement) {
case 'top':
style = {
left: '50%',
transform: 'translateX(-50%)',
right: 'auto',
top,
bottom: 'auto'
};
break;
case 'topLeft':
style = {
left: 0,
top,
bottom: 'auto'
};
break;
case 'topRight':
style = {
right: 0,
top,
bottom: 'auto'
};
break;
case 'bottom':
style = {
left: '50%',
transform: 'translateX(-50%)',
right: 'auto',
top: 'auto',
bottom
};
break;
case 'bottomLeft':
style = {
left: 0,
top: 'auto',
bottom
};
break;
default:
style = {
right: 0,
top: 'auto',
bottom
};
break;
}
return style;
}
function getMotion(prefixCls) {
return {
motionName: `${prefixCls}-fade`
};
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/notification/useNotification.js
"use client";
var useNotification_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;
};
const DEFAULT_OFFSET = 24;
const DEFAULT_DURATION = 4.5;
const DEFAULT_PLACEMENT = 'topRight';
const Wrapper = _ref => {
let {
children,
prefixCls
} = _ref;
const [, hashId] = notification_style(prefixCls);
return /*#__PURE__*/_react_17_0_2_react.createElement(es/* NotificationProvider */.JB, {
classNames: {
list: hashId,
notice: hashId
}
}, children);
};
const renderNotifications = (node, _ref2) => {
let {
prefixCls,
key
} = _ref2;
return /*#__PURE__*/_react_17_0_2_react.createElement(Wrapper, {
prefixCls: prefixCls,
key: key
}, node);
};
const Holder = /*#__PURE__*/_react_17_0_2_react.forwardRef((props, ref) => {
const {
top,
bottom,
prefixCls: staticPrefixCls,
getContainer: staticGetContainer,
maxCount,
rtl,
onAllRemoved
} = props;
const {
getPrefixCls,
getPopupContainer,
notification
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const prefixCls = staticPrefixCls || getPrefixCls('notification');
// =============================== Style ===============================
const getStyle = placement => getPlacementStyle(placement, top !== null && top !== void 0 ? top : DEFAULT_OFFSET, bottom !== null && bottom !== void 0 ? bottom : DEFAULT_OFFSET);
const getClassName = () => _classnames_2_5_1_classnames_default()({
[`${prefixCls}-rtl`]: rtl
});
// ============================== Motion ===============================
const getNotificationMotion = () => getMotion(prefixCls);
// ============================== Origin ===============================
const [api, holder] = (0,es/* useNotification */.lm)({
prefixCls,
style: getStyle,
className: getClassName,
motion: getNotificationMotion,
closable: true,
closeIcon: getCloseIcon(prefixCls),
duration: DEFAULT_DURATION,
getContainer: () => (staticGetContainer === null || staticGetContainer === void 0 ? void 0 : staticGetContainer()) || (getPopupContainer === null || getPopupContainer === void 0 ? void 0 : getPopupContainer()) || document.body,
maxCount,
onAllRemoved,
renderNotifications
});
// ================================ Ref ================================
_react_17_0_2_react.useImperativeHandle(ref, () => Object.assign(Object.assign({}, api), {
prefixCls,
notification
}));
return holder;
});
// ==============================================================================
// == Hook ==
// ==============================================================================
function useInternalNotification(notificationConfig) {
const holderRef = _react_17_0_2_react.useRef(null);
// ================================ API ================================
const wrapAPI = _react_17_0_2_react.useMemo(() => {
// Wrap with notification content
// >>> Open
const open = config => {
var _a;
if (!holderRef.current) {
false ? 0 : void 0;
return;
}
const {
open: originOpen,
prefixCls,
notification
} = holderRef.current;
const noticePrefixCls = `${prefixCls}-notice`;
const {
message,
description,
icon,
type,
btn,
className,
style,
role = 'alert',
closeIcon
} = config,
restConfig = useNotification_rest(config, ["message", "description", "icon", "type", "btn", "className", "style", "role", "closeIcon"]);
const realCloseIcon = getCloseIcon(noticePrefixCls, closeIcon);
return originOpen(Object.assign(Object.assign({
// use placement from props instead of hard-coding "topRight"
placement: (_a = notificationConfig === null || notificationConfig === void 0 ? void 0 : notificationConfig.placement) !== null && _a !== void 0 ? _a : DEFAULT_PLACEMENT
}, restConfig), {
content: /*#__PURE__*/_react_17_0_2_react.createElement(PureContent, {
prefixCls: noticePrefixCls,
icon: icon,
type: type,
message: message,
description: description,
btn: btn,
role: role
}),
className: _classnames_2_5_1_classnames_default()(type && `${noticePrefixCls}-${type}`, className, notification === null || notification === void 0 ? void 0 : notification.className),
style: Object.assign(Object.assign({}, notification === null || notification === void 0 ? void 0 : notification.style), style),
closeIcon: realCloseIcon,
closable: !!realCloseIcon
}));
};
// >>> destroy
const destroy = key => {
var _a, _b;
if (key !== undefined) {
(_a = holderRef.current) === null || _a === void 0 ? void 0 : _a.close(key);
} else {
(_b = holderRef.current) === null || _b === void 0 ? void 0 : _b.destroy();
}
};
const clone = {
open,
destroy
};
const keys = ['success', 'info', 'warning', 'error'];
keys.forEach(type => {
clone[type] = config => open(Object.assign(Object.assign({}, config), {
type
}));
});
return clone;
}, []);
// ============================== Return ===============================
return [wrapAPI, /*#__PURE__*/_react_17_0_2_react.createElement(Holder, Object.assign({
key: "notification-holder"
}, notificationConfig, {
ref: holderRef
}))];
}
function useNotification(notificationConfig) {
return useInternalNotification(notificationConfig);
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/notification/index.js
"use client";
let notification = null;
let act = callback => callback();
let taskQueue = [];
let defaultGlobalConfig = {};
function getGlobalContext() {
const {
prefixCls: globalPrefixCls,
getContainer: globalGetContainer,
rtl,
maxCount,
top,
bottom
} = defaultGlobalConfig;
const mergedPrefixCls = globalPrefixCls !== null && globalPrefixCls !== void 0 ? globalPrefixCls : (0,config_provider/* globalConfig */.w6)().getPrefixCls('notification');
const mergedContainer = (globalGetContainer === null || globalGetContainer === void 0 ? void 0 : globalGetContainer()) || document.body;
return {
prefixCls: mergedPrefixCls,
getContainer: () => mergedContainer,
rtl,
maxCount,
top,
bottom
};
}
const GlobalHolder = /*#__PURE__*/_react_17_0_2_react.forwardRef((_, ref) => {
const [notificationConfig, setNotificationConfig] = _react_17_0_2_react.useState(getGlobalContext);
const [api, holder] = useInternalNotification(notificationConfig);
const global = (0,config_provider/* globalConfig */.w6)();
const rootPrefixCls = global.getRootPrefixCls();
const rootIconPrefixCls = global.getIconPrefixCls();
const theme = global.getTheme();
const sync = () => {
setNotificationConfig(getGlobalContext);
};
_react_17_0_2_react.useEffect(sync, []);
_react_17_0_2_react.useImperativeHandle(ref, () => {
const instance = Object.assign({}, api);
Object.keys(instance).forEach(method => {
instance[method] = function () {
sync();
return api[method].apply(api, arguments);
};
});
return {
instance,
sync
};
});
return /*#__PURE__*/_react_17_0_2_react.createElement(config_provider/* default */.ZP, {
prefixCls: rootPrefixCls,
iconPrefixCls: rootIconPrefixCls,
theme: theme
}, holder);
});
function flushNotice() {
if (!notification) {
const holderFragment = document.createDocumentFragment();
const newNotification = {
fragment: holderFragment
};
notification = newNotification;
// Delay render to avoid sync issue
act(() => {
(0,render/* render */.s)( /*#__PURE__*/_react_17_0_2_react.createElement(GlobalHolder, {
ref: node => {
const {
instance,
sync
} = node || {};
Promise.resolve().then(() => {
if (!newNotification.instance && instance) {
newNotification.instance = instance;
newNotification.sync = sync;
flushNotice();
}
});
}
}), holderFragment);
});
return;
}
// Notification not ready
if (!notification.instance) {
return;
}
// >>> Execute task
taskQueue.forEach(task => {
// eslint-disable-next-line default-case
switch (task.type) {
case 'open':
{
act(() => {
notification.instance.open(Object.assign(Object.assign({}, defaultGlobalConfig), task.config));
});
break;
}
case 'destroy':
act(() => {
notification === null || notification === void 0 ? void 0 : notification.instance.destroy(task.key);
});
break;
}
});
// Clean up
taskQueue = [];
}
// ==============================================================================
// == Export ==
// ==============================================================================
function setNotificationGlobalConfig(config) {
defaultGlobalConfig = Object.assign(Object.assign({}, defaultGlobalConfig), config);
// Trigger sync for it
act(() => {
var _a;
(_a = notification === null || notification === void 0 ? void 0 : notification.sync) === null || _a === void 0 ? void 0 : _a.call(notification);
});
}
function notification_open(config) {
// Warning if exist theme
if (false) {}
taskQueue.push({
type: 'open',
config
});
flushNotice();
}
function destroy(key) {
taskQueue.push({
type: 'destroy',
key
});
flushNotice();
}
const methods = ['success', 'info', 'warning', 'error'];
const baseStaticMethods = {
open: notification_open,
destroy,
config: setNotificationGlobalConfig,
useNotification: useNotification,
_InternalPanelDoNotUseOrYouWillBeFired: notification_PurePanel
};
const staticMethods = baseStaticMethods;
methods.forEach(type => {
staticMethods[type] = config => notification_open(Object.assign(Object.assign({}, config), {
type
}));
});
// ==============================================================================
// == Test ==
// ==============================================================================
const noop = () => {};
/** @internal Only Work in test env */
// eslint-disable-next-line import/no-mutable-exports
let actWrapper = (/* unused pure expression or super */ null && (noop));
if (false) {}
/* harmony default export */ var es_notification = (staticMethods);
/***/ }),
/***/ 95237:
/*!*******************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/row/index.js ***!
\*******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _grid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../grid */ 27382);
"use client";
/* harmony default export */ __webpack_exports__.Z = (_grid__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z);
/***/ }),
/***/ 33234:
/*!***********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/space/Compact.js ***!
\***********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ BR: function() { return /* binding */ NoCompactStyle; },
/* harmony export */ ri: function() { return /* binding */ useCompactItemContext; }
/* harmony export */ });
/* unused harmony export SpaceCompactItemContext */
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! classnames */ 92310);
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! rc-util/es/Children/toArray */ 6415);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _config_provider__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../config-provider */ 36355);
/* harmony import */ var _config_provider_hooks_useSize__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../config-provider/hooks/useSize */ 19716);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./style */ 2856);
"use client";
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;
};
const SpaceCompactItemContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createContext(null);
const useCompactItemContext = (prefixCls, direction) => {
const compactItemContext = react__WEBPACK_IMPORTED_MODULE_2__.useContext(SpaceCompactItemContext);
const compactItemClassnames = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => {
if (!compactItemContext) {
return '';
}
const {
compactDirection,
isFirstItem,
isLastItem
} = compactItemContext;
const separator = compactDirection === 'vertical' ? '-vertical-' : '-';
return classnames__WEBPACK_IMPORTED_MODULE_0___default()(`${prefixCls}-compact${separator}item`, {
[`${prefixCls}-compact${separator}first-item`]: isFirstItem,
[`${prefixCls}-compact${separator}last-item`]: isLastItem,
[`${prefixCls}-compact${separator}item-rtl`]: direction === 'rtl'
});
}, [prefixCls, direction, compactItemContext]);
return {
compactSize: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactSize,
compactDirection: compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.compactDirection,
compactItemClassnames
};
};
const NoCompactStyle = _ref => {
let {
children
} = _ref;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(SpaceCompactItemContext.Provider, {
value: null
}, children);
};
const CompactItem = _a => {
var {
children
} = _a,
otherProps = __rest(_a, ["children"]);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(SpaceCompactItemContext.Provider, {
value: otherProps
}, children);
};
const Compact = props => {
const {
getPrefixCls,
direction: directionConfig
} = react__WEBPACK_IMPORTED_MODULE_2__.useContext(_config_provider__WEBPACK_IMPORTED_MODULE_3__/* .ConfigContext */ .E_);
const {
size,
direction,
block,
prefixCls: customizePrefixCls,
className,
rootClassName,
children
} = props,
restProps = __rest(props, ["size", "direction", "block", "prefixCls", "className", "rootClassName", "children"]);
const mergedSize = (0,_config_provider_hooks_useSize__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(ctx => size !== null && size !== void 0 ? size : ctx);
const prefixCls = getPrefixCls('space-compact', customizePrefixCls);
const [wrapSSR, hashId] = (0,_style__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(prefixCls);
const clx = classnames__WEBPACK_IMPORTED_MODULE_0___default()(prefixCls, hashId, {
[`${prefixCls}-rtl`]: directionConfig === 'rtl',
[`${prefixCls}-block`]: block,
[`${prefixCls}-vertical`]: direction === 'vertical'
}, className, rootClassName);
const compactItemContext = react__WEBPACK_IMPORTED_MODULE_2__.useContext(SpaceCompactItemContext);
const childNodes = (0,rc_util_es_Children_toArray__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)(children);
const nodes = react__WEBPACK_IMPORTED_MODULE_2__.useMemo(() => childNodes.map((child, i) => {
const key = child && child.key || `${prefixCls}-item-${i}`;
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement(CompactItem, {
key: key,
compactSize: mergedSize,
compactDirection: direction,
isFirstItem: i === 0 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isFirstItem)),
isLastItem: i === childNodes.length - 1 && (!compactItemContext || (compactItemContext === null || compactItemContext === void 0 ? void 0 : compactItemContext.isLastItem))
}, child);
}), [size, childNodes, compactItemContext]);
// =========================== Render ===========================
if (childNodes.length === 0) {
return null;
}
return wrapSSR( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_2__.createElement("div", Object.assign({
className: clx
}, restProps), nodes));
};
/* harmony default export */ __webpack_exports__.ZP = (Compact);
/***/ }),
/***/ 2856:
/*!***************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/space/style/index.js + 1 modules ***!
\***************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ style; }
});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/style/compact.js
const genSpaceCompactStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
'&-block': {
display: 'flex',
width: '100%'
},
'&-vertical': {
flexDirection: 'column'
}
}
};
};
// ============================== Export ==============================
/* harmony default export */ var compact = (genSpaceCompactStyle);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/space/style/index.js
const genSpaceStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
display: 'inline-flex',
'&-rtl': {
direction: 'rtl'
},
'&-vertical': {
flexDirection: 'column'
},
'&-align': {
flexDirection: 'column',
'&-center': {
alignItems: 'center'
},
'&-start': {
alignItems: 'flex-start'
},
'&-end': {
alignItems: 'flex-end'
},
'&-baseline': {
alignItems: 'baseline'
}
},
[`${componentCls}-item:empty`]: {
display: 'none'
}
}
};
};
const genSpaceGapStyle = token => {
const {
componentCls
} = token;
return {
[componentCls]: {
'&-gap-row-small': {
rowGap: token.spaceGapSmallSize
},
'&-gap-row-middle': {
rowGap: token.spaceGapMiddleSize
},
'&-gap-row-large': {
rowGap: token.spaceGapLargeSize
},
'&-gap-col-small': {
columnGap: token.spaceGapSmallSize
},
'&-gap-col-middle': {
columnGap: token.spaceGapMiddleSize
},
'&-gap-col-large': {
columnGap: token.spaceGapLargeSize
}
}
};
};
// ============================== Export ==============================
/* harmony default export */ var style = ((0,genComponentStyleHook/* default */.Z)('Space', token => {
const spaceToken = (0,statistic/* merge */.TS)(token, {
spaceGapSmallSize: token.paddingXS,
spaceGapMiddleSize: token.padding,
spaceGapLargeSize: token.paddingLG
});
return [genSpaceStyle(spaceToken), genSpaceGapStyle(spaceToken), compact(spaceToken)];
}, () => ({}), {
// Space component don't apply extra font style
// https://github.com/ant-design/ant-design/issues/40315
resetStyle: false
}));
/***/ }),
/***/ 71418:
/*!********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/spin/index.js + 1 modules ***!
\********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ spin; }
});
// EXTERNAL MODULE: ./node_modules/_classnames@2.5.1@classnames/index.js
var _classnames_2_5_1_classnames = __webpack_require__(92310);
var _classnames_2_5_1_classnames_default = /*#__PURE__*/__webpack_require__.n(_classnames_2_5_1_classnames);
// EXTERNAL MODULE: ./node_modules/_rc-util@5.38.2@rc-util/es/omit.js
var omit = __webpack_require__(41123);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_throttle-debounce@5.0.0@throttle-debounce/esm/index.js
var esm = __webpack_require__(13530);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/_util/reactNode.js
var reactNode = __webpack_require__(92343);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/config-provider/context.js
var context = __webpack_require__(36355);
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.4@@ant-design/cssinjs/es/index.js + 35 modules
var es = __webpack_require__(78600);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/style/index.js
var style = __webpack_require__(17313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js
var genComponentStyleHook = __webpack_require__(83116);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js
var statistic = __webpack_require__(37613);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/style/index.js
"use client";
const antSpinMove = new es.Keyframes('antSpinMove', {
to: {
opacity: 1
}
});
const antRotate = new es.Keyframes('antRotate', {
to: {
transform: 'rotate(405deg)'
}
});
const genSpinStyle = token => ({
[`${token.componentCls}`]: Object.assign(Object.assign({}, (0,style/* resetComponent */.Wf)(token)), {
position: 'absolute',
display: 'none',
color: token.colorPrimary,
fontSize: 0,
textAlign: 'center',
verticalAlign: 'middle',
opacity: 0,
transition: `transform ${token.motionDurationSlow} ${token.motionEaseInOutCirc}`,
'&-spinning': {
position: 'static',
display: 'inline-block',
opacity: 1
},
'&-nested-loading': {
position: 'relative',
[`> div > ${token.componentCls}`]: {
position: 'absolute',
top: 0,
insetInlineStart: 0,
zIndex: 4,
display: 'block',
width: '100%',
height: '100%',
maxHeight: token.contentHeight,
[`${token.componentCls}-dot`]: {
position: 'absolute',
top: '50%',
insetInlineStart: '50%',
margin: -token.dotSize / 2
},
[`${token.componentCls}-text`]: {
position: 'absolute',
top: '50%',
width: '100%',
paddingTop: (token.dotSize - token.fontSize) / 2 + 2,
textShadow: `0 1px 2px ${token.colorBgContainer}`,
fontSize: token.fontSize
},
[`&${token.componentCls}-show-text ${token.componentCls}-dot`]: {
marginTop: -(token.dotSize / 2) - 10
},
'&-sm': {
[`${token.componentCls}-dot`]: {
margin: -token.dotSizeSM / 2
},
[`${token.componentCls}-text`]: {
paddingTop: (token.dotSizeSM - token.fontSize) / 2 + 2
},
[`&${token.componentCls}-show-text ${token.componentCls}-dot`]: {
marginTop: -(token.dotSizeSM / 2) - 10
}
},
'&-lg': {
[`${token.componentCls}-dot`]: {
margin: -(token.dotSizeLG / 2)
},
[`${token.componentCls}-text`]: {
paddingTop: (token.dotSizeLG - token.fontSize) / 2 + 2
},
[`&${token.componentCls}-show-text ${token.componentCls}-dot`]: {
marginTop: -(token.dotSizeLG / 2) - 10
}
}
},
[`${token.componentCls}-container`]: {
position: 'relative',
transition: `opacity ${token.motionDurationSlow}`,
'&::after': {
position: 'absolute',
top: 0,
insetInlineEnd: 0,
bottom: 0,
insetInlineStart: 0,
zIndex: 10,
width: '100%',
height: '100%',
background: token.colorBgContainer,
opacity: 0,
transition: `all ${token.motionDurationSlow}`,
content: '""',
pointerEvents: 'none'
}
},
[`${token.componentCls}-blur`]: {
clear: 'both',
opacity: 0.5,
userSelect: 'none',
pointerEvents: 'none',
[`&::after`]: {
opacity: 0.4,
pointerEvents: 'auto'
}
}
},
// tip
// ------------------------------
[`&-tip`]: {
color: token.spinDotDefault
},
// dots
// ------------------------------
[`${token.componentCls}-dot`]: {
position: 'relative',
display: 'inline-block',
fontSize: token.dotSize,
width: '1em',
height: '1em',
'&-item': {
position: 'absolute',
display: 'block',
width: (token.dotSize - token.marginXXS / 2) / 2,
height: (token.dotSize - token.marginXXS / 2) / 2,
backgroundColor: token.colorPrimary,
borderRadius: '100%',
transform: 'scale(0.75)',
transformOrigin: '50% 50%',
opacity: 0.3,
animationName: antSpinMove,
animationDuration: '1s',
animationIterationCount: 'infinite',
animationTimingFunction: 'linear',
animationDirection: 'alternate',
'&:nth-child(1)': {
top: 0,
insetInlineStart: 0
},
'&:nth-child(2)': {
top: 0,
insetInlineEnd: 0,
animationDelay: '0.4s'
},
'&:nth-child(3)': {
insetInlineEnd: 0,
bottom: 0,
animationDelay: '0.8s'
},
'&:nth-child(4)': {
bottom: 0,
insetInlineStart: 0,
animationDelay: '1.2s'
}
},
'&-spin': {
transform: 'rotate(45deg)',
animationName: antRotate,
animationDuration: '1.2s',
animationIterationCount: 'infinite',
animationTimingFunction: 'linear'
}
},
// Sizes
// ------------------------------
// small
[`&-sm ${token.componentCls}-dot`]: {
fontSize: token.dotSizeSM,
i: {
width: (token.dotSizeSM - token.marginXXS / 2) / 2,
height: (token.dotSizeSM - token.marginXXS / 2) / 2
}
},
// large
[`&-lg ${token.componentCls}-dot`]: {
fontSize: token.dotSizeLG,
i: {
width: (token.dotSizeLG - token.marginXXS) / 2,
height: (token.dotSizeLG - token.marginXXS) / 2
}
},
[`&${token.componentCls}-show-text ${token.componentCls}-text`]: {
display: 'block'
}
})
});
// ============================== Export ==============================
/* harmony default export */ var spin_style = ((0,genComponentStyleHook/* default */.Z)('Spin', token => {
const spinToken = (0,statistic/* merge */.TS)(token, {
spinDotDefault: token.colorTextDescription
});
return [genSpinStyle(spinToken)];
}, token => ({
contentHeight: 400,
dotSize: token.controlHeightLG / 2,
dotSizeSM: token.controlHeightLG * 0.35,
dotSizeLG: token.controlHeight
})));
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/spin/index.js
"use client";
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;
};
const SpinSizes = (/* unused pure expression or super */ null && (['small', 'default', 'large']));
// Render indicator
let defaultIndicator = null;
function renderIndicator(prefixCls, props) {
const {
indicator
} = props;
const dotClassName = `${prefixCls}-dot`;
// should not be render default indicator when indicator value is null
if (indicator === null) {
return null;
}
if ((0,reactNode/* isValidElement */.l$)(indicator)) {
return (0,reactNode/* cloneElement */.Tm)(indicator, {
className: _classnames_2_5_1_classnames_default()(indicator.props.className, dotClassName)
});
}
if ((0,reactNode/* isValidElement */.l$)(defaultIndicator)) {
return (0,reactNode/* cloneElement */.Tm)(defaultIndicator, {
className: _classnames_2_5_1_classnames_default()(defaultIndicator.props.className, dotClassName)
});
}
return /*#__PURE__*/_react_17_0_2_react.createElement("span", {
className: _classnames_2_5_1_classnames_default()(dotClassName, `${prefixCls}-dot-spin`)
}, /*#__PURE__*/_react_17_0_2_react.createElement("i", {
className: `${prefixCls}-dot-item`,
key: 1
}), /*#__PURE__*/_react_17_0_2_react.createElement("i", {
className: `${prefixCls}-dot-item`,
key: 2
}), /*#__PURE__*/_react_17_0_2_react.createElement("i", {
className: `${prefixCls}-dot-item`,
key: 3
}), /*#__PURE__*/_react_17_0_2_react.createElement("i", {
className: `${prefixCls}-dot-item`,
key: 4
}));
}
function shouldDelay(spinning, delay) {
return !!spinning && !!delay && !isNaN(Number(delay));
}
const Spin = props => {
const {
spinPrefixCls: prefixCls,
spinning: customSpinning = true,
delay = 0,
className,
rootClassName,
size = 'default',
tip,
wrapperClassName,
style,
children,
hashId
} = props,
restProps = __rest(props, ["spinPrefixCls", "spinning", "delay", "className", "rootClassName", "size", "tip", "wrapperClassName", "style", "children", "hashId"]);
const [spinning, setSpinning] = _react_17_0_2_react.useState(() => customSpinning && !shouldDelay(customSpinning, delay));
_react_17_0_2_react.useEffect(() => {
if (customSpinning) {
const showSpinning = (0,esm/* debounce */.D)(delay, () => {
setSpinning(true);
});
showSpinning();
return () => {
var _a;
(_a = showSpinning === null || showSpinning === void 0 ? void 0 : showSpinning.cancel) === null || _a === void 0 ? void 0 : _a.call(showSpinning);
};
}
setSpinning(false);
}, [delay, customSpinning]);
const isNestedPattern = _react_17_0_2_react.useMemo(() => typeof children !== 'undefined', [children]);
if (false) {}
const {
direction,
spin
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const spinClassName = _classnames_2_5_1_classnames_default()(prefixCls, spin === null || spin === void 0 ? void 0 : spin.className, {
[`${prefixCls}-sm`]: size === 'small',
[`${prefixCls}-lg`]: size === 'large',
[`${prefixCls}-spinning`]: spinning,
[`${prefixCls}-show-text`]: !!tip,
[`${prefixCls}-rtl`]: direction === 'rtl'
}, className, rootClassName, hashId);
const containerClassName = _classnames_2_5_1_classnames_default()(`${prefixCls}-container`, {
[`${prefixCls}-blur`]: spinning
});
// fix https://fb.me/react-unknown-prop
const divProps = (0,omit/* default */.Z)(restProps, ['indicator', 'prefixCls']);
const mergedStyle = Object.assign(Object.assign({}, spin === null || spin === void 0 ? void 0 : spin.style), style);
const spinElement = /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({}, divProps, {
style: mergedStyle,
className: spinClassName,
"aria-live": "polite",
"aria-busy": spinning
}), renderIndicator(prefixCls, props), tip && isNestedPattern ? /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: `${prefixCls}-text`
}, tip) : null);
if (isNestedPattern) {
return /*#__PURE__*/_react_17_0_2_react.createElement("div", Object.assign({}, divProps, {
className: _classnames_2_5_1_classnames_default()(`${prefixCls}-nested-loading`, wrapperClassName, hashId)
}), spinning && /*#__PURE__*/_react_17_0_2_react.createElement("div", {
key: "loading"
}, spinElement), /*#__PURE__*/_react_17_0_2_react.createElement("div", {
className: containerClassName,
key: "container"
}, children));
}
return spinElement;
};
const SpinFC = props => {
const {
prefixCls: customizePrefixCls
} = props;
const {
getPrefixCls
} = _react_17_0_2_react.useContext(context/* ConfigContext */.E_);
const spinPrefixCls = getPrefixCls('spin', customizePrefixCls);
const [wrapSSR, hashId] = spin_style(spinPrefixCls);
const spinClassProps = Object.assign(Object.assign({}, props), {
spinPrefixCls,
hashId
});
return wrapSSR( /*#__PURE__*/_react_17_0_2_react.createElement(Spin, Object.assign({}, spinClassProps)));
};
SpinFC.setDefaultIndicator = indicator => {
defaultIndicator = indicator;
};
if (false) {}
/* harmony default export */ var spin = (SpinFC);
/***/ }),
/***/ 74207:
/*!****************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/style/compact-item.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ c: function() { return /* binding */ genCompactItemStyle; }
/* harmony export */ });
// handle border collapse
function compactItemBorder(token, parentCls, options) {
const {
focusElCls,
focus,
borderElCls
} = options;
const childCombinator = borderElCls ? '> *' : '';
const hoverEffects = ['hover', focus ? 'focus' : null, 'active'].filter(Boolean).map(n => `&:${n} ${childCombinator}`).join(',');
return {
[`&-item:not(${parentCls}-last-item)`]: {
marginInlineEnd: -token.lineWidth
},
'&-item': Object.assign(Object.assign({
[hoverEffects]: {
zIndex: 2
}
}, focusElCls ? {
[`&${focusElCls}`]: {
zIndex: 2
}
} : {}), {
[`&[disabled] ${childCombinator}`]: {
zIndex: 0
}
})
};
}
// handle border-radius
function compactItemBorderRadius(prefixCls, parentCls, options) {
const {
borderElCls
} = options;
const childCombinator = borderElCls ? `> ${borderElCls}` : '';
return {
[`&-item:not(${parentCls}-first-item):not(${parentCls}-last-item) ${childCombinator}`]: {
borderRadius: 0
},
[`&-item:not(${parentCls}-last-item)${parentCls}-first-item`]: {
[`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {
borderStartEndRadius: 0,
borderEndEndRadius: 0
}
},
[`&-item:not(${parentCls}-first-item)${parentCls}-last-item`]: {
[`& ${childCombinator}, &${prefixCls}-sm ${childCombinator}, &${prefixCls}-lg ${childCombinator}`]: {
borderStartStartRadius: 0,
borderEndStartRadius: 0
}
}
};
}
function genCompactItemStyle(token) {
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
focus: true
};
const {
componentCls
} = token;
const compactCls = `${componentCls}-compact`;
return {
[compactCls]: Object.assign(Object.assign({}, compactItemBorder(token, compactCls, options)), compactItemBorderRadius(componentCls, compactCls, options))
};
}
/***/ }),
/***/ 17313:
/*!*********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/style/index.js ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Lx: function() { return /* binding */ genLinkStyle; },
/* harmony export */ Qy: function() { return /* binding */ genFocusStyle; },
/* harmony export */ Ro: function() { return /* binding */ resetIcon; },
/* harmony export */ Wf: function() { return /* binding */ resetComponent; },
/* harmony export */ dF: function() { return /* binding */ clearFix; },
/* harmony export */ du: function() { return /* binding */ genCommonStyle; },
/* harmony export */ oN: function() { return /* binding */ genFocusOutline; },
/* harmony export */ vS: function() { return /* binding */ textEllipsis; }
/* harmony export */ });
"use client";
const textEllipsis = {
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis'
};
const resetComponent = token => ({
boxSizing: 'border-box',
margin: 0,
padding: 0,
color: token.colorText,
fontSize: token.fontSize,
// font-variant: @font-variant-base;
lineHeight: token.lineHeight,
listStyle: 'none',
// font-feature-settings: @font-feature-settings-base;
fontFamily: token.fontFamily
});
const resetIcon = () => ({
display: 'inline-flex',
alignItems: 'center',
color: 'inherit',
fontStyle: 'normal',
lineHeight: 0,
textAlign: 'center',
textTransform: 'none',
// for SVG icon, see https://blog.prototypr.io/align-svg-icons-to-text-and-say-goodbye-to-font-icons-d44b3d7b26b4
verticalAlign: '-0.125em',
textRendering: 'optimizeLegibility',
'-webkit-font-smoothing': 'antialiased',
'-moz-osx-font-smoothing': 'grayscale',
'> *': {
lineHeight: 1
},
svg: {
display: 'inline-block'
}
});
const clearFix = () => ({
// https://github.com/ant-design/ant-design/issues/21301#issuecomment-583955229
'&::before': {
display: 'table',
content: '""'
},
'&::after': {
// https://github.com/ant-design/ant-design/issues/21864
display: 'table',
clear: 'both',
content: '""'
}
});
const genLinkStyle = token => ({
a: {
color: token.colorLink,
textDecoration: token.linkDecoration,
backgroundColor: 'transparent',
outline: 'none',
cursor: 'pointer',
transition: `color ${token.motionDurationSlow}`,
'-webkit-text-decoration-skip': 'objects',
'&:hover': {
color: token.colorLinkHover
},
'&:active': {
color: token.colorLinkActive
},
[`&:active,
&:hover`]: {
textDecoration: token.linkHoverDecoration,
outline: 0
},
// https://github.com/ant-design/ant-design/issues/22503
'&:focus': {
textDecoration: token.linkFocusDecoration,
outline: 0
},
'&[disabled]': {
color: token.colorTextDisabled,
cursor: 'not-allowed'
}
}
});
const genCommonStyle = (token, componentPrefixCls) => {
const {
fontFamily,
fontSize
} = token;
const rootPrefixSelector = `[class^="${componentPrefixCls}"], [class*=" ${componentPrefixCls}"]`;
return {
[rootPrefixSelector]: {
fontFamily,
fontSize,
boxSizing: 'border-box',
'&::before, &::after': {
boxSizing: 'border-box'
},
[rootPrefixSelector]: {
boxSizing: 'border-box',
'&::before, &::after': {
boxSizing: 'border-box'
}
}
}
};
};
const genFocusOutline = token => ({
outline: `${token.lineWidthFocus}px solid ${token.colorPrimaryBorder}`,
outlineOffset: 1,
transition: 'outline-offset 0s, outline 0s'
});
const genFocusStyle = token => ({
'&:focus-visible': Object.assign({}, genFocusOutline(token))
});
/***/ }),
/***/ 1950:
/*!***************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/style/motion/fade.js ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ J$: function() { return /* binding */ initFadeMotion; }
/* harmony export */ });
/* unused harmony exports fadeIn, fadeOut */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ 78600);
/* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ 95406);
const fadeIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antFadeIn', {
'0%': {
opacity: 0
},
'100%': {
opacity: 1
}
});
const fadeOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antFadeOut', {
'0%': {
opacity: 1
},
'100%': {
opacity: 0
}
});
const initFadeMotion = function (token) {
let sameLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
const {
antCls
} = token;
const motionCls = `${antCls}-fade`;
const sameLevelPrefix = sameLevel ? '&' : '';
return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__/* .initMotion */ .R)(motionCls, fadeIn, fadeOut, token.motionDurationMid, sameLevel), {
[`
${sameLevelPrefix}${motionCls}-enter,
${sameLevelPrefix}${motionCls}-appear
`]: {
opacity: 0,
animationTimingFunction: 'linear'
},
[`${sameLevelPrefix}${motionCls}-leave`]: {
animationTimingFunction: 'linear'
}
}];
};
/***/ }),
/***/ 95406:
/*!*****************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/style/motion/motion.js ***!
\*****************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ R: function() { return /* binding */ initMotion; }
/* harmony export */ });
const initMotionCommon = duration => ({
animationDuration: duration,
animationFillMode: 'both'
});
// FIXME: origin less code seems same as initMotionCommon. Maybe we can safe remove
const initMotionCommonLeave = duration => ({
animationDuration: duration,
animationFillMode: 'both'
});
const initMotion = function (motionCls, inKeyframes, outKeyframes, duration) {
let sameLevel = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
const sameLevelPrefix = sameLevel ? '&' : '';
return {
[`
${sameLevelPrefix}${motionCls}-enter,
${sameLevelPrefix}${motionCls}-appear
`]: Object.assign(Object.assign({}, initMotionCommon(duration)), {
animationPlayState: 'paused'
}),
[`${sameLevelPrefix}${motionCls}-leave`]: Object.assign(Object.assign({}, initMotionCommonLeave(duration)), {
animationPlayState: 'paused'
}),
[`
${sameLevelPrefix}${motionCls}-enter${motionCls}-enter-active,
${sameLevelPrefix}${motionCls}-appear${motionCls}-appear-active
`]: {
animationName: inKeyframes,
animationPlayState: 'running'
},
[`${sameLevelPrefix}${motionCls}-leave${motionCls}-leave-active`]: {
animationName: outKeyframes,
animationPlayState: 'running',
pointerEvents: 'none'
}
};
};
/***/ }),
/***/ 29878:
/*!***************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/style/motion/zoom.js ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ _y: function() { return /* binding */ initZoomMotion; },
/* harmony export */ kr: function() { return /* binding */ zoomIn; }
/* harmony export */ });
/* unused harmony exports zoomOut, zoomBigIn, zoomBigOut, zoomUpIn, zoomUpOut, zoomLeftIn, zoomLeftOut, zoomRightIn, zoomRightOut, zoomDownIn, zoomDownOut */
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ 78600);
/* harmony import */ var _motion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./motion */ 95406);
const zoomIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomIn', {
'0%': {
transform: 'scale(0.2)',
opacity: 0
},
'100%': {
transform: 'scale(1)',
opacity: 1
}
});
const zoomOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomOut', {
'0%': {
transform: 'scale(1)'
},
'100%': {
transform: 'scale(0.2)',
opacity: 0
}
});
const zoomBigIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBigIn', {
'0%': {
transform: 'scale(0.8)',
opacity: 0
},
'100%': {
transform: 'scale(1)',
opacity: 1
}
});
const zoomBigOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomBigOut', {
'0%': {
transform: 'scale(1)'
},
'100%': {
transform: 'scale(0.8)',
opacity: 0
}
});
const zoomUpIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomUpIn', {
'0%': {
transform: 'scale(0.8)',
transformOrigin: '50% 0%',
opacity: 0
},
'100%': {
transform: 'scale(1)',
transformOrigin: '50% 0%'
}
});
const zoomUpOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomUpOut', {
'0%': {
transform: 'scale(1)',
transformOrigin: '50% 0%'
},
'100%': {
transform: 'scale(0.8)',
transformOrigin: '50% 0%',
opacity: 0
}
});
const zoomLeftIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomLeftIn', {
'0%': {
transform: 'scale(0.8)',
transformOrigin: '0% 50%',
opacity: 0
},
'100%': {
transform: 'scale(1)',
transformOrigin: '0% 50%'
}
});
const zoomLeftOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomLeftOut', {
'0%': {
transform: 'scale(1)',
transformOrigin: '0% 50%'
},
'100%': {
transform: 'scale(0.8)',
transformOrigin: '0% 50%',
opacity: 0
}
});
const zoomRightIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomRightIn', {
'0%': {
transform: 'scale(0.8)',
transformOrigin: '100% 50%',
opacity: 0
},
'100%': {
transform: 'scale(1)',
transformOrigin: '100% 50%'
}
});
const zoomRightOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomRightOut', {
'0%': {
transform: 'scale(1)',
transformOrigin: '100% 50%'
},
'100%': {
transform: 'scale(0.8)',
transformOrigin: '100% 50%',
opacity: 0
}
});
const zoomDownIn = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomDownIn', {
'0%': {
transform: 'scale(0.8)',
transformOrigin: '50% 100%',
opacity: 0
},
'100%': {
transform: 'scale(1)',
transformOrigin: '50% 100%'
}
});
const zoomDownOut = new _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.Keyframes('antZoomDownOut', {
'0%': {
transform: 'scale(1)',
transformOrigin: '50% 100%'
},
'100%': {
transform: 'scale(0.8)',
transformOrigin: '50% 100%',
opacity: 0
}
});
const zoomMotion = {
zoom: {
inKeyframes: zoomIn,
outKeyframes: zoomOut
},
'zoom-big': {
inKeyframes: zoomBigIn,
outKeyframes: zoomBigOut
},
'zoom-big-fast': {
inKeyframes: zoomBigIn,
outKeyframes: zoomBigOut
},
'zoom-left': {
inKeyframes: zoomLeftIn,
outKeyframes: zoomLeftOut
},
'zoom-right': {
inKeyframes: zoomRightIn,
outKeyframes: zoomRightOut
},
'zoom-up': {
inKeyframes: zoomUpIn,
outKeyframes: zoomUpOut
},
'zoom-down': {
inKeyframes: zoomDownIn,
outKeyframes: zoomDownOut
}
};
const initZoomMotion = (token, motionName) => {
const {
antCls
} = token;
const motionCls = `${antCls}-${motionName}`;
const {
inKeyframes,
outKeyframes
} = zoomMotion[motionName];
return [(0,_motion__WEBPACK_IMPORTED_MODULE_1__/* .initMotion */ .R)(motionCls, inKeyframes, outKeyframes, motionName === 'zoom-big-fast' ? token.motionDurationFast : token.motionDurationMid), {
[`
${motionCls}-enter,
${motionCls}-appear
`]: {
transform: 'scale(0)',
opacity: 0,
animationTimingFunction: token.motionEaseOutCirc,
'&-prepare': {
transform: 'none'
}
},
[`${motionCls}-leave`]: {
animationTimingFunction: token.motionEaseInOutCirc
}
}];
};
/***/ }),
/***/ 45246:
/*!************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/theme/context.js + 10 modules ***!
\************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Mj: function() { return /* binding */ DesignTokenContext; },
u_: function() { return /* binding */ defaultConfig; },
uH: function() { return /* binding */ defaultTheme; }
});
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.4@@ant-design/cssinjs/es/index.js + 35 modules
var es = __webpack_require__(78600);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./node_modules/_@ant-design_colors@7.0.2@@ant-design/colors/es/index.js + 1 modules
var colors_es = __webpack_require__(10129);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/shared/genControlHeight.js
const genControlHeight = token => {
const {
controlHeight
} = token;
return {
controlHeightSM: controlHeight * 0.75,
controlHeightXS: controlHeight * 0.5,
controlHeightLG: controlHeight * 1.25
};
};
/* harmony default export */ var shared_genControlHeight = (genControlHeight);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/shared/genSizeMapToken.js
function genSizeMapToken(token) {
const {
sizeUnit,
sizeStep
} = token;
return {
sizeXXL: sizeUnit * (sizeStep + 8),
sizeXL: sizeUnit * (sizeStep + 4),
sizeLG: sizeUnit * (sizeStep + 2),
sizeMD: sizeUnit * (sizeStep + 1),
sizeMS: sizeUnit * sizeStep,
size: sizeUnit * sizeStep,
sizeSM: sizeUnit * (sizeStep - 1),
sizeXS: sizeUnit * (sizeStep - 2),
sizeXXS: sizeUnit * (sizeStep - 3) // 4
};
}
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/seed.js
var seed = __webpack_require__(34117);
// EXTERNAL MODULE: ./node_modules/_@ctrl_tinycolor@3.6.1@@ctrl/tinycolor/dist/module/index.js
var dist_module = __webpack_require__(64993);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/shared/genColorMapToken.js
function genColorMapToken(seed, _ref) {
let {
generateColorPalettes,
generateNeutralColorPalettes
} = _ref;
const {
colorSuccess: colorSuccessBase,
colorWarning: colorWarningBase,
colorError: colorErrorBase,
colorInfo: colorInfoBase,
colorPrimary: colorPrimaryBase,
colorBgBase,
colorTextBase
} = seed;
const primaryColors = generateColorPalettes(colorPrimaryBase);
const successColors = generateColorPalettes(colorSuccessBase);
const warningColors = generateColorPalettes(colorWarningBase);
const errorColors = generateColorPalettes(colorErrorBase);
const infoColors = generateColorPalettes(colorInfoBase);
const neutralColors = generateNeutralColorPalettes(colorBgBase, colorTextBase);
// Color Link
const colorLink = seed.colorLink || seed.colorInfo;
const linkColors = generateColorPalettes(colorLink);
return Object.assign(Object.assign({}, neutralColors), {
colorPrimaryBg: primaryColors[1],
colorPrimaryBgHover: primaryColors[2],
colorPrimaryBorder: primaryColors[3],
colorPrimaryBorderHover: primaryColors[4],
colorPrimaryHover: primaryColors[5],
colorPrimary: primaryColors[6],
colorPrimaryActive: primaryColors[7],
colorPrimaryTextHover: primaryColors[8],
colorPrimaryText: primaryColors[9],
colorPrimaryTextActive: primaryColors[10],
colorSuccessBg: successColors[1],
colorSuccessBgHover: successColors[2],
colorSuccessBorder: successColors[3],
colorSuccessBorderHover: successColors[4],
colorSuccessHover: successColors[4],
colorSuccess: successColors[6],
colorSuccessActive: successColors[7],
colorSuccessTextHover: successColors[8],
colorSuccessText: successColors[9],
colorSuccessTextActive: successColors[10],
colorErrorBg: errorColors[1],
colorErrorBgHover: errorColors[2],
colorErrorBorder: errorColors[3],
colorErrorBorderHover: errorColors[4],
colorErrorHover: errorColors[5],
colorError: errorColors[6],
colorErrorActive: errorColors[7],
colorErrorTextHover: errorColors[8],
colorErrorText: errorColors[9],
colorErrorTextActive: errorColors[10],
colorWarningBg: warningColors[1],
colorWarningBgHover: warningColors[2],
colorWarningBorder: warningColors[3],
colorWarningBorderHover: warningColors[4],
colorWarningHover: warningColors[4],
colorWarning: warningColors[6],
colorWarningActive: warningColors[7],
colorWarningTextHover: warningColors[8],
colorWarningText: warningColors[9],
colorWarningTextActive: warningColors[10],
colorInfoBg: infoColors[1],
colorInfoBgHover: infoColors[2],
colorInfoBorder: infoColors[3],
colorInfoBorderHover: infoColors[4],
colorInfoHover: infoColors[4],
colorInfo: infoColors[6],
colorInfoActive: infoColors[7],
colorInfoTextHover: infoColors[8],
colorInfoText: infoColors[9],
colorInfoTextActive: infoColors[10],
colorLinkHover: linkColors[4],
colorLink: linkColors[6],
colorLinkActive: linkColors[7],
colorBgMask: new dist_module/* TinyColor */.C('#000').setAlpha(0.45).toRgbString(),
colorWhite: '#fff'
});
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/shared/genRadius.js
const genRadius = radiusBase => {
let radiusLG = radiusBase;
let radiusSM = radiusBase;
let radiusXS = radiusBase;
let radiusOuter = radiusBase;
// radiusLG
if (radiusBase < 6 && radiusBase >= 5) {
radiusLG = radiusBase + 1;
} else if (radiusBase < 16 && radiusBase >= 6) {
radiusLG = radiusBase + 2;
} else if (radiusBase >= 16) {
radiusLG = 16;
}
// radiusSM
if (radiusBase < 7 && radiusBase >= 5) {
radiusSM = 4;
} else if (radiusBase < 8 && radiusBase >= 7) {
radiusSM = 5;
} else if (radiusBase < 14 && radiusBase >= 8) {
radiusSM = 6;
} else if (radiusBase < 16 && radiusBase >= 14) {
radiusSM = 7;
} else if (radiusBase >= 16) {
radiusSM = 8;
}
// radiusXS
if (radiusBase < 6 && radiusBase >= 2) {
radiusXS = 1;
} else if (radiusBase >= 6) {
radiusXS = 2;
}
// radiusOuter
if (radiusBase > 4 && radiusBase < 8) {
radiusOuter = 4;
} else if (radiusBase >= 8) {
radiusOuter = 6;
}
return {
borderRadius: radiusBase > 16 ? 16 : radiusBase,
borderRadiusXS: radiusXS,
borderRadiusSM: radiusSM,
borderRadiusLG: radiusLG,
borderRadiusOuter: radiusOuter
};
};
/* harmony default export */ var shared_genRadius = (genRadius);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/shared/genCommonMapToken.js
function genCommonMapToken(token) {
const {
motionUnit,
motionBase,
borderRadius,
lineWidth
} = token;
return Object.assign({
// motion
motionDurationFast: `${(motionBase + motionUnit).toFixed(1)}s`,
motionDurationMid: `${(motionBase + motionUnit * 2).toFixed(1)}s`,
motionDurationSlow: `${(motionBase + motionUnit * 3).toFixed(1)}s`,
// line
lineWidthBold: lineWidth + 1
}, shared_genRadius(borderRadius));
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/default/colorAlgorithm.js
const getAlphaColor = (baseColor, alpha) => new dist_module/* TinyColor */.C(baseColor).setAlpha(alpha).toRgbString();
const getSolidColor = (baseColor, brightness) => {
const instance = new dist_module/* TinyColor */.C(baseColor);
return instance.darken(brightness).toHexString();
};
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/default/colors.js
const generateColorPalettes = baseColor => {
const colors = (0,colors_es.generate)(baseColor);
return {
1: colors[0],
2: colors[1],
3: colors[2],
4: colors[3],
5: colors[4],
6: colors[5],
7: colors[6],
8: colors[4],
9: colors[5],
10: colors[6]
// 8: colors[7],
// 9: colors[8],
// 10: colors[9],
};
};
const generateNeutralColorPalettes = (bgBaseColor, textBaseColor) => {
const colorBgBase = bgBaseColor || '#fff';
const colorTextBase = textBaseColor || '#000';
return {
colorBgBase,
colorTextBase,
colorText: getAlphaColor(colorTextBase, 0.88),
colorTextSecondary: getAlphaColor(colorTextBase, 0.65),
colorTextTertiary: getAlphaColor(colorTextBase, 0.45),
colorTextQuaternary: getAlphaColor(colorTextBase, 0.25),
colorFill: getAlphaColor(colorTextBase, 0.15),
colorFillSecondary: getAlphaColor(colorTextBase, 0.06),
colorFillTertiary: getAlphaColor(colorTextBase, 0.04),
colorFillQuaternary: getAlphaColor(colorTextBase, 0.02),
colorBgLayout: getSolidColor(colorBgBase, 4),
colorBgContainer: getSolidColor(colorBgBase, 0),
colorBgElevated: getSolidColor(colorBgBase, 0),
colorBgSpotlight: getAlphaColor(colorTextBase, 0.85),
colorBorder: getSolidColor(colorBgBase, 15),
colorBorderSecondary: getSolidColor(colorBgBase, 6)
};
};
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/shared/genFontSizes.js
// https://zhuanlan.zhihu.com/p/32746810
function getFontSizes(base) {
const fontSizes = new Array(10).fill(null).map((_, index) => {
const i = index - 1;
const baseSize = base * Math.pow(2.71828, i / 5);
const intSize = index > 1 ? Math.floor(baseSize) : Math.ceil(baseSize);
// Convert to even
return Math.floor(intSize / 2) * 2;
});
fontSizes[1] = base;
return fontSizes.map(size => {
const height = size + 8;
return {
size,
lineHeight: height / size
};
});
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/shared/genFontMapToken.js
const genFontMapToken = fontSize => {
const fontSizePairs = getFontSizes(fontSize);
const fontSizes = fontSizePairs.map(pair => pair.size);
const lineHeights = fontSizePairs.map(pair => pair.lineHeight);
return {
fontSizeSM: fontSizes[0],
fontSize: fontSizes[1],
fontSizeLG: fontSizes[2],
fontSizeXL: fontSizes[3],
fontSizeHeading1: fontSizes[6],
fontSizeHeading2: fontSizes[5],
fontSizeHeading3: fontSizes[4],
fontSizeHeading4: fontSizes[3],
fontSizeHeading5: fontSizes[2],
lineHeight: lineHeights[1],
lineHeightLG: lineHeights[2],
lineHeightSM: lineHeights[0],
lineHeightHeading1: lineHeights[6],
lineHeightHeading2: lineHeights[5],
lineHeightHeading3: lineHeights[4],
lineHeightHeading4: lineHeights[3],
lineHeightHeading5: lineHeights[2]
};
};
/* harmony default export */ var shared_genFontMapToken = (genFontMapToken);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/default/index.js
function derivative(token) {
const colorPalettes = Object.keys(seed/* defaultPresetColors */.M).map(colorKey => {
const colors = (0,colors_es.generate)(token[colorKey]);
return new Array(10).fill(1).reduce((prev, _, i) => {
prev[`${colorKey}-${i + 1}`] = colors[i];
prev[`${colorKey}${i + 1}`] = colors[i];
return prev;
}, {});
}).reduce((prev, cur) => {
prev = Object.assign(Object.assign({}, prev), cur);
return prev;
}, {});
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, token), colorPalettes), genColorMapToken(token, {
generateColorPalettes: generateColorPalettes,
generateNeutralColorPalettes: generateNeutralColorPalettes
})), shared_genFontMapToken(token.fontSize)), genSizeMapToken(token)), shared_genControlHeight(token)), genCommonMapToken(token));
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/context.js
const defaultTheme = (0,es.createTheme)(derivative);
// ================================ Context =================================
// To ensure snapshot stable. We disable hashed in test env.
const defaultConfig = {
token: seed/* default */.Z,
hashed: true
};
const DesignTokenContext = /*#__PURE__*/_react_17_0_2_react.createContext(defaultConfig);
/***/ }),
/***/ 34117:
/*!***************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/theme/themes/seed.js ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ M: function() { return /* binding */ defaultPresetColors; }
/* harmony export */ });
const defaultPresetColors = {
blue: '#1677ff',
purple: '#722ED1',
cyan: '#13C2C2',
green: '#52C41A',
magenta: '#EB2F96',
pink: '#eb2f96',
red: '#F5222D',
orange: '#FA8C16',
yellow: '#FADB14',
volcano: '#FA541C',
geekblue: '#2F54EB',
gold: '#FAAD14',
lime: '#A0D911'
};
const seedToken = Object.assign(Object.assign({}, defaultPresetColors), {
// Color
colorPrimary: '#1677ff',
colorSuccess: '#52c41a',
colorWarning: '#faad14',
colorError: '#ff4d4f',
colorInfo: '#1677ff',
colorLink: '',
colorTextBase: '',
colorBgBase: '',
// Font
fontFamily: `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
'Noto Color Emoji'`,
fontFamilyCode: `'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace`,
fontSize: 14,
// Line
lineWidth: 1,
lineType: 'solid',
// Motion
motionUnit: 0.1,
motionBase: 0,
motionEaseOutCirc: 'cubic-bezier(0.08, 0.82, 0.17, 1)',
motionEaseInOutCirc: 'cubic-bezier(0.78, 0.14, 0.15, 0.86)',
motionEaseOut: 'cubic-bezier(0.215, 0.61, 0.355, 1)',
motionEaseInOut: 'cubic-bezier(0.645, 0.045, 0.355, 1)',
motionEaseOutBack: 'cubic-bezier(0.12, 0.4, 0.29, 1.46)',
motionEaseInBack: 'cubic-bezier(0.71, -0.46, 0.88, 0.6)',
motionEaseInQuint: 'cubic-bezier(0.755, 0.05, 0.855, 0.06)',
motionEaseOutQuint: 'cubic-bezier(0.23, 1, 0.32, 1)',
// Radius
borderRadius: 6,
// Size
sizeUnit: 4,
sizeStep: 4,
sizePopupArrow: 16,
// Control Base
controlHeight: 32,
// zIndex
zIndexBase: 0,
zIndexPopupBase: 1000,
// Image
opacityImage: 1,
// Wireframe
wireframe: false,
// Motion
motion: true
});
/* harmony default export */ __webpack_exports__.Z = (seedToken);
/***/ }),
/***/ 88088:
/*!************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/theme/useToken.js + 4 modules ***!
\************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ useToken; }
});
// UNUSED EXPORTS: getComputedToken
// EXTERNAL MODULE: ./node_modules/_@ant-design_cssinjs@1.18.4@@ant-design/cssinjs/es/index.js + 35 modules
var es = __webpack_require__(78600);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/version/version.js
/* harmony default export */ var version = ('5.9.0');
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/version/index.js
"use client";
/* eslint import/no-unresolved: 0 */
// @ts-ignore
/* harmony default export */ var es_version = (version);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/context.js + 10 modules
var context = __webpack_require__(45246);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/themes/seed.js
var seed = __webpack_require__(34117);
// EXTERNAL MODULE: ./node_modules/_@ctrl_tinycolor@3.6.1@@ctrl/tinycolor/dist/module/index.js
var dist_module = __webpack_require__(64993);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/getAlphaColor.js
function isStableColor(color) {
return color >= 0 && color <= 255;
}
function getAlphaColor(frontColor, backgroundColor) {
const {
r: fR,
g: fG,
b: fB,
a: originAlpha
} = new dist_module/* TinyColor */.C(frontColor).toRgb();
if (originAlpha < 1) {
return frontColor;
}
const {
r: bR,
g: bG,
b: bB
} = new dist_module/* TinyColor */.C(backgroundColor).toRgb();
for (let fA = 0.01; fA <= 1; fA += 0.01) {
const r = Math.round((fR - bR * (1 - fA)) / fA);
const g = Math.round((fG - bG * (1 - fA)) / fA);
const b = Math.round((fB - bB * (1 - fA)) / fA);
if (isStableColor(r) && isStableColor(g) && isStableColor(b)) {
return new dist_module/* TinyColor */.C({
r,
g,
b,
a: Math.round(fA * 100) / 100
}).toRgbString();
}
}
// fallback
/* istanbul ignore next */
return new dist_module/* TinyColor */.C({
r: fR,
g: fG,
b: fB,
a: 1
}).toRgbString();
}
/* harmony default export */ var util_getAlphaColor = (getAlphaColor);
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/util/alias.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;
};
/**
* Seed (designer) > Derivative (designer) > Alias (developer).
*
* Merge seed & derivative & override token and generate alias token for developer.
*/
function formatToken(derivativeToken) {
const {
override
} = derivativeToken,
restToken = __rest(derivativeToken, ["override"]);
const overrideTokens = Object.assign({}, override);
Object.keys(seed/* default */.Z).forEach(token => {
delete overrideTokens[token];
});
const mergedToken = Object.assign(Object.assign({}, restToken), overrideTokens);
const screenXS = 480;
const screenSM = 576;
const screenMD = 768;
const screenLG = 992;
const screenXL = 1200;
const screenXXL = 1600;
// Motion
if (mergedToken.motion === false) {
const fastDuration = '0s';
mergedToken.motionDurationFast = fastDuration;
mergedToken.motionDurationMid = fastDuration;
mergedToken.motionDurationSlow = fastDuration;
}
// Generate alias token
const aliasToken = Object.assign(Object.assign(Object.assign({}, mergedToken), {
// ============== Background ============== //
colorFillContent: mergedToken.colorFillSecondary,
colorFillContentHover: mergedToken.colorFill,
colorFillAlter: mergedToken.colorFillQuaternary,
colorBgContainerDisabled: mergedToken.colorFillTertiary,
// ============== Split ============== //
colorBorderBg: mergedToken.colorBgContainer,
colorSplit: util_getAlphaColor(mergedToken.colorBorderSecondary, mergedToken.colorBgContainer),
// ============== Text ============== //
colorTextPlaceholder: mergedToken.colorTextQuaternary,
colorTextDisabled: mergedToken.colorTextQuaternary,
colorTextHeading: mergedToken.colorText,
colorTextLabel: mergedToken.colorTextSecondary,
colorTextDescription: mergedToken.colorTextTertiary,
colorTextLightSolid: mergedToken.colorWhite,
colorHighlight: mergedToken.colorError,
colorBgTextHover: mergedToken.colorFillSecondary,
colorBgTextActive: mergedToken.colorFill,
colorIcon: mergedToken.colorTextTertiary,
colorIconHover: mergedToken.colorText,
colorErrorOutline: util_getAlphaColor(mergedToken.colorErrorBg, mergedToken.colorBgContainer),
colorWarningOutline: util_getAlphaColor(mergedToken.colorWarningBg, mergedToken.colorBgContainer),
// Font
fontSizeIcon: mergedToken.fontSizeSM,
// Line
lineWidthFocus: mergedToken.lineWidth * 4,
// Control
lineWidth: mergedToken.lineWidth,
controlOutlineWidth: mergedToken.lineWidth * 2,
// Checkbox size and expand icon size
controlInteractiveSize: mergedToken.controlHeight / 2,
controlItemBgHover: mergedToken.colorFillTertiary,
controlItemBgActive: mergedToken.colorPrimaryBg,
controlItemBgActiveHover: mergedToken.colorPrimaryBgHover,
controlItemBgActiveDisabled: mergedToken.colorFill,
controlTmpOutline: mergedToken.colorFillQuaternary,
controlOutline: util_getAlphaColor(mergedToken.colorPrimaryBg, mergedToken.colorBgContainer),
lineType: mergedToken.lineType,
borderRadius: mergedToken.borderRadius,
borderRadiusXS: mergedToken.borderRadiusXS,
borderRadiusSM: mergedToken.borderRadiusSM,
borderRadiusLG: mergedToken.borderRadiusLG,
fontWeightStrong: 600,
opacityLoading: 0.65,
linkDecoration: 'none',
linkHoverDecoration: 'none',
linkFocusDecoration: 'none',
controlPaddingHorizontal: 12,
controlPaddingHorizontalSM: 8,
paddingXXS: mergedToken.sizeXXS,
paddingXS: mergedToken.sizeXS,
paddingSM: mergedToken.sizeSM,
padding: mergedToken.size,
paddingMD: mergedToken.sizeMD,
paddingLG: mergedToken.sizeLG,
paddingXL: mergedToken.sizeXL,
paddingContentHorizontalLG: mergedToken.sizeLG,
paddingContentVerticalLG: mergedToken.sizeMS,
paddingContentHorizontal: mergedToken.sizeMS,
paddingContentVertical: mergedToken.sizeSM,
paddingContentHorizontalSM: mergedToken.size,
paddingContentVerticalSM: mergedToken.sizeXS,
marginXXS: mergedToken.sizeXXS,
marginXS: mergedToken.sizeXS,
marginSM: mergedToken.sizeSM,
margin: mergedToken.size,
marginMD: mergedToken.sizeMD,
marginLG: mergedToken.sizeLG,
marginXL: mergedToken.sizeXL,
marginXXL: mergedToken.sizeXXL,
boxShadow: `
0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 9px 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowSecondary: `
0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 9px 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowTertiary: `
0 1px 2px 0 rgba(0, 0, 0, 0.03),
0 1px 6px -1px rgba(0, 0, 0, 0.02),
0 2px 4px 0 rgba(0, 0, 0, 0.02)
`,
screenXS,
screenXSMin: screenXS,
screenXSMax: screenSM - 1,
screenSM,
screenSMMin: screenSM,
screenSMMax: screenMD - 1,
screenMD,
screenMDMin: screenMD,
screenMDMax: screenLG - 1,
screenLG,
screenLGMin: screenLG,
screenLGMax: screenXL - 1,
screenXL,
screenXLMin: screenXL,
screenXLMax: screenXXL - 1,
screenXXL,
screenXXLMin: screenXXL,
boxShadowPopoverArrow: '2px 2px 5px rgba(0, 0, 0, 0.05)',
boxShadowCard: `
0 1px 2px -2px ${new dist_module/* TinyColor */.C('rgba(0, 0, 0, 0.16)').toRgbString()},
0 3px 6px 0 ${new dist_module/* TinyColor */.C('rgba(0, 0, 0, 0.12)').toRgbString()},
0 5px 12px 4px ${new dist_module/* TinyColor */.C('rgba(0, 0, 0, 0.09)').toRgbString()}
`,
boxShadowDrawerRight: `
-6px 0 16px 0 rgba(0, 0, 0, 0.08),
-3px 0 6px -4px rgba(0, 0, 0, 0.12),
-9px 0 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowDrawerLeft: `
6px 0 16px 0 rgba(0, 0, 0, 0.08),
3px 0 6px -4px rgba(0, 0, 0, 0.12),
9px 0 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowDrawerUp: `
0 6px 16px 0 rgba(0, 0, 0, 0.08),
0 3px 6px -4px rgba(0, 0, 0, 0.12),
0 9px 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowDrawerDown: `
0 -6px 16px 0 rgba(0, 0, 0, 0.08),
0 -3px 6px -4px rgba(0, 0, 0, 0.12),
0 -9px 28px 8px rgba(0, 0, 0, 0.05)
`,
boxShadowTabsOverflowLeft: 'inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)',
boxShadowTabsOverflowRight: 'inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)',
boxShadowTabsOverflowTop: 'inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)',
boxShadowTabsOverflowBottom: 'inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)'
}), overrideTokens);
return aliasToken;
}
;// CONCATENATED MODULE: ./node_modules/_antd@5.9.0@antd/es/theme/useToken.js
var useToken_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;
};
const getComputedToken = (originToken, overrideToken, theme) => {
const derivativeToken = theme.getDerivativeToken(originToken);
const {
override
} = overrideToken,
components = useToken_rest(overrideToken, ["override"]);
// Merge with override
let mergedDerivativeToken = Object.assign(Object.assign({}, derivativeToken), {
override
});
// Format if needed
mergedDerivativeToken = formatToken(mergedDerivativeToken);
if (components) {
Object.entries(components).forEach(_ref => {
let [key, value] = _ref;
const {
theme: componentTheme
} = value,
componentTokens = useToken_rest(value, ["theme"]);
let mergedComponentToken = componentTokens;
if (componentTheme) {
mergedComponentToken = getComputedToken(Object.assign(Object.assign({}, mergedDerivativeToken), componentTokens), {
override: componentTokens
}, componentTheme);
}
mergedDerivativeToken[key] = mergedComponentToken;
});
}
return mergedDerivativeToken;
};
// ================================== Hook ==================================
function useToken() {
const {
token: rootDesignToken,
hashed,
theme,
components
} = _react_17_0_2_react.useContext(context/* DesignTokenContext */.Mj);
const salt = `${es_version}-${hashed || ''}`;
const mergedTheme = theme || context/* defaultTheme */.uH;
const [token, hashId] = (0,es.useCacheToken)(mergedTheme, [seed/* default */.Z, rootDesignToken], {
salt,
override: Object.assign({
override: rootDesignToken
}, components),
getComputedToken,
// formatToken will not be consumed after 1.15.0 with getComputedToken.
// But token will break if @ant-design/cssinjs is under 1.15.0 without it
formatToken: formatToken
});
return [mergedTheme, token, hashed ? hashId : ''];
}
/***/ }),
/***/ 83116:
/*!******************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/theme/util/genComponentStyleHook.js ***!
\******************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Z: function() { return /* binding */ genComponentStyleHook; },
/* harmony export */ b: function() { return /* binding */ genSubStyleComponent; }
/* harmony export */ });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ 59301);
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @ant-design/cssinjs */ 78600);
/* harmony import */ var rc_util__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! rc-util */ 46142);
/* harmony import */ var _config_provider_context__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../config-provider/context */ 36355);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../style */ 17313);
/* harmony import */ var _useToken__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../useToken */ 88088);
/* harmony import */ var _statistic__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./statistic */ 37613);
/* harmony import */ var _useResetIconStyle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./useResetIconStyle */ 73040);
/* eslint-disable no-redeclare */
function genComponentStyleHook(componentName, styleFn, getDefaultToken) {
let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
const cells = Array.isArray(componentName) ? componentName : [componentName, componentName];
const [component] = cells;
const concatComponent = cells.join('-');
return prefixCls => {
const [theme, token, hashId] = (0,_useToken__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z)();
const {
getPrefixCls,
iconPrefixCls,
csp
} = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(_config_provider_context__WEBPACK_IMPORTED_MODULE_4__/* .ConfigContext */ .E_);
const rootPrefixCls = getPrefixCls();
// Shared config
const sharedConfig = {
theme,
token,
hashId,
nonce: () => csp === null || csp === void 0 ? void 0 : csp.nonce,
clientOnly: options.clientOnly,
// antd is always at top of styles
order: options.order || -999
};
// Generate style for all a tags in antd component.
(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.useStyleRegister)(Object.assign(Object.assign({}, sharedConfig), {
clientOnly: false,
path: ['Shared', rootPrefixCls]
}), () => [{
// Link
'&': (0,_style__WEBPACK_IMPORTED_MODULE_5__/* .genLinkStyle */ .Lx)(token)
}]);
// Generate style for icons
(0,_useResetIconStyle__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(iconPrefixCls);
return [(0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_1__.useStyleRegister)(Object.assign(Object.assign({}, sharedConfig), {
path: [concatComponent, prefixCls, iconPrefixCls]
}), () => {
const {
token: proxyToken,
flush
} = (0,_statistic__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .ZP)(token);
const customComponentToken = Object.assign({}, token[component]);
if (options.deprecatedTokens) {
const {
deprecatedTokens
} = options;
deprecatedTokens.forEach(_ref => {
let [oldTokenKey, newTokenKey] = _ref;
var _a;
if (false) {}
// Should wrap with `if` clause, or there will be `undefined` in object.
if ((customComponentToken === null || customComponentToken === void 0 ? void 0 : customComponentToken[oldTokenKey]) || (customComponentToken === null || customComponentToken === void 0 ? void 0 : customComponentToken[newTokenKey])) {
(_a = customComponentToken[newTokenKey]) !== null && _a !== void 0 ? _a : customComponentToken[newTokenKey] = customComponentToken === null || customComponentToken === void 0 ? void 0 : customComponentToken[oldTokenKey];
}
});
}
const defaultComponentToken = typeof getDefaultToken === 'function' ? getDefaultToken((0,_statistic__WEBPACK_IMPORTED_MODULE_7__/* .merge */ .TS)(proxyToken, customComponentToken !== null && customComponentToken !== void 0 ? customComponentToken : {})) : getDefaultToken;
const mergedComponentToken = Object.assign(Object.assign({}, defaultComponentToken), customComponentToken);
const componentCls = `.${prefixCls}`;
const mergedToken = (0,_statistic__WEBPACK_IMPORTED_MODULE_7__/* .merge */ .TS)(proxyToken, {
componentCls,
prefixCls,
iconCls: `.${iconPrefixCls}`,
antCls: `.${rootPrefixCls}`
}, mergedComponentToken);
const styleInterpolation = styleFn(mergedToken, {
hashId,
prefixCls,
rootPrefixCls,
iconPrefixCls,
overrideComponentToken: customComponentToken
});
flush(component, mergedComponentToken);
return [options.resetStyle === false ? null : (0,_style__WEBPACK_IMPORTED_MODULE_5__/* .genCommonStyle */ .du)(token, prefixCls), styleInterpolation];
}), hashId];
};
}
const genSubStyleComponent = (componentName, styleFn, getDefaultToken, options) => {
const useStyle = genComponentStyleHook(componentName, styleFn, getDefaultToken, Object.assign({
resetStyle: false,
// Sub Style should default after root one
order: -998
}, options));
const StyledComponent = _ref2 => {
let {
prefixCls
} = _ref2;
useStyle(prefixCls);
return null;
};
if (false) {}
return StyledComponent;
};
/***/ }),
/***/ 37613:
/*!******************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/theme/util/statistic.js ***!
\******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ TS: function() { return /* binding */ merge; },
/* harmony export */ ZP: function() { return /* binding */ statisticToken; }
/* harmony export */ });
/* unused harmony exports statistic, _statistic_build_ */
const enableStatistic = false || typeof CSSINJS_STATISTIC !== 'undefined';
let recording = true;
/**
* This function will do as `Object.assign` in production. But will use Object.defineProperty:get to
* pass all value access in development. To support statistic field usage with alias token.
*/
function merge() {
for (var _len = arguments.length, objs = new Array(_len), _key = 0; _key < _len; _key++) {
objs[_key] = arguments[_key];
}
/* istanbul ignore next */
if (!enableStatistic) {
return Object.assign.apply(Object, [{}].concat(objs));
}
recording = false;
const ret = {};
objs.forEach(obj => {
const keys = Object.keys(obj);
keys.forEach(key => {
Object.defineProperty(ret, key, {
configurable: true,
enumerable: true,
get: () => obj[key]
});
});
});
recording = true;
return ret;
}
/** @internal Internal Usage. Not use in your production. */
const statistic = {};
/** @internal Internal Usage. Not use in your production. */
// eslint-disable-next-line camelcase
const _statistic_build_ = {};
/* istanbul ignore next */
function noop() {}
/** Statistic token usage case. Should use `merge` function if you do not want spread record. */
function statisticToken(token) {
let tokenKeys;
let proxy = token;
let flush = noop;
if (enableStatistic) {
tokenKeys = new Set();
proxy = new Proxy(token, {
get(obj, prop) {
if (recording) {
tokenKeys.add(prop);
}
return obj[prop];
}
});
flush = (componentName, componentToken) => {
var _a;
statistic[componentName] = {
global: Array.from(tokenKeys),
component: Object.assign(Object.assign({}, (_a = statistic[componentName]) === null || _a === void 0 ? void 0 : _a.component), componentToken)
};
};
}
return {
token: proxy,
keys: tokenKeys,
flush
};
}
/***/ }),
/***/ 73040:
/*!**************************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/theme/util/useResetIconStyle.js ***!
\**************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var _ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @ant-design/cssinjs */ 78600);
/* harmony import */ var _style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../style */ 17313);
/* harmony import */ var _useToken__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../useToken */ 88088);
const useResetIconStyle = (iconPrefixCls, csp) => {
const [theme, token] = (0,_useToken__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z)();
// Generate style for icons
return (0,_ant_design_cssinjs__WEBPACK_IMPORTED_MODULE_0__.useStyleRegister)({
theme,
token,
hashId: '',
path: ['ant-design-icons', iconPrefixCls],
nonce: () => csp === null || csp === void 0 ? void 0 : csp.nonce
}, () => [{
[`.${iconPrefixCls}`]: Object.assign(Object.assign({}, (0,_style__WEBPACK_IMPORTED_MODULE_2__/* .resetIcon */ .Ro)()), {
[`.${iconPrefixCls} .${iconPrefixCls}-icon`]: {
display: 'block'
}
})
}]);
};
/* harmony default export */ __webpack_exports__.Z = (useResetIconStyle);
/***/ }),
/***/ 67532:
/*!**********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/time-picker/locale/en_US.js ***!
\**********************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__) {
"use strict";
const locale = {
placeholder: 'Select time',
rangePlaceholder: ['Start time', 'End time']
};
/* harmony default export */ __webpack_exports__.Z = (locale);
/***/ }),
/***/ 11575:
/*!***************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/watermark/context.js ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ H: function() { return /* binding */ usePanelRef; }
/* harmony export */ });
/* harmony import */ var rc_util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! rc-util */ 46142);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ 59301);
function voidFunc() {}
const WatermarkContext = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createContext({
add: voidFunc,
remove: voidFunc
});
function usePanelRef(panelSelector) {
const watermark = react__WEBPACK_IMPORTED_MODULE_1__.useContext(WatermarkContext);
const panelEleRef = react__WEBPACK_IMPORTED_MODULE_1__.useRef();
const panelRef = (0,rc_util__WEBPACK_IMPORTED_MODULE_0__.useEvent)(ele => {
if (ele) {
const innerContentEle = panelSelector ? ele.querySelector(panelSelector) : ele;
watermark.add(innerContentEle);
panelEleRef.current = innerContentEle;
} else {
watermark.remove(panelEleRef.current);
}
});
return panelRef;
}
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (WatermarkContext)));
/***/ }),
/***/ 67751:
/*!********************************************************!*\
!*** ./node_modules/_charenc@0.0.2@charenc/charenc.js ***!
\********************************************************/
/***/ (function(module) {
var charenc = {
// UTF-8 encoding
utf8: {
// Convert a string to a byte array
stringToBytes: function(str) {
return charenc.bin.stringToBytes(unescape(encodeURIComponent(str)));
},
// Convert a byte array to a string
bytesToString: function(bytes) {
return decodeURIComponent(escape(charenc.bin.bytesToString(bytes)));
}
},
// Binary encoding
bin: {
// Convert a string to a byte array
stringToBytes: function(str) {
for (var bytes = [], i = 0; i < str.length; i++)
bytes.push(str.charCodeAt(i) & 0xFF);
return bytes;
},
// Convert a byte array to a string
bytesToString: function(bytes) {
for (var str = [], i = 0; i < bytes.length; i++)
str.push(String.fromCharCode(bytes[i]));
return str.join('');
}
}
};
module.exports = charenc;
/***/ }),
/***/ 75041:
/*!**************************************************!*\
!*** ./node_modules/_crypt@0.0.2@crypt/crypt.js ***!
\**************************************************/
/***/ (function(module) {
(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;
})();
/***/ }),
/***/ 15849:
/*!******************************************!*\
!*** ./node_modules/_d@1.0.1@d/index.js ***!
\******************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var isValue = __webpack_require__(/*! type/value/is */ 76518)
, isPlainFunction = __webpack_require__(/*! type/plain-function/is */ 43413)
, assign = __webpack_require__(/*! es5-ext/object/assign */ 63474)
, normalizeOpts = __webpack_require__(/*! es5-ext/object/normalize-options */ 47095)
, contains = __webpack_require__(/*! es5-ext/string/#/contains */ 99363);
var d = (module.exports = function (dscr, value/*, options*/) {
var c, e, w, options, desc;
if (arguments.length < 2 || typeof dscr !== "string") {
options = value;
value = dscr;
dscr = null;
} else {
options = arguments[2];
}
if (isValue(dscr)) {
c = contains.call(dscr, "c");
e = contains.call(dscr, "e");
w = contains.call(dscr, "w");
} else {
c = w = true;
e = false;
}
desc = { value: value, configurable: c, enumerable: e, writable: w };
return !options ? desc : assign(normalizeOpts(options), desc);
});
d.gs = function (dscr, get, set/*, options*/) {
var c, e, options, desc;
if (typeof dscr !== "string") {
options = set;
set = get;
get = dscr;
dscr = null;
} else {
options = arguments[3];
}
if (!isValue(get)) {
get = undefined;
} else if (!isPlainFunction(get)) {
options = get;
get = set = undefined;
} else if (!isValue(set)) {
set = undefined;
} else if (!isPlainFunction(set)) {
options = set;
set = undefined;
}
if (isValue(dscr)) {
c = contains.call(dscr, "c");
e = contains.call(dscr, "e");
} else {
c = true;
e = false;
}
desc = { get: get, set: set, configurable: c, enumerable: e };
return !options ? desc : assign(normalizeOpts(options), desc);
};
/***/ }),
/***/ 9498:
/*!********************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js ***!
\********************************************************/
/***/ (function(module) {
!function(t,e){ true?module.exports=e():0}(this,(function(){"use strict";var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return"["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)68?1900:2e3)};var a=function(e){return function(t){this[e]=+t}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if("Z"===e)return 0;var t=e.match(/([+-]|\d\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:"+"===t[0]?-n:n}(e)}],h=function(e){var t=o[e];return t&&(t.indexOf?t:t.s.concat(t.f))},u=function(e,t){var n,r=o.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?"pm":"PM");return n},d={A:[i,function(e){this.afternoon=u(e,!1)}],a:[i,function(e){this.afternoon=u(e,!0)}],S:[/\d/,function(e){this.milliseconds=100*+e}],SS:[n,function(e){this.milliseconds=10*+e}],SSS:[/\d{3}/,function(e){this.milliseconds=+e}],s:[r,a("seconds")],ss:[r,a("seconds")],m:[r,a("minutes")],mm:[r,a("minutes")],H:[r,a("hours")],h:[r,a("hours")],HH:[r,a("hours")],hh:[r,a("hours")],D:[r,a("day")],DD:[n,a("day")],Do:[i,function(e){var t=o.ordinal,n=e.match(/\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\[|\]/g,"")===e&&(this.day=r)}],M:[r,a("month")],MM:[n,a("month")],MMM:[i,function(e){var t=h("months"),n=(h("monthsShort")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[i,function(e){var t=h("months").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\d+/,a("year")],YY:[n,function(e){this.year=s(e)}],YYYY:[/\d{4}/,a("year")],Z:f,ZZ:f};function c(n){var r,i;r=n,i=o&&o.formats;for(var s=(n=r.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=s.length,f=0;f-1)return new Date(("X"===t?1e3:1)*e);var r=c(t)(e),i=r.year,o=r.month,s=r.day,a=r.hours,f=r.minutes,h=r.seconds,u=r.milliseconds,d=r.zone,l=new Date,m=s||(i||o?1:l.getDate()),M=i||l.getFullYear(),Y=0;i&&!o||(Y=o>0?o-1:l.getMonth());var p=a||0,v=f||0,D=h||0,g=u||0;return d?new Date(Date.UTC(M,Y,m,p,v,D,g+60*d.offset*1e3)):n?new Date(Date.UTC(M,Y,m,p,v,D,g)):new Date(M,Y,m,p,v,D,g)}catch(e){return new Date("")}}(t,a,r),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date("")),o={}}else if(a instanceof Array)for(var l=a.length,m=1;m<=l;m+=1){s[1]=a[m-1];var M=n.apply(this,s);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===l&&(this.$d=new Date(""))}else i.call(this,e)}}}));
/***/ }),
/***/ 91607:
/*!**************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/duration.js ***!
\**************************************************************/
/***/ (function(module) {
!function(t,s){ true?module.exports=s():0}(this,(function(){"use strict";var t,s,n=1e3,i=6e4,e=36e5,r=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,d=2628e6,a=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,h={years:u,months:d,days:r,hours:e,minutes:i,seconds:n,milliseconds:1,weeks:6048e5},c=function(t){return t instanceof g},f=function(t,s,n){return new g(t,n,s.$l)},m=function(t){return s.p(t)+"s"},l=function(t){return t<0},$=function(t){return l(t)?Math.ceil(t):Math.floor(t)},y=function(t){return Math.abs(t)},v=function(t,s){return t?l(t)?{negative:!0,format:""+y(t)+s}:{negative:!1,format:""+t+s}:{negative:!1,format:""}},g=function(){function l(t,s,n){var i=this;if(this.$d={},this.$l=n,void 0===t&&(this.$ms=0,this.parseFromMilliseconds()),s)return f(t*h[m(s)],this);if("number"==typeof t)return this.$ms=t,this.parseFromMilliseconds(),this;if("object"==typeof t)return Object.keys(t).forEach((function(s){i.$d[m(s)]=t[s]})),this.calMilliseconds(),this;if("string"==typeof t){var e=t.match(a);if(e){var r=e.slice(2).map((function(t){return null!=t?Number(t):0}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var y=l.prototype;return y.calMilliseconds=function(){var t=this;this.$ms=Object.keys(this.$d).reduce((function(s,n){return s+(t.$d[n]||0)*h[n]}),0)},y.parseFromMilliseconds=function(){var t=this.$ms;this.$d.years=$(t/u),t%=u,this.$d.months=$(t/d),t%=d,this.$d.days=$(t/r),t%=r,this.$d.hours=$(t/e),t%=e,this.$d.minutes=$(t/i),t%=i,this.$d.seconds=$(t/n),t%=n,this.$d.milliseconds=t},y.toISOString=function(){var t=v(this.$d.years,"Y"),s=v(this.$d.months,"M"),n=+this.$d.days||0;this.$d.weeks&&(n+=7*this.$d.weeks);var i=v(n,"D"),e=v(this.$d.hours,"H"),r=v(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3,o=Math.round(1e3*o)/1e3);var u=v(o,"S"),d=t.negative||s.negative||i.negative||e.negative||r.negative||u.negative,a=e.format||r.format||u.format?"T":"",h=(d?"-":"")+"P"+t.format+s.format+i.format+a+e.format+r.format+u.format;return"P"===h||"-P"===h?"P0D":h},y.toJSON=function(){return this.toISOString()},y.format=function(t){var n=t||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return n.replace(o,(function(t,s){return s||String(i[t])}))},y.as=function(t){return this.$ms/h[m(t)]},y.get=function(t){var s=this.$ms,n=m(t);return"milliseconds"===n?s%=1e3:s="weeks"===n?$(s/h[n]):this.$d[n],s||0},y.add=function(t,s,n){var i;return i=s?t*h[m(s)]:c(t)?t.$ms:f(t,this).$ms,f(this.$ms+i*(n?-1:1),this)},y.subtract=function(t,s){return this.add(t,s,!0)},y.locale=function(t){var s=this.clone();return s.$l=t,s},y.clone=function(){return f(this.$ms,this)},y.humanize=function(s){return t().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},y.valueOf=function(){return this.asMilliseconds()},y.milliseconds=function(){return this.get("milliseconds")},y.asMilliseconds=function(){return this.as("milliseconds")},y.seconds=function(){return this.get("seconds")},y.asSeconds=function(){return this.as("seconds")},y.minutes=function(){return this.get("minutes")},y.asMinutes=function(){return this.as("minutes")},y.hours=function(){return this.get("hours")},y.asHours=function(){return this.as("hours")},y.days=function(){return this.get("days")},y.asDays=function(){return this.as("days")},y.weeks=function(){return this.get("weeks")},y.asWeeks=function(){return this.as("weeks")},y.months=function(){return this.get("months")},y.asMonths=function(){return this.as("months")},y.years=function(){return this.get("years")},y.asYears=function(){return this.as("years")},l}(),p=function(t,s,n){return t.add(s.years()*n,"y").add(s.months()*n,"M").add(s.days()*n,"d").add(s.hours()*n,"h").add(s.minutes()*n,"m").add(s.seconds()*n,"s").add(s.milliseconds()*n,"ms")};return function(n,i,e){t=e,s=e().$utils(),e.duration=function(t,s){var n=e.locale();return f(t,{$l:n},s)},e.isDuration=c;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(t,s){return c(t)?p(this,t,1):r.bind(this)(t,s)},i.prototype.subtract=function(t,s){return c(t)?p(this,t,-1):o.bind(this)(t,s)}}}));
/***/ }),
/***/ 4299:
/*!**************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/isMoment.js ***!
\**************************************************************/
/***/ (function(module) {
!function(e,n){ true?module.exports=n():0}(this,(function(){"use strict";return function(e,n,t){t.isMoment=function(e){return t.isDayjs(e)}}}));
/***/ }),
/***/ 3699:
/*!*******************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/isSameOrAfter.js ***!
\*******************************************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}));
/***/ }),
/***/ 18178:
/*!********************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/isSameOrBefore.js ***!
\********************************************************************/
/***/ (function(module) {
!function(e,i){ true?module.exports=i():0}(this,(function(){"use strict";return function(e,i){i.prototype.isSameOrBefore=function(e,i){return this.isSame(e,i)||this.isBefore(e,i)}}}));
/***/ }),
/***/ 61072:
/*!****************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/localeData.js ***!
\****************************************************************/
/***/ (function(module) {
!function(n,e){ true?module.exports=e():0}(this,(function(){"use strict";return function(n,e,t){var r=e.prototype,o=function(n){return n&&(n.indexOf?n:n.s)},u=function(n,e,t,r,u){var i=n.name?n:n.$locale(),a=o(i[e]),s=o(i[t]),f=a||s.map((function(n){return n.slice(0,r)}));if(!u)return f;var d=i.weekStart;return f.map((function(n,e){return f[(e+(d||0))%7]}))},i=function(){return t.Ls[t.locale()]},a=function(n,e){return n.formats[e]||function(n){return n.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(n,e,t){return e||t.slice(1)}))}(n.formats[e.toUpperCase()])},s=function(){var n=this;return{months:function(e){return e?e.format("MMMM"):u(n,"months")},monthsShort:function(e){return e?e.format("MMM"):u(n,"monthsShort","months",3)},firstDayOfWeek:function(){return n.$locale().weekStart||0},weekdays:function(e){return e?e.format("dddd"):u(n,"weekdays")},weekdaysMin:function(e){return e?e.format("dd"):u(n,"weekdaysMin","weekdays",2)},weekdaysShort:function(e){return e?e.format("ddd"):u(n,"weekdaysShort","weekdays",3)},longDateFormat:function(e){return a(n.$locale(),e)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};r.localeData=function(){return s.bind(this)()},t.localeData=function(){var n=i();return{firstDayOfWeek:function(){return n.weekStart||0},weekdays:function(){return t.weekdays()},weekdaysShort:function(){return t.weekdaysShort()},weekdaysMin:function(){return t.weekdaysMin()},months:function(){return t.months()},monthsShort:function(){return t.monthsShort()},longDateFormat:function(e){return a(n,e)},meridiem:n.meridiem,ordinal:n.ordinal}},t.months=function(){return u(i(),"months")},t.monthsShort=function(){return u(i(),"monthsShort","months",3)},t.weekdays=function(n){return u(i(),"weekdays",null,null,n)},t.weekdaysShort=function(n){return u(i(),"weekdaysShort","weekdays",3,n)},t.weekdaysMin=function(n){return u(i(),"weekdaysMin","weekdays",2,n)}}}));
/***/ }),
/***/ 94496:
/*!*********************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/localizedFormat.js ***!
\*********************************************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)}}}));
/***/ }),
/***/ 2358:
/*!******************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/relativeTime.js ***!
\******************************************************************/
/***/ (function(module) {
!function(r,e){ true?module.exports=e():0}(this,(function(){"use strict";return function(r,e,t){r=r||{};var n=e.prototype,o={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],m=h.length,c=0;c0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(""+p)),a="string"==typeof v?v.replace("%d",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return"function"==typeof M?M(a):M.replace("%s",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));
/***/ }),
/***/ 96901:
/*!****************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/weekOfYear.js ***!
\****************************************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";var e="week",t="year";return function(i,n,r){var f=n.prototype;f.week=function(i){if(void 0===i&&(i=null),null!==i)return this.add(7*(i-this.week()),"day");var n=this.$locale().yearStart||1;if(11===this.month()&&this.date()>25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,"millisecond"),o=this.diff(a,e,!0);return o<0?r(this).startOf("week").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));
/***/ }),
/***/ 50499:
/*!**************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/weekYear.js ***!
\**************************************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){t.prototype.weekYear=function(){var e=this.month(),t=this.week(),n=this.year();return 1===t&&11===e?n+1:0===e&&t>=52?n-1:n}}}));
/***/ }),
/***/ 23001:
/*!*************************************************************!*\
!*** ./node_modules/_dayjs@1.11.10@dayjs/plugin/weekday.js ***!
\*************************************************************/
/***/ (function(module) {
!function(e,t){ true?module.exports=t():0}(this,(function(){"use strict";return function(e,t){t.prototype.weekday=function(e){var t=this.$locale().weekStart||0,i=this.$W,n=(i 0 && arguments[0] !== undefined ? arguments[0] : {};
var namespace = opts.namespace || NAMESPACE;
var _opts$only = opts.only,
only = _opts$only === void 0 ? [] : _opts$only,
_opts$except = opts.except,
except = _opts$except === void 0 ? [] : _opts$except;
if (only.length > 0 && except.length > 0) {
throw Error('It is ambiguous to configurate `only` and `except` items at the same time.');
}
var initialState = {
global: false,
models: {},
effects: {}
};
var extraReducers = _defineProperty({}, namespace, function () {
var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : initialState;
var _ref = arguments.length > 1 ? arguments[1] : undefined,
type = _ref.type,
payload = _ref.payload;
var _ref2 = payload || {},
namespace = _ref2.namespace,
actionType = _ref2.actionType;
var ret;
switch (type) {
case SHOW:
ret = _objectSpread2(_objectSpread2({}, state), {}, {
global: true,
models: _objectSpread2(_objectSpread2({}, state.models), {}, _defineProperty({}, namespace, true)),
effects: _objectSpread2(_objectSpread2({}, state.effects), {}, _defineProperty({}, actionType, true))
});
break;
case HIDE:
{
var effects = _objectSpread2(_objectSpread2({}, state.effects), {}, _defineProperty({}, actionType, false));
var models = _objectSpread2(_objectSpread2({}, state.models), {}, _defineProperty({}, namespace, Object.keys(effects).some(function (actionType) {
var _namespace = actionType.split('/')[0];
if (_namespace !== namespace) return false;
return effects[actionType];
})));
var global = Object.keys(models).some(function (namespace) {
return models[namespace];
});
ret = _objectSpread2(_objectSpread2({}, state), {}, {
global: global,
models: models,
effects: effects
});
break;
}
default:
ret = state;
break;
}
return ret;
});
function onEffect(effect, _ref3, model, actionType) {
var put = _ref3.put;
var namespace = model.namespace;
if (only.length === 0 && except.length === 0 || only.length > 0 && only.indexOf(actionType) !== -1 || except.length > 0 && except.indexOf(actionType) === -1) {
return /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
var _args = arguments;
return regeneratorRuntime.wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return put({
type: SHOW,
payload: {
namespace: namespace,
actionType: actionType
}
});
case 2:
_context.next = 4;
return effect.apply(void 0, _args);
case 4:
_context.next = 6;
return put({
type: HIDE,
payload: {
namespace: namespace,
actionType: actionType
}
});
case 6:
case "end":
return _context.stop();
}
}
}, _callee);
});
} else {
return effect;
}
}
return {
extraReducers: extraReducers,
onEffect: onEffect
};
}
module.exports = createLoading;
/***/ }),
/***/ 68192:
/*!****************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/function/noop.js ***!
\****************************************************************/
/***/ (function(module) {
"use strict";
// eslint-disable-next-line no-empty-function
module.exports = function () {};
/***/ }),
/***/ 63474:
/*!**********************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/assign/index.js ***!
\**********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(/*! ./is-implemented */ 71111)() ? Object.assign : __webpack_require__(/*! ./shim */ 47597);
/***/ }),
/***/ 71111:
/*!*******************************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/assign/is-implemented.js ***!
\*******************************************************************************/
/***/ (function(module) {
"use strict";
module.exports = function () {
var assign = Object.assign, obj;
if (typeof assign !== "function") return false;
obj = { foo: "raz" };
assign(obj, { bar: "dwa" }, { trzy: "trzy" });
return obj.foo + obj.bar + obj.trzy === "razdwatrzy";
};
/***/ }),
/***/ 47597:
/*!*********************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/assign/shim.js ***!
\*********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var keys = __webpack_require__(/*! ../keys */ 90721)
, value = __webpack_require__(/*! ../valid-value */ 58883)
, max = Math.max;
module.exports = function (dest, src /*, …srcn*/) {
var error, i, length = max(arguments.length, 2), assign;
dest = Object(value(dest));
assign = function (key) {
try {
dest[key] = src[key];
} catch (e) {
if (!error) error = e;
}
};
for (i = 1; i < length; ++i) {
src = arguments[i];
keys(src).forEach(assign);
}
if (error !== undefined) throw error;
return dest;
};
/***/ }),
/***/ 67390:
/*!******************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/is-value.js ***!
\******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var _undefined = __webpack_require__(/*! ../function/noop */ 68192)(); // Support ES3 engines
module.exports = function (val) { return val !== _undefined && val !== null; };
/***/ }),
/***/ 90721:
/*!********************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/keys/index.js ***!
\********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(/*! ./is-implemented */ 69075)() ? Object.keys : __webpack_require__(/*! ./shim */ 34810);
/***/ }),
/***/ 69075:
/*!*****************************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/keys/is-implemented.js ***!
\*****************************************************************************/
/***/ (function(module) {
"use strict";
module.exports = function () {
try {
Object.keys("primitive");
return true;
} catch (e) {
return false;
}
};
/***/ }),
/***/ 34810:
/*!*******************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/keys/shim.js ***!
\*******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var isValue = __webpack_require__(/*! ../is-value */ 67390);
var keys = Object.keys;
module.exports = function (object) { return keys(isValue(object) ? Object(object) : object); };
/***/ }),
/***/ 47095:
/*!***************************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/normalize-options.js ***!
\***************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var isValue = __webpack_require__(/*! ./is-value */ 67390);
var forEach = Array.prototype.forEach, create = Object.create;
var process = function (src, obj) {
var key;
for (key in src) obj[key] = src[key];
};
// eslint-disable-next-line no-unused-vars
module.exports = function (opts1 /*, …options*/) {
var result = create(null);
forEach.call(arguments, function (options) {
if (!isValue(options)) return;
process(Object(options), result);
});
return result;
};
/***/ }),
/***/ 15895:
/*!************************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/valid-callable.js ***!
\************************************************************************/
/***/ (function(module) {
"use strict";
module.exports = function (fn) {
if (typeof fn !== "function") throw new TypeError(fn + " is not a function");
return fn;
};
/***/ }),
/***/ 58883:
/*!*********************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/object/valid-value.js ***!
\*********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var isValue = __webpack_require__(/*! ./is-value */ 67390);
module.exports = function (value) {
if (!isValue(value)) throw new TypeError("Cannot use null or undefined");
return value;
};
/***/ }),
/***/ 99363:
/*!***************************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/string/ #/contains/index.js ***!
\***************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
module.exports = __webpack_require__(/*! ./is-implemented */ 65136)() ? String.prototype.contains : __webpack_require__(/*! ./shim */ 12444);
/***/ }),
/***/ 65136:
/*!************************************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/string/ #/contains/is-implemented.js ***!
\************************************************************************************/
/***/ (function(module) {
"use strict";
var str = "razdwatrzy";
module.exports = function () {
if (typeof str.contains !== "function") return false;
return str.contains("dwa") === true && str.contains("foo") === false;
};
/***/ }),
/***/ 12444:
/*!**************************************************************************!*\
!*** ./node_modules/_es5-ext@0.10.64@es5-ext/string/ #/contains/shim.js ***!
\**************************************************************************/
/***/ (function(module) {
"use strict";
var indexOf = String.prototype.indexOf;
module.exports = function (searchString /*, position*/) {
return indexOf.call(this, searchString, arguments[1]) > -1;
};
/***/ }),
/***/ 3424:
/*!******************************************************************!*\
!*** ./node_modules/_event-emitter@0.3.5@event-emitter/index.js ***!
\******************************************************************/
/***/ (function(module, exports, __webpack_require__) {
"use strict";
var d = __webpack_require__(/*! d */ 15849)
, callable = __webpack_require__(/*! es5-ext/object/valid-callable */ 15895)
, apply = Function.prototype.apply, call = Function.prototype.call
, create = Object.create, defineProperty = Object.defineProperty
, defineProperties = Object.defineProperties
, hasOwnProperty = Object.prototype.hasOwnProperty
, descriptor = { configurable: true, enumerable: false, writable: true }
, on, once, off, emit, methods, descriptors, base;
on = function (type, listener) {
var data;
callable(listener);
if (!hasOwnProperty.call(this, '__ee__')) {
data = descriptor.value = create(null);
defineProperty(this, '__ee__', descriptor);
descriptor.value = null;
} else {
data = this.__ee__;
}
if (!data[type]) data[type] = listener;
else if (typeof data[type] === 'object') data[type].push(listener);
else data[type] = [data[type], listener];
return this;
};
once = function (type, listener) {
var once, self;
callable(listener);
self = this;
on.call(this, type, once = function () {
off.call(self, type, once);
apply.call(listener, this, arguments);
});
once.__eeOnceListener__ = listener;
return this;
};
off = function (type, listener) {
var data, listeners, candidate, i;
callable(listener);
if (!hasOwnProperty.call(this, '__ee__')) return this;
data = this.__ee__;
if (!data[type]) return this;
listeners = data[type];
if (typeof listeners === 'object') {
for (i = 0; (candidate = listeners[i]); ++i) {
if ((candidate === listener) ||
(candidate.__eeOnceListener__ === listener)) {
if (listeners.length === 2) data[type] = listeners[i ? 0 : 1];
else listeners.splice(i, 1);
}
}
} else {
if ((listeners === listener) ||
(listeners.__eeOnceListener__ === listener)) {
delete data[type];
}
}
return this;
};
emit = function (type) {
var i, l, listener, listeners, args;
if (!hasOwnProperty.call(this, '__ee__')) return;
listeners = this.__ee__[type];
if (!listeners) return;
if (typeof listeners === 'object') {
l = arguments.length;
args = new Array(l - 1);
for (i = 1; i < l; ++i) args[i - 1] = arguments[i];
listeners = listeners.slice();
for (i = 0; (listener = listeners[i]); ++i) {
apply.call(listener, this, args);
}
} else {
switch (arguments.length) {
case 1:
call.call(listeners, this);
break;
case 2:
call.call(listeners, this, arguments[1]);
break;
case 3:
call.call(listeners, this, arguments[1], arguments[2]);
break;
default:
l = arguments.length;
args = new Array(l - 1);
for (i = 1; i < l; ++i) {
args[i - 1] = arguments[i];
}
apply.call(listeners, this, args);
}
}
};
methods = {
on: on,
once: once,
off: off,
emit: emit
};
descriptors = {
on: d(on),
once: d(once),
off: d(off),
emit: d(emit)
};
base = defineProperties({}, descriptors);
module.exports = exports = function (o) {
return (o == null) ? create(base) : defineProperties(Object(o), descriptors);
};
exports.methods = methods;
/***/ }),
/***/ 89381:
/*!******************************************************!*\
!*** ./node_modules/_flatten@1.0.3@flatten/index.js ***!
\******************************************************/
/***/ (function(module) {
module.exports = function flatten(list, depth) {
depth = (typeof depth == 'number') ? depth : Infinity;
if (!depth) {
if (Array.isArray(list)) {
return list.map(function(i) { return i; });
}
return list;
}
return _flatten(list, 1);
function _flatten(list, d) {
return list.reduce(function (acc, item) {
if (Array.isArray(item) && d < depth) {
return acc.concat(_flatten(item, d + 1));
}
else {
return acc.concat(item);
}
}, []);
}
};
/***/ }),
/***/ 60288:
/*!*****************************************************!*\
!*** ./node_modules/_global@4.4.0@global/window.js ***!
\*****************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var win;
if (typeof window !== "undefined") {
win = window;
} else if (typeof __webpack_require__.g !== "undefined") {
win = __webpack_require__.g;
} else if (typeof self !== "undefined"){
win = self;
} else {
win = {};
}
module.exports = win;
/***/ }),
/***/ 85582:
/*!*********************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash.js ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
var hash = exports;
hash.utils = __webpack_require__(/*! ./hash/utils */ 8631);
hash.common = __webpack_require__(/*! ./hash/common */ 28766);
hash.sha = __webpack_require__(/*! ./hash/sha */ 26672);
hash.ripemd = __webpack_require__(/*! ./hash/ripemd */ 20427);
hash.hmac = __webpack_require__(/*! ./hash/hmac */ 57969);
// Proxy hash functions to the main object
hash.sha1 = hash.sha.sha1;
hash.sha256 = hash.sha.sha256;
hash.sha224 = hash.sha.sha224;
hash.sha384 = hash.sha.sha384;
hash.sha512 = hash.sha.sha512;
hash.ripemd160 = hash.ripemd.ripemd160;
/***/ }),
/***/ 28766:
/*!****************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/common.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ./utils */ 8631);
var assert = __webpack_require__(/*! minimalistic-assert */ 61339);
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;
};
/***/ }),
/***/ 57969:
/*!**************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/hmac.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ./utils */ 8631);
var assert = __webpack_require__(/*! minimalistic-assert */ 61339);
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);
};
/***/ }),
/***/ 20427:
/*!****************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/ripemd.js ***!
\****************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ./utils */ 8631);
var common = __webpack_require__(/*! ./common */ 28766);
var rotl32 = utils.rotl32;
var sum32 = utils.sum32;
var sum32_3 = utils.sum32_3;
var sum32_4 = utils.sum32_4;
var BlockHash = common.BlockHash;
function RIPEMD160() {
if (!(this instanceof RIPEMD160))
return new RIPEMD160();
BlockHash.call(this);
this.h = [ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0 ];
this.endian = 'little';
}
utils.inherits(RIPEMD160, BlockHash);
exports.ripemd160 = RIPEMD160;
RIPEMD160.blockSize = 512;
RIPEMD160.outSize = 160;
RIPEMD160.hmacStrength = 192;
RIPEMD160.padLength = 64;
RIPEMD160.prototype._update = function update(msg, start) {
var A = this.h[0];
var B = this.h[1];
var C = this.h[2];
var D = this.h[3];
var E = this.h[4];
var Ah = A;
var Bh = B;
var Ch = C;
var Dh = D;
var Eh = E;
for (var j = 0; j < 80; j++) {
var T = sum32(
rotl32(
sum32_4(A, f(j, B, C, D), msg[r[j] + start], K(j)),
s[j]),
E);
A = E;
E = D;
D = rotl32(C, 10);
C = B;
B = T;
T = sum32(
rotl32(
sum32_4(Ah, f(79 - j, Bh, Ch, Dh), msg[rh[j] + start], Kh(j)),
sh[j]),
Eh);
Ah = Eh;
Eh = Dh;
Dh = rotl32(Ch, 10);
Ch = Bh;
Bh = T;
}
T = sum32_3(this.h[1], C, Dh);
this.h[1] = sum32_3(this.h[2], D, Eh);
this.h[2] = sum32_3(this.h[3], E, Ah);
this.h[3] = sum32_3(this.h[4], A, Bh);
this.h[4] = sum32_3(this.h[0], B, Ch);
this.h[0] = T;
};
RIPEMD160.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'little');
else
return utils.split32(this.h, 'little');
};
function f(j, x, y, z) {
if (j <= 15)
return x ^ y ^ z;
else if (j <= 31)
return (x & y) | ((~x) & z);
else if (j <= 47)
return (x | (~y)) ^ z;
else if (j <= 63)
return (x & z) | (y & (~z));
else
return x ^ (y | (~z));
}
function K(j) {
if (j <= 15)
return 0x00000000;
else if (j <= 31)
return 0x5a827999;
else if (j <= 47)
return 0x6ed9eba1;
else if (j <= 63)
return 0x8f1bbcdc;
else
return 0xa953fd4e;
}
function Kh(j) {
if (j <= 15)
return 0x50a28be6;
else if (j <= 31)
return 0x5c4dd124;
else if (j <= 47)
return 0x6d703ef3;
else if (j <= 63)
return 0x7a6d76e9;
else
return 0x00000000;
}
var r = [
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8,
3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12,
1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2,
4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
];
var rh = [
5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12,
6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2,
15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13,
8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14,
12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
];
var s = [
11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8,
7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12,
11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5,
11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12,
9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
];
var sh = [
8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6,
9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11,
9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5,
15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8,
8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
];
/***/ }),
/***/ 26672:
/*!*************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/sha.js ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
exports.sha1 = __webpack_require__(/*! ./sha/1 */ 16114);
exports.sha224 = __webpack_require__(/*! ./sha/224 */ 44853);
exports.sha256 = __webpack_require__(/*! ./sha/256 */ 6586);
exports.sha384 = __webpack_require__(/*! ./sha/384 */ 66474);
exports.sha512 = __webpack_require__(/*! ./sha/512 */ 50663);
/***/ }),
/***/ 16114:
/*!***************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/sha/1.js ***!
\***************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ 8631);
var common = __webpack_require__(/*! ../common */ 28766);
var shaCommon = __webpack_require__(/*! ./common */ 81692);
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');
};
/***/ }),
/***/ 44853:
/*!*****************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/sha/224.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ 8631);
var SHA256 = __webpack_require__(/*! ./256 */ 6586);
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');
};
/***/ }),
/***/ 6586:
/*!*****************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/sha/256.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ 8631);
var common = __webpack_require__(/*! ../common */ 28766);
var shaCommon = __webpack_require__(/*! ./common */ 81692);
var assert = __webpack_require__(/*! minimalistic-assert */ 61339);
var sum32 = utils.sum32;
var sum32_4 = utils.sum32_4;
var sum32_5 = utils.sum32_5;
var ch32 = shaCommon.ch32;
var maj32 = shaCommon.maj32;
var s0_256 = shaCommon.s0_256;
var s1_256 = shaCommon.s1_256;
var g0_256 = shaCommon.g0_256;
var g1_256 = shaCommon.g1_256;
var BlockHash = common.BlockHash;
var sha256_K = [
0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
];
function SHA256() {
if (!(this instanceof SHA256))
return new SHA256();
BlockHash.call(this);
this.h = [
0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19
];
this.k = sha256_K;
this.W = new Array(64);
}
utils.inherits(SHA256, BlockHash);
module.exports = SHA256;
SHA256.blockSize = 512;
SHA256.outSize = 256;
SHA256.hmacStrength = 192;
SHA256.padLength = 64;
SHA256.prototype._update = function _update(msg, start) {
var W = this.W;
for (var i = 0; i < 16; i++)
W[i] = msg[start + i];
for (; i < W.length; i++)
W[i] = sum32_4(g1_256(W[i - 2]), W[i - 7], g0_256(W[i - 15]), W[i - 16]);
var a = this.h[0];
var b = this.h[1];
var c = this.h[2];
var d = this.h[3];
var e = this.h[4];
var f = this.h[5];
var g = this.h[6];
var h = this.h[7];
assert(this.k.length === W.length);
for (i = 0; i < W.length; i++) {
var T1 = sum32_5(h, s1_256(e), ch32(e, f, g), this.k[i], W[i]);
var T2 = sum32(s0_256(a), maj32(a, b, c));
h = g;
g = f;
f = e;
e = sum32(d, T1);
d = c;
c = b;
b = a;
a = sum32(T1, T2);
}
this.h[0] = sum32(this.h[0], a);
this.h[1] = sum32(this.h[1], b);
this.h[2] = sum32(this.h[2], c);
this.h[3] = sum32(this.h[3], d);
this.h[4] = sum32(this.h[4], e);
this.h[5] = sum32(this.h[5], f);
this.h[6] = sum32(this.h[6], g);
this.h[7] = sum32(this.h[7], h);
};
SHA256.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'big');
else
return utils.split32(this.h, 'big');
};
/***/ }),
/***/ 66474:
/*!*****************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/sha/384.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ 8631);
var SHA512 = __webpack_require__(/*! ./512 */ 50663);
function SHA384() {
if (!(this instanceof SHA384))
return new SHA384();
SHA512.call(this);
this.h = [
0xcbbb9d5d, 0xc1059ed8,
0x629a292a, 0x367cd507,
0x9159015a, 0x3070dd17,
0x152fecd8, 0xf70e5939,
0x67332667, 0xffc00b31,
0x8eb44a87, 0x68581511,
0xdb0c2e0d, 0x64f98fa7,
0x47b5481d, 0xbefa4fa4 ];
}
utils.inherits(SHA384, SHA512);
module.exports = SHA384;
SHA384.blockSize = 1024;
SHA384.outSize = 384;
SHA384.hmacStrength = 192;
SHA384.padLength = 128;
SHA384.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h.slice(0, 12), 'big');
else
return utils.split32(this.h.slice(0, 12), 'big');
};
/***/ }),
/***/ 50663:
/*!*****************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/sha/512.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ 8631);
var common = __webpack_require__(/*! ../common */ 28766);
var assert = __webpack_require__(/*! minimalistic-assert */ 61339);
var rotr64_hi = utils.rotr64_hi;
var rotr64_lo = utils.rotr64_lo;
var shr64_hi = utils.shr64_hi;
var shr64_lo = utils.shr64_lo;
var sum64 = utils.sum64;
var sum64_hi = utils.sum64_hi;
var sum64_lo = utils.sum64_lo;
var sum64_4_hi = utils.sum64_4_hi;
var sum64_4_lo = utils.sum64_4_lo;
var sum64_5_hi = utils.sum64_5_hi;
var sum64_5_lo = utils.sum64_5_lo;
var BlockHash = common.BlockHash;
var sha512_K = [
0x428a2f98, 0xd728ae22, 0x71374491, 0x23ef65cd,
0xb5c0fbcf, 0xec4d3b2f, 0xe9b5dba5, 0x8189dbbc,
0x3956c25b, 0xf348b538, 0x59f111f1, 0xb605d019,
0x923f82a4, 0xaf194f9b, 0xab1c5ed5, 0xda6d8118,
0xd807aa98, 0xa3030242, 0x12835b01, 0x45706fbe,
0x243185be, 0x4ee4b28c, 0x550c7dc3, 0xd5ffb4e2,
0x72be5d74, 0xf27b896f, 0x80deb1fe, 0x3b1696b1,
0x9bdc06a7, 0x25c71235, 0xc19bf174, 0xcf692694,
0xe49b69c1, 0x9ef14ad2, 0xefbe4786, 0x384f25e3,
0x0fc19dc6, 0x8b8cd5b5, 0x240ca1cc, 0x77ac9c65,
0x2de92c6f, 0x592b0275, 0x4a7484aa, 0x6ea6e483,
0x5cb0a9dc, 0xbd41fbd4, 0x76f988da, 0x831153b5,
0x983e5152, 0xee66dfab, 0xa831c66d, 0x2db43210,
0xb00327c8, 0x98fb213f, 0xbf597fc7, 0xbeef0ee4,
0xc6e00bf3, 0x3da88fc2, 0xd5a79147, 0x930aa725,
0x06ca6351, 0xe003826f, 0x14292967, 0x0a0e6e70,
0x27b70a85, 0x46d22ffc, 0x2e1b2138, 0x5c26c926,
0x4d2c6dfc, 0x5ac42aed, 0x53380d13, 0x9d95b3df,
0x650a7354, 0x8baf63de, 0x766a0abb, 0x3c77b2a8,
0x81c2c92e, 0x47edaee6, 0x92722c85, 0x1482353b,
0xa2bfe8a1, 0x4cf10364, 0xa81a664b, 0xbc423001,
0xc24b8b70, 0xd0f89791, 0xc76c51a3, 0x0654be30,
0xd192e819, 0xd6ef5218, 0xd6990624, 0x5565a910,
0xf40e3585, 0x5771202a, 0x106aa070, 0x32bbd1b8,
0x19a4c116, 0xb8d2d0c8, 0x1e376c08, 0x5141ab53,
0x2748774c, 0xdf8eeb99, 0x34b0bcb5, 0xe19b48a8,
0x391c0cb3, 0xc5c95a63, 0x4ed8aa4a, 0xe3418acb,
0x5b9cca4f, 0x7763e373, 0x682e6ff3, 0xd6b2b8a3,
0x748f82ee, 0x5defb2fc, 0x78a5636f, 0x43172f60,
0x84c87814, 0xa1f0ab72, 0x8cc70208, 0x1a6439ec,
0x90befffa, 0x23631e28, 0xa4506ceb, 0xde82bde9,
0xbef9a3f7, 0xb2c67915, 0xc67178f2, 0xe372532b,
0xca273ece, 0xea26619c, 0xd186b8c7, 0x21c0c207,
0xeada7dd6, 0xcde0eb1e, 0xf57d4f7f, 0xee6ed178,
0x06f067aa, 0x72176fba, 0x0a637dc5, 0xa2c898a6,
0x113f9804, 0xbef90dae, 0x1b710b35, 0x131c471b,
0x28db77f5, 0x23047d84, 0x32caab7b, 0x40c72493,
0x3c9ebe0a, 0x15c9bebc, 0x431d67c4, 0x9c100d4c,
0x4cc5d4be, 0xcb3e42b6, 0x597f299c, 0xfc657e2a,
0x5fcb6fab, 0x3ad6faec, 0x6c44198c, 0x4a475817
];
function SHA512() {
if (!(this instanceof SHA512))
return new SHA512();
BlockHash.call(this);
this.h = [
0x6a09e667, 0xf3bcc908,
0xbb67ae85, 0x84caa73b,
0x3c6ef372, 0xfe94f82b,
0xa54ff53a, 0x5f1d36f1,
0x510e527f, 0xade682d1,
0x9b05688c, 0x2b3e6c1f,
0x1f83d9ab, 0xfb41bd6b,
0x5be0cd19, 0x137e2179 ];
this.k = sha512_K;
this.W = new Array(160);
}
utils.inherits(SHA512, BlockHash);
module.exports = SHA512;
SHA512.blockSize = 1024;
SHA512.outSize = 512;
SHA512.hmacStrength = 192;
SHA512.padLength = 128;
SHA512.prototype._prepareBlock = function _prepareBlock(msg, start) {
var W = this.W;
// 32 x 32bit words
for (var i = 0; i < 32; i++)
W[i] = msg[start + i];
for (; i < W.length; i += 2) {
var c0_hi = g1_512_hi(W[i - 4], W[i - 3]); // i - 2
var c0_lo = g1_512_lo(W[i - 4], W[i - 3]);
var c1_hi = W[i - 14]; // i - 7
var c1_lo = W[i - 13];
var c2_hi = g0_512_hi(W[i - 30], W[i - 29]); // i - 15
var c2_lo = g0_512_lo(W[i - 30], W[i - 29]);
var c3_hi = W[i - 32]; // i - 16
var c3_lo = W[i - 31];
W[i] = sum64_4_hi(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo);
W[i + 1] = sum64_4_lo(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo);
}
};
SHA512.prototype._update = function _update(msg, start) {
this._prepareBlock(msg, start);
var W = this.W;
var ah = this.h[0];
var al = this.h[1];
var bh = this.h[2];
var bl = this.h[3];
var ch = this.h[4];
var cl = this.h[5];
var dh = this.h[6];
var dl = this.h[7];
var eh = this.h[8];
var el = this.h[9];
var fh = this.h[10];
var fl = this.h[11];
var gh = this.h[12];
var gl = this.h[13];
var hh = this.h[14];
var hl = this.h[15];
assert(this.k.length === W.length);
for (var i = 0; i < W.length; i += 2) {
var c0_hi = hh;
var c0_lo = hl;
var c1_hi = s1_512_hi(eh, el);
var c1_lo = s1_512_lo(eh, el);
var c2_hi = ch64_hi(eh, el, fh, fl, gh, gl);
var c2_lo = ch64_lo(eh, el, fh, fl, gh, gl);
var c3_hi = this.k[i];
var c3_lo = this.k[i + 1];
var c4_hi = W[i];
var c4_lo = W[i + 1];
var T1_hi = sum64_5_hi(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo,
c4_hi, c4_lo);
var T1_lo = sum64_5_lo(
c0_hi, c0_lo,
c1_hi, c1_lo,
c2_hi, c2_lo,
c3_hi, c3_lo,
c4_hi, c4_lo);
c0_hi = s0_512_hi(ah, al);
c0_lo = s0_512_lo(ah, al);
c1_hi = maj64_hi(ah, al, bh, bl, ch, cl);
c1_lo = maj64_lo(ah, al, bh, bl, ch, cl);
var T2_hi = sum64_hi(c0_hi, c0_lo, c1_hi, c1_lo);
var T2_lo = sum64_lo(c0_hi, c0_lo, c1_hi, c1_lo);
hh = gh;
hl = gl;
gh = fh;
gl = fl;
fh = eh;
fl = el;
eh = sum64_hi(dh, dl, T1_hi, T1_lo);
el = sum64_lo(dl, dl, T1_hi, T1_lo);
dh = ch;
dl = cl;
ch = bh;
cl = bl;
bh = ah;
bl = al;
ah = sum64_hi(T1_hi, T1_lo, T2_hi, T2_lo);
al = sum64_lo(T1_hi, T1_lo, T2_hi, T2_lo);
}
sum64(this.h, 0, ah, al);
sum64(this.h, 2, bh, bl);
sum64(this.h, 4, ch, cl);
sum64(this.h, 6, dh, dl);
sum64(this.h, 8, eh, el);
sum64(this.h, 10, fh, fl);
sum64(this.h, 12, gh, gl);
sum64(this.h, 14, hh, hl);
};
SHA512.prototype._digest = function digest(enc) {
if (enc === 'hex')
return utils.toHex32(this.h, 'big');
else
return utils.split32(this.h, 'big');
};
function ch64_hi(xh, xl, yh, yl, zh) {
var r = (xh & yh) ^ ((~xh) & zh);
if (r < 0)
r += 0x100000000;
return r;
}
function ch64_lo(xh, xl, yh, yl, zh, zl) {
var r = (xl & yl) ^ ((~xl) & zl);
if (r < 0)
r += 0x100000000;
return r;
}
function maj64_hi(xh, xl, yh, yl, zh) {
var r = (xh & yh) ^ (xh & zh) ^ (yh & zh);
if (r < 0)
r += 0x100000000;
return r;
}
function maj64_lo(xh, xl, yh, yl, zh, zl) {
var r = (xl & yl) ^ (xl & zl) ^ (yl & zl);
if (r < 0)
r += 0x100000000;
return r;
}
function s0_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 28);
var c1_hi = rotr64_hi(xl, xh, 2); // 34
var c2_hi = rotr64_hi(xl, xh, 7); // 39
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function s0_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 28);
var c1_lo = rotr64_lo(xl, xh, 2); // 34
var c2_lo = rotr64_lo(xl, xh, 7); // 39
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
function s1_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 14);
var c1_hi = rotr64_hi(xh, xl, 18);
var c2_hi = rotr64_hi(xl, xh, 9); // 41
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function s1_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 14);
var c1_lo = rotr64_lo(xh, xl, 18);
var c2_lo = rotr64_lo(xl, xh, 9); // 41
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
function g0_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 1);
var c1_hi = rotr64_hi(xh, xl, 8);
var c2_hi = shr64_hi(xh, xl, 7);
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function g0_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 1);
var c1_lo = rotr64_lo(xh, xl, 8);
var c2_lo = shr64_lo(xh, xl, 7);
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
function g1_512_hi(xh, xl) {
var c0_hi = rotr64_hi(xh, xl, 19);
var c1_hi = rotr64_hi(xl, xh, 29); // 61
var c2_hi = shr64_hi(xh, xl, 6);
var r = c0_hi ^ c1_hi ^ c2_hi;
if (r < 0)
r += 0x100000000;
return r;
}
function g1_512_lo(xh, xl) {
var c0_lo = rotr64_lo(xh, xl, 19);
var c1_lo = rotr64_lo(xl, xh, 29); // 61
var c2_lo = shr64_lo(xh, xl, 6);
var r = c0_lo ^ c1_lo ^ c2_lo;
if (r < 0)
r += 0x100000000;
return r;
}
/***/ }),
/***/ 81692:
/*!********************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/sha/common.js ***!
\********************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
var utils = __webpack_require__(/*! ../utils */ 8631);
var rotr32 = utils.rotr32;
function ft_1(s, x, y, z) {
if (s === 0)
return ch32(x, y, z);
if (s === 1 || s === 3)
return p32(x, y, z);
if (s === 2)
return maj32(x, y, z);
}
exports.ft_1 = ft_1;
function ch32(x, y, z) {
return (x & y) ^ ((~x) & z);
}
exports.ch32 = ch32;
function maj32(x, y, z) {
return (x & y) ^ (x & z) ^ (y & z);
}
exports.maj32 = maj32;
function p32(x, y, z) {
return x ^ y ^ z;
}
exports.p32 = p32;
function s0_256(x) {
return rotr32(x, 2) ^ rotr32(x, 13) ^ rotr32(x, 22);
}
exports.s0_256 = s0_256;
function s1_256(x) {
return rotr32(x, 6) ^ rotr32(x, 11) ^ rotr32(x, 25);
}
exports.s1_256 = s1_256;
function g0_256(x) {
return rotr32(x, 7) ^ rotr32(x, 18) ^ (x >>> 3);
}
exports.g0_256 = g0_256;
function g1_256(x) {
return rotr32(x, 17) ^ rotr32(x, 19) ^ (x >>> 10);
}
exports.g1_256 = g1_256;
/***/ }),
/***/ 8631:
/*!***************************************************************!*\
!*** ./node_modules/_hash.js@1.1.7@hash.js/lib/hash/utils.js ***!
\***************************************************************/
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
"use strict";
var assert = __webpack_require__(/*! minimalistic-assert */ 61339);
var inherits = __webpack_require__(/*! inherits */ 4603);
exports.inherits = inherits;
function isSurrogatePair(msg, i) {
if ((msg.charCodeAt(i) & 0xFC00) !== 0xD800) {
return false;
}
if (i < 0 || i + 1 >= msg.length) {
return false;
}
return (msg.charCodeAt(i + 1) & 0xFC00) === 0xDC00;
}
function toArray(msg, enc) {
if (Array.isArray(msg))
return msg.slice();
if (!msg)
return [];
var res = [];
if (typeof msg === 'string') {
if (!enc) {
// Inspired by stringToUtf8ByteArray() in closure-library by Google
// https://github.com/google/closure-library/blob/8598d87242af59aac233270742c8984e2b2bdbe0/closure/goog/crypt/crypt.js#L117-L143
// Apache License 2.0
// https://github.com/google/closure-library/blob/master/LICENSE
var p = 0;
for (var i = 0; i < msg.length; i++) {
var c = msg.charCodeAt(i);
if (c < 128) {
res[p++] = c;
} else if (c < 2048) {
res[p++] = (c >> 6) | 192;
res[p++] = (c & 63) | 128;
} else if (isSurrogatePair(msg, i)) {
c = 0x10000 + ((c & 0x03FF) << 10) + (msg.charCodeAt(++i) & 0x03FF);
res[p++] = (c >> 18) | 240;
res[p++] = ((c >> 12) & 63) | 128;
res[p++] = ((c >> 6) & 63) | 128;
res[p++] = (c & 63) | 128;
} else {
res[p++] = (c >> 12) | 224;
res[p++] = ((c >> 6) & 63) | 128;
res[p++] = (c & 63) | 128;
}
}
} else if (enc === 'hex') {
msg = msg.replace(/[^a-z0-9]+/ig, '');
if (msg.length % 2 !== 0)
msg = '0' + msg;
for (i = 0; i < msg.length; i += 2)
res.push(parseInt(msg[i] + msg[i + 1], 16));
}
} else {
for (i = 0; i < msg.length; i++)
res[i] = msg[i] | 0;
}
return res;
}
exports.toArray = toArray;
function toHex(msg) {
var res = '';
for (var i = 0; i < msg.length; i++)
res += zero2(msg[i].toString(16));
return res;
}
exports.toHex = toHex;
function htonl(w) {
var res = (w >>> 24) |
((w >>> 8) & 0xff00) |
((w << 8) & 0xff0000) |
((w & 0xff) << 24);
return res >>> 0;
}
exports.htonl = htonl;
function toHex32(msg, endian) {
var res = '';
for (var i = 0; i < msg.length; i++) {
var w = msg[i];
if (endian === 'little')
w = htonl(w);
res += zero8(w.toString(16));
}
return res;
}
exports.toHex32 = toHex32;
function zero2(word) {
if (word.length === 1)
return '0' + word;
else
return word;
}
exports.zero2 = zero2;
function zero8(word) {
if (word.length === 7)
return '0' + word;
else if (word.length === 6)
return '00' + word;
else if (word.length === 5)
return '000' + word;
else if (word.length === 4)
return '0000' + word;
else if (word.length === 3)
return '00000' + word;
else if (word.length === 2)
return '000000' + word;
else if (word.length === 1)
return '0000000' + word;
else
return word;
}
exports.zero8 = zero8;
function join32(msg, start, end, endian) {
var len = end - start;
assert(len % 4 === 0);
var res = new Array(len / 4);
for (var i = 0, k = start; i < res.length; i++, k += 4) {
var w;
if (endian === 'big')
w = (msg[k] << 24) | (msg[k + 1] << 16) | (msg[k + 2] << 8) | msg[k + 3];
else
w = (msg[k + 3] << 24) | (msg[k + 2] << 16) | (msg[k + 1] << 8) | msg[k];
res[i] = w >>> 0;
}
return res;
}
exports.join32 = join32;
function split32(msg, endian) {
var res = new Array(msg.length * 4);
for (var i = 0, k = 0; i < msg.length; i++, k += 4) {
var m = msg[i];
if (endian === 'big') {
res[k] = m >>> 24;
res[k + 1] = (m >>> 16) & 0xff;
res[k + 2] = (m >>> 8) & 0xff;
res[k + 3] = m & 0xff;
} else {
res[k + 3] = m >>> 24;
res[k + 2] = (m >>> 16) & 0xff;
res[k + 1] = (m >>> 8) & 0xff;
res[k] = m & 0xff;
}
}
return res;
}
exports.split32 = split32;
function rotr32(w, b) {
return (w >>> b) | (w << (32 - b));
}
exports.rotr32 = rotr32;
function rotl32(w, b) {
return (w << b) | (w >>> (32 - b));
}
exports.rotl32 = rotl32;
function sum32(a, b) {
return (a + b) >>> 0;
}
exports.sum32 = sum32;
function sum32_3(a, b, c) {
return (a + b + c) >>> 0;
}
exports.sum32_3 = sum32_3;
function sum32_4(a, b, c, d) {
return (a + b + c + d) >>> 0;
}
exports.sum32_4 = sum32_4;
function sum32_5(a, b, c, d, e) {
return (a + b + c + d + e) >>> 0;
}
exports.sum32_5 = sum32_5;
function sum64(buf, pos, ah, al) {
var bh = buf[pos];
var bl = buf[pos + 1];
var lo = (al + bl) >>> 0;
var hi = (lo < al ? 1 : 0) + ah + bh;
buf[pos] = hi >>> 0;
buf[pos + 1] = lo;
}
exports.sum64 = sum64;
function sum64_hi(ah, al, bh, bl) {
var lo = (al + bl) >>> 0;
var hi = (lo < al ? 1 : 0) + ah + bh;
return hi >>> 0;
}
exports.sum64_hi = sum64_hi;
function sum64_lo(ah, al, bh, bl) {
var lo = al + bl;
return lo >>> 0;
}
exports.sum64_lo = sum64_lo;
function sum64_4_hi(ah, al, bh, bl, ch, cl, dh, dl) {
var carry = 0;
var lo = al;
lo = (lo + bl) >>> 0;
carry += lo < al ? 1 : 0;
lo = (lo + cl) >>> 0;
carry += lo < cl ? 1 : 0;
lo = (lo + dl) >>> 0;
carry += lo < dl ? 1 : 0;
var hi = ah + bh + ch + dh + carry;
return hi >>> 0;
}
exports.sum64_4_hi = sum64_4_hi;
function sum64_4_lo(ah, al, bh, bl, ch, cl, dh, dl) {
var lo = al + bl + cl + dl;
return lo >>> 0;
}
exports.sum64_4_lo = sum64_4_lo;
function sum64_5_hi(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
var carry = 0;
var lo = al;
lo = (lo + bl) >>> 0;
carry += lo < al ? 1 : 0;
lo = (lo + cl) >>> 0;
carry += lo < cl ? 1 : 0;
lo = (lo + dl) >>> 0;
carry += lo < dl ? 1 : 0;
lo = (lo + el) >>> 0;
carry += lo < el ? 1 : 0;
var hi = ah + bh + ch + dh + eh + carry;
return hi >>> 0;
}
exports.sum64_5_hi = sum64_5_hi;
function sum64_5_lo(ah, al, bh, bl, ch, cl, dh, dl, eh, el) {
var lo = al + bl + cl + dl + el;
return lo >>> 0;
}
exports.sum64_5_lo = sum64_5_lo;
function rotr64_hi(ah, al, num) {
var r = (al << (32 - num)) | (ah >>> num);
return r >>> 0;
}
exports.rotr64_hi = rotr64_hi;
function rotr64_lo(ah, al, num) {
var r = (ah << (32 - num)) | (al >>> num);
return r >>> 0;
}
exports.rotr64_lo = rotr64_lo;
function shr64_hi(ah, al, num) {
return ah >>> num;
}
exports.shr64_hi = shr64_hi;
function shr64_lo(ah, al, num) {
var r = (ah << (32 - num)) | (al >>> num);
return r >>> 0;
}
exports.shr64_lo = shr64_lo;
/***/ }),
/***/ 19340:
/*!******************************************************!*\
!*** ./node_modules/_history@5.3.0@history/index.js ***!
\******************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ Ep: function() { return /* binding */ createPath; },
/* harmony export */ PP: function() { return /* binding */ createMemoryHistory; },
/* harmony export */ aU: function() { return /* binding */ Action; },
/* harmony export */ cP: function() { return /* binding */ parsePath; },
/* harmony export */ lX: function() { return /* binding */ createBrowserHistory; },
/* harmony export */ q_: function() { return /* binding */ createHashHistory; }
/* harmony export */ });
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/extends */ 36384);
/**
* Actions represent the type of change to a location value.
*
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#action
*/
var Action;
(function (Action) {
/**
* A POP indicates a change to an arbitrary index in the history stack, such
* as a back or forward navigation. It does not describe the direction of the
* navigation, only that the current index changed.
*
* Note: This is the default action for newly created history objects.
*/
Action["Pop"] = "POP";
/**
* A PUSH indicates a new entry being added to the history stack, such as when
* a link is clicked and a new page loads. When this happens, all subsequent
* entries in the stack are lost.
*/
Action["Push"] = "PUSH";
/**
* A REPLACE indicates the entry at the current index in the history stack
* being replaced by a new one.
*/
Action["Replace"] = "REPLACE";
})(Action || (Action = {}));
var readOnly = false ? 0 : function (obj) {
return obj;
};
function warning(cond, message) {
if (!cond) {
// eslint-disable-next-line no-console
if (typeof console !== 'undefined') console.warn(message);
try {
// Welcome to debugging history!
//
// This error is thrown as a convenience so you can more easily
// find the source for a warning that appears in the console by
// enabling "pause on exceptions" in your JavaScript debugger.
throw new Error(message); // eslint-disable-next-line no-empty
} catch (e) {}
}
}
var BeforeUnloadEventType = 'beforeunload';
var HashChangeEventType = 'hashchange';
var PopStateEventType = 'popstate';
/**
* Browser history stores the location in regular URLs. This is the standard for
* most web apps, but it requires some configuration on the server to ensure you
* serve the same app at multiple URLs.
*
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createbrowserhistory
*/
function createBrowserHistory(options) {
if (options === void 0) {
options = {};
}
var _options = options,
_options$window = _options.window,
window = _options$window === void 0 ? document.defaultView : _options$window;
var globalHistory = window.history;
function getIndexAndLocation() {
var _window$location = window.location,
pathname = _window$location.pathname,
search = _window$location.search,
hash = _window$location.hash;
var state = globalHistory.state || {};
return [state.idx, readOnly({
pathname: pathname,
search: search,
hash: hash,
state: state.usr || null,
key: state.key || 'default'
})];
}
var blockedPopTx = null;
function handlePop() {
if (blockedPopTx) {
blockers.call(blockedPopTx);
blockedPopTx = null;
} else {
var nextAction = Action.Pop;
var _getIndexAndLocation = getIndexAndLocation(),
nextIndex = _getIndexAndLocation[0],
nextLocation = _getIndexAndLocation[1];
if (blockers.length) {
if (nextIndex != null) {
var delta = index - nextIndex;
if (delta) {
// Revert the POP
blockedPopTx = {
action: nextAction,
location: nextLocation,
retry: function retry() {
go(delta * -1);
}
};
go(delta);
}
} else {
// Trying to POP to a location with no index. We did not create
// this location, so we can't effectively block the navigation.
false ? 0 : void 0;
}
} else {
applyTx(nextAction);
}
}
}
window.addEventListener(PopStateEventType, handlePop);
var action = Action.Pop;
var _getIndexAndLocation2 = getIndexAndLocation(),
index = _getIndexAndLocation2[0],
location = _getIndexAndLocation2[1];
var listeners = createEvents();
var blockers = createEvents();
if (index == null) {
index = 0;
globalHistory.replaceState((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, globalHistory.state, {
idx: index
}), '');
}
function createHref(to) {
return typeof to === 'string' ? to : createPath(to);
} // state defaults to `null` because `window.history.state` does
function getNextLocation(to, state) {
if (state === void 0) {
state = null;
}
return readOnly((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({
pathname: location.pathname,
hash: '',
search: ''
}, typeof to === 'string' ? parsePath(to) : to, {
state: state,
key: createKey()
}));
}
function getHistoryStateAndUrl(nextLocation, index) {
return [{
usr: nextLocation.state,
key: nextLocation.key,
idx: index
}, createHref(nextLocation)];
}
function allowTx(action, location, retry) {
return !blockers.length || (blockers.call({
action: action,
location: location,
retry: retry
}), false);
}
function applyTx(nextAction) {
action = nextAction;
var _getIndexAndLocation3 = getIndexAndLocation();
index = _getIndexAndLocation3[0];
location = _getIndexAndLocation3[1];
listeners.call({
action: action,
location: location
});
}
function push(to, state) {
var nextAction = Action.Push;
var nextLocation = getNextLocation(to, state);
function retry() {
push(to, state);
}
if (allowTx(nextAction, nextLocation, retry)) {
var _getHistoryStateAndUr = getHistoryStateAndUrl(nextLocation, index + 1),
historyState = _getHistoryStateAndUr[0],
url = _getHistoryStateAndUr[1]; // TODO: Support forced reloading
// try...catch because iOS limits us to 100 pushState calls :/
try {
globalHistory.pushState(historyState, '', url);
} catch (error) {
// They are going to lose state here, but there is no real
// way to warn them about it since the page will refresh...
window.location.assign(url);
}
applyTx(nextAction);
}
}
function replace(to, state) {
var nextAction = Action.Replace;
var nextLocation = getNextLocation(to, state);
function retry() {
replace(to, state);
}
if (allowTx(nextAction, nextLocation, retry)) {
var _getHistoryStateAndUr2 = getHistoryStateAndUrl(nextLocation, index),
historyState = _getHistoryStateAndUr2[0],
url = _getHistoryStateAndUr2[1]; // TODO: Support forced reloading
globalHistory.replaceState(historyState, '', url);
applyTx(nextAction);
}
}
function go(delta) {
globalHistory.go(delta);
}
var history = {
get action() {
return action;
},
get location() {
return location;
},
createHref: createHref,
push: push,
replace: replace,
go: go,
back: function back() {
go(-1);
},
forward: function forward() {
go(1);
},
listen: function listen(listener) {
return listeners.push(listener);
},
block: function block(blocker) {
var unblock = blockers.push(blocker);
if (blockers.length === 1) {
window.addEventListener(BeforeUnloadEventType, promptBeforeUnload);
}
return function () {
unblock(); // Remove the beforeunload listener so the document may
// still be salvageable in the pagehide event.
// See https://html.spec.whatwg.org/#unloading-documents
if (!blockers.length) {
window.removeEventListener(BeforeUnloadEventType, promptBeforeUnload);
}
};
}
};
return history;
}
/**
* Hash history stores the location in window.location.hash. This makes it ideal
* for situations where you don't want to send the location to the server for
* some reason, either because you do cannot configure it or the URL space is
* reserved for something else.
*
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createhashhistory
*/
function createHashHistory(options) {
if (options === void 0) {
options = {};
}
var _options2 = options,
_options2$window = _options2.window,
window = _options2$window === void 0 ? document.defaultView : _options2$window;
var globalHistory = window.history;
function getIndexAndLocation() {
var _parsePath = parsePath(window.location.hash.substr(1)),
_parsePath$pathname = _parsePath.pathname,
pathname = _parsePath$pathname === void 0 ? '/' : _parsePath$pathname,
_parsePath$search = _parsePath.search,
search = _parsePath$search === void 0 ? '' : _parsePath$search,
_parsePath$hash = _parsePath.hash,
hash = _parsePath$hash === void 0 ? '' : _parsePath$hash;
var state = globalHistory.state || {};
return [state.idx, readOnly({
pathname: pathname,
search: search,
hash: hash,
state: state.usr || null,
key: state.key || 'default'
})];
}
var blockedPopTx = null;
function handlePop() {
if (blockedPopTx) {
blockers.call(blockedPopTx);
blockedPopTx = null;
} else {
var nextAction = Action.Pop;
var _getIndexAndLocation4 = getIndexAndLocation(),
nextIndex = _getIndexAndLocation4[0],
nextLocation = _getIndexAndLocation4[1];
if (blockers.length) {
if (nextIndex != null) {
var delta = index - nextIndex;
if (delta) {
// Revert the POP
blockedPopTx = {
action: nextAction,
location: nextLocation,
retry: function retry() {
go(delta * -1);
}
};
go(delta);
}
} else {
// Trying to POP to a location with no index. We did not create
// this location, so we can't effectively block the navigation.
false ? 0 : void 0;
}
} else {
applyTx(nextAction);
}
}
}
window.addEventListener(PopStateEventType, handlePop); // popstate does not fire on hashchange in IE 11 and old (trident) Edge
// https://developer.mozilla.org/de/docs/Web/API/Window/popstate_event
window.addEventListener(HashChangeEventType, function () {
var _getIndexAndLocation5 = getIndexAndLocation(),
nextLocation = _getIndexAndLocation5[1]; // Ignore extraneous hashchange events.
if (createPath(nextLocation) !== createPath(location)) {
handlePop();
}
});
var action = Action.Pop;
var _getIndexAndLocation6 = getIndexAndLocation(),
index = _getIndexAndLocation6[0],
location = _getIndexAndLocation6[1];
var listeners = createEvents();
var blockers = createEvents();
if (index == null) {
index = 0;
globalHistory.replaceState((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({}, globalHistory.state, {
idx: index
}), '');
}
function getBaseHref() {
var base = document.querySelector('base');
var href = '';
if (base && base.getAttribute('href')) {
var url = window.location.href;
var hashIndex = url.indexOf('#');
href = hashIndex === -1 ? url : url.slice(0, hashIndex);
}
return href;
}
function createHref(to) {
return getBaseHref() + '#' + (typeof to === 'string' ? to : createPath(to));
}
function getNextLocation(to, state) {
if (state === void 0) {
state = null;
}
return readOnly((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({
pathname: location.pathname,
hash: '',
search: ''
}, typeof to === 'string' ? parsePath(to) : to, {
state: state,
key: createKey()
}));
}
function getHistoryStateAndUrl(nextLocation, index) {
return [{
usr: nextLocation.state,
key: nextLocation.key,
idx: index
}, createHref(nextLocation)];
}
function allowTx(action, location, retry) {
return !blockers.length || (blockers.call({
action: action,
location: location,
retry: retry
}), false);
}
function applyTx(nextAction) {
action = nextAction;
var _getIndexAndLocation7 = getIndexAndLocation();
index = _getIndexAndLocation7[0];
location = _getIndexAndLocation7[1];
listeners.call({
action: action,
location: location
});
}
function push(to, state) {
var nextAction = Action.Push;
var nextLocation = getNextLocation(to, state);
function retry() {
push(to, state);
}
false ? 0 : void 0;
if (allowTx(nextAction, nextLocation, retry)) {
var _getHistoryStateAndUr3 = getHistoryStateAndUrl(nextLocation, index + 1),
historyState = _getHistoryStateAndUr3[0],
url = _getHistoryStateAndUr3[1]; // TODO: Support forced reloading
// try...catch because iOS limits us to 100 pushState calls :/
try {
globalHistory.pushState(historyState, '', url);
} catch (error) {
// They are going to lose state here, but there is no real
// way to warn them about it since the page will refresh...
window.location.assign(url);
}
applyTx(nextAction);
}
}
function replace(to, state) {
var nextAction = Action.Replace;
var nextLocation = getNextLocation(to, state);
function retry() {
replace(to, state);
}
false ? 0 : void 0;
if (allowTx(nextAction, nextLocation, retry)) {
var _getHistoryStateAndUr4 = getHistoryStateAndUrl(nextLocation, index),
historyState = _getHistoryStateAndUr4[0],
url = _getHistoryStateAndUr4[1]; // TODO: Support forced reloading
globalHistory.replaceState(historyState, '', url);
applyTx(nextAction);
}
}
function go(delta) {
globalHistory.go(delta);
}
var history = {
get action() {
return action;
},
get location() {
return location;
},
createHref: createHref,
push: push,
replace: replace,
go: go,
back: function back() {
go(-1);
},
forward: function forward() {
go(1);
},
listen: function listen(listener) {
return listeners.push(listener);
},
block: function block(blocker) {
var unblock = blockers.push(blocker);
if (blockers.length === 1) {
window.addEventListener(BeforeUnloadEventType, promptBeforeUnload);
}
return function () {
unblock(); // Remove the beforeunload listener so the document may
// still be salvageable in the pagehide event.
// See https://html.spec.whatwg.org/#unloading-documents
if (!blockers.length) {
window.removeEventListener(BeforeUnloadEventType, promptBeforeUnload);
}
};
}
};
return history;
}
/**
* Memory history stores the current location in memory. It is designed for use
* in stateful non-browser environments like tests and React Native.
*
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#creatememoryhistory
*/
function createMemoryHistory(options) {
if (options === void 0) {
options = {};
}
var _options3 = options,
_options3$initialEntr = _options3.initialEntries,
initialEntries = _options3$initialEntr === void 0 ? ['/'] : _options3$initialEntr,
initialIndex = _options3.initialIndex;
var entries = initialEntries.map(function (entry) {
var location = readOnly((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({
pathname: '/',
search: '',
hash: '',
state: null,
key: createKey()
}, typeof entry === 'string' ? parsePath(entry) : entry));
false ? 0 : void 0;
return location;
});
var index = clamp(initialIndex == null ? entries.length - 1 : initialIndex, 0, entries.length - 1);
var action = Action.Pop;
var location = entries[index];
var listeners = createEvents();
var blockers = createEvents();
function createHref(to) {
return typeof to === 'string' ? to : createPath(to);
}
function getNextLocation(to, state) {
if (state === void 0) {
state = null;
}
return readOnly((0,_babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z)({
pathname: location.pathname,
search: '',
hash: ''
}, typeof to === 'string' ? parsePath(to) : to, {
state: state,
key: createKey()
}));
}
function allowTx(action, location, retry) {
return !blockers.length || (blockers.call({
action: action,
location: location,
retry: retry
}), false);
}
function applyTx(nextAction, nextLocation) {
action = nextAction;
location = nextLocation;
listeners.call({
action: action,
location: location
});
}
function push(to, state) {
var nextAction = Action.Push;
var nextLocation = getNextLocation(to, state);
function retry() {
push(to, state);
}
false ? 0 : void 0;
if (allowTx(nextAction, nextLocation, retry)) {
index += 1;
entries.splice(index, entries.length, nextLocation);
applyTx(nextAction, nextLocation);
}
}
function replace(to, state) {
var nextAction = Action.Replace;
var nextLocation = getNextLocation(to, state);
function retry() {
replace(to, state);
}
false ? 0 : void 0;
if (allowTx(nextAction, nextLocation, retry)) {
entries[index] = nextLocation;
applyTx(nextAction, nextLocation);
}
}
function go(delta) {
var nextIndex = clamp(index + delta, 0, entries.length - 1);
var nextAction = Action.Pop;
var nextLocation = entries[nextIndex];
function retry() {
go(delta);
}
if (allowTx(nextAction, nextLocation, retry)) {
index = nextIndex;
applyTx(nextAction, nextLocation);
}
}
var history = {
get index() {
return index;
},
get action() {
return action;
},
get location() {
return location;
},
createHref: createHref,
push: push,
replace: replace,
go: go,
back: function back() {
go(-1);
},
forward: function forward() {
go(1);
},
listen: function listen(listener) {
return listeners.push(listener);
},
block: function block(blocker) {
return blockers.push(blocker);
}
};
return history;
} ////////////////////////////////////////////////////////////////////////////////
// UTILS
////////////////////////////////////////////////////////////////////////////////
function clamp(n, lowerBound, upperBound) {
return Math.min(Math.max(n, lowerBound), upperBound);
}
function promptBeforeUnload(event) {
// Cancel the event.
event.preventDefault(); // Chrome (and legacy IE) requires returnValue to be set.
event.returnValue = '';
}
function createEvents() {
var handlers = [];
return {
get length() {
return handlers.length;
},
push: function push(fn) {
handlers.push(fn);
return function () {
handlers = handlers.filter(function (handler) {
return handler !== fn;
});
};
},
call: function call(arg) {
handlers.forEach(function (fn) {
return fn && fn(arg);
});
}
};
}
function createKey() {
return Math.random().toString(36).substr(2, 8);
}
/**
* Creates a string URL path from the given pathname, search, and hash components.
*
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#createpath
*/
function createPath(_ref) {
var _ref$pathname = _ref.pathname,
pathname = _ref$pathname === void 0 ? '/' : _ref$pathname,
_ref$search = _ref.search,
search = _ref$search === void 0 ? '' : _ref$search,
_ref$hash = _ref.hash,
hash = _ref$hash === void 0 ? '' : _ref$hash;
if (search && search !== '?') pathname += search.charAt(0) === '?' ? search : '?' + search;
if (hash && hash !== '#') pathname += hash.charAt(0) === '#' ? hash : '#' + hash;
return pathname;
}
/**
* Parses a string URL path into its separate pathname, search, and hash components.
*
* @see https://github.com/remix-run/history/tree/main/docs/api-reference.md#parsepath
*/
function parsePath(path) {
var parsedPath = {};
if (path) {
var hashIndex = path.indexOf('#');
if (hashIndex >= 0) {
parsedPath.hash = path.substr(hashIndex);
path = path.substr(0, hashIndex);
}
var searchIndex = path.indexOf('?');
if (searchIndex >= 0) {
parsedPath.search = path.substr(searchIndex);
path = path.substr(0, searchIndex);
}
if (path) {
parsedPath.pathname = path;
}
}
return parsedPath;
}
//# sourceMappingURL=index.js.map
/***/ }),
/***/ 94266:
/*!*****************************************************************************************************************!*\
!*** ./node_modules/_hoist-non-react-statics@3.3.2@hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js ***!
\*****************************************************************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
var reactIs = __webpack_require__(/*! react-is */ 99234);
/**
* 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;
/***/ }),
/***/ 4603:
/*!*******************************************************************!*\
!*** ./node_modules/_inherits@2.0.4@inherits/inherits_browser.js ***!
\*******************************************************************/
/***/ (function(module) {
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
if (superCtor) {
ctor.super_ = superCtor
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
})
}
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
if (superCtor) {
ctor.super_ = superCtor
var TempCtor = function () {}
TempCtor.prototype = superCtor.prototype
ctor.prototype = new TempCtor()
ctor.prototype.constructor = ctor
}
}
}
/***/ }),
/***/ 44520:
/*!************************************************************!*\
!*** ./node_modules/_invariant@2.2.4@invariant/browser.js ***!
\************************************************************/
/***/ (function(module) {
"use strict";
/**
* Copyright (c) 2013-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Use invariant() to assert state which your program assumes to be true.
*
* Provide sprintf-style format (only %s is supported) and arguments
* to provide information about what broke and what you were
* expecting.
*
* The invariant message will be stripped in production, but the invariant
* will remain to ensure logic does not differ in production.
*/
var invariant = function(condition, format, a, b, c, d, e, f) {
if (false) {}
if (!condition) {
var error;
if (format === undefined) {
error = new Error(
'Minified exception occurred; use the non-minified dev environment ' +
'for the full error message and additional helpful warnings.'
);
} else {
var args = [a, b, c, d, e, f];
var argIndex = 0;
error = new Error(
format.replace(/%s/g, function() { return args[argIndex++]; })
);
error.name = 'Invariant Violation';
}
error.framesToPop = 1; // we don't care about invariant's own frame
throw error;
}
};
module.exports = invariant;
/***/ }),
/***/ 78034:
/*!**********************************************************!*\
!*** ./node_modules/_is-buffer@1.1.6@is-buffer/index.js ***!
\**********************************************************/
/***/ (function(module) {
/*!
* 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))
}
/***/ }),
/***/ 78639:
/*!**********************************************************************!*\
!*** ./node_modules/_is-plain-object@2.0.4@is-plain-object/index.js ***!
\**********************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
"use strict";
/*!
* is-plain-object
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
var isObject = __webpack_require__(/*! isobject */ 77497);
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;
};
/***/ }),
/***/ 77497:
/*!********************************************************!*\
!*** ./node_modules/_isobject@3.0.1@isobject/index.js ***!
\********************************************************/
/***/ (function(module) {
"use strict";
/*!
* isobject
*
* Copyright (c) 2014-2017, Jon Schlinkert.
* Released under the MIT License.
*/
module.exports = function isObject(val) {
return val != null && typeof val === 'object' && Array.isArray(val) === false;
};
/***/ }),
/***/ 76414:
/*!******************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_Hash.js ***!
\******************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var hashClear = __webpack_require__(/*! ./_hashClear */ 64696),
hashDelete = __webpack_require__(/*! ./_hashDelete */ 16824),
hashGet = __webpack_require__(/*! ./_hashGet */ 23476),
hashHas = __webpack_require__(/*! ./_hashHas */ 63122),
hashSet = __webpack_require__(/*! ./_hashSet */ 37279);
/**
* 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;
/***/ }),
/***/ 99746:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_ListCache.js ***!
\***********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var listCacheClear = __webpack_require__(/*! ./_listCacheClear */ 34251),
listCacheDelete = __webpack_require__(/*! ./_listCacheDelete */ 24968),
listCacheGet = __webpack_require__(/*! ./_listCacheGet */ 28290),
listCacheHas = __webpack_require__(/*! ./_listCacheHas */ 88068),
listCacheSet = __webpack_require__(/*! ./_listCacheSet */ 54238);
/**
* 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]);
}
}
// Add methods to `ListCache`.
ListCache.prototype.clear = listCacheClear;
ListCache.prototype['delete'] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
module.exports = ListCache;
/***/ }),
/***/ 40164:
/*!*****************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_Map.js ***!
\*****************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var getNative = __webpack_require__(/*! ./_getNative */ 73893),
root = __webpack_require__(/*! ./_root */ 33152);
/* Built-in method references that are verified to be native. */
var Map = getNative(root, 'Map');
module.exports = Map;
/***/ }),
/***/ 52166:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_MapCache.js ***!
\**********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var mapCacheClear = __webpack_require__(/*! ./_mapCacheClear */ 35365),
mapCacheDelete = __webpack_require__(/*! ./_mapCacheDelete */ 63765),
mapCacheGet = __webpack_require__(/*! ./_mapCacheGet */ 12608),
mapCacheHas = __webpack_require__(/*! ./_mapCacheHas */ 10203),
mapCacheSet = __webpack_require__(/*! ./_mapCacheSet */ 11298);
/**
* 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]);
}
}
// Add methods to `MapCache`.
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype['delete'] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
module.exports = MapCache;
/***/ }),
/***/ 91866:
/*!*******************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_Stack.js ***!
\*******************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var ListCache = __webpack_require__(/*! ./_ListCache */ 99746),
stackClear = __webpack_require__(/*! ./_stackClear */ 31119),
stackDelete = __webpack_require__(/*! ./_stackDelete */ 64399),
stackGet = __webpack_require__(/*! ./_stackGet */ 81897),
stackHas = __webpack_require__(/*! ./_stackHas */ 90558),
stackSet = __webpack_require__(/*! ./_stackSet */ 4564);
/**
* 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;
}
// Add methods to `Stack`.
Stack.prototype.clear = stackClear;
Stack.prototype['delete'] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
module.exports = Stack;
/***/ }),
/***/ 91869:
/*!********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_Symbol.js ***!
\********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var root = __webpack_require__(/*! ./_root */ 33152);
/** Built-in value references. */
var Symbol = root.Symbol;
module.exports = Symbol;
/***/ }),
/***/ 77945:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_Uint8Array.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var root = __webpack_require__(/*! ./_root */ 33152);
/** Built-in value references. */
var Uint8Array = root.Uint8Array;
module.exports = Uint8Array;
/***/ }),
/***/ 79628:
/*!*******************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_apply.js ***!
\*******************************************************/
/***/ (function(module) {
/**
* 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);
}
module.exports = apply;
/***/ }),
/***/ 63333:
/*!***************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_arrayLikeKeys.js ***!
\***************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseTimes = __webpack_require__(/*! ./_baseTimes */ 67943),
isArguments = __webpack_require__(/*! ./isArguments */ 13053),
isArray = __webpack_require__(/*! ./isArray */ 80744),
isBuffer = __webpack_require__(/*! ./isBuffer */ 57835),
isIndex = __webpack_require__(/*! ./_isIndex */ 70213),
isTypedArray = __webpack_require__(/*! ./isTypedArray */ 18397);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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;
}
module.exports = arrayLikeKeys;
/***/ }),
/***/ 89135:
/*!******************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_assignMergeValue.js ***!
\******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ 42813),
eq = __webpack_require__(/*! ./eq */ 43607);
/**
* 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);
}
}
module.exports = assignMergeValue;
/***/ }),
/***/ 60348:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_assignValue.js ***!
\*************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ 42813),
eq = __webpack_require__(/*! ./eq */ 43607);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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);
}
}
module.exports = assignValue;
/***/ }),
/***/ 67971:
/*!**************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_assocIndexOf.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var eq = __webpack_require__(/*! ./eq */ 43607);
/**
* 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;
}
module.exports = assocIndexOf;
/***/ }),
/***/ 42813:
/*!*****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseAssignValue.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var defineProperty = __webpack_require__(/*! ./_defineProperty */ 35234);
/**
* 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;
}
}
module.exports = baseAssignValue;
/***/ }),
/***/ 35024:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseCreate.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./isObject */ 20816);
/** Built-in value references. */
var objectCreate = Object.create;
/**
* 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;
};
}());
module.exports = baseCreate;
/***/ }),
/***/ 14018:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseFor.js ***!
\*********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var createBaseFor = __webpack_require__(/*! ./_createBaseFor */ 78010);
/**
* 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();
module.exports = baseFor;
/***/ }),
/***/ 86756:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseGetTag.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var Symbol = __webpack_require__(/*! ./_Symbol */ 91869),
getRawTag = __webpack_require__(/*! ./_getRawTag */ 72533),
objectToString = __webpack_require__(/*! ./_objectToString */ 74702);
/** `Object#toString` result references. */
var nullTag = '[object Null]',
undefinedTag = '[object Undefined]';
/** Built-in value references. */
var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
/**
* The base implementation of `getTag` without fallbacks for buggy environments.
*
* @private
* @param {*} value The value to query.
* @returns {string} Returns the `toStringTag`.
*/
function baseGetTag(value) {
if (value == null) {
return value === undefined ? undefinedTag : nullTag;
}
return (symToStringTag && symToStringTag in Object(value))
? getRawTag(value)
: objectToString(value);
}
module.exports = baseGetTag;
/***/ }),
/***/ 4977:
/*!*****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseIsArguments.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 86756),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ 93913);
/** `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;
/***/ }),
/***/ 6367:
/*!**************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseIsNative.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var isFunction = __webpack_require__(/*! ./isFunction */ 9363),
isMasked = __webpack_require__(/*! ./_isMasked */ 89379),
isObject = __webpack_require__(/*! ./isObject */ 20816),
toSource = __webpack_require__(/*! ./_toSource */ 63256);
/**
* Used to match `RegExp`
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
*/
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
/** Used to detect host constructors (Safari). */
var reIsHostCtor = /^\[object .+?Constructor\]$/;
/** Used for built-in method references. */
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** 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 detect if a method is native. */
var reIsNative = RegExp('^' +
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
);
/**
* 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));
}
module.exports = baseIsNative;
/***/ }),
/***/ 10766:
/*!******************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseIsTypedArray.js ***!
\******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 86756),
isLength = __webpack_require__(/*! ./isLength */ 11156),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ 93913);
/** `Object#toString` result references. */
var argsTag = '[object Arguments]',
arrayTag = '[object Array]',
boolTag = '[object Boolean]',
dateTag = '[object Date]',
errorTag = '[object Error]',
funcTag = '[object Function]',
mapTag = '[object Map]',
numberTag = '[object Number]',
objectTag = '[object Object]',
regexpTag = '[object RegExp]',
setTag = '[object Set]',
stringTag = '[object String]',
weakMapTag = '[object WeakMap]';
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 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;
/**
* 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)];
}
module.exports = baseIsTypedArray;
/***/ }),
/***/ 33988:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseKeysIn.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var isObject = __webpack_require__(/*! ./isObject */ 20816),
isPrototype = __webpack_require__(/*! ./_isPrototype */ 7975),
nativeKeysIn = __webpack_require__(/*! ./_nativeKeysIn */ 97817);
/** 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 `_.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;
}
module.exports = baseKeysIn;
/***/ }),
/***/ 50097:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseMerge.js ***!
\***********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var Stack = __webpack_require__(/*! ./_Stack */ 91866),
assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ 89135),
baseFor = __webpack_require__(/*! ./_baseFor */ 14018),
baseMergeDeep = __webpack_require__(/*! ./_baseMergeDeep */ 23585),
isObject = __webpack_require__(/*! ./isObject */ 20816),
keysIn = __webpack_require__(/*! ./keysIn */ 56730),
safeGet = __webpack_require__(/*! ./_safeGet */ 47052);
/**
* 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);
}
module.exports = baseMerge;
/***/ }),
/***/ 23585:
/*!***************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseMergeDeep.js ***!
\***************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var assignMergeValue = __webpack_require__(/*! ./_assignMergeValue */ 89135),
cloneBuffer = __webpack_require__(/*! ./_cloneBuffer */ 32315),
cloneTypedArray = __webpack_require__(/*! ./_cloneTypedArray */ 78358),
copyArray = __webpack_require__(/*! ./_copyArray */ 47760),
initCloneObject = __webpack_require__(/*! ./_initCloneObject */ 4084),
isArguments = __webpack_require__(/*! ./isArguments */ 13053),
isArray = __webpack_require__(/*! ./isArray */ 80744),
isArrayLikeObject = __webpack_require__(/*! ./isArrayLikeObject */ 41590),
isBuffer = __webpack_require__(/*! ./isBuffer */ 57835),
isFunction = __webpack_require__(/*! ./isFunction */ 9363),
isObject = __webpack_require__(/*! ./isObject */ 20816),
isPlainObject = __webpack_require__(/*! ./isPlainObject */ 19308),
isTypedArray = __webpack_require__(/*! ./isTypedArray */ 18397),
safeGet = __webpack_require__(/*! ./_safeGet */ 47052),
toPlainObject = __webpack_require__(/*! ./toPlainObject */ 20480);
/**
* 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);
}
module.exports = baseMergeDeep;
/***/ }),
/***/ 92918:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseRest.js ***!
\**********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var identity = __webpack_require__(/*! ./identity */ 46962),
overRest = __webpack_require__(/*! ./_overRest */ 19652),
setToString = __webpack_require__(/*! ./_setToString */ 71152);
/**
* 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 + '');
}
module.exports = baseRest;
/***/ }),
/***/ 63989:
/*!*****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseSetToString.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var constant = __webpack_require__(/*! ./constant */ 13503),
defineProperty = __webpack_require__(/*! ./_defineProperty */ 35234),
identity = __webpack_require__(/*! ./identity */ 46962);
/**
* 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
});
};
module.exports = baseSetToString;
/***/ }),
/***/ 67943:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseTimes.js ***!
\***********************************************************/
/***/ (function(module) {
/**
* 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;
}
module.exports = baseTimes;
/***/ }),
/***/ 38342:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_baseUnary.js ***!
\***********************************************************/
/***/ (function(module) {
/**
* 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);
};
}
module.exports = baseUnary;
/***/ }),
/***/ 20188:
/*!******************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_cloneArrayBuffer.js ***!
\******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var Uint8Array = __webpack_require__(/*! ./_Uint8Array */ 77945);
/**
* 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;
}
module.exports = cloneArrayBuffer;
/***/ }),
/***/ 32315:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_cloneBuffer.js ***!
\*************************************************************/
/***/ (function(module, exports, __webpack_require__) {
/* module decorator */ module = __webpack_require__.nmd(module);
var root = __webpack_require__(/*! ./_root */ 33152);
/** Detect free variable `exports`. */
var freeExports = true && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && "object" == '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,
allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;
/**
* 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;
}
module.exports = cloneBuffer;
/***/ }),
/***/ 78358:
/*!*****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_cloneTypedArray.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var cloneArrayBuffer = __webpack_require__(/*! ./_cloneArrayBuffer */ 20188);
/**
* 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);
}
module.exports = cloneTypedArray;
/***/ }),
/***/ 47760:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_copyArray.js ***!
\***********************************************************/
/***/ (function(module) {
/**
* 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;
}
module.exports = copyArray;
/***/ }),
/***/ 95378:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_copyObject.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var assignValue = __webpack_require__(/*! ./_assignValue */ 60348),
baseAssignValue = __webpack_require__(/*! ./_baseAssignValue */ 42813);
/**
* 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;
}
module.exports = copyObject;
/***/ }),
/***/ 64218:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_coreJsData.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var root = __webpack_require__(/*! ./_root */ 33152);
/** Used to detect overreaching core-js shims. */
var coreJsData = root['__core-js_shared__'];
module.exports = coreJsData;
/***/ }),
/***/ 63323:
/*!****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_createAssigner.js ***!
\****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseRest = __webpack_require__(/*! ./_baseRest */ 92918),
isIterateeCall = __webpack_require__(/*! ./_isIterateeCall */ 8138);
/**
* 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;
});
}
module.exports = createAssigner;
/***/ }),
/***/ 78010:
/*!***************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_createBaseFor.js ***!
\***************************************************************/
/***/ (function(module) {
/**
* 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;
};
}
module.exports = createBaseFor;
/***/ }),
/***/ 35234:
/*!****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_defineProperty.js ***!
\****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var getNative = __webpack_require__(/*! ./_getNative */ 73893);
var defineProperty = (function() {
try {
var func = getNative(Object, 'defineProperty');
func({}, '', {});
return func;
} catch (e) {}
}());
module.exports = defineProperty;
/***/ }),
/***/ 37675:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_freeGlobal.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
/** Detect free variable `global` from Node.js. */
var freeGlobal = typeof __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
module.exports = freeGlobal;
/***/ }),
/***/ 89819:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_getMapData.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var isKeyable = __webpack_require__(/*! ./_isKeyable */ 94358);
/**
* 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;
}
module.exports = getMapData;
/***/ }),
/***/ 73893:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_getNative.js ***!
\***********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseIsNative = __webpack_require__(/*! ./_baseIsNative */ 6367),
getValue = __webpack_require__(/*! ./_getValue */ 49966);
/**
* 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;
/***/ }),
/***/ 49217:
/*!**************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_getPrototype.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var overArg = __webpack_require__(/*! ./_overArg */ 31030);
/** Built-in value references. */
var getPrototype = overArg(Object.getPrototypeOf, Object);
module.exports = getPrototype;
/***/ }),
/***/ 72533:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_getRawTag.js ***!
\***********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var Symbol = __webpack_require__(/*! ./_Symbol */ 91869);
/** 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;
/***/ }),
/***/ 49966:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_getValue.js ***!
\**********************************************************/
/***/ (function(module) {
/**
* 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];
}
module.exports = getValue;
/***/ }),
/***/ 64696:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_hashClear.js ***!
\***********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 65294);
/**
* Removes all key-value entries from the hash.
*
* @private
* @name clear
* @memberOf Hash
*/
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
module.exports = hashClear;
/***/ }),
/***/ 16824:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_hashDelete.js ***!
\************************************************************/
/***/ (function(module) {
/**
* 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;
/***/ }),
/***/ 23476:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_hashGet.js ***!
\*********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 65294);
/** Used to stand-in for `undefined` hash values. */
var HASH_UNDEFINED = '__lodash_hash_undefined__';
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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;
}
module.exports = hashGet;
/***/ }),
/***/ 63122:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_hashHas.js ***!
\*********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 65294);
/** Used for built-in method references. */
var objectProto = Object.prototype;
/** Used to check objects for own properties. */
var hasOwnProperty = objectProto.hasOwnProperty;
/**
* 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);
}
module.exports = hashHas;
/***/ }),
/***/ 37279:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_hashSet.js ***!
\*********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var nativeCreate = __webpack_require__(/*! ./_nativeCreate */ 65294);
/** 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;
/***/ }),
/***/ 4084:
/*!*****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_initCloneObject.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseCreate = __webpack_require__(/*! ./_baseCreate */ 35024),
getPrototype = __webpack_require__(/*! ./_getPrototype */ 49217),
isPrototype = __webpack_require__(/*! ./_isPrototype */ 7975);
/**
* 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))
: {};
}
module.exports = initCloneObject;
/***/ }),
/***/ 70213:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_isIndex.js ***!
\*********************************************************/
/***/ (function(module) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/** Used to detect unsigned integer values. */
var reIsUint = /^(?:0|[1-9]\d*)$/;
/**
* 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);
}
module.exports = isIndex;
/***/ }),
/***/ 8138:
/*!****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_isIterateeCall.js ***!
\****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var eq = __webpack_require__(/*! ./eq */ 43607),
isArrayLike = __webpack_require__(/*! ./isArrayLike */ 24665),
isIndex = __webpack_require__(/*! ./_isIndex */ 70213),
isObject = __webpack_require__(/*! ./isObject */ 20816);
/**
* 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;
}
module.exports = isIterateeCall;
/***/ }),
/***/ 94358:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_isKeyable.js ***!
\***********************************************************/
/***/ (function(module) {
/**
* 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;
/***/ }),
/***/ 89379:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_isMasked.js ***!
\**********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var coreJsData = __webpack_require__(/*! ./_coreJsData */ 64218);
/** 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;
/***/ }),
/***/ 7975:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_isPrototype.js ***!
\*************************************************************/
/***/ (function(module) {
/** 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;
/***/ }),
/***/ 34251:
/*!****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_listCacheClear.js ***!
\****************************************************************/
/***/ (function(module) {
/**
* Removes all key-value entries from the list cache.
*
* @private
* @name clear
* @memberOf ListCache
*/
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
module.exports = listCacheClear;
/***/ }),
/***/ 24968:
/*!*****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_listCacheDelete.js ***!
\*****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 67971);
/** Used for built-in method references. */
var arrayProto = Array.prototype;
/** Built-in value references. */
var splice = arrayProto.splice;
/**
* 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;
}
module.exports = listCacheDelete;
/***/ }),
/***/ 28290:
/*!**************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_listCacheGet.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 67971);
/**
* 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];
}
module.exports = listCacheGet;
/***/ }),
/***/ 88068:
/*!**************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_listCacheHas.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 67971);
/**
* 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;
/***/ }),
/***/ 54238:
/*!**************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_listCacheSet.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var assocIndexOf = __webpack_require__(/*! ./_assocIndexOf */ 67971);
/**
* 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;
}
module.exports = listCacheSet;
/***/ }),
/***/ 35365:
/*!***************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_mapCacheClear.js ***!
\***************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var Hash = __webpack_require__(/*! ./_Hash */ 76414),
ListCache = __webpack_require__(/*! ./_ListCache */ 99746),
Map = __webpack_require__(/*! ./_Map */ 40164);
/**
* 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
};
}
module.exports = mapCacheClear;
/***/ }),
/***/ 63765:
/*!****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_mapCacheDelete.js ***!
\****************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var getMapData = __webpack_require__(/*! ./_getMapData */ 89819);
/**
* 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;
}
module.exports = mapCacheDelete;
/***/ }),
/***/ 12608:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_mapCacheGet.js ***!
\*************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var getMapData = __webpack_require__(/*! ./_getMapData */ 89819);
/**
* 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;
/***/ }),
/***/ 10203:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_mapCacheHas.js ***!
\*************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var getMapData = __webpack_require__(/*! ./_getMapData */ 89819);
/**
* 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);
}
module.exports = mapCacheHas;
/***/ }),
/***/ 11298:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_mapCacheSet.js ***!
\*************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var getMapData = __webpack_require__(/*! ./_getMapData */ 89819);
/**
* 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;
/***/ }),
/***/ 65294:
/*!**************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_nativeCreate.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var getNative = __webpack_require__(/*! ./_getNative */ 73893);
/* Built-in method references that are verified to be native. */
var nativeCreate = getNative(Object, 'create');
module.exports = nativeCreate;
/***/ }),
/***/ 97817:
/*!**************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_nativeKeysIn.js ***!
\**************************************************************/
/***/ (function(module) {
/**
* 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;
}
module.exports = nativeKeysIn;
/***/ }),
/***/ 52495:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_nodeUtil.js ***!
\**********************************************************/
/***/ (function(module, exports, __webpack_require__) {
/* module decorator */ module = __webpack_require__.nmd(module);
var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ 37675);
/** Detect free variable `exports`. */
var freeExports = true && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && "object" == '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) {}
}());
module.exports = nodeUtil;
/***/ }),
/***/ 74702:
/*!****************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_objectToString.js ***!
\****************************************************************/
/***/ (function(module) {
/** 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;
/***/ }),
/***/ 31030:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_overArg.js ***!
\*********************************************************/
/***/ (function(module) {
/**
* 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));
};
}
module.exports = overArg;
/***/ }),
/***/ 19652:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_overRest.js ***!
\**********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var apply = __webpack_require__(/*! ./_apply */ 79628);
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeMax = Math.max;
/**
* 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);
};
}
module.exports = overRest;
/***/ }),
/***/ 33152:
/*!******************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_root.js ***!
\******************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var freeGlobal = __webpack_require__(/*! ./_freeGlobal */ 37675);
/** 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;
/***/ }),
/***/ 47052:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_safeGet.js ***!
\*********************************************************/
/***/ (function(module) {
/**
* 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];
}
module.exports = safeGet;
/***/ }),
/***/ 71152:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_setToString.js ***!
\*************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseSetToString = __webpack_require__(/*! ./_baseSetToString */ 63989),
shortOut = __webpack_require__(/*! ./_shortOut */ 12345);
/**
* 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);
module.exports = setToString;
/***/ }),
/***/ 12345:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_shortOut.js ***!
\**********************************************************/
/***/ (function(module) {
/** Used to detect hot functions by number of calls within a span of milliseconds. */
var HOT_COUNT = 800,
HOT_SPAN = 16;
/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeNow = Date.now;
/**
* 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);
};
}
module.exports = shortOut;
/***/ }),
/***/ 31119:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_stackClear.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var ListCache = __webpack_require__(/*! ./_ListCache */ 99746);
/**
* 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;
/***/ }),
/***/ 64399:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_stackDelete.js ***!
\*************************************************************/
/***/ (function(module) {
/**
* 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;
/***/ }),
/***/ 81897:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_stackGet.js ***!
\**********************************************************/
/***/ (function(module) {
/**
* 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);
}
module.exports = stackGet;
/***/ }),
/***/ 90558:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_stackHas.js ***!
\**********************************************************/
/***/ (function(module) {
/**
* 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);
}
module.exports = stackHas;
/***/ }),
/***/ 4564:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_stackSet.js ***!
\**********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var ListCache = __webpack_require__(/*! ./_ListCache */ 99746),
Map = __webpack_require__(/*! ./_Map */ 40164),
MapCache = __webpack_require__(/*! ./_MapCache */ 52166);
/** 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;
/***/ }),
/***/ 63256:
/*!**********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/_toSource.js ***!
\**********************************************************/
/***/ (function(module) {
/** 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;
/***/ }),
/***/ 13503:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/constant.js ***!
\*********************************************************/
/***/ (function(module) {
/**
* Creates a function that returns `value`.
*
* @static
* @memberOf _
* @since 2.4.0
* @category Util
* @param {*} value The value to return from the new function.
* @returns {Function} Returns the new constant function.
* @example
*
* var objects = _.times(2, _.constant({ 'a': 1 }));
*
* console.log(objects);
* // => [{ 'a': 1 }, { 'a': 1 }]
*
* console.log(objects[0] === objects[1]);
* // => true
*/
function constant(value) {
return function() {
return value;
};
}
module.exports = constant;
/***/ }),
/***/ 43607:
/*!***************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/eq.js ***!
\***************************************************/
/***/ (function(module) {
/**
* 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);
}
module.exports = eq;
/***/ }),
/***/ 46962:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/identity.js ***!
\*********************************************************/
/***/ (function(module) {
/**
* This method returns the first argument it receives.
*
* @static
* @since 0.1.0
* @memberOf _
* @category Util
* @param {*} value Any value.
* @returns {*} Returns `value`.
* @example
*
* var object = { 'a': 1 };
*
* console.log(_.identity(object) === object);
* // => true
*/
function identity(value) {
return value;
}
module.exports = identity;
/***/ }),
/***/ 13053:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isArguments.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseIsArguments = __webpack_require__(/*! ./_baseIsArguments */ 4977),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ 93913);
/** 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;
/***/ }),
/***/ 80744:
/*!********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isArray.js ***!
\********************************************************/
/***/ (function(module) {
/**
* Checks if `value` is classified as an `Array` object.
*
* @static
* @memberOf _
* @since 0.1.0
* @category Lang
* @param {*} value The value to check.
* @returns {boolean} Returns `true` if `value` is an array, else `false`.
* @example
*
* _.isArray([1, 2, 3]);
* // => true
*
* _.isArray(document.body.children);
* // => false
*
* _.isArray('abc');
* // => false
*
* _.isArray(_.noop);
* // => false
*/
var isArray = Array.isArray;
module.exports = isArray;
/***/ }),
/***/ 24665:
/*!************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isArrayLike.js ***!
\************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var isFunction = __webpack_require__(/*! ./isFunction */ 9363),
isLength = __webpack_require__(/*! ./isLength */ 11156);
/**
* 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);
}
module.exports = isArrayLike;
/***/ }),
/***/ 41590:
/*!******************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isArrayLikeObject.js ***!
\******************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var isArrayLike = __webpack_require__(/*! ./isArrayLike */ 24665),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ 93913);
/**
* 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);
}
module.exports = isArrayLikeObject;
/***/ }),
/***/ 57835:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isBuffer.js ***!
\*********************************************************/
/***/ (function(module, exports, __webpack_require__) {
/* module decorator */ module = __webpack_require__.nmd(module);
var root = __webpack_require__(/*! ./_root */ 33152),
stubFalse = __webpack_require__(/*! ./stubFalse */ 55950);
/** Detect free variable `exports`. */
var freeExports = true && exports && !exports.nodeType && exports;
/** Detect free variable `module`. */
var freeModule = freeExports && "object" == '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;
/***/ }),
/***/ 9363:
/*!***********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isFunction.js ***!
\***********************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 86756),
isObject = __webpack_require__(/*! ./isObject */ 20816);
/** `Object#toString` result references. */
var asyncTag = '[object AsyncFunction]',
funcTag = '[object Function]',
genTag = '[object GeneratorFunction]',
proxyTag = '[object Proxy]';
/**
* 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;
}
module.exports = isFunction;
/***/ }),
/***/ 11156:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isLength.js ***!
\*********************************************************/
/***/ (function(module) {
/** Used as references for various `Number` constants. */
var MAX_SAFE_INTEGER = 9007199254740991;
/**
* 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;
}
module.exports = isLength;
/***/ }),
/***/ 20816:
/*!*********************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isObject.js ***!
\*********************************************************/
/***/ (function(module) {
/**
* 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;
/***/ }),
/***/ 93913:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isObjectLike.js ***!
\*************************************************************/
/***/ (function(module) {
/**
* 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;
/***/ }),
/***/ 19308:
/*!**************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isPlainObject.js ***!
\**************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseGetTag = __webpack_require__(/*! ./_baseGetTag */ 86756),
getPrototype = __webpack_require__(/*! ./_getPrototype */ 49217),
isObjectLike = __webpack_require__(/*! ./isObjectLike */ 93913);
/** `Object#toString` result references. */
var objectTag = '[object Object]';
/** Used for built-in method references. */
var funcProto = Function.prototype,
objectProto = Object.prototype;
/** 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 infer the `Object` constructor. */
var objectCtorString = funcToString.call(Object);
/**
* 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;
}
module.exports = isPlainObject;
/***/ }),
/***/ 18397:
/*!*************************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/isTypedArray.js ***!
\*************************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var baseIsTypedArray = __webpack_require__(/*! ./_baseIsTypedArray */ 10766),
baseUnary = __webpack_require__(/*! ./_baseUnary */ 38342),
nodeUtil = __webpack_require__(/*! ./_nodeUtil */ 52495);
/* Node.js helper references. */
var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
/**
* 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;
module.exports = isTypedArray;
/***/ }),
/***/ 56730:
/*!*******************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/keysIn.js ***!
\*******************************************************/
/***/ (function(module, __unused_webpack_exports, __webpack_require__) {
var arrayLikeKeys = __webpack_require__(/*! ./_arrayLikeKeys */ 63333),
baseKeysIn = __webpack_require__(/*! ./_baseKeysIn */ 33988),
isArrayLike = __webpack_require__(/*! ./isArrayLike */ 24665);
/**
* 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);
}
module.exports = keysIn;
/***/ }),
/***/ 89392:
/*!*******************************************************!*\
!*** ./node_modules/_lodash@4.17.21@lodash/lodash.js ***!
\*******************************************************/
/***/ (function(module, exports, __webpack_require__) {
/* module decorator */ module = __webpack_require__.nmd(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 __webpack_require__.g == 'object' && __webpack_require__.g && __webpack_require__.g.Object === Object && __webpack_require__.g;
/** 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 && "object" == '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': '