seeder-st2110-components 1.7.1 → 1.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1421 -221
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1421 -221
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -5,15 +5,15 @@ import { useWebSocket, useInterval } from 'ahooks';
|
|
|
5
5
|
import { LoadingOutlined, ExclamationCircleFilled, PlusOutlined } from '@ant-design/icons';
|
|
6
6
|
import axios from 'axios';
|
|
7
7
|
|
|
8
|
-
function _defineProperty
|
|
9
|
-
return (r = _toPropertyKey
|
|
8
|
+
function _defineProperty(e, r, t) {
|
|
9
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
10
10
|
value: t,
|
|
11
11
|
enumerable: !0,
|
|
12
12
|
configurable: !0,
|
|
13
13
|
writable: !0
|
|
14
14
|
}) : e[r] = t, e;
|
|
15
15
|
}
|
|
16
|
-
function ownKeys
|
|
16
|
+
function ownKeys(e, r) {
|
|
17
17
|
var t = Object.keys(e);
|
|
18
18
|
if (Object.getOwnPropertySymbols) {
|
|
19
19
|
var o = Object.getOwnPropertySymbols(e);
|
|
@@ -23,29 +23,29 @@ function ownKeys$1(e, r) {
|
|
|
23
23
|
}
|
|
24
24
|
return t;
|
|
25
25
|
}
|
|
26
|
-
function _objectSpread2
|
|
26
|
+
function _objectSpread2(e) {
|
|
27
27
|
for (var r = 1; r < arguments.length; r++) {
|
|
28
28
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
29
|
-
r % 2 ? ownKeys
|
|
30
|
-
_defineProperty
|
|
31
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys
|
|
29
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
30
|
+
_defineProperty(e, r, t[r]);
|
|
31
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
32
32
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
return e;
|
|
36
36
|
}
|
|
37
|
-
function _objectWithoutProperties
|
|
37
|
+
function _objectWithoutProperties(e, t) {
|
|
38
38
|
if (null == e) return {};
|
|
39
39
|
var o,
|
|
40
40
|
r,
|
|
41
|
-
i = _objectWithoutPropertiesLoose
|
|
41
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
42
42
|
if (Object.getOwnPropertySymbols) {
|
|
43
43
|
var n = Object.getOwnPropertySymbols(e);
|
|
44
44
|
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
45
45
|
}
|
|
46
46
|
return i;
|
|
47
47
|
}
|
|
48
|
-
function _objectWithoutPropertiesLoose
|
|
48
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
49
49
|
if (null == r) return {};
|
|
50
50
|
var t = {};
|
|
51
51
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
@@ -54,7 +54,7 @@ function _objectWithoutPropertiesLoose$1(r, e) {
|
|
|
54
54
|
}
|
|
55
55
|
return t;
|
|
56
56
|
}
|
|
57
|
-
function _toPrimitive
|
|
57
|
+
function _toPrimitive(t, r) {
|
|
58
58
|
if ("object" != typeof t || !t) return t;
|
|
59
59
|
var e = t[Symbol.toPrimitive];
|
|
60
60
|
if (void 0 !== e) {
|
|
@@ -64,8 +64,8 @@ function _toPrimitive$1(t, r) {
|
|
|
64
64
|
}
|
|
65
65
|
return ("string" === r ? String : Number)(t);
|
|
66
66
|
}
|
|
67
|
-
function _toPropertyKey
|
|
68
|
-
var i = _toPrimitive
|
|
67
|
+
function _toPropertyKey(t) {
|
|
68
|
+
var i = _toPrimitive(t, "string");
|
|
69
69
|
return "symbol" == typeof i ? i : i + "";
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -112,7 +112,7 @@ const useHardwareWebSocket = socketUrl => {
|
|
|
112
112
|
const handleMessage = useCallback(message => {
|
|
113
113
|
try {
|
|
114
114
|
if (message) {
|
|
115
|
-
setSystemStatus(prev => _objectSpread2
|
|
115
|
+
setSystemStatus(prev => _objectSpread2(_objectSpread2({}, prev), message));
|
|
116
116
|
}
|
|
117
117
|
} catch (error) {
|
|
118
118
|
console.error('Message processing error:', error);
|
|
@@ -207,7 +207,7 @@ const getItems = details => {
|
|
|
207
207
|
items.push(createMetricItem('CPU Temperature', 'seeder-icon-CPUwendu', details.cpu_temp, '℃'));
|
|
208
208
|
}
|
|
209
209
|
if (details.mem_usage !== null && details.mem_usage !== undefined) {
|
|
210
|
-
items.push(_objectSpread2
|
|
210
|
+
items.push(_objectSpread2(_objectSpread2({}, createMetricItem('Memory Usage', 'seeder-icon-shiyongshuai', details.mem_usage, '%')), {}, {
|
|
211
211
|
memTotal: details.mem_total
|
|
212
212
|
}));
|
|
213
213
|
}
|
|
@@ -251,15 +251,15 @@ const useHardwareUsage = socketUrl => {
|
|
|
251
251
|
};
|
|
252
252
|
var useHardwareUsage$1 = useHardwareUsage;
|
|
253
253
|
|
|
254
|
-
const _excluded$
|
|
255
|
-
const StyledModal
|
|
254
|
+
const _excluded$2 = ["width", "okText", "cancelText", "styles"];
|
|
255
|
+
const StyledModal = props => {
|
|
256
256
|
const {
|
|
257
257
|
width = "520px",
|
|
258
258
|
okText = "Apply",
|
|
259
259
|
cancelText = "Close",
|
|
260
260
|
styles: propStyles = {}
|
|
261
261
|
} = props,
|
|
262
|
-
restProps = _objectWithoutProperties
|
|
262
|
+
restProps = _objectWithoutProperties(props, _excluded$2);
|
|
263
263
|
|
|
264
264
|
// 基础样式配置
|
|
265
265
|
const baseStyles = {
|
|
@@ -287,15 +287,15 @@ const StyledModal$2 = props => {
|
|
|
287
287
|
};
|
|
288
288
|
|
|
289
289
|
// 合并样式
|
|
290
|
-
const styles = _objectSpread2
|
|
291
|
-
return /*#__PURE__*/jsx(Modal, _objectSpread2
|
|
290
|
+
const styles = _objectSpread2(_objectSpread2({}, baseStyles), propStyles);
|
|
291
|
+
return /*#__PURE__*/jsx(Modal, _objectSpread2({
|
|
292
292
|
width: width,
|
|
293
293
|
okText: okText,
|
|
294
294
|
cancelText: cancelText,
|
|
295
295
|
styles: styles
|
|
296
296
|
}, restProps));
|
|
297
297
|
};
|
|
298
|
-
var StyledModal$
|
|
298
|
+
var StyledModal$1 = StyledModal;
|
|
299
299
|
|
|
300
300
|
const AuthorizationModal = _ref => {
|
|
301
301
|
let {
|
|
@@ -335,7 +335,7 @@ const AuthorizationModal = _ref => {
|
|
|
335
335
|
showIcon: true
|
|
336
336
|
});
|
|
337
337
|
const defaultOkText = isActivated ? "Reactivate" : "Activate Now";
|
|
338
|
-
return /*#__PURE__*/jsx(StyledModal$
|
|
338
|
+
return /*#__PURE__*/jsx(StyledModal$1, {
|
|
339
339
|
title: title,
|
|
340
340
|
width: width,
|
|
341
341
|
open: true,
|
|
@@ -852,7 +852,7 @@ const NetworkFieldGroup = _ref => {
|
|
|
852
852
|
enabled: true
|
|
853
853
|
}
|
|
854
854
|
};
|
|
855
|
-
const mergedFieldConfig = _objectSpread2
|
|
855
|
+
const mergedFieldConfig = _objectSpread2(_objectSpread2(_objectSpread2({}, defaultFieldConfig), fieldConfig), {}, {
|
|
856
856
|
netmask: {
|
|
857
857
|
label: "Netmask",
|
|
858
858
|
enabled: (_fieldConfig$netmask$ = (_fieldConfig$netmask = fieldConfig.netmask) === null || _fieldConfig$netmask === void 0 ? void 0 : _fieldConfig$netmask.enabled) !== null && _fieldConfig$netmask$ !== void 0 ? _fieldConfig$netmask$ : defaultFieldConfig.netmask.enabled // 合并 enabled
|
|
@@ -928,18 +928,18 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
928
928
|
hasInitialized: false
|
|
929
929
|
});
|
|
930
930
|
const preparedFieldConfig = useMemo(() => {
|
|
931
|
-
const config = _objectSpread2
|
|
931
|
+
const config = _objectSpread2({}, fieldConfig);
|
|
932
932
|
|
|
933
933
|
// 确保LAN和QSFP的配置存在
|
|
934
934
|
config.LAN = config.LAN || {};
|
|
935
935
|
config.QSFP = config.QSFP || {};
|
|
936
936
|
if (sections.includes('LAN')) {
|
|
937
|
-
config.LAN.netmask = _objectSpread2
|
|
937
|
+
config.LAN.netmask = _objectSpread2(_objectSpread2({}, config.LAN.netmask || {}), {}, {
|
|
938
938
|
enabled: showNetmask.LAN
|
|
939
939
|
});
|
|
940
940
|
}
|
|
941
941
|
if (sections.includes('QSFP')) {
|
|
942
|
-
config.QSFP.netmask = _objectSpread2
|
|
942
|
+
config.QSFP.netmask = _objectSpread2(_objectSpread2({}, config.QSFP.netmask || {}), {}, {
|
|
943
943
|
enabled: showNetmask.QSFP
|
|
944
944
|
});
|
|
945
945
|
}
|
|
@@ -1009,7 +1009,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1009
1009
|
const initialValues = useMemo(() => {
|
|
1010
1010
|
const values = {};
|
|
1011
1011
|
if (sections.includes('LAN') && lanConfigs.length > 0) {
|
|
1012
|
-
values.LAN = lanConfigs.map(config => _objectSpread2
|
|
1012
|
+
values.LAN = lanConfigs.map(config => _objectSpread2({
|
|
1013
1013
|
connection_id: config.connection_id,
|
|
1014
1014
|
display_name: config.display_name,
|
|
1015
1015
|
ip_address: config.ip_address
|
|
@@ -1018,7 +1018,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1018
1018
|
} : {}));
|
|
1019
1019
|
}
|
|
1020
1020
|
if (sections.includes('QSFP') && st2110Interfaces.length > 0) {
|
|
1021
|
-
values.QSFP = st2110Interfaces.map(iface => _objectSpread2
|
|
1021
|
+
values.QSFP = st2110Interfaces.map(iface => _objectSpread2(_objectSpread2({}, iface.id !== undefined && {
|
|
1022
1022
|
id: iface.id
|
|
1023
1023
|
}), {}, {
|
|
1024
1024
|
display_name: iface.display_name,
|
|
@@ -1087,7 +1087,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1087
1087
|
if (sections.includes('LAN') && values.LAN) {
|
|
1088
1088
|
const lanData = values.LAN.map((item, index) => {
|
|
1089
1089
|
var _lanConfigs$index;
|
|
1090
|
-
return _objectSpread2
|
|
1090
|
+
return _objectSpread2({
|
|
1091
1091
|
connection_id: (_lanConfigs$index = lanConfigs[index]) === null || _lanConfigs$index === void 0 ? void 0 : _lanConfigs$index.connection_id,
|
|
1092
1092
|
ip_address: item.ip_address
|
|
1093
1093
|
}, showNetmask.LAN ? {
|
|
@@ -1101,7 +1101,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1101
1101
|
if (sections.includes('QSFP') && values.QSFP) {
|
|
1102
1102
|
const interfacesData = values.QSFP.map((item, index) => {
|
|
1103
1103
|
var _st2110Interfaces$ind, _st2110Interfaces$ind2, _st2110Interfaces$ind3;
|
|
1104
|
-
return _objectSpread2
|
|
1104
|
+
return _objectSpread2(_objectSpread2(_objectSpread2({}, (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind = st2110Interfaces[index]) === null || _st2110Interfaces$ind === void 0 ? void 0 : _st2110Interfaces$ind.id) !== undefined && {
|
|
1105
1105
|
id: st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind2 = st2110Interfaces[index]) === null || _st2110Interfaces$ind2 === void 0 ? void 0 : _st2110Interfaces$ind2.id
|
|
1106
1106
|
}), (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind3 = st2110Interfaces[index]) === null || _st2110Interfaces$ind3 === void 0 ? void 0 : _st2110Interfaces$ind3.ip) !== undefined ? {
|
|
1107
1107
|
ip: item.ip_address
|
|
@@ -1133,7 +1133,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1133
1133
|
}, [form, sections, lanConfigs, st2110Interfaces, updateLanConfig, updateSysConfig, handleSuccess]);
|
|
1134
1134
|
|
|
1135
1135
|
// 合并默认模态框属性和传入的属性
|
|
1136
|
-
const mergedModalProps = _objectSpread2
|
|
1136
|
+
const mergedModalProps = _objectSpread2({
|
|
1137
1137
|
title: "Network Settings",
|
|
1138
1138
|
width: 650,
|
|
1139
1139
|
open,
|
|
@@ -1148,7 +1148,7 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1148
1148
|
}, modalProps);
|
|
1149
1149
|
|
|
1150
1150
|
// 合并默认表单属性和传入的属性
|
|
1151
|
-
const mergedFormProps = _objectSpread2
|
|
1151
|
+
const mergedFormProps = _objectSpread2({
|
|
1152
1152
|
form: form,
|
|
1153
1153
|
labelCol: {
|
|
1154
1154
|
span: 6
|
|
@@ -1158,8 +1158,8 @@ const NetworkSettingsModal = _ref2 => {
|
|
|
1158
1158
|
},
|
|
1159
1159
|
autoComplete: "off"
|
|
1160
1160
|
}, formProps);
|
|
1161
|
-
return /*#__PURE__*/jsxs(StyledModal$
|
|
1162
|
-
children: [/*#__PURE__*/jsxs(Form, _objectSpread2
|
|
1161
|
+
return /*#__PURE__*/jsxs(StyledModal$1, _objectSpread2(_objectSpread2({}, mergedModalProps), {}, {
|
|
1162
|
+
children: [/*#__PURE__*/jsxs(Form, _objectSpread2(_objectSpread2({}, mergedFormProps), {}, {
|
|
1163
1163
|
children: [sections.includes('LAN') && lanConfigs.length > 0 && /*#__PURE__*/jsxs(Fragment, {
|
|
1164
1164
|
children: [/*#__PURE__*/jsx(NetworkFieldGroup, {
|
|
1165
1165
|
prefix: "LAN",
|
|
@@ -1281,7 +1281,7 @@ function convertPtpStatusToArray(ptpStatus, fieldConfigs, fieldOrder) {
|
|
|
1281
1281
|
formType: 'text'
|
|
1282
1282
|
};
|
|
1283
1283
|
const value = ptpStatus[key];
|
|
1284
|
-
return _objectSpread2
|
|
1284
|
+
return _objectSpread2(_objectSpread2({
|
|
1285
1285
|
key,
|
|
1286
1286
|
value
|
|
1287
1287
|
}, config), {}, {
|
|
@@ -1393,7 +1393,7 @@ const PtpModal = _ref => {
|
|
|
1393
1393
|
if (!open || !ptpStatus) return null;
|
|
1394
1394
|
|
|
1395
1395
|
// 合并默认模态框属性和传入的属性
|
|
1396
|
-
const mergedModalProps = _objectSpread2
|
|
1396
|
+
const mergedModalProps = _objectSpread2({
|
|
1397
1397
|
title: "PTP",
|
|
1398
1398
|
width: 650,
|
|
1399
1399
|
open,
|
|
@@ -1405,7 +1405,7 @@ const PtpModal = _ref => {
|
|
|
1405
1405
|
}, modalProps);
|
|
1406
1406
|
|
|
1407
1407
|
// 合并默认表单属性和传入的属性
|
|
1408
|
-
const mergedFormProps = _objectSpread2
|
|
1408
|
+
const mergedFormProps = _objectSpread2({
|
|
1409
1409
|
form: form,
|
|
1410
1410
|
name: "ptpForm",
|
|
1411
1411
|
labelCol: {
|
|
@@ -1416,8 +1416,8 @@ const PtpModal = _ref => {
|
|
|
1416
1416
|
},
|
|
1417
1417
|
autoComplete: "off"
|
|
1418
1418
|
}, formProps);
|
|
1419
|
-
return /*#__PURE__*/jsx(StyledModal$
|
|
1420
|
-
children: /*#__PURE__*/jsx(Form, _objectSpread2
|
|
1419
|
+
return /*#__PURE__*/jsx(StyledModal$1, _objectSpread2(_objectSpread2({}, mergedModalProps), {}, {
|
|
1420
|
+
children: /*#__PURE__*/jsx(Form, _objectSpread2(_objectSpread2({}, mergedFormProps), {}, {
|
|
1421
1421
|
children: ptpStatusArray.map(item => /*#__PURE__*/jsx(Form.Item, {
|
|
1422
1422
|
label: item.label,
|
|
1423
1423
|
name: item.key,
|
|
@@ -1612,7 +1612,7 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
|
|
|
1612
1612
|
return fields.category_list.options.map(category => {
|
|
1613
1613
|
const isInitiallySelected = initialSelected.includes(category.name);
|
|
1614
1614
|
const shouldDisable = isSavedPreset ? !isInitiallySelected : false;
|
|
1615
|
-
return _objectSpread2
|
|
1615
|
+
return _objectSpread2(_objectSpread2({}, category), {}, {
|
|
1616
1616
|
disabled: shouldDisable,
|
|
1617
1617
|
initiallySelected: isInitiallySelected
|
|
1618
1618
|
});
|
|
@@ -1762,7 +1762,7 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
|
|
|
1762
1762
|
}) :
|
|
1763
1763
|
/*#__PURE__*/
|
|
1764
1764
|
// 非编辑模式下的按钮
|
|
1765
|
-
jsx(SubmitButton, _objectSpread2
|
|
1765
|
+
jsx(SubmitButton, _objectSpread2(_objectSpread2({
|
|
1766
1766
|
action: handleLoad
|
|
1767
1767
|
}, hasCategoryList && {
|
|
1768
1768
|
disabled: !currentSelected.length
|
|
@@ -1964,7 +1964,7 @@ const Preset = _ref => {
|
|
|
1964
1964
|
}
|
|
1965
1965
|
});
|
|
1966
1966
|
try {
|
|
1967
|
-
await loadPreset(_objectSpread2
|
|
1967
|
+
await loadPreset(_objectSpread2({
|
|
1968
1968
|
id: loadData.id
|
|
1969
1969
|
}, loadData.category_list && {
|
|
1970
1970
|
category_list: loadData.category_list
|
|
@@ -2082,7 +2082,7 @@ const Preset = _ref => {
|
|
|
2082
2082
|
useEffect(() => {
|
|
2083
2083
|
fetchPresetList();
|
|
2084
2084
|
}, [fetchPresetList]);
|
|
2085
|
-
return /*#__PURE__*/jsx(StyledModal$
|
|
2085
|
+
return /*#__PURE__*/jsx(StyledModal$1, {
|
|
2086
2086
|
title: texts.title,
|
|
2087
2087
|
width: width,
|
|
2088
2088
|
open: open,
|
|
@@ -2165,7 +2165,7 @@ const UpgradeManager = _ref => {
|
|
|
2165
2165
|
statusPollingInterval = 1000,
|
|
2166
2166
|
children
|
|
2167
2167
|
} = _ref,
|
|
2168
|
-
dropdownProps = _objectWithoutProperties
|
|
2168
|
+
dropdownProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
2169
2169
|
const [upgradeElement] = useUpgrade$1({
|
|
2170
2170
|
menuItems,
|
|
2171
2171
|
onMenuClick,
|
|
@@ -2181,7 +2181,7 @@ const UpgradeManager = _ref => {
|
|
|
2181
2181
|
const dropdownElement = upgradeElement.props.children[0];
|
|
2182
2182
|
const otherElements = upgradeElement.props.children.slice(1);
|
|
2183
2183
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
2184
|
-
children: [/*#__PURE__*/jsx(Dropdown, _objectSpread2
|
|
2184
|
+
children: [/*#__PURE__*/jsx(Dropdown, _objectSpread2(_objectSpread2(_objectSpread2({}, dropdownProps), dropdownElement.props), {}, {
|
|
2185
2185
|
children: children
|
|
2186
2186
|
})), otherElements]
|
|
2187
2187
|
});
|
|
@@ -2196,15 +2196,15 @@ UpgradeManager.defaultProps = {
|
|
|
2196
2196
|
};
|
|
2197
2197
|
var UpgradeManager$1 = UpgradeManager;
|
|
2198
2198
|
|
|
2199
|
-
function getDefaultExportFromCjs$
|
|
2199
|
+
function getDefaultExportFromCjs$2 (x) {
|
|
2200
2200
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
2201
2201
|
}
|
|
2202
2202
|
|
|
2203
|
-
var propTypes$
|
|
2203
|
+
var propTypes$2 = {exports: {}};
|
|
2204
2204
|
|
|
2205
|
-
var reactIs$
|
|
2205
|
+
var reactIs$2 = {exports: {}};
|
|
2206
2206
|
|
|
2207
|
-
var reactIs_production_min$
|
|
2207
|
+
var reactIs_production_min$2 = {};
|
|
2208
2208
|
|
|
2209
2209
|
/** @license React v16.13.1
|
|
2210
2210
|
* react-is.production.min.js
|
|
@@ -2215,21 +2215,21 @@ var reactIs_production_min$1 = {};
|
|
|
2215
2215
|
* LICENSE file in the root directory of this source tree.
|
|
2216
2216
|
*/
|
|
2217
2217
|
|
|
2218
|
-
var hasRequiredReactIs_production_min$
|
|
2218
|
+
var hasRequiredReactIs_production_min$2;
|
|
2219
2219
|
|
|
2220
|
-
function requireReactIs_production_min$
|
|
2221
|
-
if (hasRequiredReactIs_production_min$
|
|
2222
|
-
hasRequiredReactIs_production_min$
|
|
2220
|
+
function requireReactIs_production_min$2 () {
|
|
2221
|
+
if (hasRequiredReactIs_production_min$2) return reactIs_production_min$2;
|
|
2222
|
+
hasRequiredReactIs_production_min$2 = 1;
|
|
2223
2223
|
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
2224
2224
|
Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
2225
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min$
|
|
2226
|
-
reactIs_production_min$
|
|
2227
|
-
reactIs_production_min$
|
|
2228
|
-
reactIs_production_min$
|
|
2229
|
-
return reactIs_production_min$
|
|
2225
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min$2.AsyncMode=l;reactIs_production_min$2.ConcurrentMode=m;reactIs_production_min$2.ContextConsumer=k;reactIs_production_min$2.ContextProvider=h;reactIs_production_min$2.Element=c;reactIs_production_min$2.ForwardRef=n;reactIs_production_min$2.Fragment=e;reactIs_production_min$2.Lazy=t;reactIs_production_min$2.Memo=r;reactIs_production_min$2.Portal=d;
|
|
2226
|
+
reactIs_production_min$2.Profiler=g;reactIs_production_min$2.StrictMode=f;reactIs_production_min$2.Suspense=p;reactIs_production_min$2.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$2.isConcurrentMode=A;reactIs_production_min$2.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$2.isContextProvider=function(a){return z(a)===h};reactIs_production_min$2.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$2.isForwardRef=function(a){return z(a)===n};reactIs_production_min$2.isFragment=function(a){return z(a)===e};reactIs_production_min$2.isLazy=function(a){return z(a)===t};
|
|
2227
|
+
reactIs_production_min$2.isMemo=function(a){return z(a)===r};reactIs_production_min$2.isPortal=function(a){return z(a)===d};reactIs_production_min$2.isProfiler=function(a){return z(a)===g};reactIs_production_min$2.isStrictMode=function(a){return z(a)===f};reactIs_production_min$2.isSuspense=function(a){return z(a)===p};
|
|
2228
|
+
reactIs_production_min$2.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min$2.typeOf=z;
|
|
2229
|
+
return reactIs_production_min$2;
|
|
2230
2230
|
}
|
|
2231
2231
|
|
|
2232
|
-
var reactIs_development$
|
|
2232
|
+
var reactIs_development$2 = {};
|
|
2233
2233
|
|
|
2234
2234
|
/** @license React v16.13.1
|
|
2235
2235
|
* react-is.development.js
|
|
@@ -2240,11 +2240,11 @@ var reactIs_development$1 = {};
|
|
|
2240
2240
|
* LICENSE file in the root directory of this source tree.
|
|
2241
2241
|
*/
|
|
2242
2242
|
|
|
2243
|
-
var hasRequiredReactIs_development$
|
|
2243
|
+
var hasRequiredReactIs_development$2;
|
|
2244
2244
|
|
|
2245
|
-
function requireReactIs_development$
|
|
2246
|
-
if (hasRequiredReactIs_development$
|
|
2247
|
-
hasRequiredReactIs_development$
|
|
2245
|
+
function requireReactIs_development$2 () {
|
|
2246
|
+
if (hasRequiredReactIs_development$2) return reactIs_development$2;
|
|
2247
|
+
hasRequiredReactIs_development$2 = 1;
|
|
2248
2248
|
|
|
2249
2249
|
|
|
2250
2250
|
|
|
@@ -2385,51 +2385,51 @@ function requireReactIs_development$1 () {
|
|
|
2385
2385
|
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
2386
2386
|
}
|
|
2387
2387
|
|
|
2388
|
-
reactIs_development$
|
|
2389
|
-
reactIs_development$
|
|
2390
|
-
reactIs_development$
|
|
2391
|
-
reactIs_development$
|
|
2392
|
-
reactIs_development$
|
|
2393
|
-
reactIs_development$
|
|
2394
|
-
reactIs_development$
|
|
2395
|
-
reactIs_development$
|
|
2396
|
-
reactIs_development$
|
|
2397
|
-
reactIs_development$
|
|
2398
|
-
reactIs_development$
|
|
2399
|
-
reactIs_development$
|
|
2400
|
-
reactIs_development$
|
|
2401
|
-
reactIs_development$
|
|
2402
|
-
reactIs_development$
|
|
2403
|
-
reactIs_development$
|
|
2404
|
-
reactIs_development$
|
|
2405
|
-
reactIs_development$
|
|
2406
|
-
reactIs_development$
|
|
2407
|
-
reactIs_development$
|
|
2408
|
-
reactIs_development$
|
|
2409
|
-
reactIs_development$
|
|
2410
|
-
reactIs_development$
|
|
2411
|
-
reactIs_development$
|
|
2412
|
-
reactIs_development$
|
|
2413
|
-
reactIs_development$
|
|
2414
|
-
reactIs_development$
|
|
2415
|
-
reactIs_development$
|
|
2388
|
+
reactIs_development$2.AsyncMode = AsyncMode;
|
|
2389
|
+
reactIs_development$2.ConcurrentMode = ConcurrentMode;
|
|
2390
|
+
reactIs_development$2.ContextConsumer = ContextConsumer;
|
|
2391
|
+
reactIs_development$2.ContextProvider = ContextProvider;
|
|
2392
|
+
reactIs_development$2.Element = Element;
|
|
2393
|
+
reactIs_development$2.ForwardRef = ForwardRef;
|
|
2394
|
+
reactIs_development$2.Fragment = Fragment;
|
|
2395
|
+
reactIs_development$2.Lazy = Lazy;
|
|
2396
|
+
reactIs_development$2.Memo = Memo;
|
|
2397
|
+
reactIs_development$2.Portal = Portal;
|
|
2398
|
+
reactIs_development$2.Profiler = Profiler;
|
|
2399
|
+
reactIs_development$2.StrictMode = StrictMode;
|
|
2400
|
+
reactIs_development$2.Suspense = Suspense;
|
|
2401
|
+
reactIs_development$2.isAsyncMode = isAsyncMode;
|
|
2402
|
+
reactIs_development$2.isConcurrentMode = isConcurrentMode;
|
|
2403
|
+
reactIs_development$2.isContextConsumer = isContextConsumer;
|
|
2404
|
+
reactIs_development$2.isContextProvider = isContextProvider;
|
|
2405
|
+
reactIs_development$2.isElement = isElement;
|
|
2406
|
+
reactIs_development$2.isForwardRef = isForwardRef;
|
|
2407
|
+
reactIs_development$2.isFragment = isFragment;
|
|
2408
|
+
reactIs_development$2.isLazy = isLazy;
|
|
2409
|
+
reactIs_development$2.isMemo = isMemo;
|
|
2410
|
+
reactIs_development$2.isPortal = isPortal;
|
|
2411
|
+
reactIs_development$2.isProfiler = isProfiler;
|
|
2412
|
+
reactIs_development$2.isStrictMode = isStrictMode;
|
|
2413
|
+
reactIs_development$2.isSuspense = isSuspense;
|
|
2414
|
+
reactIs_development$2.isValidElementType = isValidElementType;
|
|
2415
|
+
reactIs_development$2.typeOf = typeOf;
|
|
2416
2416
|
})();
|
|
2417
2417
|
}
|
|
2418
|
-
return reactIs_development$
|
|
2418
|
+
return reactIs_development$2;
|
|
2419
2419
|
}
|
|
2420
2420
|
|
|
2421
|
-
var hasRequiredReactIs$
|
|
2421
|
+
var hasRequiredReactIs$2;
|
|
2422
2422
|
|
|
2423
|
-
function requireReactIs$
|
|
2424
|
-
if (hasRequiredReactIs$
|
|
2425
|
-
hasRequiredReactIs$
|
|
2423
|
+
function requireReactIs$2 () {
|
|
2424
|
+
if (hasRequiredReactIs$2) return reactIs$2.exports;
|
|
2425
|
+
hasRequiredReactIs$2 = 1;
|
|
2426
2426
|
|
|
2427
2427
|
if (process.env.NODE_ENV === 'production') {
|
|
2428
|
-
reactIs$
|
|
2428
|
+
reactIs$2.exports = requireReactIs_production_min$2();
|
|
2429
2429
|
} else {
|
|
2430
|
-
reactIs$
|
|
2430
|
+
reactIs$2.exports = requireReactIs_development$2();
|
|
2431
2431
|
}
|
|
2432
|
-
return reactIs$
|
|
2432
|
+
return reactIs$2.exports;
|
|
2433
2433
|
}
|
|
2434
2434
|
|
|
2435
2435
|
/*
|
|
@@ -2438,12 +2438,12 @@ object-assign
|
|
|
2438
2438
|
@license MIT
|
|
2439
2439
|
*/
|
|
2440
2440
|
|
|
2441
|
-
var objectAssign$
|
|
2442
|
-
var hasRequiredObjectAssign$
|
|
2441
|
+
var objectAssign$2;
|
|
2442
|
+
var hasRequiredObjectAssign$2;
|
|
2443
2443
|
|
|
2444
|
-
function requireObjectAssign$
|
|
2445
|
-
if (hasRequiredObjectAssign$
|
|
2446
|
-
hasRequiredObjectAssign$
|
|
2444
|
+
function requireObjectAssign$2 () {
|
|
2445
|
+
if (hasRequiredObjectAssign$2) return objectAssign$2;
|
|
2446
|
+
hasRequiredObjectAssign$2 = 1;
|
|
2447
2447
|
/* eslint-disable no-unused-vars */
|
|
2448
2448
|
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
2449
2449
|
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
@@ -2501,7 +2501,7 @@ function requireObjectAssign$1 () {
|
|
|
2501
2501
|
}
|
|
2502
2502
|
}
|
|
2503
2503
|
|
|
2504
|
-
objectAssign$
|
|
2504
|
+
objectAssign$2 = shouldUseNative() ? Object.assign : function (target, source) {
|
|
2505
2505
|
var from;
|
|
2506
2506
|
var to = toObject(target);
|
|
2507
2507
|
var symbols;
|
|
@@ -2527,7 +2527,7 @@ function requireObjectAssign$1 () {
|
|
|
2527
2527
|
|
|
2528
2528
|
return to;
|
|
2529
2529
|
};
|
|
2530
|
-
return objectAssign$
|
|
2530
|
+
return objectAssign$2;
|
|
2531
2531
|
}
|
|
2532
2532
|
|
|
2533
2533
|
/**
|
|
@@ -2537,27 +2537,27 @@ function requireObjectAssign$1 () {
|
|
|
2537
2537
|
* LICENSE file in the root directory of this source tree.
|
|
2538
2538
|
*/
|
|
2539
2539
|
|
|
2540
|
-
var ReactPropTypesSecret_1$
|
|
2541
|
-
var hasRequiredReactPropTypesSecret$
|
|
2540
|
+
var ReactPropTypesSecret_1$2;
|
|
2541
|
+
var hasRequiredReactPropTypesSecret$2;
|
|
2542
2542
|
|
|
2543
|
-
function requireReactPropTypesSecret$
|
|
2544
|
-
if (hasRequiredReactPropTypesSecret$
|
|
2545
|
-
hasRequiredReactPropTypesSecret$
|
|
2543
|
+
function requireReactPropTypesSecret$2 () {
|
|
2544
|
+
if (hasRequiredReactPropTypesSecret$2) return ReactPropTypesSecret_1$2;
|
|
2545
|
+
hasRequiredReactPropTypesSecret$2 = 1;
|
|
2546
2546
|
|
|
2547
2547
|
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
2548
2548
|
|
|
2549
|
-
ReactPropTypesSecret_1$
|
|
2550
|
-
return ReactPropTypesSecret_1$
|
|
2549
|
+
ReactPropTypesSecret_1$2 = ReactPropTypesSecret;
|
|
2550
|
+
return ReactPropTypesSecret_1$2;
|
|
2551
2551
|
}
|
|
2552
2552
|
|
|
2553
|
-
var has$
|
|
2554
|
-
var hasRequiredHas$
|
|
2553
|
+
var has$2;
|
|
2554
|
+
var hasRequiredHas$2;
|
|
2555
2555
|
|
|
2556
|
-
function requireHas$
|
|
2557
|
-
if (hasRequiredHas$
|
|
2558
|
-
hasRequiredHas$
|
|
2559
|
-
has$
|
|
2560
|
-
return has$
|
|
2556
|
+
function requireHas$2 () {
|
|
2557
|
+
if (hasRequiredHas$2) return has$2;
|
|
2558
|
+
hasRequiredHas$2 = 1;
|
|
2559
|
+
has$2 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
2560
|
+
return has$2;
|
|
2561
2561
|
}
|
|
2562
2562
|
|
|
2563
2563
|
/**
|
|
@@ -2567,19 +2567,19 @@ function requireHas$1 () {
|
|
|
2567
2567
|
* LICENSE file in the root directory of this source tree.
|
|
2568
2568
|
*/
|
|
2569
2569
|
|
|
2570
|
-
var checkPropTypes_1$
|
|
2571
|
-
var hasRequiredCheckPropTypes$
|
|
2570
|
+
var checkPropTypes_1$2;
|
|
2571
|
+
var hasRequiredCheckPropTypes$2;
|
|
2572
2572
|
|
|
2573
|
-
function requireCheckPropTypes$
|
|
2574
|
-
if (hasRequiredCheckPropTypes$
|
|
2575
|
-
hasRequiredCheckPropTypes$
|
|
2573
|
+
function requireCheckPropTypes$2 () {
|
|
2574
|
+
if (hasRequiredCheckPropTypes$2) return checkPropTypes_1$2;
|
|
2575
|
+
hasRequiredCheckPropTypes$2 = 1;
|
|
2576
2576
|
|
|
2577
2577
|
var printWarning = function() {};
|
|
2578
2578
|
|
|
2579
2579
|
if (process.env.NODE_ENV !== 'production') {
|
|
2580
|
-
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$
|
|
2580
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$2();
|
|
2581
2581
|
var loggedTypeFailures = {};
|
|
2582
|
-
var has = /*@__PURE__*/ requireHas$
|
|
2582
|
+
var has = /*@__PURE__*/ requireHas$2();
|
|
2583
2583
|
|
|
2584
2584
|
printWarning = function(text) {
|
|
2585
2585
|
var message = 'Warning: ' + text;
|
|
@@ -2667,8 +2667,8 @@ function requireCheckPropTypes$1 () {
|
|
|
2667
2667
|
}
|
|
2668
2668
|
};
|
|
2669
2669
|
|
|
2670
|
-
checkPropTypes_1$
|
|
2671
|
-
return checkPropTypes_1$
|
|
2670
|
+
checkPropTypes_1$2 = checkPropTypes;
|
|
2671
|
+
return checkPropTypes_1$2;
|
|
2672
2672
|
}
|
|
2673
2673
|
|
|
2674
2674
|
/**
|
|
@@ -2678,19 +2678,19 @@ function requireCheckPropTypes$1 () {
|
|
|
2678
2678
|
* LICENSE file in the root directory of this source tree.
|
|
2679
2679
|
*/
|
|
2680
2680
|
|
|
2681
|
-
var factoryWithTypeCheckers$
|
|
2682
|
-
var hasRequiredFactoryWithTypeCheckers$
|
|
2681
|
+
var factoryWithTypeCheckers$2;
|
|
2682
|
+
var hasRequiredFactoryWithTypeCheckers$2;
|
|
2683
2683
|
|
|
2684
|
-
function requireFactoryWithTypeCheckers$
|
|
2685
|
-
if (hasRequiredFactoryWithTypeCheckers$
|
|
2686
|
-
hasRequiredFactoryWithTypeCheckers$
|
|
2684
|
+
function requireFactoryWithTypeCheckers$2 () {
|
|
2685
|
+
if (hasRequiredFactoryWithTypeCheckers$2) return factoryWithTypeCheckers$2;
|
|
2686
|
+
hasRequiredFactoryWithTypeCheckers$2 = 1;
|
|
2687
2687
|
|
|
2688
|
-
var ReactIs = requireReactIs$
|
|
2689
|
-
var assign = requireObjectAssign$
|
|
2688
|
+
var ReactIs = requireReactIs$2();
|
|
2689
|
+
var assign = requireObjectAssign$2();
|
|
2690
2690
|
|
|
2691
|
-
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$
|
|
2692
|
-
var has = /*@__PURE__*/ requireHas$
|
|
2693
|
-
var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$
|
|
2691
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$2();
|
|
2692
|
+
var has = /*@__PURE__*/ requireHas$2();
|
|
2693
|
+
var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$2();
|
|
2694
2694
|
|
|
2695
2695
|
var printWarning = function() {};
|
|
2696
2696
|
|
|
@@ -2713,7 +2713,7 @@ function requireFactoryWithTypeCheckers$1 () {
|
|
|
2713
2713
|
return null;
|
|
2714
2714
|
}
|
|
2715
2715
|
|
|
2716
|
-
factoryWithTypeCheckers$
|
|
2716
|
+
factoryWithTypeCheckers$2 = function(isValidElement, throwOnDirectAccess) {
|
|
2717
2717
|
/* global Symbol */
|
|
2718
2718
|
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
2719
2719
|
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
@@ -3286,7 +3286,7 @@ function requireFactoryWithTypeCheckers$1 () {
|
|
|
3286
3286
|
|
|
3287
3287
|
return ReactPropTypes;
|
|
3288
3288
|
};
|
|
3289
|
-
return factoryWithTypeCheckers$
|
|
3289
|
+
return factoryWithTypeCheckers$2;
|
|
3290
3290
|
}
|
|
3291
3291
|
|
|
3292
3292
|
/**
|
|
@@ -3296,20 +3296,20 @@ function requireFactoryWithTypeCheckers$1 () {
|
|
|
3296
3296
|
* LICENSE file in the root directory of this source tree.
|
|
3297
3297
|
*/
|
|
3298
3298
|
|
|
3299
|
-
var factoryWithThrowingShims$
|
|
3300
|
-
var hasRequiredFactoryWithThrowingShims$
|
|
3299
|
+
var factoryWithThrowingShims$2;
|
|
3300
|
+
var hasRequiredFactoryWithThrowingShims$2;
|
|
3301
3301
|
|
|
3302
|
-
function requireFactoryWithThrowingShims$
|
|
3303
|
-
if (hasRequiredFactoryWithThrowingShims$
|
|
3304
|
-
hasRequiredFactoryWithThrowingShims$
|
|
3302
|
+
function requireFactoryWithThrowingShims$2 () {
|
|
3303
|
+
if (hasRequiredFactoryWithThrowingShims$2) return factoryWithThrowingShims$2;
|
|
3304
|
+
hasRequiredFactoryWithThrowingShims$2 = 1;
|
|
3305
3305
|
|
|
3306
|
-
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$
|
|
3306
|
+
var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$2();
|
|
3307
3307
|
|
|
3308
3308
|
function emptyFunction() {}
|
|
3309
3309
|
function emptyFunctionWithReset() {}
|
|
3310
3310
|
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
3311
3311
|
|
|
3312
|
-
factoryWithThrowingShims$
|
|
3312
|
+
factoryWithThrowingShims$2 = function() {
|
|
3313
3313
|
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
3314
3314
|
if (secret === ReactPropTypesSecret) {
|
|
3315
3315
|
// It is still safe when called from React.
|
|
@@ -3357,7 +3357,7 @@ function requireFactoryWithThrowingShims$1 () {
|
|
|
3357
3357
|
|
|
3358
3358
|
return ReactPropTypes;
|
|
3359
3359
|
};
|
|
3360
|
-
return factoryWithThrowingShims$
|
|
3360
|
+
return factoryWithThrowingShims$2;
|
|
3361
3361
|
}
|
|
3362
3362
|
|
|
3363
3363
|
/**
|
|
@@ -3367,28 +3367,28 @@ function requireFactoryWithThrowingShims$1 () {
|
|
|
3367
3367
|
* LICENSE file in the root directory of this source tree.
|
|
3368
3368
|
*/
|
|
3369
3369
|
|
|
3370
|
-
var hasRequiredPropTypes$
|
|
3370
|
+
var hasRequiredPropTypes$2;
|
|
3371
3371
|
|
|
3372
|
-
function requirePropTypes$
|
|
3373
|
-
if (hasRequiredPropTypes$
|
|
3374
|
-
hasRequiredPropTypes$
|
|
3372
|
+
function requirePropTypes$2 () {
|
|
3373
|
+
if (hasRequiredPropTypes$2) return propTypes$2.exports;
|
|
3374
|
+
hasRequiredPropTypes$2 = 1;
|
|
3375
3375
|
if (process.env.NODE_ENV !== 'production') {
|
|
3376
|
-
var ReactIs = requireReactIs$
|
|
3376
|
+
var ReactIs = requireReactIs$2();
|
|
3377
3377
|
|
|
3378
3378
|
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
3379
3379
|
// http://fb.me/prop-types-in-prod
|
|
3380
3380
|
var throwOnDirectAccess = true;
|
|
3381
|
-
propTypes$
|
|
3381
|
+
propTypes$2.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers$2()(ReactIs.isElement, throwOnDirectAccess);
|
|
3382
3382
|
} else {
|
|
3383
3383
|
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
3384
3384
|
// http://fb.me/prop-types-in-prod
|
|
3385
|
-
propTypes$
|
|
3385
|
+
propTypes$2.exports = /*@__PURE__*/ requireFactoryWithThrowingShims$2()();
|
|
3386
3386
|
}
|
|
3387
|
-
return propTypes$
|
|
3387
|
+
return propTypes$2.exports;
|
|
3388
3388
|
}
|
|
3389
3389
|
|
|
3390
|
-
var propTypesExports$
|
|
3391
|
-
var PropTypes$
|
|
3390
|
+
var propTypesExports$2 = /*@__PURE__*/ requirePropTypes$2();
|
|
3391
|
+
var PropTypes$2 = /*@__PURE__*/getDefaultExportFromCjs$2(propTypesExports$2);
|
|
3392
3392
|
|
|
3393
3393
|
const SystemOperations = _ref => {
|
|
3394
3394
|
let {
|
|
@@ -3470,15 +3470,15 @@ const SystemOperations = _ref => {
|
|
|
3470
3470
|
});
|
|
3471
3471
|
};
|
|
3472
3472
|
SystemOperations.propTypes = {
|
|
3473
|
-
onPowerOff: PropTypes$
|
|
3474
|
-
onRestart: PropTypes$
|
|
3475
|
-
powerOffLabel: PropTypes$
|
|
3476
|
-
restartLabel: PropTypes$
|
|
3477
|
-
iconClassName: PropTypes$
|
|
3478
|
-
confirmTitle: PropTypes$
|
|
3479
|
-
cancelText: PropTypes$
|
|
3480
|
-
okText: PropTypes$
|
|
3481
|
-
run: PropTypes$
|
|
3473
|
+
onPowerOff: PropTypes$2.func,
|
|
3474
|
+
onRestart: PropTypes$2.func,
|
|
3475
|
+
powerOffLabel: PropTypes$2.string,
|
|
3476
|
+
restartLabel: PropTypes$2.string,
|
|
3477
|
+
iconClassName: PropTypes$2.string,
|
|
3478
|
+
confirmTitle: PropTypes$2.string,
|
|
3479
|
+
cancelText: PropTypes$2.string,
|
|
3480
|
+
okText: PropTypes$2.string,
|
|
3481
|
+
run: PropTypes$2.func
|
|
3482
3482
|
};
|
|
3483
3483
|
var SystemOperations$1 = SystemOperations;
|
|
3484
3484
|
|
|
@@ -3521,10 +3521,10 @@ const useSpaLogo = function () {
|
|
|
3521
3521
|
}, "logo")];
|
|
3522
3522
|
};
|
|
3523
3523
|
useSpaLogo.propTypes = {
|
|
3524
|
-
logoUrl: PropTypes$
|
|
3525
|
-
logoWidth: PropTypes$
|
|
3526
|
-
logoAlt: PropTypes$
|
|
3527
|
-
onClick: PropTypes$
|
|
3524
|
+
logoUrl: PropTypes$2.string,
|
|
3525
|
+
logoWidth: PropTypes$2.number,
|
|
3526
|
+
logoAlt: PropTypes$2.string,
|
|
3527
|
+
onClick: PropTypes$2.func
|
|
3528
3528
|
};
|
|
3529
3529
|
var useSpaLogo$1 = useSpaLogo;
|
|
3530
3530
|
|
|
@@ -3570,7 +3570,9 @@ const CommonHeader = _ref => {
|
|
|
3570
3570
|
className = '',
|
|
3571
3571
|
style = {},
|
|
3572
3572
|
// 新增插槽
|
|
3573
|
-
leftContent
|
|
3573
|
+
leftContent = null,
|
|
3574
|
+
// 左侧额外内容
|
|
3575
|
+
rightContent = null // 右侧额外内容
|
|
3574
3576
|
} = _ref;
|
|
3575
3577
|
const [logo] = useSpaLogo$1(logoProps);
|
|
3576
3578
|
|
|
@@ -3604,7 +3606,7 @@ const CommonHeader = _ref => {
|
|
|
3604
3606
|
}), /*#__PURE__*/jsxs(Flex, {
|
|
3605
3607
|
align: "center",
|
|
3606
3608
|
gap: 10,
|
|
3607
|
-
children: [showHardwareUsage && usageElement, /*#__PURE__*/jsxs("div", {
|
|
3609
|
+
children: [rightContent, showHardwareUsage && usageElement, /*#__PURE__*/jsxs("div", {
|
|
3608
3610
|
className: "header-controls",
|
|
3609
3611
|
children: [menuElement && /*#__PURE__*/jsx("div", {
|
|
3610
3612
|
className: "control-icon",
|
|
@@ -3624,23 +3626,23 @@ const CommonHeader = _ref => {
|
|
|
3624
3626
|
|
|
3625
3627
|
// PropTypes 类型检查
|
|
3626
3628
|
CommonHeader.propTypes = {
|
|
3627
|
-
menuElement: PropTypes$
|
|
3628
|
-
productInfo: PropTypes$
|
|
3629
|
-
productName: PropTypes$
|
|
3630
|
-
version: PropTypes$
|
|
3629
|
+
menuElement: PropTypes$2.node,
|
|
3630
|
+
productInfo: PropTypes$2.shape({
|
|
3631
|
+
productName: PropTypes$2.string,
|
|
3632
|
+
version: PropTypes$2.string
|
|
3631
3633
|
}),
|
|
3632
|
-
showLogo: PropTypes$
|
|
3633
|
-
showProductInfo: PropTypes$
|
|
3634
|
-
showHardwareUsage: PropTypes$
|
|
3635
|
-
showSystemOperations: PropTypes$
|
|
3636
|
-
onPowerOff: PropTypes$
|
|
3637
|
-
onRestart: PropTypes$
|
|
3638
|
-
onRun: PropTypes$
|
|
3639
|
-
hardwareMonitorUrl: PropTypes$
|
|
3640
|
-
getSocketUrl: PropTypes$
|
|
3641
|
-
logoProps: PropTypes$
|
|
3642
|
-
className: PropTypes$
|
|
3643
|
-
style: PropTypes$
|
|
3634
|
+
showLogo: PropTypes$2.bool,
|
|
3635
|
+
showProductInfo: PropTypes$2.bool,
|
|
3636
|
+
showHardwareUsage: PropTypes$2.bool,
|
|
3637
|
+
showSystemOperations: PropTypes$2.bool,
|
|
3638
|
+
onPowerOff: PropTypes$2.func,
|
|
3639
|
+
onRestart: PropTypes$2.func,
|
|
3640
|
+
onRun: PropTypes$2.func,
|
|
3641
|
+
hardwareMonitorUrl: PropTypes$2.string,
|
|
3642
|
+
getSocketUrl: PropTypes$2.func,
|
|
3643
|
+
logoProps: PropTypes$2.object,
|
|
3644
|
+
className: PropTypes$2.string,
|
|
3645
|
+
style: PropTypes$2.object
|
|
3644
3646
|
};
|
|
3645
3647
|
var CommonHeader$1 = CommonHeader;
|
|
3646
3648
|
|
|
@@ -3670,10 +3672,10 @@ const LSMLabelField = props => {
|
|
|
3670
3672
|
};
|
|
3671
3673
|
loadLsmData();
|
|
3672
3674
|
}, [fetchLsmData]);
|
|
3673
|
-
return /*#__PURE__*/jsx(Form.Item, _objectSpread2
|
|
3675
|
+
return /*#__PURE__*/jsx(Form.Item, _objectSpread2(_objectSpread2({
|
|
3674
3676
|
label: label
|
|
3675
3677
|
}, formItemProps), {}, {
|
|
3676
|
-
children: /*#__PURE__*/jsx(Select, _objectSpread2
|
|
3678
|
+
children: /*#__PURE__*/jsx(Select, _objectSpread2(_objectSpread2(_objectSpread2({}, field), selectProps), {}, {
|
|
3677
3679
|
options: lsmList,
|
|
3678
3680
|
fieldNames: fieldNames,
|
|
3679
3681
|
allowClear: true,
|
|
@@ -3689,15 +3691,15 @@ const LSMLabelField = props => {
|
|
|
3689
3691
|
};
|
|
3690
3692
|
var LSMLabelField$1 = /*#__PURE__*/memo(LSMLabelField);
|
|
3691
3693
|
|
|
3692
|
-
function _defineProperty(e, r, t) {
|
|
3693
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
3694
|
+
function _defineProperty$1(e, r, t) {
|
|
3695
|
+
return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, {
|
|
3694
3696
|
value: t,
|
|
3695
3697
|
enumerable: !0,
|
|
3696
3698
|
configurable: !0,
|
|
3697
3699
|
writable: !0
|
|
3698
3700
|
}) : e[r] = t, e;
|
|
3699
3701
|
}
|
|
3700
|
-
function ownKeys(e, r) {
|
|
3702
|
+
function ownKeys$1(e, r) {
|
|
3701
3703
|
var t = Object.keys(e);
|
|
3702
3704
|
if (Object.getOwnPropertySymbols) {
|
|
3703
3705
|
var o = Object.getOwnPropertySymbols(e);
|
|
@@ -3707,29 +3709,29 @@ function ownKeys(e, r) {
|
|
|
3707
3709
|
}
|
|
3708
3710
|
return t;
|
|
3709
3711
|
}
|
|
3710
|
-
function _objectSpread2(e) {
|
|
3712
|
+
function _objectSpread2$1(e) {
|
|
3711
3713
|
for (var r = 1; r < arguments.length; r++) {
|
|
3712
3714
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
3713
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
3714
|
-
_defineProperty(e, r, t[r]);
|
|
3715
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
3715
|
+
r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) {
|
|
3716
|
+
_defineProperty$1(e, r, t[r]);
|
|
3717
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) {
|
|
3716
3718
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
3717
3719
|
});
|
|
3718
3720
|
}
|
|
3719
3721
|
return e;
|
|
3720
3722
|
}
|
|
3721
|
-
function _objectWithoutProperties(e, t) {
|
|
3723
|
+
function _objectWithoutProperties$1(e, t) {
|
|
3722
3724
|
if (null == e) return {};
|
|
3723
3725
|
var o,
|
|
3724
3726
|
r,
|
|
3725
|
-
i = _objectWithoutPropertiesLoose(e, t);
|
|
3727
|
+
i = _objectWithoutPropertiesLoose$1(e, t);
|
|
3726
3728
|
if (Object.getOwnPropertySymbols) {
|
|
3727
3729
|
var n = Object.getOwnPropertySymbols(e);
|
|
3728
3730
|
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
3729
3731
|
}
|
|
3730
3732
|
return i;
|
|
3731
3733
|
}
|
|
3732
|
-
function _objectWithoutPropertiesLoose(r, e) {
|
|
3734
|
+
function _objectWithoutPropertiesLoose$1(r, e) {
|
|
3733
3735
|
if (null == r) return {};
|
|
3734
3736
|
var t = {};
|
|
3735
3737
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
@@ -3738,7 +3740,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
3738
3740
|
}
|
|
3739
3741
|
return t;
|
|
3740
3742
|
}
|
|
3741
|
-
function _toPrimitive(t, r) {
|
|
3743
|
+
function _toPrimitive$1(t, r) {
|
|
3742
3744
|
if ("object" != typeof t || !t) return t;
|
|
3743
3745
|
var e = t[Symbol.toPrimitive];
|
|
3744
3746
|
if (void 0 !== e) {
|
|
@@ -3748,19 +3750,19 @@ function _toPrimitive(t, r) {
|
|
|
3748
3750
|
}
|
|
3749
3751
|
return ("string" === r ? String : Number)(t);
|
|
3750
3752
|
}
|
|
3751
|
-
function _toPropertyKey(t) {
|
|
3752
|
-
var i = _toPrimitive(t, "string");
|
|
3753
|
+
function _toPropertyKey$1(t) {
|
|
3754
|
+
var i = _toPrimitive$1(t, "string");
|
|
3753
3755
|
return "symbol" == typeof i ? i : i + "";
|
|
3754
3756
|
}
|
|
3755
|
-
const _excluded$
|
|
3756
|
-
const StyledModal = props => {
|
|
3757
|
+
const _excluded$3 = ["width", "okText", "cancelText", "styles"];
|
|
3758
|
+
const StyledModal$2 = props => {
|
|
3757
3759
|
const {
|
|
3758
3760
|
width = "520px",
|
|
3759
3761
|
okText = "Apply",
|
|
3760
3762
|
cancelText = "Close",
|
|
3761
3763
|
styles: propStyles = {}
|
|
3762
3764
|
} = props,
|
|
3763
|
-
restProps = _objectWithoutProperties(props, _excluded$
|
|
3765
|
+
restProps = _objectWithoutProperties$1(props, _excluded$3);
|
|
3764
3766
|
|
|
3765
3767
|
// 基础样式配置
|
|
3766
3768
|
const baseStyles = {
|
|
@@ -3788,15 +3790,1213 @@ const StyledModal = props => {
|
|
|
3788
3790
|
};
|
|
3789
3791
|
|
|
3790
3792
|
// 合并样式
|
|
3791
|
-
const styles = _objectSpread2(_objectSpread2({}, baseStyles), propStyles);
|
|
3792
|
-
return /*#__PURE__*/jsx(Modal, _objectSpread2({
|
|
3793
|
+
const styles = _objectSpread2$1(_objectSpread2$1({}, baseStyles), propStyles);
|
|
3794
|
+
return /*#__PURE__*/jsx(Modal, _objectSpread2$1({
|
|
3793
3795
|
width: width,
|
|
3794
3796
|
okText: okText,
|
|
3795
3797
|
cancelText: cancelText,
|
|
3796
3798
|
styles: styles
|
|
3797
3799
|
}, restProps));
|
|
3798
3800
|
};
|
|
3799
|
-
var StyledModal$
|
|
3801
|
+
var StyledModal$3 = StyledModal$2;
|
|
3802
|
+
function getDefaultExportFromCjs$1(x) {
|
|
3803
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3804
|
+
}
|
|
3805
|
+
var propTypes$1 = {
|
|
3806
|
+
exports: {}
|
|
3807
|
+
};
|
|
3808
|
+
var reactIs$1 = {
|
|
3809
|
+
exports: {}
|
|
3810
|
+
};
|
|
3811
|
+
var reactIs_production_min$1 = {};
|
|
3812
|
+
|
|
3813
|
+
/** @license React v16.13.1
|
|
3814
|
+
* react-is.production.min.js
|
|
3815
|
+
*
|
|
3816
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3817
|
+
*
|
|
3818
|
+
* This source code is licensed under the MIT license found in the
|
|
3819
|
+
* LICENSE file in the root directory of this source tree.
|
|
3820
|
+
*/
|
|
3821
|
+
|
|
3822
|
+
var hasRequiredReactIs_production_min$1;
|
|
3823
|
+
function requireReactIs_production_min$1() {
|
|
3824
|
+
if (hasRequiredReactIs_production_min$1) return reactIs_production_min$1;
|
|
3825
|
+
hasRequiredReactIs_production_min$1 = 1;
|
|
3826
|
+
var b = "function" === typeof Symbol && Symbol.for,
|
|
3827
|
+
c = b ? Symbol.for("react.element") : 60103,
|
|
3828
|
+
d = b ? Symbol.for("react.portal") : 60106,
|
|
3829
|
+
e = b ? Symbol.for("react.fragment") : 60107,
|
|
3830
|
+
f = b ? Symbol.for("react.strict_mode") : 60108,
|
|
3831
|
+
g = b ? Symbol.for("react.profiler") : 60114,
|
|
3832
|
+
h = b ? Symbol.for("react.provider") : 60109,
|
|
3833
|
+
k = b ? Symbol.for("react.context") : 60110,
|
|
3834
|
+
l = b ? Symbol.for("react.async_mode") : 60111,
|
|
3835
|
+
m = b ? Symbol.for("react.concurrent_mode") : 60111,
|
|
3836
|
+
n = b ? Symbol.for("react.forward_ref") : 60112,
|
|
3837
|
+
p = b ? Symbol.for("react.suspense") : 60113,
|
|
3838
|
+
q = b ? Symbol.for("react.suspense_list") : 60120,
|
|
3839
|
+
r = b ? Symbol.for("react.memo") : 60115,
|
|
3840
|
+
t = b ? Symbol.for("react.lazy") : 60116,
|
|
3841
|
+
v = b ? Symbol.for("react.block") : 60121,
|
|
3842
|
+
w = b ? Symbol.for("react.fundamental") : 60117,
|
|
3843
|
+
x = b ? Symbol.for("react.responder") : 60118,
|
|
3844
|
+
y = b ? Symbol.for("react.scope") : 60119;
|
|
3845
|
+
function z(a) {
|
|
3846
|
+
if ("object" === typeof a && null !== a) {
|
|
3847
|
+
var u = a.$$typeof;
|
|
3848
|
+
switch (u) {
|
|
3849
|
+
case c:
|
|
3850
|
+
switch (a = a.type, a) {
|
|
3851
|
+
case l:
|
|
3852
|
+
case m:
|
|
3853
|
+
case e:
|
|
3854
|
+
case g:
|
|
3855
|
+
case f:
|
|
3856
|
+
case p:
|
|
3857
|
+
return a;
|
|
3858
|
+
default:
|
|
3859
|
+
switch (a = a && a.$$typeof, a) {
|
|
3860
|
+
case k:
|
|
3861
|
+
case n:
|
|
3862
|
+
case t:
|
|
3863
|
+
case r:
|
|
3864
|
+
case h:
|
|
3865
|
+
return a;
|
|
3866
|
+
default:
|
|
3867
|
+
return u;
|
|
3868
|
+
}
|
|
3869
|
+
}
|
|
3870
|
+
case d:
|
|
3871
|
+
return u;
|
|
3872
|
+
}
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
function A(a) {
|
|
3876
|
+
return z(a) === m;
|
|
3877
|
+
}
|
|
3878
|
+
reactIs_production_min$1.AsyncMode = l;
|
|
3879
|
+
reactIs_production_min$1.ConcurrentMode = m;
|
|
3880
|
+
reactIs_production_min$1.ContextConsumer = k;
|
|
3881
|
+
reactIs_production_min$1.ContextProvider = h;
|
|
3882
|
+
reactIs_production_min$1.Element = c;
|
|
3883
|
+
reactIs_production_min$1.ForwardRef = n;
|
|
3884
|
+
reactIs_production_min$1.Fragment = e;
|
|
3885
|
+
reactIs_production_min$1.Lazy = t;
|
|
3886
|
+
reactIs_production_min$1.Memo = r;
|
|
3887
|
+
reactIs_production_min$1.Portal = d;
|
|
3888
|
+
reactIs_production_min$1.Profiler = g;
|
|
3889
|
+
reactIs_production_min$1.StrictMode = f;
|
|
3890
|
+
reactIs_production_min$1.Suspense = p;
|
|
3891
|
+
reactIs_production_min$1.isAsyncMode = function (a) {
|
|
3892
|
+
return A(a) || z(a) === l;
|
|
3893
|
+
};
|
|
3894
|
+
reactIs_production_min$1.isConcurrentMode = A;
|
|
3895
|
+
reactIs_production_min$1.isContextConsumer = function (a) {
|
|
3896
|
+
return z(a) === k;
|
|
3897
|
+
};
|
|
3898
|
+
reactIs_production_min$1.isContextProvider = function (a) {
|
|
3899
|
+
return z(a) === h;
|
|
3900
|
+
};
|
|
3901
|
+
reactIs_production_min$1.isElement = function (a) {
|
|
3902
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
3903
|
+
};
|
|
3904
|
+
reactIs_production_min$1.isForwardRef = function (a) {
|
|
3905
|
+
return z(a) === n;
|
|
3906
|
+
};
|
|
3907
|
+
reactIs_production_min$1.isFragment = function (a) {
|
|
3908
|
+
return z(a) === e;
|
|
3909
|
+
};
|
|
3910
|
+
reactIs_production_min$1.isLazy = function (a) {
|
|
3911
|
+
return z(a) === t;
|
|
3912
|
+
};
|
|
3913
|
+
reactIs_production_min$1.isMemo = function (a) {
|
|
3914
|
+
return z(a) === r;
|
|
3915
|
+
};
|
|
3916
|
+
reactIs_production_min$1.isPortal = function (a) {
|
|
3917
|
+
return z(a) === d;
|
|
3918
|
+
};
|
|
3919
|
+
reactIs_production_min$1.isProfiler = function (a) {
|
|
3920
|
+
return z(a) === g;
|
|
3921
|
+
};
|
|
3922
|
+
reactIs_production_min$1.isStrictMode = function (a) {
|
|
3923
|
+
return z(a) === f;
|
|
3924
|
+
};
|
|
3925
|
+
reactIs_production_min$1.isSuspense = function (a) {
|
|
3926
|
+
return z(a) === p;
|
|
3927
|
+
};
|
|
3928
|
+
reactIs_production_min$1.isValidElementType = function (a) {
|
|
3929
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
3930
|
+
};
|
|
3931
|
+
reactIs_production_min$1.typeOf = z;
|
|
3932
|
+
return reactIs_production_min$1;
|
|
3933
|
+
}
|
|
3934
|
+
var reactIs_development$1 = {};
|
|
3935
|
+
|
|
3936
|
+
/** @license React v16.13.1
|
|
3937
|
+
* react-is.development.js
|
|
3938
|
+
*
|
|
3939
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3940
|
+
*
|
|
3941
|
+
* This source code is licensed under the MIT license found in the
|
|
3942
|
+
* LICENSE file in the root directory of this source tree.
|
|
3943
|
+
*/
|
|
3944
|
+
|
|
3945
|
+
var hasRequiredReactIs_development$1;
|
|
3946
|
+
function requireReactIs_development$1() {
|
|
3947
|
+
if (hasRequiredReactIs_development$1) return reactIs_development$1;
|
|
3948
|
+
hasRequiredReactIs_development$1 = 1;
|
|
3949
|
+
if (process.env.NODE_ENV !== "production") {
|
|
3950
|
+
(function () {
|
|
3951
|
+
// The Symbol used to tag the ReactElement-like types. If there is no native Symbol
|
|
3952
|
+
// nor polyfill, then a plain number is used for performance.
|
|
3953
|
+
var hasSymbol = typeof Symbol === 'function' && Symbol.for;
|
|
3954
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
|
|
3955
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
3956
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
3957
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
3958
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
3959
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
3960
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
3961
|
+
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
3962
|
+
|
|
3963
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
3964
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
3965
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
3966
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
3967
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
3968
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
3969
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
3970
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
3971
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
3972
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
3973
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
3974
|
+
function isValidElementType(type) {
|
|
3975
|
+
return typeof type === 'string' || typeof type === 'function' ||
|
|
3976
|
+
// Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
3977
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
3978
|
+
}
|
|
3979
|
+
function typeOf(object) {
|
|
3980
|
+
if (typeof object === 'object' && object !== null) {
|
|
3981
|
+
var $$typeof = object.$$typeof;
|
|
3982
|
+
switch ($$typeof) {
|
|
3983
|
+
case REACT_ELEMENT_TYPE:
|
|
3984
|
+
var type = object.type;
|
|
3985
|
+
switch (type) {
|
|
3986
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
3987
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
3988
|
+
case REACT_FRAGMENT_TYPE:
|
|
3989
|
+
case REACT_PROFILER_TYPE:
|
|
3990
|
+
case REACT_STRICT_MODE_TYPE:
|
|
3991
|
+
case REACT_SUSPENSE_TYPE:
|
|
3992
|
+
return type;
|
|
3993
|
+
default:
|
|
3994
|
+
var $$typeofType = type && type.$$typeof;
|
|
3995
|
+
switch ($$typeofType) {
|
|
3996
|
+
case REACT_CONTEXT_TYPE:
|
|
3997
|
+
case REACT_FORWARD_REF_TYPE:
|
|
3998
|
+
case REACT_LAZY_TYPE:
|
|
3999
|
+
case REACT_MEMO_TYPE:
|
|
4000
|
+
case REACT_PROVIDER_TYPE:
|
|
4001
|
+
return $$typeofType;
|
|
4002
|
+
default:
|
|
4003
|
+
return $$typeof;
|
|
4004
|
+
}
|
|
4005
|
+
}
|
|
4006
|
+
case REACT_PORTAL_TYPE:
|
|
4007
|
+
return $$typeof;
|
|
4008
|
+
}
|
|
4009
|
+
}
|
|
4010
|
+
return undefined;
|
|
4011
|
+
} // AsyncMode is deprecated along with isAsyncMode
|
|
4012
|
+
|
|
4013
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
4014
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
4015
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
4016
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
4017
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
4018
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
4019
|
+
var Fragment = REACT_FRAGMENT_TYPE;
|
|
4020
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
4021
|
+
var Memo = REACT_MEMO_TYPE;
|
|
4022
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
4023
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
4024
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
4025
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
4026
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
4027
|
+
|
|
4028
|
+
function isAsyncMode(object) {
|
|
4029
|
+
{
|
|
4030
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
4031
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
4032
|
+
|
|
4033
|
+
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
4034
|
+
}
|
|
4035
|
+
}
|
|
4036
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
4037
|
+
}
|
|
4038
|
+
function isConcurrentMode(object) {
|
|
4039
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
4040
|
+
}
|
|
4041
|
+
function isContextConsumer(object) {
|
|
4042
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
4043
|
+
}
|
|
4044
|
+
function isContextProvider(object) {
|
|
4045
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
4046
|
+
}
|
|
4047
|
+
function isElement(object) {
|
|
4048
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
4049
|
+
}
|
|
4050
|
+
function isForwardRef(object) {
|
|
4051
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
4052
|
+
}
|
|
4053
|
+
function isFragment(object) {
|
|
4054
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
4055
|
+
}
|
|
4056
|
+
function isLazy(object) {
|
|
4057
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
4058
|
+
}
|
|
4059
|
+
function isMemo(object) {
|
|
4060
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
4061
|
+
}
|
|
4062
|
+
function isPortal(object) {
|
|
4063
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
4064
|
+
}
|
|
4065
|
+
function isProfiler(object) {
|
|
4066
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
4067
|
+
}
|
|
4068
|
+
function isStrictMode(object) {
|
|
4069
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
4070
|
+
}
|
|
4071
|
+
function isSuspense(object) {
|
|
4072
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
4073
|
+
}
|
|
4074
|
+
reactIs_development$1.AsyncMode = AsyncMode;
|
|
4075
|
+
reactIs_development$1.ConcurrentMode = ConcurrentMode;
|
|
4076
|
+
reactIs_development$1.ContextConsumer = ContextConsumer;
|
|
4077
|
+
reactIs_development$1.ContextProvider = ContextProvider;
|
|
4078
|
+
reactIs_development$1.Element = Element;
|
|
4079
|
+
reactIs_development$1.ForwardRef = ForwardRef;
|
|
4080
|
+
reactIs_development$1.Fragment = Fragment;
|
|
4081
|
+
reactIs_development$1.Lazy = Lazy;
|
|
4082
|
+
reactIs_development$1.Memo = Memo;
|
|
4083
|
+
reactIs_development$1.Portal = Portal;
|
|
4084
|
+
reactIs_development$1.Profiler = Profiler;
|
|
4085
|
+
reactIs_development$1.StrictMode = StrictMode;
|
|
4086
|
+
reactIs_development$1.Suspense = Suspense;
|
|
4087
|
+
reactIs_development$1.isAsyncMode = isAsyncMode;
|
|
4088
|
+
reactIs_development$1.isConcurrentMode = isConcurrentMode;
|
|
4089
|
+
reactIs_development$1.isContextConsumer = isContextConsumer;
|
|
4090
|
+
reactIs_development$1.isContextProvider = isContextProvider;
|
|
4091
|
+
reactIs_development$1.isElement = isElement;
|
|
4092
|
+
reactIs_development$1.isForwardRef = isForwardRef;
|
|
4093
|
+
reactIs_development$1.isFragment = isFragment;
|
|
4094
|
+
reactIs_development$1.isLazy = isLazy;
|
|
4095
|
+
reactIs_development$1.isMemo = isMemo;
|
|
4096
|
+
reactIs_development$1.isPortal = isPortal;
|
|
4097
|
+
reactIs_development$1.isProfiler = isProfiler;
|
|
4098
|
+
reactIs_development$1.isStrictMode = isStrictMode;
|
|
4099
|
+
reactIs_development$1.isSuspense = isSuspense;
|
|
4100
|
+
reactIs_development$1.isValidElementType = isValidElementType;
|
|
4101
|
+
reactIs_development$1.typeOf = typeOf;
|
|
4102
|
+
})();
|
|
4103
|
+
}
|
|
4104
|
+
return reactIs_development$1;
|
|
4105
|
+
}
|
|
4106
|
+
var hasRequiredReactIs$1;
|
|
4107
|
+
function requireReactIs$1() {
|
|
4108
|
+
if (hasRequiredReactIs$1) return reactIs$1.exports;
|
|
4109
|
+
hasRequiredReactIs$1 = 1;
|
|
4110
|
+
if (process.env.NODE_ENV === 'production') {
|
|
4111
|
+
reactIs$1.exports = requireReactIs_production_min$1();
|
|
4112
|
+
} else {
|
|
4113
|
+
reactIs$1.exports = requireReactIs_development$1();
|
|
4114
|
+
}
|
|
4115
|
+
return reactIs$1.exports;
|
|
4116
|
+
}
|
|
4117
|
+
|
|
4118
|
+
/*
|
|
4119
|
+
object-assign
|
|
4120
|
+
(c) Sindre Sorhus
|
|
4121
|
+
@license MIT
|
|
4122
|
+
*/
|
|
4123
|
+
|
|
4124
|
+
var objectAssign$1;
|
|
4125
|
+
var hasRequiredObjectAssign$1;
|
|
4126
|
+
function requireObjectAssign$1() {
|
|
4127
|
+
if (hasRequiredObjectAssign$1) return objectAssign$1;
|
|
4128
|
+
hasRequiredObjectAssign$1 = 1;
|
|
4129
|
+
/* eslint-disable no-unused-vars */
|
|
4130
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
4131
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4132
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
4133
|
+
function toObject(val) {
|
|
4134
|
+
if (val === null || val === undefined) {
|
|
4135
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
4136
|
+
}
|
|
4137
|
+
return Object(val);
|
|
4138
|
+
}
|
|
4139
|
+
function shouldUseNative() {
|
|
4140
|
+
try {
|
|
4141
|
+
if (!Object.assign) {
|
|
4142
|
+
return false;
|
|
4143
|
+
}
|
|
4144
|
+
|
|
4145
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
4146
|
+
|
|
4147
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
4148
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
4149
|
+
test1[5] = 'de';
|
|
4150
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
4151
|
+
return false;
|
|
4152
|
+
}
|
|
4153
|
+
|
|
4154
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
4155
|
+
var test2 = {};
|
|
4156
|
+
for (var i = 0; i < 10; i++) {
|
|
4157
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
4158
|
+
}
|
|
4159
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
4160
|
+
return test2[n];
|
|
4161
|
+
});
|
|
4162
|
+
if (order2.join('') !== '0123456789') {
|
|
4163
|
+
return false;
|
|
4164
|
+
}
|
|
4165
|
+
|
|
4166
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
4167
|
+
var test3 = {};
|
|
4168
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
4169
|
+
test3[letter] = letter;
|
|
4170
|
+
});
|
|
4171
|
+
if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
|
|
4172
|
+
return false;
|
|
4173
|
+
}
|
|
4174
|
+
return true;
|
|
4175
|
+
} catch (err) {
|
|
4176
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
4177
|
+
return false;
|
|
4178
|
+
}
|
|
4179
|
+
}
|
|
4180
|
+
objectAssign$1 = shouldUseNative() ? Object.assign : function (target, source) {
|
|
4181
|
+
var from;
|
|
4182
|
+
var to = toObject(target);
|
|
4183
|
+
var symbols;
|
|
4184
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
4185
|
+
from = Object(arguments[s]);
|
|
4186
|
+
for (var key in from) {
|
|
4187
|
+
if (hasOwnProperty.call(from, key)) {
|
|
4188
|
+
to[key] = from[key];
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
if (getOwnPropertySymbols) {
|
|
4192
|
+
symbols = getOwnPropertySymbols(from);
|
|
4193
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
4194
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
4195
|
+
to[symbols[i]] = from[symbols[i]];
|
|
4196
|
+
}
|
|
4197
|
+
}
|
|
4198
|
+
}
|
|
4199
|
+
}
|
|
4200
|
+
return to;
|
|
4201
|
+
};
|
|
4202
|
+
return objectAssign$1;
|
|
4203
|
+
}
|
|
4204
|
+
|
|
4205
|
+
/**
|
|
4206
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4207
|
+
*
|
|
4208
|
+
* This source code is licensed under the MIT license found in the
|
|
4209
|
+
* LICENSE file in the root directory of this source tree.
|
|
4210
|
+
*/
|
|
4211
|
+
|
|
4212
|
+
var ReactPropTypesSecret_1$1;
|
|
4213
|
+
var hasRequiredReactPropTypesSecret$1;
|
|
4214
|
+
function requireReactPropTypesSecret$1() {
|
|
4215
|
+
if (hasRequiredReactPropTypesSecret$1) return ReactPropTypesSecret_1$1;
|
|
4216
|
+
hasRequiredReactPropTypesSecret$1 = 1;
|
|
4217
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
4218
|
+
ReactPropTypesSecret_1$1 = ReactPropTypesSecret;
|
|
4219
|
+
return ReactPropTypesSecret_1$1;
|
|
4220
|
+
}
|
|
4221
|
+
var has$1;
|
|
4222
|
+
var hasRequiredHas$1;
|
|
4223
|
+
function requireHas$1() {
|
|
4224
|
+
if (hasRequiredHas$1) return has$1;
|
|
4225
|
+
hasRequiredHas$1 = 1;
|
|
4226
|
+
has$1 = Function.call.bind(Object.prototype.hasOwnProperty);
|
|
4227
|
+
return has$1;
|
|
4228
|
+
}
|
|
4229
|
+
|
|
4230
|
+
/**
|
|
4231
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4232
|
+
*
|
|
4233
|
+
* This source code is licensed under the MIT license found in the
|
|
4234
|
+
* LICENSE file in the root directory of this source tree.
|
|
4235
|
+
*/
|
|
4236
|
+
|
|
4237
|
+
var checkPropTypes_1$1;
|
|
4238
|
+
var hasRequiredCheckPropTypes$1;
|
|
4239
|
+
function requireCheckPropTypes$1() {
|
|
4240
|
+
if (hasRequiredCheckPropTypes$1) return checkPropTypes_1$1;
|
|
4241
|
+
hasRequiredCheckPropTypes$1 = 1;
|
|
4242
|
+
var printWarning = function () {};
|
|
4243
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4244
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$1();
|
|
4245
|
+
var loggedTypeFailures = {};
|
|
4246
|
+
var has = /*@__PURE__*/requireHas$1();
|
|
4247
|
+
printWarning = function (text) {
|
|
4248
|
+
var message = 'Warning: ' + text;
|
|
4249
|
+
if (typeof console !== 'undefined') {
|
|
4250
|
+
console.error(message);
|
|
4251
|
+
}
|
|
4252
|
+
try {
|
|
4253
|
+
// --- Welcome to debugging React ---
|
|
4254
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
4255
|
+
// to find the callsite that caused this warning to fire.
|
|
4256
|
+
throw new Error(message);
|
|
4257
|
+
} catch (x) {/**/}
|
|
4258
|
+
};
|
|
4259
|
+
}
|
|
4260
|
+
|
|
4261
|
+
/**
|
|
4262
|
+
* Assert that the values match with the type specs.
|
|
4263
|
+
* Error messages are memorized and will only be shown once.
|
|
4264
|
+
*
|
|
4265
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
4266
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
4267
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
4268
|
+
* @param {string} componentName Name of the component for error messages.
|
|
4269
|
+
* @param {?Function} getStack Returns the component stack.
|
|
4270
|
+
* @private
|
|
4271
|
+
*/
|
|
4272
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
4273
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4274
|
+
for (var typeSpecName in typeSpecs) {
|
|
4275
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
4276
|
+
var error;
|
|
4277
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
4278
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
4279
|
+
// After these have been cleaned up, we'll let them throw.
|
|
4280
|
+
try {
|
|
4281
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
4282
|
+
// behavior as without this statement except with a better message.
|
|
4283
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
4284
|
+
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
|
4285
|
+
err.name = 'Invariant Violation';
|
|
4286
|
+
throw err;
|
|
4287
|
+
}
|
|
4288
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
4289
|
+
} catch (ex) {
|
|
4290
|
+
error = ex;
|
|
4291
|
+
}
|
|
4292
|
+
if (error && !(error instanceof Error)) {
|
|
4293
|
+
printWarning((componentName || 'React class') + ': type specification of ' + location + ' `' + typeSpecName + '` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).');
|
|
4294
|
+
}
|
|
4295
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
4296
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
4297
|
+
// same error.
|
|
4298
|
+
loggedTypeFailures[error.message] = true;
|
|
4299
|
+
var stack = getStack ? getStack() : '';
|
|
4300
|
+
printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
|
|
4301
|
+
}
|
|
4302
|
+
}
|
|
4303
|
+
}
|
|
4304
|
+
}
|
|
4305
|
+
}
|
|
4306
|
+
|
|
4307
|
+
/**
|
|
4308
|
+
* Resets warning cache when testing.
|
|
4309
|
+
*
|
|
4310
|
+
* @private
|
|
4311
|
+
*/
|
|
4312
|
+
checkPropTypes.resetWarningCache = function () {
|
|
4313
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4314
|
+
loggedTypeFailures = {};
|
|
4315
|
+
}
|
|
4316
|
+
};
|
|
4317
|
+
checkPropTypes_1$1 = checkPropTypes;
|
|
4318
|
+
return checkPropTypes_1$1;
|
|
4319
|
+
}
|
|
4320
|
+
|
|
4321
|
+
/**
|
|
4322
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4323
|
+
*
|
|
4324
|
+
* This source code is licensed under the MIT license found in the
|
|
4325
|
+
* LICENSE file in the root directory of this source tree.
|
|
4326
|
+
*/
|
|
4327
|
+
|
|
4328
|
+
var factoryWithTypeCheckers$1;
|
|
4329
|
+
var hasRequiredFactoryWithTypeCheckers$1;
|
|
4330
|
+
function requireFactoryWithTypeCheckers$1() {
|
|
4331
|
+
if (hasRequiredFactoryWithTypeCheckers$1) return factoryWithTypeCheckers$1;
|
|
4332
|
+
hasRequiredFactoryWithTypeCheckers$1 = 1;
|
|
4333
|
+
var ReactIs = requireReactIs$1();
|
|
4334
|
+
var assign = requireObjectAssign$1();
|
|
4335
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$1();
|
|
4336
|
+
var has = /*@__PURE__*/requireHas$1();
|
|
4337
|
+
var checkPropTypes = /*@__PURE__*/requireCheckPropTypes$1();
|
|
4338
|
+
var printWarning = function () {};
|
|
4339
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4340
|
+
printWarning = function (text) {
|
|
4341
|
+
var message = 'Warning: ' + text;
|
|
4342
|
+
if (typeof console !== 'undefined') {
|
|
4343
|
+
console.error(message);
|
|
4344
|
+
}
|
|
4345
|
+
try {
|
|
4346
|
+
// --- Welcome to debugging React ---
|
|
4347
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
4348
|
+
// to find the callsite that caused this warning to fire.
|
|
4349
|
+
throw new Error(message);
|
|
4350
|
+
} catch (x) {}
|
|
4351
|
+
};
|
|
4352
|
+
}
|
|
4353
|
+
function emptyFunctionThatReturnsNull() {
|
|
4354
|
+
return null;
|
|
4355
|
+
}
|
|
4356
|
+
factoryWithTypeCheckers$1 = function (isValidElement, throwOnDirectAccess) {
|
|
4357
|
+
/* global Symbol */
|
|
4358
|
+
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
4359
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
4360
|
+
|
|
4361
|
+
/**
|
|
4362
|
+
* Returns the iterator method function contained on the iterable object.
|
|
4363
|
+
*
|
|
4364
|
+
* Be sure to invoke the function with the iterable as context:
|
|
4365
|
+
*
|
|
4366
|
+
* var iteratorFn = getIteratorFn(myIterable);
|
|
4367
|
+
* if (iteratorFn) {
|
|
4368
|
+
* var iterator = iteratorFn.call(myIterable);
|
|
4369
|
+
* ...
|
|
4370
|
+
* }
|
|
4371
|
+
*
|
|
4372
|
+
* @param {?object} maybeIterable
|
|
4373
|
+
* @return {?function}
|
|
4374
|
+
*/
|
|
4375
|
+
function getIteratorFn(maybeIterable) {
|
|
4376
|
+
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
4377
|
+
if (typeof iteratorFn === 'function') {
|
|
4378
|
+
return iteratorFn;
|
|
4379
|
+
}
|
|
4380
|
+
}
|
|
4381
|
+
|
|
4382
|
+
/**
|
|
4383
|
+
* Collection of methods that allow declaration and validation of props that are
|
|
4384
|
+
* supplied to React components. Example usage:
|
|
4385
|
+
*
|
|
4386
|
+
* var Props = require('ReactPropTypes');
|
|
4387
|
+
* var MyArticle = React.createClass({
|
|
4388
|
+
* propTypes: {
|
|
4389
|
+
* // An optional string prop named "description".
|
|
4390
|
+
* description: Props.string,
|
|
4391
|
+
*
|
|
4392
|
+
* // A required enum prop named "category".
|
|
4393
|
+
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
4394
|
+
*
|
|
4395
|
+
* // A prop named "dialog" that requires an instance of Dialog.
|
|
4396
|
+
* dialog: Props.instanceOf(Dialog).isRequired
|
|
4397
|
+
* },
|
|
4398
|
+
* render: function() { ... }
|
|
4399
|
+
* });
|
|
4400
|
+
*
|
|
4401
|
+
* A more formal specification of how these methods are used:
|
|
4402
|
+
*
|
|
4403
|
+
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
4404
|
+
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
4405
|
+
*
|
|
4406
|
+
* Each and every declaration produces a function with the same signature. This
|
|
4407
|
+
* allows the creation of custom validation functions. For example:
|
|
4408
|
+
*
|
|
4409
|
+
* var MyLink = React.createClass({
|
|
4410
|
+
* propTypes: {
|
|
4411
|
+
* // An optional string or URI prop named "href".
|
|
4412
|
+
* href: function(props, propName, componentName) {
|
|
4413
|
+
* var propValue = props[propName];
|
|
4414
|
+
* if (propValue != null && typeof propValue !== 'string' &&
|
|
4415
|
+
* !(propValue instanceof URI)) {
|
|
4416
|
+
* return new Error(
|
|
4417
|
+
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
4418
|
+
* componentName
|
|
4419
|
+
* );
|
|
4420
|
+
* }
|
|
4421
|
+
* }
|
|
4422
|
+
* },
|
|
4423
|
+
* render: function() {...}
|
|
4424
|
+
* });
|
|
4425
|
+
*
|
|
4426
|
+
* @internal
|
|
4427
|
+
*/
|
|
4428
|
+
|
|
4429
|
+
var ANONYMOUS = '<<anonymous>>';
|
|
4430
|
+
|
|
4431
|
+
// Important!
|
|
4432
|
+
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
4433
|
+
var ReactPropTypes = {
|
|
4434
|
+
array: createPrimitiveTypeChecker('array'),
|
|
4435
|
+
bigint: createPrimitiveTypeChecker('bigint'),
|
|
4436
|
+
bool: createPrimitiveTypeChecker('boolean'),
|
|
4437
|
+
func: createPrimitiveTypeChecker('function'),
|
|
4438
|
+
number: createPrimitiveTypeChecker('number'),
|
|
4439
|
+
object: createPrimitiveTypeChecker('object'),
|
|
4440
|
+
string: createPrimitiveTypeChecker('string'),
|
|
4441
|
+
symbol: createPrimitiveTypeChecker('symbol'),
|
|
4442
|
+
any: createAnyTypeChecker(),
|
|
4443
|
+
arrayOf: createArrayOfTypeChecker,
|
|
4444
|
+
element: createElementTypeChecker(),
|
|
4445
|
+
elementType: createElementTypeTypeChecker(),
|
|
4446
|
+
instanceOf: createInstanceTypeChecker,
|
|
4447
|
+
node: createNodeChecker(),
|
|
4448
|
+
objectOf: createObjectOfTypeChecker,
|
|
4449
|
+
oneOf: createEnumTypeChecker,
|
|
4450
|
+
oneOfType: createUnionTypeChecker,
|
|
4451
|
+
shape: createShapeTypeChecker,
|
|
4452
|
+
exact: createStrictShapeTypeChecker
|
|
4453
|
+
};
|
|
4454
|
+
|
|
4455
|
+
/**
|
|
4456
|
+
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
4457
|
+
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
4458
|
+
*/
|
|
4459
|
+
/*eslint-disable no-self-compare*/
|
|
4460
|
+
function is(x, y) {
|
|
4461
|
+
// SameValue algorithm
|
|
4462
|
+
if (x === y) {
|
|
4463
|
+
// Steps 1-5, 7-10
|
|
4464
|
+
// Steps 6.b-6.e: +0 != -0
|
|
4465
|
+
return x !== 0 || 1 / x === 1 / y;
|
|
4466
|
+
} else {
|
|
4467
|
+
// Step 6.a: NaN == NaN
|
|
4468
|
+
return x !== x && y !== y;
|
|
4469
|
+
}
|
|
4470
|
+
}
|
|
4471
|
+
/*eslint-enable no-self-compare*/
|
|
4472
|
+
|
|
4473
|
+
/**
|
|
4474
|
+
* We use an Error-like object for backward compatibility as people may call
|
|
4475
|
+
* PropTypes directly and inspect their output. However, we don't use real
|
|
4476
|
+
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
4477
|
+
* is prohibitively expensive if they are created too often, such as what
|
|
4478
|
+
* happens in oneOfType() for any type before the one that matched.
|
|
4479
|
+
*/
|
|
4480
|
+
function PropTypeError(message, data) {
|
|
4481
|
+
this.message = message;
|
|
4482
|
+
this.data = data && typeof data === 'object' ? data : {};
|
|
4483
|
+
this.stack = '';
|
|
4484
|
+
}
|
|
4485
|
+
// Make `instanceof Error` still work for returned errors.
|
|
4486
|
+
PropTypeError.prototype = Error.prototype;
|
|
4487
|
+
function createChainableTypeChecker(validate) {
|
|
4488
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4489
|
+
var manualPropTypeCallCache = {};
|
|
4490
|
+
var manualPropTypeWarningCount = 0;
|
|
4491
|
+
}
|
|
4492
|
+
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
4493
|
+
componentName = componentName || ANONYMOUS;
|
|
4494
|
+
propFullName = propFullName || propName;
|
|
4495
|
+
if (secret !== ReactPropTypesSecret) {
|
|
4496
|
+
if (throwOnDirectAccess) {
|
|
4497
|
+
// New behavior only for users of `prop-types` package
|
|
4498
|
+
var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use `PropTypes.checkPropTypes()` to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
|
|
4499
|
+
err.name = 'Invariant Violation';
|
|
4500
|
+
throw err;
|
|
4501
|
+
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
4502
|
+
// Old behavior for people using React.PropTypes
|
|
4503
|
+
var cacheKey = componentName + ':' + propName;
|
|
4504
|
+
if (!manualPropTypeCallCache[cacheKey] &&
|
|
4505
|
+
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
4506
|
+
manualPropTypeWarningCount < 3) {
|
|
4507
|
+
printWarning('You are manually calling a React.PropTypes validation ' + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + 'and will throw in the standalone `prop-types` package. ' + 'You may be seeing this warning due to a third-party PropTypes ' + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.');
|
|
4508
|
+
manualPropTypeCallCache[cacheKey] = true;
|
|
4509
|
+
manualPropTypeWarningCount++;
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4512
|
+
}
|
|
4513
|
+
if (props[propName] == null) {
|
|
4514
|
+
if (isRequired) {
|
|
4515
|
+
if (props[propName] === null) {
|
|
4516
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
4517
|
+
}
|
|
4518
|
+
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
4519
|
+
}
|
|
4520
|
+
return null;
|
|
4521
|
+
} else {
|
|
4522
|
+
return validate(props, propName, componentName, location, propFullName);
|
|
4523
|
+
}
|
|
4524
|
+
}
|
|
4525
|
+
var chainedCheckType = checkType.bind(null, false);
|
|
4526
|
+
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
4527
|
+
return chainedCheckType;
|
|
4528
|
+
}
|
|
4529
|
+
function createPrimitiveTypeChecker(expectedType) {
|
|
4530
|
+
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
4531
|
+
var propValue = props[propName];
|
|
4532
|
+
var propType = getPropType(propValue);
|
|
4533
|
+
if (propType !== expectedType) {
|
|
4534
|
+
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
4535
|
+
// check, but we can offer a more precise error message here rather than
|
|
4536
|
+
// 'of type `object`'.
|
|
4537
|
+
var preciseType = getPreciseType(propValue);
|
|
4538
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
|
|
4539
|
+
expectedType: expectedType
|
|
4540
|
+
});
|
|
4541
|
+
}
|
|
4542
|
+
return null;
|
|
4543
|
+
}
|
|
4544
|
+
return createChainableTypeChecker(validate);
|
|
4545
|
+
}
|
|
4546
|
+
function createAnyTypeChecker() {
|
|
4547
|
+
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
4548
|
+
}
|
|
4549
|
+
function createArrayOfTypeChecker(typeChecker) {
|
|
4550
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4551
|
+
if (typeof typeChecker !== 'function') {
|
|
4552
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
4553
|
+
}
|
|
4554
|
+
var propValue = props[propName];
|
|
4555
|
+
if (!Array.isArray(propValue)) {
|
|
4556
|
+
var propType = getPropType(propValue);
|
|
4557
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
4558
|
+
}
|
|
4559
|
+
for (var i = 0; i < propValue.length; i++) {
|
|
4560
|
+
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
|
|
4561
|
+
if (error instanceof Error) {
|
|
4562
|
+
return error;
|
|
4563
|
+
}
|
|
4564
|
+
}
|
|
4565
|
+
return null;
|
|
4566
|
+
}
|
|
4567
|
+
return createChainableTypeChecker(validate);
|
|
4568
|
+
}
|
|
4569
|
+
function createElementTypeChecker() {
|
|
4570
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4571
|
+
var propValue = props[propName];
|
|
4572
|
+
if (!isValidElement(propValue)) {
|
|
4573
|
+
var propType = getPropType(propValue);
|
|
4574
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
4575
|
+
}
|
|
4576
|
+
return null;
|
|
4577
|
+
}
|
|
4578
|
+
return createChainableTypeChecker(validate);
|
|
4579
|
+
}
|
|
4580
|
+
function createElementTypeTypeChecker() {
|
|
4581
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4582
|
+
var propValue = props[propName];
|
|
4583
|
+
if (!ReactIs.isValidElementType(propValue)) {
|
|
4584
|
+
var propType = getPropType(propValue);
|
|
4585
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
4586
|
+
}
|
|
4587
|
+
return null;
|
|
4588
|
+
}
|
|
4589
|
+
return createChainableTypeChecker(validate);
|
|
4590
|
+
}
|
|
4591
|
+
function createInstanceTypeChecker(expectedClass) {
|
|
4592
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4593
|
+
if (!(props[propName] instanceof expectedClass)) {
|
|
4594
|
+
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
4595
|
+
var actualClassName = getClassName(props[propName]);
|
|
4596
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
4597
|
+
}
|
|
4598
|
+
return null;
|
|
4599
|
+
}
|
|
4600
|
+
return createChainableTypeChecker(validate);
|
|
4601
|
+
}
|
|
4602
|
+
function createEnumTypeChecker(expectedValues) {
|
|
4603
|
+
if (!Array.isArray(expectedValues)) {
|
|
4604
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4605
|
+
if (arguments.length > 1) {
|
|
4606
|
+
printWarning('Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).');
|
|
4607
|
+
} else {
|
|
4608
|
+
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
4609
|
+
}
|
|
4610
|
+
}
|
|
4611
|
+
return emptyFunctionThatReturnsNull;
|
|
4612
|
+
}
|
|
4613
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4614
|
+
var propValue = props[propName];
|
|
4615
|
+
for (var i = 0; i < expectedValues.length; i++) {
|
|
4616
|
+
if (is(propValue, expectedValues[i])) {
|
|
4617
|
+
return null;
|
|
4618
|
+
}
|
|
4619
|
+
}
|
|
4620
|
+
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
4621
|
+
var type = getPreciseType(value);
|
|
4622
|
+
if (type === 'symbol') {
|
|
4623
|
+
return String(value);
|
|
4624
|
+
}
|
|
4625
|
+
return value;
|
|
4626
|
+
});
|
|
4627
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
4628
|
+
}
|
|
4629
|
+
return createChainableTypeChecker(validate);
|
|
4630
|
+
}
|
|
4631
|
+
function createObjectOfTypeChecker(typeChecker) {
|
|
4632
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4633
|
+
if (typeof typeChecker !== 'function') {
|
|
4634
|
+
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
4635
|
+
}
|
|
4636
|
+
var propValue = props[propName];
|
|
4637
|
+
var propType = getPropType(propValue);
|
|
4638
|
+
if (propType !== 'object') {
|
|
4639
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
4640
|
+
}
|
|
4641
|
+
for (var key in propValue) {
|
|
4642
|
+
if (has(propValue, key)) {
|
|
4643
|
+
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
4644
|
+
if (error instanceof Error) {
|
|
4645
|
+
return error;
|
|
4646
|
+
}
|
|
4647
|
+
}
|
|
4648
|
+
}
|
|
4649
|
+
return null;
|
|
4650
|
+
}
|
|
4651
|
+
return createChainableTypeChecker(validate);
|
|
4652
|
+
}
|
|
4653
|
+
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
4654
|
+
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
4655
|
+
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
4656
|
+
return emptyFunctionThatReturnsNull;
|
|
4657
|
+
}
|
|
4658
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
4659
|
+
var checker = arrayOfTypeCheckers[i];
|
|
4660
|
+
if (typeof checker !== 'function') {
|
|
4661
|
+
printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
|
|
4662
|
+
return emptyFunctionThatReturnsNull;
|
|
4663
|
+
}
|
|
4664
|
+
}
|
|
4665
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4666
|
+
var expectedTypes = [];
|
|
4667
|
+
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
4668
|
+
var checker = arrayOfTypeCheckers[i];
|
|
4669
|
+
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
|
|
4670
|
+
if (checkerResult == null) {
|
|
4671
|
+
return null;
|
|
4672
|
+
}
|
|
4673
|
+
if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
|
|
4674
|
+
expectedTypes.push(checkerResult.data.expectedType);
|
|
4675
|
+
}
|
|
4676
|
+
}
|
|
4677
|
+
var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
|
|
4678
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
|
|
4679
|
+
}
|
|
4680
|
+
return createChainableTypeChecker(validate);
|
|
4681
|
+
}
|
|
4682
|
+
function createNodeChecker() {
|
|
4683
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4684
|
+
if (!isNode(props[propName])) {
|
|
4685
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
4686
|
+
}
|
|
4687
|
+
return null;
|
|
4688
|
+
}
|
|
4689
|
+
return createChainableTypeChecker(validate);
|
|
4690
|
+
}
|
|
4691
|
+
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
4692
|
+
return new PropTypeError((componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.');
|
|
4693
|
+
}
|
|
4694
|
+
function createShapeTypeChecker(shapeTypes) {
|
|
4695
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4696
|
+
var propValue = props[propName];
|
|
4697
|
+
var propType = getPropType(propValue);
|
|
4698
|
+
if (propType !== 'object') {
|
|
4699
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
4700
|
+
}
|
|
4701
|
+
for (var key in shapeTypes) {
|
|
4702
|
+
var checker = shapeTypes[key];
|
|
4703
|
+
if (typeof checker !== 'function') {
|
|
4704
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
4705
|
+
}
|
|
4706
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
4707
|
+
if (error) {
|
|
4708
|
+
return error;
|
|
4709
|
+
}
|
|
4710
|
+
}
|
|
4711
|
+
return null;
|
|
4712
|
+
}
|
|
4713
|
+
return createChainableTypeChecker(validate);
|
|
4714
|
+
}
|
|
4715
|
+
function createStrictShapeTypeChecker(shapeTypes) {
|
|
4716
|
+
function validate(props, propName, componentName, location, propFullName) {
|
|
4717
|
+
var propValue = props[propName];
|
|
4718
|
+
var propType = getPropType(propValue);
|
|
4719
|
+
if (propType !== 'object') {
|
|
4720
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
4721
|
+
}
|
|
4722
|
+
// We need to check all keys in case some are required but missing from props.
|
|
4723
|
+
var allKeys = assign({}, props[propName], shapeTypes);
|
|
4724
|
+
for (var key in allKeys) {
|
|
4725
|
+
var checker = shapeTypes[key];
|
|
4726
|
+
if (has(shapeTypes, key) && typeof checker !== 'function') {
|
|
4727
|
+
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
4728
|
+
}
|
|
4729
|
+
if (!checker) {
|
|
4730
|
+
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' '));
|
|
4731
|
+
}
|
|
4732
|
+
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
|
|
4733
|
+
if (error) {
|
|
4734
|
+
return error;
|
|
4735
|
+
}
|
|
4736
|
+
}
|
|
4737
|
+
return null;
|
|
4738
|
+
}
|
|
4739
|
+
return createChainableTypeChecker(validate);
|
|
4740
|
+
}
|
|
4741
|
+
function isNode(propValue) {
|
|
4742
|
+
switch (typeof propValue) {
|
|
4743
|
+
case 'number':
|
|
4744
|
+
case 'string':
|
|
4745
|
+
case 'undefined':
|
|
4746
|
+
return true;
|
|
4747
|
+
case 'boolean':
|
|
4748
|
+
return !propValue;
|
|
4749
|
+
case 'object':
|
|
4750
|
+
if (Array.isArray(propValue)) {
|
|
4751
|
+
return propValue.every(isNode);
|
|
4752
|
+
}
|
|
4753
|
+
if (propValue === null || isValidElement(propValue)) {
|
|
4754
|
+
return true;
|
|
4755
|
+
}
|
|
4756
|
+
var iteratorFn = getIteratorFn(propValue);
|
|
4757
|
+
if (iteratorFn) {
|
|
4758
|
+
var iterator = iteratorFn.call(propValue);
|
|
4759
|
+
var step;
|
|
4760
|
+
if (iteratorFn !== propValue.entries) {
|
|
4761
|
+
while (!(step = iterator.next()).done) {
|
|
4762
|
+
if (!isNode(step.value)) {
|
|
4763
|
+
return false;
|
|
4764
|
+
}
|
|
4765
|
+
}
|
|
4766
|
+
} else {
|
|
4767
|
+
// Iterator will provide entry [k,v] tuples rather than values.
|
|
4768
|
+
while (!(step = iterator.next()).done) {
|
|
4769
|
+
var entry = step.value;
|
|
4770
|
+
if (entry) {
|
|
4771
|
+
if (!isNode(entry[1])) {
|
|
4772
|
+
return false;
|
|
4773
|
+
}
|
|
4774
|
+
}
|
|
4775
|
+
}
|
|
4776
|
+
}
|
|
4777
|
+
} else {
|
|
4778
|
+
return false;
|
|
4779
|
+
}
|
|
4780
|
+
return true;
|
|
4781
|
+
default:
|
|
4782
|
+
return false;
|
|
4783
|
+
}
|
|
4784
|
+
}
|
|
4785
|
+
function isSymbol(propType, propValue) {
|
|
4786
|
+
// Native Symbol.
|
|
4787
|
+
if (propType === 'symbol') {
|
|
4788
|
+
return true;
|
|
4789
|
+
}
|
|
4790
|
+
|
|
4791
|
+
// falsy value can't be a Symbol
|
|
4792
|
+
if (!propValue) {
|
|
4793
|
+
return false;
|
|
4794
|
+
}
|
|
4795
|
+
|
|
4796
|
+
// 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
|
|
4797
|
+
if (propValue['@@toStringTag'] === 'Symbol') {
|
|
4798
|
+
return true;
|
|
4799
|
+
}
|
|
4800
|
+
|
|
4801
|
+
// Fallback for non-spec compliant Symbols which are polyfilled.
|
|
4802
|
+
if (typeof Symbol === 'function' && propValue instanceof Symbol) {
|
|
4803
|
+
return true;
|
|
4804
|
+
}
|
|
4805
|
+
return false;
|
|
4806
|
+
}
|
|
4807
|
+
|
|
4808
|
+
// Equivalent of `typeof` but with special handling for array and regexp.
|
|
4809
|
+
function getPropType(propValue) {
|
|
4810
|
+
var propType = typeof propValue;
|
|
4811
|
+
if (Array.isArray(propValue)) {
|
|
4812
|
+
return 'array';
|
|
4813
|
+
}
|
|
4814
|
+
if (propValue instanceof RegExp) {
|
|
4815
|
+
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
4816
|
+
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
4817
|
+
// passes PropTypes.object.
|
|
4818
|
+
return 'object';
|
|
4819
|
+
}
|
|
4820
|
+
if (isSymbol(propType, propValue)) {
|
|
4821
|
+
return 'symbol';
|
|
4822
|
+
}
|
|
4823
|
+
return propType;
|
|
4824
|
+
}
|
|
4825
|
+
|
|
4826
|
+
// This handles more types than `getPropType`. Only used for error messages.
|
|
4827
|
+
// See `createPrimitiveTypeChecker`.
|
|
4828
|
+
function getPreciseType(propValue) {
|
|
4829
|
+
if (typeof propValue === 'undefined' || propValue === null) {
|
|
4830
|
+
return '' + propValue;
|
|
4831
|
+
}
|
|
4832
|
+
var propType = getPropType(propValue);
|
|
4833
|
+
if (propType === 'object') {
|
|
4834
|
+
if (propValue instanceof Date) {
|
|
4835
|
+
return 'date';
|
|
4836
|
+
} else if (propValue instanceof RegExp) {
|
|
4837
|
+
return 'regexp';
|
|
4838
|
+
}
|
|
4839
|
+
}
|
|
4840
|
+
return propType;
|
|
4841
|
+
}
|
|
4842
|
+
|
|
4843
|
+
// Returns a string that is postfixed to a warning about an invalid type.
|
|
4844
|
+
// For example, "undefined" or "of type array"
|
|
4845
|
+
function getPostfixForTypeWarning(value) {
|
|
4846
|
+
var type = getPreciseType(value);
|
|
4847
|
+
switch (type) {
|
|
4848
|
+
case 'array':
|
|
4849
|
+
case 'object':
|
|
4850
|
+
return 'an ' + type;
|
|
4851
|
+
case 'boolean':
|
|
4852
|
+
case 'date':
|
|
4853
|
+
case 'regexp':
|
|
4854
|
+
return 'a ' + type;
|
|
4855
|
+
default:
|
|
4856
|
+
return type;
|
|
4857
|
+
}
|
|
4858
|
+
}
|
|
4859
|
+
|
|
4860
|
+
// Returns class name of the object, if any.
|
|
4861
|
+
function getClassName(propValue) {
|
|
4862
|
+
if (!propValue.constructor || !propValue.constructor.name) {
|
|
4863
|
+
return ANONYMOUS;
|
|
4864
|
+
}
|
|
4865
|
+
return propValue.constructor.name;
|
|
4866
|
+
}
|
|
4867
|
+
ReactPropTypes.checkPropTypes = checkPropTypes;
|
|
4868
|
+
ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
|
|
4869
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
4870
|
+
return ReactPropTypes;
|
|
4871
|
+
};
|
|
4872
|
+
return factoryWithTypeCheckers$1;
|
|
4873
|
+
}
|
|
4874
|
+
|
|
4875
|
+
/**
|
|
4876
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4877
|
+
*
|
|
4878
|
+
* This source code is licensed under the MIT license found in the
|
|
4879
|
+
* LICENSE file in the root directory of this source tree.
|
|
4880
|
+
*/
|
|
4881
|
+
|
|
4882
|
+
var factoryWithThrowingShims$1;
|
|
4883
|
+
var hasRequiredFactoryWithThrowingShims$1;
|
|
4884
|
+
function requireFactoryWithThrowingShims$1() {
|
|
4885
|
+
if (hasRequiredFactoryWithThrowingShims$1) return factoryWithThrowingShims$1;
|
|
4886
|
+
hasRequiredFactoryWithThrowingShims$1 = 1;
|
|
4887
|
+
var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$1();
|
|
4888
|
+
function emptyFunction() {}
|
|
4889
|
+
function emptyFunctionWithReset() {}
|
|
4890
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
4891
|
+
factoryWithThrowingShims$1 = function () {
|
|
4892
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
4893
|
+
if (secret === ReactPropTypesSecret) {
|
|
4894
|
+
// It is still safe when called from React.
|
|
4895
|
+
return;
|
|
4896
|
+
}
|
|
4897
|
+
var err = new Error('Calling PropTypes validators directly is not supported by the `prop-types` package. ' + 'Use PropTypes.checkPropTypes() to call them. ' + 'Read more at http://fb.me/use-check-prop-types');
|
|
4898
|
+
err.name = 'Invariant Violation';
|
|
4899
|
+
throw err;
|
|
4900
|
+
}
|
|
4901
|
+
shim.isRequired = shim;
|
|
4902
|
+
function getShim() {
|
|
4903
|
+
return shim;
|
|
4904
|
+
} // Important!
|
|
4905
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
4906
|
+
var ReactPropTypes = {
|
|
4907
|
+
array: shim,
|
|
4908
|
+
bigint: shim,
|
|
4909
|
+
bool: shim,
|
|
4910
|
+
func: shim,
|
|
4911
|
+
number: shim,
|
|
4912
|
+
object: shim,
|
|
4913
|
+
string: shim,
|
|
4914
|
+
symbol: shim,
|
|
4915
|
+
any: shim,
|
|
4916
|
+
arrayOf: getShim,
|
|
4917
|
+
element: shim,
|
|
4918
|
+
elementType: shim,
|
|
4919
|
+
instanceOf: getShim,
|
|
4920
|
+
node: shim,
|
|
4921
|
+
objectOf: getShim,
|
|
4922
|
+
oneOf: getShim,
|
|
4923
|
+
oneOfType: getShim,
|
|
4924
|
+
shape: getShim,
|
|
4925
|
+
exact: getShim,
|
|
4926
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
4927
|
+
resetWarningCache: emptyFunction
|
|
4928
|
+
};
|
|
4929
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
4930
|
+
return ReactPropTypes;
|
|
4931
|
+
};
|
|
4932
|
+
return factoryWithThrowingShims$1;
|
|
4933
|
+
}
|
|
4934
|
+
|
|
4935
|
+
/**
|
|
4936
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
4937
|
+
*
|
|
4938
|
+
* This source code is licensed under the MIT license found in the
|
|
4939
|
+
* LICENSE file in the root directory of this source tree.
|
|
4940
|
+
*/
|
|
4941
|
+
|
|
4942
|
+
var hasRequiredPropTypes$1;
|
|
4943
|
+
function requirePropTypes$1() {
|
|
4944
|
+
if (hasRequiredPropTypes$1) return propTypes$1.exports;
|
|
4945
|
+
hasRequiredPropTypes$1 = 1;
|
|
4946
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
4947
|
+
var ReactIs = requireReactIs$1();
|
|
4948
|
+
|
|
4949
|
+
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
4950
|
+
// http://fb.me/prop-types-in-prod
|
|
4951
|
+
var throwOnDirectAccess = true;
|
|
4952
|
+
propTypes$1.exports = /*@__PURE__*/requireFactoryWithTypeCheckers$1()(ReactIs.isElement, throwOnDirectAccess);
|
|
4953
|
+
} else {
|
|
4954
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
4955
|
+
// http://fb.me/prop-types-in-prod
|
|
4956
|
+
propTypes$1.exports = /*@__PURE__*/requireFactoryWithThrowingShims$1()();
|
|
4957
|
+
}
|
|
4958
|
+
return propTypes$1.exports;
|
|
4959
|
+
}
|
|
4960
|
+
var propTypesExports$1 = /*@__PURE__*/requirePropTypes$1();
|
|
4961
|
+
var PropTypes$1 = /*@__PURE__*/getDefaultExportFromCjs$1(propTypesExports$1);
|
|
4962
|
+
({
|
|
4963
|
+
onPowerOff: PropTypes$1.func,
|
|
4964
|
+
onRestart: PropTypes$1.func,
|
|
4965
|
+
powerOffLabel: PropTypes$1.string,
|
|
4966
|
+
restartLabel: PropTypes$1.string,
|
|
4967
|
+
iconClassName: PropTypes$1.string,
|
|
4968
|
+
confirmTitle: PropTypes$1.string,
|
|
4969
|
+
cancelText: PropTypes$1.string,
|
|
4970
|
+
okText: PropTypes$1.string,
|
|
4971
|
+
run: PropTypes$1.func
|
|
4972
|
+
});
|
|
4973
|
+
({
|
|
4974
|
+
logoUrl: PropTypes$1.string,
|
|
4975
|
+
logoWidth: PropTypes$1.number,
|
|
4976
|
+
logoAlt: PropTypes$1.string,
|
|
4977
|
+
onClick: PropTypes$1.func
|
|
4978
|
+
});
|
|
4979
|
+
|
|
4980
|
+
// PropTypes 类型检查
|
|
4981
|
+
({
|
|
4982
|
+
menuElement: PropTypes$1.node,
|
|
4983
|
+
productInfo: PropTypes$1.shape({
|
|
4984
|
+
productName: PropTypes$1.string,
|
|
4985
|
+
version: PropTypes$1.string
|
|
4986
|
+
}),
|
|
4987
|
+
showLogo: PropTypes$1.bool,
|
|
4988
|
+
showProductInfo: PropTypes$1.bool,
|
|
4989
|
+
showHardwareUsage: PropTypes$1.bool,
|
|
4990
|
+
showSystemOperations: PropTypes$1.bool,
|
|
4991
|
+
onPowerOff: PropTypes$1.func,
|
|
4992
|
+
onRestart: PropTypes$1.func,
|
|
4993
|
+
onRun: PropTypes$1.func,
|
|
4994
|
+
hardwareMonitorUrl: PropTypes$1.string,
|
|
4995
|
+
getSocketUrl: PropTypes$1.func,
|
|
4996
|
+
logoProps: PropTypes$1.object,
|
|
4997
|
+
className: PropTypes$1.string,
|
|
4998
|
+
style: PropTypes$1.object
|
|
4999
|
+
});
|
|
3800
5000
|
function getDefaultExportFromCjs(x) {
|
|
3801
5001
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
3802
5002
|
}
|
|
@@ -5050,7 +6250,7 @@ const NmosModal = _ref => {
|
|
|
5050
6250
|
const values = await form.getFieldsValue();
|
|
5051
6251
|
setLoading(true);
|
|
5052
6252
|
try {
|
|
5053
|
-
const response = await updateNmosSettings(_objectSpread2
|
|
6253
|
+
const response = await updateNmosSettings(_objectSpread2(_objectSpread2({}, nmosSettings), values));
|
|
5054
6254
|
if (response) {
|
|
5055
6255
|
message.success('Success');
|
|
5056
6256
|
setTimeout(() => {
|
|
@@ -5063,7 +6263,7 @@ const NmosModal = _ref => {
|
|
|
5063
6263
|
setLoading(false);
|
|
5064
6264
|
}
|
|
5065
6265
|
};
|
|
5066
|
-
return /*#__PURE__*/jsx(StyledModal$
|
|
6266
|
+
return /*#__PURE__*/jsx(StyledModal$3, _objectSpread2(_objectSpread2({
|
|
5067
6267
|
title: "NMOS",
|
|
5068
6268
|
width: 650,
|
|
5069
6269
|
open: open,
|
|
@@ -5072,7 +6272,7 @@ const NmosModal = _ref => {
|
|
|
5072
6272
|
confirmLoading: loading,
|
|
5073
6273
|
destroyOnClose: true // 关闭时销毁组件,确保下次打开重新初始化
|
|
5074
6274
|
}, modalProps), {}, {
|
|
5075
|
-
children: /*#__PURE__*/jsxs(Form, _objectSpread2
|
|
6275
|
+
children: /*#__PURE__*/jsxs(Form, _objectSpread2(_objectSpread2({
|
|
5076
6276
|
form: form,
|
|
5077
6277
|
name: "nmosForm",
|
|
5078
6278
|
labelCol: {
|
|
@@ -5108,7 +6308,7 @@ const NmosModal = _ref => {
|
|
|
5108
6308
|
}), /*#__PURE__*/jsx(Form.Item, {
|
|
5109
6309
|
label: "Registry Port",
|
|
5110
6310
|
name: "registration_port",
|
|
5111
|
-
children: /*#__PURE__*/jsx(InputNumber, _objectSpread2
|
|
6311
|
+
children: /*#__PURE__*/jsx(InputNumber, _objectSpread2(_objectSpread2({}, numberProps), {}, {
|
|
5112
6312
|
min: 0,
|
|
5113
6313
|
max: 65535,
|
|
5114
6314
|
style: {
|
|
@@ -5137,7 +6337,7 @@ const NmosModal = _ref => {
|
|
|
5137
6337
|
}), /*#__PURE__*/jsx(Form.Item, {
|
|
5138
6338
|
label: "Logging Level",
|
|
5139
6339
|
name: "logging_level",
|
|
5140
|
-
children: /*#__PURE__*/jsx(InputNumber, _objectSpread2
|
|
6340
|
+
children: /*#__PURE__*/jsx(InputNumber, _objectSpread2(_objectSpread2({}, numberProps), {}, {
|
|
5141
6341
|
min: -40,
|
|
5142
6342
|
max: 40,
|
|
5143
6343
|
style: {
|
|
@@ -5245,7 +6445,7 @@ function DraggableNumberInput(_ref2) {
|
|
|
5245
6445
|
// 新增 disabled 属性
|
|
5246
6446
|
style
|
|
5247
6447
|
} = _ref2,
|
|
5248
|
-
restProps = _objectWithoutProperties
|
|
6448
|
+
restProps = _objectWithoutProperties(_ref2, _excluded);
|
|
5249
6449
|
const inputRef = useRef(null);
|
|
5250
6450
|
const [isMouseDown, setIsMouseDown] = useState(false);
|
|
5251
6451
|
const [isDragging, setIsDragging] = useState(false);
|
|
@@ -5354,7 +6554,7 @@ function DraggableNumberInput(_ref2) {
|
|
|
5354
6554
|
applyMovement(totalMovement.current, e);
|
|
5355
6555
|
}, [isMouseDown, disabled]);
|
|
5356
6556
|
const getModifiers = useCallback(e => {
|
|
5357
|
-
const mods = _objectSpread2
|
|
6557
|
+
const mods = _objectSpread2(_objectSpread2({}, defaultModifiers), modifierKeys);
|
|
5358
6558
|
for (const key in mods) {
|
|
5359
6559
|
if (key !== "default" && e[key]) {
|
|
5360
6560
|
currentMultiplier.current = mods[key].multiplier;
|
|
@@ -5470,7 +6670,7 @@ function DraggableNumberInput(_ref2) {
|
|
|
5470
6670
|
background: 'rgba(255, 255, 255, 0.08)',
|
|
5471
6671
|
color: 'rgba(255, 255, 255, 0.25)'
|
|
5472
6672
|
} : {};
|
|
5473
|
-
return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement("input", _objectSpread2
|
|
6673
|
+
return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement("input", _objectSpread2({
|
|
5474
6674
|
ref: inputRef,
|
|
5475
6675
|
type: "text",
|
|
5476
6676
|
inputMode: "numeric",
|
|
@@ -5484,7 +6684,7 @@ function DraggableNumberInput(_ref2) {
|
|
|
5484
6684
|
disabled: disabled,
|
|
5485
6685
|
// 添加 disabled 属性
|
|
5486
6686
|
className: "draggable-number-input ".concat(className, " ").concat(isDragging ? "dragging" : "", " ").concat(disabled ? "disabled" : ""),
|
|
5487
|
-
style: _objectSpread2
|
|
6687
|
+
style: _objectSpread2(_objectSpread2(_objectSpread2({}, {
|
|
5488
6688
|
cursor: disabled ? 'not-allowed' : 'ew-resize',
|
|
5489
6689
|
userSelect: disabled ? 'none' : 'auto',
|
|
5490
6690
|
caretColor: isDragging ? "transparent" : "initial"
|
|
@@ -5494,5 +6694,5 @@ function DraggableNumberInput(_ref2) {
|
|
|
5494
6694
|
}));
|
|
5495
6695
|
}
|
|
5496
6696
|
|
|
5497
|
-
export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, NetworkSettingsModal$1 as NetworkSettingsModal, NmosModal$1 as NmosModal, PresetModal, PtpModal$1 as PtpModal, StyledModal$
|
|
6697
|
+
export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, NetworkSettingsModal$1 as NetworkSettingsModal, NmosModal$1 as NmosModal, PresetModal, PtpModal$1 as PtpModal, StyledModal$1 as StyledModal, SystemOperations$1 as SystemOperations, UpgradeManager$1 as UpgradeManager, useAuth, useHardwareUsage$1 as useHardwareUsage, useSystemOperations$1 as useSystemOperations, useUpgrade$1 as useUpgrade };
|
|
5498
6698
|
//# sourceMappingURL=index.esm.js.map
|