seeder-st2110-components 1.7.9 → 1.7.11

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 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(e, r, t) {
9
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
8
+ function _defineProperty$1(e, r, t) {
9
+ return (r = _toPropertyKey$1(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(e, r) {
16
+ function ownKeys$1(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(e, r) {
23
23
  }
24
24
  return t;
25
25
  }
26
- function _objectSpread2(e) {
26
+ function _objectSpread2$1(e) {
27
27
  for (var r = 1; r < arguments.length; r++) {
28
28
  var t = null != arguments[r] ? arguments[r] : {};
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) {
29
+ r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) {
30
+ _defineProperty$1(e, r, t[r]);
31
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(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(e, t) {
37
+ function _objectWithoutProperties$1(e, t) {
38
38
  if (null == e) return {};
39
39
  var o,
40
40
  r,
41
- i = _objectWithoutPropertiesLoose(e, t);
41
+ i = _objectWithoutPropertiesLoose$1(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(r, e) {
48
+ function _objectWithoutPropertiesLoose$1(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(r, e) {
54
54
  }
55
55
  return t;
56
56
  }
57
- function _toPrimitive(t, r) {
57
+ function _toPrimitive$1(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(t, r) {
64
64
  }
65
65
  return ("string" === r ? String : Number)(t);
66
66
  }
67
- function _toPropertyKey(t) {
68
- var i = _toPrimitive(t, "string");
67
+ function _toPropertyKey$1(t) {
68
+ var i = _toPrimitive$1(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(_objectSpread2({}, prev), message));
115
+ setSystemStatus(prev => _objectSpread2$1(_objectSpread2$1({}, 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(_objectSpread2({}, createMetricItem('Memory Usage', 'seeder-icon-shiyongshuai', details.mem_usage, '%')), {}, {
210
+ items.push(_objectSpread2$1(_objectSpread2$1({}, 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$3 = ["width", "okText", "cancelText", "styles"];
255
- const StyledModal = props => {
254
+ const _excluded$4 = ["width", "okText", "cancelText", "styles"];
255
+ const StyledModal$2 = 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(props, _excluded$3);
262
+ restProps = _objectWithoutProperties$1(props, _excluded$4);
263
263
 
264
264
  // 基础样式配置
265
265
  const baseStyles = {
@@ -287,15 +287,15 @@ const StyledModal = props => {
287
287
  };
288
288
 
289
289
  // 合并样式
290
- const styles = _objectSpread2(_objectSpread2({}, baseStyles), propStyles);
291
- return /*#__PURE__*/jsx(Modal, _objectSpread2({
290
+ const styles = _objectSpread2$1(_objectSpread2$1({}, baseStyles), propStyles);
291
+ return /*#__PURE__*/jsx(Modal, _objectSpread2$1({
292
292
  width: width,
293
293
  okText: okText,
294
294
  cancelText: cancelText,
295
295
  styles: styles
296
296
  }, restProps));
297
297
  };
298
- var StyledModal$1 = StyledModal;
298
+ var StyledModal$3 = StyledModal$2;
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$1, {
338
+ return /*#__PURE__*/jsx(StyledModal$3, {
339
339
  title: title,
340
340
  width: width,
341
341
  open: true,
@@ -928,6 +928,650 @@ const usePageReload = () => {
928
928
  };
929
929
  var usePageReload$1 = usePageReload;
930
930
 
931
+ const getReadyStateText = state => {
932
+ const states = {
933
+ 0: 'CONNECTING',
934
+ 1: 'OPEN',
935
+ 2: 'CLOSING',
936
+ 3: 'CLOSED'
937
+ };
938
+ return states[state] || "UNKNOWN(".concat(state, ")");
939
+ };
940
+
941
+ // 创建空日志器
942
+ const createDummyLogger = () => {
943
+ const dummyFn = () => {};
944
+ return {
945
+ log: dummyFn,
946
+ exportLogs: dummyFn,
947
+ getLogStats: () => ({
948
+ total: 0,
949
+ errors: 0,
950
+ warnings: 0,
951
+ info: 0,
952
+ lastTimestamp: null
953
+ }),
954
+ clearLogs: dummyFn,
955
+ logs: []
956
+ };
957
+ };
958
+
959
+ // 创建通用的日志器
960
+ const createGlobalLogger = function () {
961
+ let webSocketUrl = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
962
+ const logs = [];
963
+ const maxLogs = 1000;
964
+
965
+ // 判断是否为开发环境
966
+ const isDevelopment = process.env.NODE_ENV === 'development';
967
+ const log = function (level, message) {
968
+ let data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
969
+ const timestamp = new Date().toISOString();
970
+ const logEntry = {
971
+ timestamp,
972
+ level,
973
+ message,
974
+ data,
975
+ timestampDisplay: new Date().toLocaleString('zh-CN', {
976
+ year: 'numeric',
977
+ month: '2-digit',
978
+ day: '2-digit',
979
+ hour: '2-digit',
980
+ minute: '2-digit',
981
+ second: '2-digit',
982
+ hour12: false
983
+ })
984
+ };
985
+ logs.push(logEntry);
986
+ if (logs.length > maxLogs) logs.shift();
987
+
988
+ // 只在开发环境下输出到控制台
989
+ if (isDevelopment) {
990
+ const consoleMessage = "[".concat(logEntry.timestampDisplay, "] [WebSocket] [").concat(level, "] ").concat(message);
991
+ const consoleArgs = [consoleMessage];
992
+ if (Object.keys(data).length > 0) consoleArgs.push(data);
993
+ switch (level) {
994
+ case 'ERROR':
995
+ console.error(...consoleArgs);
996
+ break;
997
+ case 'WARN':
998
+ console.warn(...consoleArgs);
999
+ break;
1000
+ case 'INFO':
1001
+ console.info(...consoleArgs);
1002
+ break;
1003
+ default:
1004
+ console.log(...consoleArgs);
1005
+ }
1006
+ }
1007
+ return logEntry;
1008
+ };
1009
+ const exportLogs = function () {
1010
+ let filenamePrefix = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'websocket';
1011
+ if (logs.length === 0) {
1012
+ log('WARN', '没有日志可导出', {
1013
+ filenamePrefix
1014
+ });
1015
+ return;
1016
+ }
1017
+ const logText = logs.map(entry => "[".concat(entry.timestampDisplay, "] [").concat(entry.level, "] ").concat(entry.message, "\n\u6570\u636E: ").concat(JSON.stringify(entry.data, null, 2))).join('\n' + '='.repeat(50) + '\n');
1018
+ const blob = new Blob([logText], {
1019
+ type: 'text/plain;charset=utf-8'
1020
+ });
1021
+ const blobUrl = URL.createObjectURL(blob);
1022
+ let hostname = 'unknown';
1023
+ let pathname = 'unknown';
1024
+ try {
1025
+ if (webSocketUrl) {
1026
+ const urlObj = new URL(webSocketUrl.replace(/^ws/, 'http'));
1027
+ hostname = urlObj.hostname.replace(/\./g, '-');
1028
+ pathname = urlObj.pathname.replace(/\//g, '-').replace(/^-|-$/g, '') || 'root';
1029
+ }
1030
+ } catch (error) {
1031
+ console.warn('无法解析WebSocket URL:', error);
1032
+ }
1033
+ const readableTime = new Date().toLocaleString('zh-CN', {
1034
+ year: 'numeric',
1035
+ month: '2-digit',
1036
+ day: '2-digit',
1037
+ hour: '2-digit',
1038
+ minute: '2-digit',
1039
+ second: '2-digit',
1040
+ hour12: false
1041
+ }).replace(/[\/:\s]/g, '-');
1042
+ const filename = "".concat(filenamePrefix, "-").concat(hostname, "-").concat(pathname, "-").concat(readableTime, ".log");
1043
+ const a = document.createElement('a');
1044
+ a.href = blobUrl;
1045
+ a.download = filename;
1046
+ document.body.appendChild(a);
1047
+ a.click();
1048
+ document.body.removeChild(a);
1049
+ URL.revokeObjectURL(blobUrl);
1050
+ log('INFO', '日志文件已导出', {
1051
+ count: logs.length,
1052
+ filename
1053
+ });
1054
+ };
1055
+ const getLogStats = () => {
1056
+ var _logs;
1057
+ return {
1058
+ total: logs.length,
1059
+ errors: logs.filter(l => l.level === 'ERROR').length,
1060
+ warnings: logs.filter(l => l.level === 'WARN').length,
1061
+ info: logs.filter(l => l.level === 'INFO').length,
1062
+ lastTimestamp: (_logs = logs[logs.length - 1]) === null || _logs === void 0 ? void 0 : _logs.timestampDisplay
1063
+ };
1064
+ };
1065
+ const clearLogs = () => {
1066
+ logs.length = 0;
1067
+ log('INFO', '日志已清空');
1068
+ };
1069
+ return {
1070
+ log,
1071
+ exportLogs,
1072
+ getLogStats,
1073
+ clearLogs,
1074
+ logs
1075
+ };
1076
+ };
1077
+
1078
+ // 心跳管理器
1079
+ const useHeartbeat = function (sendMessage, readyState, config, logger) {
1080
+ let enabled = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : true;
1081
+ const heartbeatTimerRef = useRef(null);
1082
+ const lastHeartbeatTimeRef = useRef(Date.now());
1083
+ const isMountedRef = useRef(true);
1084
+ const configRef = useRef({
1085
+ interval: (config === null || config === void 0 ? void 0 : config.interval) || 20000,
1086
+ message: (config === null || config === void 0 ? void 0 : config.message) || {
1087
+ type: 'ping'
1088
+ }
1089
+ });
1090
+ const stateRef = useRef({
1091
+ sendMessage,
1092
+ readyState,
1093
+ enabled
1094
+ });
1095
+ useEffect(() => {
1096
+ configRef.current = {
1097
+ interval: (config === null || config === void 0 ? void 0 : config.interval) || 20000,
1098
+ message: (config === null || config === void 0 ? void 0 : config.message) || {
1099
+ type: 'ping'
1100
+ }
1101
+ };
1102
+ }, [config === null || config === void 0 ? void 0 : config.interval, config === null || config === void 0 ? void 0 : config.message]);
1103
+ useEffect(() => {
1104
+ stateRef.current = {
1105
+ sendMessage,
1106
+ readyState,
1107
+ enabled
1108
+ };
1109
+ }, [sendMessage, readyState, enabled]);
1110
+ useEffect(() => {
1111
+ return () => {
1112
+ isMountedRef.current = false;
1113
+ if (heartbeatTimerRef.current) {
1114
+ clearInterval(heartbeatTimerRef.current);
1115
+ }
1116
+ };
1117
+ }, []);
1118
+ const stopHeartbeat = useCallback(() => {
1119
+ if (heartbeatTimerRef.current) {
1120
+ clearInterval(heartbeatTimerRef.current);
1121
+ heartbeatTimerRef.current = null;
1122
+ if (stateRef.current.enabled) {
1123
+ logger.log('INFO', '停止心跳机制');
1124
+ }
1125
+ }
1126
+ }, [logger]);
1127
+ const startHeartbeat = useCallback(() => {
1128
+ stopHeartbeat();
1129
+ const currentState = stateRef.current;
1130
+ const currentConfig = configRef.current;
1131
+ if (!currentState.enabled) return;
1132
+ logger.log('INFO', '启动心跳机制', {
1133
+ interval: currentConfig.interval
1134
+ });
1135
+ heartbeatTimerRef.current = setInterval(() => {
1136
+ // 检查组件是否挂载
1137
+ if (!isMountedRef.current || !heartbeatTimerRef.current) {
1138
+ return;
1139
+ }
1140
+
1141
+ // 目的: 总是获取最新的值
1142
+ const latestState = stateRef.current;
1143
+ const latestConfig = configRef.current;
1144
+ if (latestState.sendMessage && latestState.readyState === 1) {
1145
+ try {
1146
+ latestState.sendMessage(JSON.stringify(latestConfig.message));
1147
+ lastHeartbeatTimeRef.current = Date.now();
1148
+ logger.log('DEBUG', '发送心跳包', {
1149
+ timeSinceLastHeartbeat: Date.now() - lastHeartbeatTimeRef.current,
1150
+ readyState: getReadyStateText(latestState.readyState)
1151
+ });
1152
+ } catch (error) {
1153
+ logger.log('ERROR', '发送心跳失败', {
1154
+ error: error.message,
1155
+ readyState: getReadyStateText(latestState.readyState)
1156
+ });
1157
+ }
1158
+ }
1159
+ }, currentConfig.interval);
1160
+ }, [stopHeartbeat, logger]);
1161
+
1162
+ // 自动管理心跳
1163
+ useEffect(() => {
1164
+ const currentState = stateRef.current;
1165
+ if (currentState.enabled) {
1166
+ if (currentState.readyState === 1) {
1167
+ startHeartbeat();
1168
+ } else {
1169
+ stopHeartbeat();
1170
+ }
1171
+ } else {
1172
+ stopHeartbeat();
1173
+ }
1174
+ return () => {
1175
+ if (heartbeatTimerRef.current) {
1176
+ clearInterval(heartbeatTimerRef.current);
1177
+ heartbeatTimerRef.current = null;
1178
+ }
1179
+ };
1180
+ }, [readyState, enabled, startHeartbeat, stopHeartbeat]);
1181
+ const heartbeatImpl = useMemo(() => {
1182
+ if (!enabled) {
1183
+ return {
1184
+ startHeartbeat: () => {},
1185
+ stopHeartbeat: () => {},
1186
+ getLastHeartbeatTime: () => null,
1187
+ isEnabled: false
1188
+ };
1189
+ }
1190
+ return {
1191
+ startHeartbeat,
1192
+ stopHeartbeat,
1193
+ getLastHeartbeatTime: () => lastHeartbeatTimeRef.current,
1194
+ isEnabled: true
1195
+ };
1196
+ }, [enabled, startHeartbeat, stopHeartbeat]);
1197
+ return heartbeatImpl;
1198
+ };
1199
+ const useWebSocketWithFeatures = config => {
1200
+ const {
1201
+ url,
1202
+ options = {},
1203
+ heartbeat: heartbeatConfig = false,
1204
+ enableLog = true
1205
+ } = config;
1206
+ const [isConnected, setIsConnected] = useState(false);
1207
+
1208
+ // 创建 logger 实例
1209
+ const logger = useMemo(() => {
1210
+ if (enableLog) {
1211
+ return createGlobalLogger(url);
1212
+ }
1213
+ return createDummyLogger();
1214
+ }, [url, enableLog]);
1215
+ const websocketOptions = useMemo(() => _objectSpread2$1(_objectSpread2$1({}, options), {}, {
1216
+ onOpen: event => {
1217
+ var _options$onOpen;
1218
+ logger.log('INFO', 'WebSocket 连接成功', {
1219
+ url,
1220
+ readyState: getReadyStateText(1),
1221
+ // 连接成功时 readyState 为 1
1222
+ eventCode: event === null || event === void 0 ? void 0 : event.code
1223
+ });
1224
+ setIsConnected(true);
1225
+ (_options$onOpen = options.onOpen) === null || _options$onOpen === void 0 || _options$onOpen.call(options, event);
1226
+ },
1227
+ onError: error => {
1228
+ var _options$onError;
1229
+ logger.log('ERROR', 'WebSocket 连接错误', {
1230
+ url,
1231
+ error: error.message,
1232
+ errorType: error.type,
1233
+ readyState: getReadyStateText(3) // 错误时 readyState 为 3
1234
+ });
1235
+ setIsConnected(false);
1236
+ (_options$onError = options.onError) === null || _options$onError === void 0 || _options$onError.call(options, error);
1237
+ },
1238
+ onClose: event => {
1239
+ var _options$onClose;
1240
+ logger.log('WARN', 'WebSocket 连接断开', {
1241
+ url,
1242
+ code: event.code,
1243
+ reason: event.reason,
1244
+ wasClean: event.wasClean,
1245
+ readyState: getReadyStateText(3) // 关闭时 readyState 为 3
1246
+ });
1247
+ setIsConnected(false);
1248
+ (_options$onClose = options.onClose) === null || _options$onClose === void 0 || _options$onClose.call(options, event);
1249
+ },
1250
+ onReconnect: count => {
1251
+ var _options$onReconnect;
1252
+ logger.log('INFO', '尝试重新连接', {
1253
+ url,
1254
+ attempt: count,
1255
+ maxAttempts: options.reconnectLimit || 10
1256
+ });
1257
+ (_options$onReconnect = options.onReconnect) === null || _options$onReconnect === void 0 || _options$onReconnect.call(options, count);
1258
+ }
1259
+ }), [url, options, logger]);
1260
+ const {
1261
+ latestMessage,
1262
+ readyState,
1263
+ sendMessage,
1264
+ connect,
1265
+ disconnect
1266
+ } = useWebSocket(url, websocketOptions);
1267
+ const heartbeatOptions = useMemo(() => heartbeatConfig === true ? {} : heartbeatConfig, [heartbeatConfig]);
1268
+ const heartbeatEnabled = useMemo(() => heartbeatConfig !== false, [heartbeatConfig]);
1269
+ const heartbeat = useHeartbeat(sendMessage, readyState, heartbeatOptions, logger, heartbeatEnabled);
1270
+
1271
+ // 在全局暴露日志方法
1272
+ useEffect(() => {
1273
+ if (typeof window !== 'undefined' && enableLog) {
1274
+ // 生成唯一的键名:基于URL进行base64编码
1275
+ const key = "exportWebSocketLogs_".concat(btoa(url));
1276
+ // 在window对象上添加方法
1277
+ window[key] = () => logger.exportLogs();
1278
+ }
1279
+ return () => {
1280
+ if (typeof window !== 'undefined' && enableLog) {
1281
+ const key = "exportWebSocketLogs_".concat(btoa(url));
1282
+ delete window[key];
1283
+ }
1284
+ };
1285
+ }, [url, enableLog, logger]);
1286
+ const loggerMethods = useMemo(() => ({
1287
+ log: (level, message, data) => logger.log(level, message, data),
1288
+ exportLogs: () => logger.exportLogs(),
1289
+ getLogStats: () => logger.getLogStats(),
1290
+ clearLogs: () => logger.clearLogs()
1291
+ }), [logger]);
1292
+ return {
1293
+ latestMessage,
1294
+ readyState,
1295
+ sendMessage,
1296
+ connect,
1297
+ disconnect,
1298
+ isConnected,
1299
+ readyStateText: getReadyStateText(readyState),
1300
+ // 心跳功能
1301
+ heartbeat,
1302
+ // 日志功能
1303
+ logger: enableLog ? loggerMethods : null
1304
+ };
1305
+ };
1306
+ var useWebSocketWithFeatures$1 = useWebSocketWithFeatures;
1307
+
1308
+ // 在控制台中直接查看所有可用的导出方法 Object.keys(window).filter(key => key.startsWith('exportWebSocketLogs_'))
1309
+ // 导出特定连接的日志 window['exportWebSocketLogs_d3M6Ly8xOTIuMTY4LjEyMy4yMDQvd3MvZHZyL3ZpZGVvX3N0YXR1c19jaGFuZ2U=']();
1310
+
1311
+ /**
1312
+ * 国际化调试工具
1313
+ * 在浏览器控制台运行 window.debugI18n() 查看当前国际化状态
1314
+ */
1315
+
1316
+ const debugI18n = () => {
1317
+ var _window$g_initialProp, _window$g_initialProp2, _window$g_initialProp3, _window$g_initialProp4, _window$g_initialProp5, _window$g_initialProp6;
1318
+ if (typeof window === 'undefined') {
1319
+ console.log('[i18n debug] Not in browser environment');
1320
+ return;
1321
+ }
1322
+ console.group('🌍 I18n Debug Information');
1323
+
1324
+ // 1. 当前语言环境
1325
+ console.log('📍 Current Locale Sources:');
1326
+ console.log(' - window.g_initialProps?.locale:', (_window$g_initialProp = window.g_initialProps) === null || _window$g_initialProp === void 0 ? void 0 : _window$g_initialProp.locale);
1327
+ console.log(' - window.g_initialProps?.___g_initialPropsFromServer?.locale:', (_window$g_initialProp2 = window.g_initialProps) === null || _window$g_initialProp2 === void 0 || (_window$g_initialProp2 = _window$g_initialProp2.___g_initialPropsFromServer) === null || _window$g_initialProp2 === void 0 ? void 0 : _window$g_initialProp2.locale);
1328
+ try {
1329
+ console.log(' - localStorage.umi-locale:', localStorage.getItem('umi-locale'));
1330
+ } catch (e) {
1331
+ console.log(' - localStorage: not available');
1332
+ }
1333
+ console.log(' - window.__COMPONENT_LOCALE__:', window.__COMPONENT_LOCALE__);
1334
+
1335
+ // 2. 语言包
1336
+ console.log('\n📦 Available Message Sources:');
1337
+ console.log(' - window.__COMPONENT_I18N_MESSAGES__:', window.__COMPONENT_I18N_MESSAGES__);
1338
+ console.log(' - window.__PROJECT_I18N_MESSAGES__:', window.__PROJECT_I18N_MESSAGES__);
1339
+ console.log(' - window.g_initialProps?.messages:', (_window$g_initialProp3 = window.g_initialProps) === null || _window$g_initialProp3 === void 0 ? void 0 : _window$g_initialProp3.messages);
1340
+
1341
+ // 3. 合并后的语言包
1342
+ const componentMessages = window.__COMPONENT_I18N_MESSAGES__ || {};
1343
+ const projectMessages = window.__PROJECT_I18N_MESSAGES__ || {};
1344
+ const umiMessages = ((_window$g_initialProp4 = window.g_initialProps) === null || _window$g_initialProp4 === void 0 ? void 0 : _window$g_initialProp4.messages) || {};
1345
+ const allLocales = new Set([...Object.keys(componentMessages), ...Object.keys(projectMessages), ...Object.keys(umiMessages)]);
1346
+ console.log('\n🔧 Merged Locales:', Array.from(allLocales));
1347
+ allLocales.forEach(locale => {
1348
+ const merged = _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, umiMessages[locale] || {}), projectMessages[locale] || {}), componentMessages[locale] || {});
1349
+ console.log("\n \uD83D\uDCC4 ".concat(locale, " (").concat(Object.keys(merged).length, " keys):"), merged);
1350
+ });
1351
+
1352
+ // 4. 测试几个关键的 key
1353
+ console.log('\n🧪 Test Translation:');
1354
+ const testKeys = ['networkSettings.title', 'button.ok', 'button.cancel', 'button.apply', 'button.close'];
1355
+ const currentLocale = ((_window$g_initialProp5 = window.g_initialProps) === null || _window$g_initialProp5 === void 0 ? void 0 : _window$g_initialProp5.locale) || ((_window$g_initialProp6 = window.g_initialProps) === null || _window$g_initialProp6 === void 0 || (_window$g_initialProp6 = _window$g_initialProp6.___g_initialPropsFromServer) === null || _window$g_initialProp6 === void 0 ? void 0 : _window$g_initialProp6.locale) || localStorage.getItem('umi-locale') || 'zh-CN';
1356
+ const allMessages = {};
1357
+ allLocales.forEach(locale => {
1358
+ allMessages[locale] = _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, umiMessages[locale] || {}), projectMessages[locale] || {}), componentMessages[locale] || {});
1359
+ });
1360
+ testKeys.forEach(key => {
1361
+ var _allMessages$currentL, _allMessages$enUS;
1362
+ const translation = ((_allMessages$currentL = allMessages[currentLocale]) === null || _allMessages$currentL === void 0 ? void 0 : _allMessages$currentL[key]) || ((_allMessages$enUS = allMessages['en-US']) === null || _allMessages$enUS === void 0 ? void 0 : _allMessages$enUS[key]) || '❌ NOT FOUND';
1363
+ console.log(" - ".concat(key, ": ").concat(translation));
1364
+ });
1365
+ console.groupEnd();
1366
+ };
1367
+
1368
+ // 自动在开发环境注册到 window
1369
+ if (process.env.NODE_ENV === 'development' && typeof window !== 'undefined') {
1370
+ window.debugI18n = debugI18n;
1371
+ console.log('💡 I18n debug tool available. Run window.debugI18n() in console to check i18n status.');
1372
+ }
1373
+
1374
+ /**
1375
+ * seeder-st2110-components 组件库国际化 Hook
1376
+ *
1377
+ * 设计目标:
1378
+ * 1. 不依赖特定的国际化库(react-intl, i18next 等)
1379
+ * 2. 可以与主项目(Umi)的国际化集成
1380
+ * 3. 支持简单的变量替换
1381
+ * 4. 降级处理:如果没有翻译,显示 key 本身
1382
+ */
1383
+
1384
+ /**
1385
+ * 获取当前语言环境
1386
+ * 优先从 Umi 全局变量读取,其次使用默认值
1387
+ */
1388
+ const getLocale = () => {
1389
+ // 尝试从 Umi 获取语言设置
1390
+ if (typeof window !== 'undefined') {
1391
+ var _window$g_initialProp, _window$g_initialProp2;
1392
+ // 方式 1:Umi 的 g_initialProps
1393
+ if ((_window$g_initialProp = window.g_initialProps) !== null && _window$g_initialProp !== void 0 && _window$g_initialProp.locale) {
1394
+ return window.g_initialProps.locale;
1395
+ }
1396
+ // 方式 2:Umi 的全局语言标记
1397
+ if ((_window$g_initialProp2 = window.g_initialProps) !== null && _window$g_initialProp2 !== void 0 && (_window$g_initialProp2 = _window$g_initialProp2.___g_initialPropsFromServer) !== null && _window$g_initialProp2 !== void 0 && _window$g_initialProp2.locale) {
1398
+ return window.g_initialProps.___g_initialPropsFromServer.locale;
1399
+ }
1400
+ // 方式 3:从 localStorage 读取(Umi 默认行为)
1401
+ try {
1402
+ const storedLocale = localStorage.getItem('umi-locale');
1403
+ if (storedLocale) {
1404
+ return storedLocale;
1405
+ }
1406
+ } catch (e) {
1407
+ // localStorage 不可用时忽略
1408
+ }
1409
+ // 方式 4:组件库自定义语言标记
1410
+ if (window.__COMPONENT_LOCALE__) {
1411
+ return window.__COMPONENT_LOCALE__;
1412
+ }
1413
+ }
1414
+ // 默认语言
1415
+ return 'zh-CN';
1416
+ };
1417
+
1418
+ /**
1419
+ * 获取语言包
1420
+ * 优先从主项目读取,其次使用组件库自带的语言包
1421
+ */
1422
+ const getMessages = () => {
1423
+ if (typeof window !== 'undefined') {
1424
+ var _window$g_initialProp3;
1425
+ // 尝试从多个来源读取语言包
1426
+ const messages = {};
1427
+
1428
+ // 1. 组件库注册的语言包
1429
+ const componentMessages = window.__COMPONENT_I18N_MESSAGES__ || {};
1430
+
1431
+ // 2. 主项目的语言包
1432
+ const projectMessages = window.__PROJECT_I18N_MESSAGES__ || {};
1433
+
1434
+ // 3. Umi 的语言包
1435
+ const umiMessages = ((_window$g_initialProp3 = window.g_initialProps) === null || _window$g_initialProp3 === void 0 ? void 0 : _window$g_initialProp3.messages) || {};
1436
+
1437
+ // 合并语言包(组件库的优先级最高,其次是主项目,最后是 Umi)
1438
+ const allLocales = new Set([...Object.keys(componentMessages), ...Object.keys(projectMessages), ...Object.keys(umiMessages)]);
1439
+ allLocales.forEach(locale => {
1440
+ messages[locale] = _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, umiMessages[locale] || {}), projectMessages[locale] || {}), componentMessages[locale] || {});
1441
+ });
1442
+ return messages;
1443
+ }
1444
+ return {};
1445
+ };
1446
+
1447
+ /**
1448
+ * 格式化消息
1449
+ * @param {string} id - 国际化 key
1450
+ * @param {object} values - 变量替换值
1451
+ * @param {string} locale - 语言环境
1452
+ * @param {object} messages - 语言包
1453
+ */
1454
+ const formatMessage = function (_ref) {
1455
+ var _messages$locale, _messages$enUS;
1456
+ let {
1457
+ id
1458
+ } = _ref;
1459
+ let values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1460
+ let locale = arguments.length > 2 ? arguments[2] : undefined;
1461
+ let messages = arguments.length > 3 ? arguments[3] : undefined;
1462
+ const message = ((_messages$locale = messages[locale]) === null || _messages$locale === void 0 ? void 0 : _messages$locale[id]) || ((_messages$enUS = messages['en-US']) === null || _messages$enUS === void 0 ? void 0 : _messages$enUS[id]) || id;
1463
+
1464
+ // 支持变量替换 {min}, {max}, {value} 等
1465
+ return message.replace(/\{(\w+)\}/g, (match, key) => {
1466
+ return values[key] !== undefined ? values[key] : match;
1467
+ });
1468
+ };
1469
+
1470
+ /**
1471
+ * 国际化 Hook
1472
+ *
1473
+ * @returns {{
1474
+ * locale: string,
1475
+ * formatMessage: function,
1476
+ * messages: object
1477
+ * }}
1478
+ *
1479
+ * @example
1480
+ * const intl = useIntl();
1481
+ * const title = intl.formatMessage({ id: 'networkSettings.title' });
1482
+ * const message = intl.formatMessage({ id: 'validation.minLength' }, { min: 3 });
1483
+ */
1484
+ const useIntl = () => {
1485
+ const locale = getLocale();
1486
+ const messages = getMessages();
1487
+ const formatMessageFn = function (_ref2) {
1488
+ let {
1489
+ id
1490
+ } = _ref2;
1491
+ let values = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1492
+ return formatMessage({
1493
+ id
1494
+ }, values, locale, messages);
1495
+ };
1496
+ return {
1497
+ locale,
1498
+ formatMessage: formatMessageFn,
1499
+ messages
1500
+ };
1501
+ };
1502
+
1503
+ /**
1504
+ * 设置语言环境(可选)
1505
+ * 如果需要在运行时切换语言,可以调用此函数
1506
+ *
1507
+ * @param {string} locale - 语言代码,如 'zh-CN' 或 'en-US'
1508
+ */
1509
+ const setLocale = locale => {
1510
+ if (typeof window !== 'undefined') {
1511
+ window.__COMPONENT_LOCALE__ = locale;
1512
+ }
1513
+ };
1514
+
1515
+ /**
1516
+ * 注册语言包(可选)
1517
+ * 如果需要在运行时注册语言包,可以调用此函数
1518
+ *
1519
+ * @param {string} locale - 语言代码
1520
+ * @param {object} messages - 语言包对象
1521
+ */
1522
+ const addMessages = (locale, messages) => {
1523
+ if (typeof window !== 'undefined') {
1524
+ if (!window.__COMPONENT_I18N_MESSAGES__) {
1525
+ window.__COMPONENT_I18N_MESSAGES__ = {};
1526
+ }
1527
+ window.__COMPONENT_I18N_MESSAGES__[locale] = messages;
1528
+ }
1529
+ };
1530
+
1531
+ /**
1532
+ * 初始化国际化
1533
+ * 在组件库初始化时调用,注册默认语言包
1534
+ */
1535
+ const initI18n = () => {
1536
+ // 注册中文语言包
1537
+ addMessages('zh-CN', {
1538
+ 'button.ok': '确定',
1539
+ 'button.cancel': '取消',
1540
+ 'button.save': '保存',
1541
+ 'button.delete': '删除',
1542
+ 'button.edit': '编辑',
1543
+ 'button.add': '添加',
1544
+ 'button.confirm': '确认',
1545
+ 'button.close': '关闭',
1546
+ 'button.apply': '应用',
1547
+ 'menu.networkSettings': '网络设置',
1548
+ 'menu.ptp': 'PTP',
1549
+ 'menu.nmos': 'NMOS',
1550
+ 'menu.preset': '预设',
1551
+ 'menu.license': '许可证'
1552
+ // ... 其他默认翻译
1553
+ });
1554
+
1555
+ // 注册英文语言包
1556
+ addMessages('en-US', {
1557
+ 'button.ok': 'OK',
1558
+ 'button.cancel': 'Cancel',
1559
+ 'button.save': 'Save',
1560
+ 'button.delete': 'Delete',
1561
+ 'button.edit': 'Edit',
1562
+ 'button.add': 'Add',
1563
+ 'button.confirm': 'Confirm',
1564
+ 'button.close': 'Close',
1565
+ 'button.apply': 'Apply',
1566
+ 'menu.networkSettings': 'Network Settings',
1567
+ 'menu.ptp': 'PTP',
1568
+ 'menu.nmos': 'NMOS',
1569
+ 'menu.preset': 'Preset',
1570
+ 'menu.license': 'License'
1571
+ // ... 其他默认翻译
1572
+ });
1573
+ };
1574
+
931
1575
  const NetworkFieldGroup = _ref => {
932
1576
  var _fieldConfig$netmask$, _fieldConfig$netmask;
933
1577
  let {
@@ -935,22 +1579,30 @@ const NetworkFieldGroup = _ref => {
935
1579
  interfaces,
936
1580
  fieldConfig = {}
937
1581
  } = _ref;
1582
+ const intl = useIntl();
1583
+
938
1584
  // 默认字段配置
939
1585
  const defaultFieldConfig = {
940
1586
  name: {
941
- label: "Name",
1587
+ label: intl.formatMessage({
1588
+ id: 'label.name'
1589
+ }),
942
1590
  enabled: true
943
1591
  },
944
1592
  ip: {
945
- label: "IP Address",
1593
+ label: intl.formatMessage({
1594
+ id: 'networkSettings.ipAddress'
1595
+ }),
946
1596
  enabled: true
947
1597
  },
948
1598
  netmask: {
949
- label: "Netmask",
1599
+ label: intl.formatMessage({
1600
+ id: 'networkSettings.subnetMask'
1601
+ }),
950
1602
  enabled: true
951
1603
  }
952
1604
  };
953
- const mergedFieldConfig = _objectSpread2(_objectSpread2(_objectSpread2({}, defaultFieldConfig), fieldConfig), {}, {
1605
+ const mergedFieldConfig = _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, defaultFieldConfig), fieldConfig), {}, {
954
1606
  netmask: {
955
1607
  label: "Netmask",
956
1608
  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
@@ -994,11 +1646,11 @@ const NetworkSettingsModal = _ref2 => {
994
1646
  open,
995
1647
  onClose,
996
1648
  getLanConfig,
997
- // 可选 - 单独获取LAN配置的函数
1649
+ // 可选 - 单独获取 LAN 配置的函数
998
1650
  getSysConfig,
999
- // 可选 - 单独获取QSFP配置的函数
1651
+ // 可选 - 单独获取 QSFP 配置的函数
1000
1652
  getConfig,
1001
- // 可选 - 统一获取配置的函数 ipgweb专用
1653
+ // 可选 - 统一获取配置的函数 ipgweb 专用
1002
1654
  updateLanConfig,
1003
1655
  updateSysConfig,
1004
1656
  restart,
@@ -1014,6 +1666,7 @@ const NetworkSettingsModal = _ref2 => {
1014
1666
  },
1015
1667
  restartRemark
1016
1668
  } = _ref2;
1669
+ const intl = useIntl();
1017
1670
  const {
1018
1671
  message,
1019
1672
  modal
@@ -1031,18 +1684,18 @@ const NetworkSettingsModal = _ref2 => {
1031
1684
  hasInitialized: false
1032
1685
  });
1033
1686
  const preparedFieldConfig = useMemo(() => {
1034
- const config = _objectSpread2({}, fieldConfig);
1687
+ const config = _objectSpread2$1({}, fieldConfig);
1035
1688
 
1036
1689
  // 确保LAN和QSFP的配置存在
1037
1690
  config.LAN = config.LAN || {};
1038
1691
  config.QSFP = config.QSFP || {};
1039
1692
  if (sections.includes('LAN')) {
1040
- config.LAN.netmask = _objectSpread2(_objectSpread2({}, config.LAN.netmask || {}), {}, {
1693
+ config.LAN.netmask = _objectSpread2$1(_objectSpread2$1({}, config.LAN.netmask || {}), {}, {
1041
1694
  enabled: showNetmask.LAN
1042
1695
  });
1043
1696
  }
1044
1697
  if (sections.includes('QSFP')) {
1045
- config.QSFP.netmask = _objectSpread2(_objectSpread2({}, config.QSFP.netmask || {}), {}, {
1698
+ config.QSFP.netmask = _objectSpread2$1(_objectSpread2$1({}, config.QSFP.netmask || {}), {}, {
1046
1699
  enabled: showNetmask.QSFP
1047
1700
  });
1048
1701
  }
@@ -1117,7 +1770,7 @@ const NetworkSettingsModal = _ref2 => {
1117
1770
  const initialValues = useMemo(() => {
1118
1771
  const values = {};
1119
1772
  if (sections.includes('LAN') && lanConfigs.length > 0) {
1120
- values.LAN = lanConfigs.map(config => _objectSpread2({
1773
+ values.LAN = lanConfigs.map(config => _objectSpread2$1({
1121
1774
  connection_id: config.connection_id,
1122
1775
  display_name: config.display_name,
1123
1776
  ip_address: config.ip_address
@@ -1126,7 +1779,7 @@ const NetworkSettingsModal = _ref2 => {
1126
1779
  } : {}));
1127
1780
  }
1128
1781
  if (sections.includes('QSFP') && st2110Interfaces.length > 0) {
1129
- values.QSFP = st2110Interfaces.map(iface => _objectSpread2(_objectSpread2({}, iface.id !== undefined && {
1782
+ values.QSFP = st2110Interfaces.map(iface => _objectSpread2$1(_objectSpread2$1({}, iface.id !== undefined && {
1130
1783
  id: iface.id
1131
1784
  }), {}, {
1132
1785
  display_name: iface.display_name,
@@ -1149,11 +1802,14 @@ const NetworkSettingsModal = _ref2 => {
1149
1802
  // 成功处理
1150
1803
  const handleSuccess = useCallback(async function () {
1151
1804
  let {
1152
- messageText = 'Success',
1805
+ messageText,
1153
1806
  isPopup = false,
1154
1807
  refresh = !restart
1155
1808
  } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
1156
- message.success(messageText);
1809
+ const defaultMessage = intl.formatMessage({
1810
+ id: 'networkSettings.saveSuccess'
1811
+ });
1812
+ message.success(messageText || defaultMessage);
1157
1813
  if (refresh && getConfig) {
1158
1814
  try {
1159
1815
  const newConfig = await getConfig();
@@ -1177,9 +1833,15 @@ const NetworkSettingsModal = _ref2 => {
1177
1833
  if (updatedConfig !== null && updatedConfig !== void 0 && updatedConfig.is_restart_required) {
1178
1834
  modal.confirm({
1179
1835
  icon: /*#__PURE__*/jsx(ExclamationCircleFilled, {}),
1180
- title: "Configuration modified. Restart to apply changes?",
1181
- cancelText: "Cancel",
1182
- okText: "Restart Now",
1836
+ title: intl.formatMessage({
1837
+ id: 'networkSettings.restartRequired'
1838
+ }),
1839
+ cancelText: intl.formatMessage({
1840
+ id: 'networkSettings.restartLater'
1841
+ }),
1842
+ okText: intl.formatMessage({
1843
+ id: 'networkSettings.restartNow'
1844
+ }),
1183
1845
  onOk: async () => {
1184
1846
  await restart();
1185
1847
  if (onRestartSuccess && typeof onRestartSuccess === 'function') {
@@ -1195,9 +1857,15 @@ const NetworkSettingsModal = _ref2 => {
1195
1857
  // 无接口:直接弹出重启确认框
1196
1858
  modal.confirm({
1197
1859
  icon: /*#__PURE__*/jsx(ExclamationCircleFilled, {}),
1198
- title: "Configuration modified. Restart to apply changes?",
1199
- cancelText: "Cancel",
1200
- okText: "Restart Now",
1860
+ title: intl.formatMessage({
1861
+ id: 'networkSettings.restartRequired'
1862
+ }),
1863
+ cancelText: intl.formatMessage({
1864
+ id: 'networkSettings.restartLater'
1865
+ }),
1866
+ okText: intl.formatMessage({
1867
+ id: 'networkSettings.restartNow'
1868
+ }),
1201
1869
  onOk: async () => {
1202
1870
  await restart();
1203
1871
  if (onRestartSuccess && typeof onRestartSuccess === 'function') {
@@ -1208,7 +1876,7 @@ const NetworkSettingsModal = _ref2 => {
1208
1876
  }
1209
1877
  }
1210
1878
  onClose();
1211
- }, [message, modal, getSysConfig, restart, getConfig, sections, onClose]);
1879
+ }, [intl, message, modal, getSysConfig, restart, getConfig, sections, onClose]);
1212
1880
  const handleSubmit = useCallback(async () => {
1213
1881
  setSubmitLoading(true);
1214
1882
  try {
@@ -1232,7 +1900,7 @@ const NetworkSettingsModal = _ref2 => {
1232
1900
  if (sections.includes('LAN') && values.LAN) {
1233
1901
  const lanData = values.LAN.map((item, index) => {
1234
1902
  var _lanConfigs$index;
1235
- return _objectSpread2({
1903
+ return _objectSpread2$1({
1236
1904
  connection_id: (_lanConfigs$index = lanConfigs[index]) === null || _lanConfigs$index === void 0 ? void 0 : _lanConfigs$index.connection_id,
1237
1905
  ip_address: item.ip_address
1238
1906
  }, showNetmask.LAN ? {
@@ -1246,7 +1914,7 @@ const NetworkSettingsModal = _ref2 => {
1246
1914
  if (sections.includes('QSFP') && values.QSFP) {
1247
1915
  const interfacesData = values.QSFP.map((item, index) => {
1248
1916
  var _st2110Interfaces$ind, _st2110Interfaces$ind2, _st2110Interfaces$ind3;
1249
- return _objectSpread2(_objectSpread2(_objectSpread2({}, (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind = st2110Interfaces[index]) === null || _st2110Interfaces$ind === void 0 ? void 0 : _st2110Interfaces$ind.id) !== undefined && {
1917
+ return _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind = st2110Interfaces[index]) === null || _st2110Interfaces$ind === void 0 ? void 0 : _st2110Interfaces$ind.id) !== undefined && {
1250
1918
  id: st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind2 = st2110Interfaces[index]) === null || _st2110Interfaces$ind2 === void 0 ? void 0 : _st2110Interfaces$ind2.id
1251
1919
  }), (st2110Interfaces === null || st2110Interfaces === void 0 || (_st2110Interfaces$ind3 = st2110Interfaces[index]) === null || _st2110Interfaces$ind3 === void 0 ? void 0 : _st2110Interfaces$ind3.ip) !== undefined ? {
1252
1920
  ip: item.ip_address
@@ -1288,22 +1956,28 @@ const NetworkSettingsModal = _ref2 => {
1288
1956
  }, [form, sections, lanConfigs, st2110Interfaces, updateLanConfig, updateSysConfig, handleSuccess]);
1289
1957
 
1290
1958
  // 合并默认模态框属性和传入的属性
1291
- const mergedModalProps = _objectSpread2({
1292
- title: "Network Settings",
1959
+ const mergedModalProps = _objectSpread2$1({
1960
+ title: intl.formatMessage({
1961
+ id: 'networkSettings.title'
1962
+ }),
1293
1963
  width: 650,
1294
1964
  open,
1295
1965
  confirmLoading: submitLoading,
1296
1966
  onOk: handleSubmit,
1297
1967
  onCancel: onClose,
1298
- okText: "Apply",
1299
- cancelText: "Close",
1968
+ okText: intl.formatMessage({
1969
+ id: 'button.apply'
1970
+ }),
1971
+ cancelText: intl.formatMessage({
1972
+ id: 'button.close'
1973
+ }),
1300
1974
  centered: true,
1301
1975
  destroyOnHidden: true,
1302
1976
  forceRender: true
1303
1977
  }, modalProps);
1304
1978
 
1305
1979
  // 合并默认表单属性和传入的属性
1306
- const mergedFormProps = _objectSpread2({
1980
+ const mergedFormProps = _objectSpread2$1({
1307
1981
  form: form,
1308
1982
  labelCol: {
1309
1983
  span: 6
@@ -1313,8 +1987,8 @@ const NetworkSettingsModal = _ref2 => {
1313
1987
  },
1314
1988
  autoComplete: "off"
1315
1989
  }, formProps);
1316
- return /*#__PURE__*/jsxs(StyledModal$1, _objectSpread2(_objectSpread2({}, mergedModalProps), {}, {
1317
- children: [/*#__PURE__*/jsxs(Form, _objectSpread2(_objectSpread2({}, mergedFormProps), {}, {
1990
+ return /*#__PURE__*/jsxs(StyledModal$3, _objectSpread2$1(_objectSpread2$1({}, mergedModalProps), {}, {
1991
+ children: [/*#__PURE__*/jsxs(Form, _objectSpread2$1(_objectSpread2$1({}, mergedFormProps), {}, {
1318
1992
  children: [sections.includes('LAN') && lanConfigs.length > 0 && /*#__PURE__*/jsxs(Fragment, {
1319
1993
  children: [/*#__PURE__*/jsx(NetworkFieldGroup, {
1320
1994
  prefix: "LAN",
@@ -1436,7 +2110,7 @@ function convertPtpStatusToArray(ptpStatus, fieldConfigs, fieldOrder) {
1436
2110
  formType: 'text'
1437
2111
  };
1438
2112
  const value = ptpStatus[key];
1439
- return _objectSpread2(_objectSpread2({
2113
+ return _objectSpread2$1(_objectSpread2$1({
1440
2114
  key,
1441
2115
  value
1442
2116
  }, config), {}, {
@@ -1548,7 +2222,7 @@ const PtpModal = _ref => {
1548
2222
  if (!open || !ptpStatus) return null;
1549
2223
 
1550
2224
  // 合并默认模态框属性和传入的属性
1551
- const mergedModalProps = _objectSpread2({
2225
+ const mergedModalProps = _objectSpread2$1({
1552
2226
  title: "PTP",
1553
2227
  width: 650,
1554
2228
  open,
@@ -1560,7 +2234,7 @@ const PtpModal = _ref => {
1560
2234
  }, modalProps);
1561
2235
 
1562
2236
  // 合并默认表单属性和传入的属性
1563
- const mergedFormProps = _objectSpread2({
2237
+ const mergedFormProps = _objectSpread2$1({
1564
2238
  form: form,
1565
2239
  name: "ptpForm",
1566
2240
  labelCol: {
@@ -1571,8 +2245,8 @@ const PtpModal = _ref => {
1571
2245
  },
1572
2246
  autoComplete: "off"
1573
2247
  }, formProps);
1574
- return /*#__PURE__*/jsx(StyledModal$1, _objectSpread2(_objectSpread2({}, mergedModalProps), {}, {
1575
- children: /*#__PURE__*/jsx(Form, _objectSpread2(_objectSpread2({}, mergedFormProps), {}, {
2248
+ return /*#__PURE__*/jsx(StyledModal$3, _objectSpread2$1(_objectSpread2$1({}, mergedModalProps), {}, {
2249
+ children: /*#__PURE__*/jsx(Form, _objectSpread2$1(_objectSpread2$1({}, mergedFormProps), {}, {
1576
2250
  children: ptpStatusArray.map(item => /*#__PURE__*/jsx(Form.Item, {
1577
2251
  label: item.label,
1578
2252
  name: item.key,
@@ -1767,7 +2441,7 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
1767
2441
  return fields.category_list.options.map(category => {
1768
2442
  const isInitiallySelected = initialSelected.includes(category.name);
1769
2443
  const shouldDisable = isSavedPreset ? !isInitiallySelected : false;
1770
- return _objectSpread2(_objectSpread2({}, category), {}, {
2444
+ return _objectSpread2$1(_objectSpread2$1({}, category), {}, {
1771
2445
  disabled: shouldDisable,
1772
2446
  initiallySelected: isInitiallySelected
1773
2447
  });
@@ -1917,7 +2591,7 @@ const RightDetailForm = /*#__PURE__*/memo(_ref3 => {
1917
2591
  }) :
1918
2592
  /*#__PURE__*/
1919
2593
  // 非编辑模式下的按钮
1920
- jsx(SubmitButton, _objectSpread2(_objectSpread2({
2594
+ jsx(SubmitButton, _objectSpread2$1(_objectSpread2$1({
1921
2595
  action: handleLoad
1922
2596
  }, hasCategoryList && {
1923
2597
  disabled: !currentSelected.length
@@ -2131,7 +2805,7 @@ const Preset = _ref => {
2131
2805
  });
2132
2806
  (async () => {
2133
2807
  try {
2134
- await loadPreset(_objectSpread2({
2808
+ await loadPreset(_objectSpread2$1({
2135
2809
  id: loadData.id
2136
2810
  }, loadData.category_list && {
2137
2811
  category_list: loadData.category_list
@@ -2255,7 +2929,7 @@ const Preset = _ref => {
2255
2929
  useEffect(() => {
2256
2930
  fetchPresetList();
2257
2931
  }, [fetchPresetList]);
2258
- return /*#__PURE__*/jsx(StyledModal$1, {
2932
+ return /*#__PURE__*/jsx(StyledModal$3, {
2259
2933
  title: texts.title,
2260
2934
  width: width,
2261
2935
  open: open,
@@ -2336,7 +3010,7 @@ const UpgradeManager = _ref => {
2336
3010
  statusPollingInterval = 1000,
2337
3011
  children
2338
3012
  } = _ref,
2339
- dropdownProps = _objectWithoutProperties(_ref, _excluded$2);
3013
+ dropdownProps = _objectWithoutProperties$1(_ref, _excluded$2);
2340
3014
  const [upgradeElement] = useUpgrade$1({
2341
3015
  menuItems,
2342
3016
  onMenuClick,
@@ -2352,7 +3026,7 @@ const UpgradeManager = _ref => {
2352
3026
  const dropdownElement = upgradeElement.props.children[0];
2353
3027
  const otherElements = upgradeElement.props.children.slice(1);
2354
3028
  return /*#__PURE__*/jsxs(Fragment, {
2355
- children: [/*#__PURE__*/jsx(Dropdown, _objectSpread2(_objectSpread2(_objectSpread2({}, dropdownProps), dropdownElement.props), {}, {
3029
+ children: [/*#__PURE__*/jsx(Dropdown, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, dropdownProps), dropdownElement.props), {}, {
2356
3030
  children: children
2357
3031
  })), otherElements]
2358
3032
  });
@@ -2367,15 +3041,15 @@ UpgradeManager.defaultProps = {
2367
3041
  };
2368
3042
  var UpgradeManager$1 = UpgradeManager;
2369
3043
 
2370
- function getDefaultExportFromCjs$6 (x) {
3044
+ function getDefaultExportFromCjs$7 (x) {
2371
3045
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
2372
3046
  }
2373
3047
 
2374
- var propTypes$6 = {exports: {}};
3048
+ var propTypes$7 = {exports: {}};
2375
3049
 
2376
- var reactIs$6 = {exports: {}};
3050
+ var reactIs$7 = {exports: {}};
2377
3051
 
2378
- var reactIs_production_min$6 = {};
3052
+ var reactIs_production_min$7 = {};
2379
3053
 
2380
3054
  /** @license React v16.13.1
2381
3055
  * react-is.production.min.js
@@ -2386,21 +3060,21 @@ var reactIs_production_min$6 = {};
2386
3060
  * LICENSE file in the root directory of this source tree.
2387
3061
  */
2388
3062
 
2389
- var hasRequiredReactIs_production_min$6;
3063
+ var hasRequiredReactIs_production_min$7;
2390
3064
 
2391
- function requireReactIs_production_min$6 () {
2392
- if (hasRequiredReactIs_production_min$6) return reactIs_production_min$6;
2393
- hasRequiredReactIs_production_min$6 = 1;
3065
+ function requireReactIs_production_min$7 () {
3066
+ if (hasRequiredReactIs_production_min$7) return reactIs_production_min$7;
3067
+ hasRequiredReactIs_production_min$7 = 1;
2394
3068
  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?
2395
3069
  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;
2396
- 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$6.AsyncMode=l;reactIs_production_min$6.ConcurrentMode=m;reactIs_production_min$6.ContextConsumer=k;reactIs_production_min$6.ContextProvider=h;reactIs_production_min$6.Element=c;reactIs_production_min$6.ForwardRef=n;reactIs_production_min$6.Fragment=e;reactIs_production_min$6.Lazy=t;reactIs_production_min$6.Memo=r;reactIs_production_min$6.Portal=d;
2397
- reactIs_production_min$6.Profiler=g;reactIs_production_min$6.StrictMode=f;reactIs_production_min$6.Suspense=p;reactIs_production_min$6.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$6.isConcurrentMode=A;reactIs_production_min$6.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$6.isContextProvider=function(a){return z(a)===h};reactIs_production_min$6.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$6.isForwardRef=function(a){return z(a)===n};reactIs_production_min$6.isFragment=function(a){return z(a)===e};reactIs_production_min$6.isLazy=function(a){return z(a)===t};
2398
- reactIs_production_min$6.isMemo=function(a){return z(a)===r};reactIs_production_min$6.isPortal=function(a){return z(a)===d};reactIs_production_min$6.isProfiler=function(a){return z(a)===g};reactIs_production_min$6.isStrictMode=function(a){return z(a)===f};reactIs_production_min$6.isSuspense=function(a){return z(a)===p};
2399
- reactIs_production_min$6.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$6.typeOf=z;
2400
- return reactIs_production_min$6;
3070
+ 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$7.AsyncMode=l;reactIs_production_min$7.ConcurrentMode=m;reactIs_production_min$7.ContextConsumer=k;reactIs_production_min$7.ContextProvider=h;reactIs_production_min$7.Element=c;reactIs_production_min$7.ForwardRef=n;reactIs_production_min$7.Fragment=e;reactIs_production_min$7.Lazy=t;reactIs_production_min$7.Memo=r;reactIs_production_min$7.Portal=d;
3071
+ reactIs_production_min$7.Profiler=g;reactIs_production_min$7.StrictMode=f;reactIs_production_min$7.Suspense=p;reactIs_production_min$7.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min$7.isConcurrentMode=A;reactIs_production_min$7.isContextConsumer=function(a){return z(a)===k};reactIs_production_min$7.isContextProvider=function(a){return z(a)===h};reactIs_production_min$7.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min$7.isForwardRef=function(a){return z(a)===n};reactIs_production_min$7.isFragment=function(a){return z(a)===e};reactIs_production_min$7.isLazy=function(a){return z(a)===t};
3072
+ reactIs_production_min$7.isMemo=function(a){return z(a)===r};reactIs_production_min$7.isPortal=function(a){return z(a)===d};reactIs_production_min$7.isProfiler=function(a){return z(a)===g};reactIs_production_min$7.isStrictMode=function(a){return z(a)===f};reactIs_production_min$7.isSuspense=function(a){return z(a)===p};
3073
+ reactIs_production_min$7.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$7.typeOf=z;
3074
+ return reactIs_production_min$7;
2401
3075
  }
2402
3076
 
2403
- var reactIs_development$6 = {};
3077
+ var reactIs_development$7 = {};
2404
3078
 
2405
3079
  /** @license React v16.13.1
2406
3080
  * react-is.development.js
@@ -2411,11 +3085,11 @@ var reactIs_development$6 = {};
2411
3085
  * LICENSE file in the root directory of this source tree.
2412
3086
  */
2413
3087
 
2414
- var hasRequiredReactIs_development$6;
3088
+ var hasRequiredReactIs_development$7;
2415
3089
 
2416
- function requireReactIs_development$6 () {
2417
- if (hasRequiredReactIs_development$6) return reactIs_development$6;
2418
- hasRequiredReactIs_development$6 = 1;
3090
+ function requireReactIs_development$7 () {
3091
+ if (hasRequiredReactIs_development$7) return reactIs_development$7;
3092
+ hasRequiredReactIs_development$7 = 1;
2419
3093
 
2420
3094
 
2421
3095
 
@@ -2556,51 +3230,51 @@ function requireReactIs_development$6 () {
2556
3230
  return typeOf(object) === REACT_SUSPENSE_TYPE;
2557
3231
  }
2558
3232
 
2559
- reactIs_development$6.AsyncMode = AsyncMode;
2560
- reactIs_development$6.ConcurrentMode = ConcurrentMode;
2561
- reactIs_development$6.ContextConsumer = ContextConsumer;
2562
- reactIs_development$6.ContextProvider = ContextProvider;
2563
- reactIs_development$6.Element = Element;
2564
- reactIs_development$6.ForwardRef = ForwardRef;
2565
- reactIs_development$6.Fragment = Fragment;
2566
- reactIs_development$6.Lazy = Lazy;
2567
- reactIs_development$6.Memo = Memo;
2568
- reactIs_development$6.Portal = Portal;
2569
- reactIs_development$6.Profiler = Profiler;
2570
- reactIs_development$6.StrictMode = StrictMode;
2571
- reactIs_development$6.Suspense = Suspense;
2572
- reactIs_development$6.isAsyncMode = isAsyncMode;
2573
- reactIs_development$6.isConcurrentMode = isConcurrentMode;
2574
- reactIs_development$6.isContextConsumer = isContextConsumer;
2575
- reactIs_development$6.isContextProvider = isContextProvider;
2576
- reactIs_development$6.isElement = isElement;
2577
- reactIs_development$6.isForwardRef = isForwardRef;
2578
- reactIs_development$6.isFragment = isFragment;
2579
- reactIs_development$6.isLazy = isLazy;
2580
- reactIs_development$6.isMemo = isMemo;
2581
- reactIs_development$6.isPortal = isPortal;
2582
- reactIs_development$6.isProfiler = isProfiler;
2583
- reactIs_development$6.isStrictMode = isStrictMode;
2584
- reactIs_development$6.isSuspense = isSuspense;
2585
- reactIs_development$6.isValidElementType = isValidElementType;
2586
- reactIs_development$6.typeOf = typeOf;
3233
+ reactIs_development$7.AsyncMode = AsyncMode;
3234
+ reactIs_development$7.ConcurrentMode = ConcurrentMode;
3235
+ reactIs_development$7.ContextConsumer = ContextConsumer;
3236
+ reactIs_development$7.ContextProvider = ContextProvider;
3237
+ reactIs_development$7.Element = Element;
3238
+ reactIs_development$7.ForwardRef = ForwardRef;
3239
+ reactIs_development$7.Fragment = Fragment;
3240
+ reactIs_development$7.Lazy = Lazy;
3241
+ reactIs_development$7.Memo = Memo;
3242
+ reactIs_development$7.Portal = Portal;
3243
+ reactIs_development$7.Profiler = Profiler;
3244
+ reactIs_development$7.StrictMode = StrictMode;
3245
+ reactIs_development$7.Suspense = Suspense;
3246
+ reactIs_development$7.isAsyncMode = isAsyncMode;
3247
+ reactIs_development$7.isConcurrentMode = isConcurrentMode;
3248
+ reactIs_development$7.isContextConsumer = isContextConsumer;
3249
+ reactIs_development$7.isContextProvider = isContextProvider;
3250
+ reactIs_development$7.isElement = isElement;
3251
+ reactIs_development$7.isForwardRef = isForwardRef;
3252
+ reactIs_development$7.isFragment = isFragment;
3253
+ reactIs_development$7.isLazy = isLazy;
3254
+ reactIs_development$7.isMemo = isMemo;
3255
+ reactIs_development$7.isPortal = isPortal;
3256
+ reactIs_development$7.isProfiler = isProfiler;
3257
+ reactIs_development$7.isStrictMode = isStrictMode;
3258
+ reactIs_development$7.isSuspense = isSuspense;
3259
+ reactIs_development$7.isValidElementType = isValidElementType;
3260
+ reactIs_development$7.typeOf = typeOf;
2587
3261
  })();
2588
3262
  }
2589
- return reactIs_development$6;
3263
+ return reactIs_development$7;
2590
3264
  }
2591
3265
 
2592
- var hasRequiredReactIs$6;
3266
+ var hasRequiredReactIs$7;
2593
3267
 
2594
- function requireReactIs$6 () {
2595
- if (hasRequiredReactIs$6) return reactIs$6.exports;
2596
- hasRequiredReactIs$6 = 1;
3268
+ function requireReactIs$7 () {
3269
+ if (hasRequiredReactIs$7) return reactIs$7.exports;
3270
+ hasRequiredReactIs$7 = 1;
2597
3271
 
2598
3272
  if (process.env.NODE_ENV === 'production') {
2599
- reactIs$6.exports = requireReactIs_production_min$6();
3273
+ reactIs$7.exports = requireReactIs_production_min$7();
2600
3274
  } else {
2601
- reactIs$6.exports = requireReactIs_development$6();
3275
+ reactIs$7.exports = requireReactIs_development$7();
2602
3276
  }
2603
- return reactIs$6.exports;
3277
+ return reactIs$7.exports;
2604
3278
  }
2605
3279
 
2606
3280
  /*
@@ -2609,12 +3283,12 @@ object-assign
2609
3283
  @license MIT
2610
3284
  */
2611
3285
 
2612
- var objectAssign$6;
2613
- var hasRequiredObjectAssign$6;
3286
+ var objectAssign$7;
3287
+ var hasRequiredObjectAssign$7;
2614
3288
 
2615
- function requireObjectAssign$6 () {
2616
- if (hasRequiredObjectAssign$6) return objectAssign$6;
2617
- hasRequiredObjectAssign$6 = 1;
3289
+ function requireObjectAssign$7 () {
3290
+ if (hasRequiredObjectAssign$7) return objectAssign$7;
3291
+ hasRequiredObjectAssign$7 = 1;
2618
3292
  /* eslint-disable no-unused-vars */
2619
3293
  var getOwnPropertySymbols = Object.getOwnPropertySymbols;
2620
3294
  var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -2672,7 +3346,7 @@ function requireObjectAssign$6 () {
2672
3346
  }
2673
3347
  }
2674
3348
 
2675
- objectAssign$6 = shouldUseNative() ? Object.assign : function (target, source) {
3349
+ objectAssign$7 = shouldUseNative() ? Object.assign : function (target, source) {
2676
3350
  var from;
2677
3351
  var to = toObject(target);
2678
3352
  var symbols;
@@ -2698,7 +3372,7 @@ function requireObjectAssign$6 () {
2698
3372
 
2699
3373
  return to;
2700
3374
  };
2701
- return objectAssign$6;
3375
+ return objectAssign$7;
2702
3376
  }
2703
3377
 
2704
3378
  /**
@@ -2708,27 +3382,27 @@ function requireObjectAssign$6 () {
2708
3382
  * LICENSE file in the root directory of this source tree.
2709
3383
  */
2710
3384
 
2711
- var ReactPropTypesSecret_1$6;
2712
- var hasRequiredReactPropTypesSecret$6;
3385
+ var ReactPropTypesSecret_1$7;
3386
+ var hasRequiredReactPropTypesSecret$7;
2713
3387
 
2714
- function requireReactPropTypesSecret$6 () {
2715
- if (hasRequiredReactPropTypesSecret$6) return ReactPropTypesSecret_1$6;
2716
- hasRequiredReactPropTypesSecret$6 = 1;
3388
+ function requireReactPropTypesSecret$7 () {
3389
+ if (hasRequiredReactPropTypesSecret$7) return ReactPropTypesSecret_1$7;
3390
+ hasRequiredReactPropTypesSecret$7 = 1;
2717
3391
 
2718
3392
  var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
2719
3393
 
2720
- ReactPropTypesSecret_1$6 = ReactPropTypesSecret;
2721
- return ReactPropTypesSecret_1$6;
3394
+ ReactPropTypesSecret_1$7 = ReactPropTypesSecret;
3395
+ return ReactPropTypesSecret_1$7;
2722
3396
  }
2723
3397
 
2724
- var has$6;
2725
- var hasRequiredHas$6;
3398
+ var has$7;
3399
+ var hasRequiredHas$7;
2726
3400
 
2727
- function requireHas$6 () {
2728
- if (hasRequiredHas$6) return has$6;
2729
- hasRequiredHas$6 = 1;
2730
- has$6 = Function.call.bind(Object.prototype.hasOwnProperty);
2731
- return has$6;
3401
+ function requireHas$7 () {
3402
+ if (hasRequiredHas$7) return has$7;
3403
+ hasRequiredHas$7 = 1;
3404
+ has$7 = Function.call.bind(Object.prototype.hasOwnProperty);
3405
+ return has$7;
2732
3406
  }
2733
3407
 
2734
3408
  /**
@@ -2738,19 +3412,19 @@ function requireHas$6 () {
2738
3412
  * LICENSE file in the root directory of this source tree.
2739
3413
  */
2740
3414
 
2741
- var checkPropTypes_1$6;
2742
- var hasRequiredCheckPropTypes$6;
3415
+ var checkPropTypes_1$7;
3416
+ var hasRequiredCheckPropTypes$7;
2743
3417
 
2744
- function requireCheckPropTypes$6 () {
2745
- if (hasRequiredCheckPropTypes$6) return checkPropTypes_1$6;
2746
- hasRequiredCheckPropTypes$6 = 1;
3418
+ function requireCheckPropTypes$7 () {
3419
+ if (hasRequiredCheckPropTypes$7) return checkPropTypes_1$7;
3420
+ hasRequiredCheckPropTypes$7 = 1;
2747
3421
 
2748
3422
  var printWarning = function() {};
2749
3423
 
2750
3424
  if (process.env.NODE_ENV !== 'production') {
2751
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$6();
3425
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$7();
2752
3426
  var loggedTypeFailures = {};
2753
- var has = /*@__PURE__*/ requireHas$6();
3427
+ var has = /*@__PURE__*/ requireHas$7();
2754
3428
 
2755
3429
  printWarning = function(text) {
2756
3430
  var message = 'Warning: ' + text;
@@ -2838,8 +3512,8 @@ function requireCheckPropTypes$6 () {
2838
3512
  }
2839
3513
  };
2840
3514
 
2841
- checkPropTypes_1$6 = checkPropTypes;
2842
- return checkPropTypes_1$6;
3515
+ checkPropTypes_1$7 = checkPropTypes;
3516
+ return checkPropTypes_1$7;
2843
3517
  }
2844
3518
 
2845
3519
  /**
@@ -2849,19 +3523,19 @@ function requireCheckPropTypes$6 () {
2849
3523
  * LICENSE file in the root directory of this source tree.
2850
3524
  */
2851
3525
 
2852
- var factoryWithTypeCheckers$6;
2853
- var hasRequiredFactoryWithTypeCheckers$6;
3526
+ var factoryWithTypeCheckers$7;
3527
+ var hasRequiredFactoryWithTypeCheckers$7;
2854
3528
 
2855
- function requireFactoryWithTypeCheckers$6 () {
2856
- if (hasRequiredFactoryWithTypeCheckers$6) return factoryWithTypeCheckers$6;
2857
- hasRequiredFactoryWithTypeCheckers$6 = 1;
3529
+ function requireFactoryWithTypeCheckers$7 () {
3530
+ if (hasRequiredFactoryWithTypeCheckers$7) return factoryWithTypeCheckers$7;
3531
+ hasRequiredFactoryWithTypeCheckers$7 = 1;
2858
3532
 
2859
- var ReactIs = requireReactIs$6();
2860
- var assign = requireObjectAssign$6();
3533
+ var ReactIs = requireReactIs$7();
3534
+ var assign = requireObjectAssign$7();
2861
3535
 
2862
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$6();
2863
- var has = /*@__PURE__*/ requireHas$6();
2864
- var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$6();
3536
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$7();
3537
+ var has = /*@__PURE__*/ requireHas$7();
3538
+ var checkPropTypes = /*@__PURE__*/ requireCheckPropTypes$7();
2865
3539
 
2866
3540
  var printWarning = function() {};
2867
3541
 
@@ -2884,7 +3558,7 @@ function requireFactoryWithTypeCheckers$6 () {
2884
3558
  return null;
2885
3559
  }
2886
3560
 
2887
- factoryWithTypeCheckers$6 = function(isValidElement, throwOnDirectAccess) {
3561
+ factoryWithTypeCheckers$7 = function(isValidElement, throwOnDirectAccess) {
2888
3562
  /* global Symbol */
2889
3563
  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
2890
3564
  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
@@ -3457,7 +4131,7 @@ function requireFactoryWithTypeCheckers$6 () {
3457
4131
 
3458
4132
  return ReactPropTypes;
3459
4133
  };
3460
- return factoryWithTypeCheckers$6;
4134
+ return factoryWithTypeCheckers$7;
3461
4135
  }
3462
4136
 
3463
4137
  /**
@@ -3467,20 +4141,20 @@ function requireFactoryWithTypeCheckers$6 () {
3467
4141
  * LICENSE file in the root directory of this source tree.
3468
4142
  */
3469
4143
 
3470
- var factoryWithThrowingShims$6;
3471
- var hasRequiredFactoryWithThrowingShims$6;
4144
+ var factoryWithThrowingShims$7;
4145
+ var hasRequiredFactoryWithThrowingShims$7;
3472
4146
 
3473
- function requireFactoryWithThrowingShims$6 () {
3474
- if (hasRequiredFactoryWithThrowingShims$6) return factoryWithThrowingShims$6;
3475
- hasRequiredFactoryWithThrowingShims$6 = 1;
4147
+ function requireFactoryWithThrowingShims$7 () {
4148
+ if (hasRequiredFactoryWithThrowingShims$7) return factoryWithThrowingShims$7;
4149
+ hasRequiredFactoryWithThrowingShims$7 = 1;
3476
4150
 
3477
- var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$6();
4151
+ var ReactPropTypesSecret = /*@__PURE__*/ requireReactPropTypesSecret$7();
3478
4152
 
3479
4153
  function emptyFunction() {}
3480
4154
  function emptyFunctionWithReset() {}
3481
4155
  emptyFunctionWithReset.resetWarningCache = emptyFunction;
3482
4156
 
3483
- factoryWithThrowingShims$6 = function() {
4157
+ factoryWithThrowingShims$7 = function() {
3484
4158
  function shim(props, propName, componentName, location, propFullName, secret) {
3485
4159
  if (secret === ReactPropTypesSecret) {
3486
4160
  // It is still safe when called from React.
@@ -3528,7 +4202,7 @@ function requireFactoryWithThrowingShims$6 () {
3528
4202
 
3529
4203
  return ReactPropTypes;
3530
4204
  };
3531
- return factoryWithThrowingShims$6;
4205
+ return factoryWithThrowingShims$7;
3532
4206
  }
3533
4207
 
3534
4208
  /**
@@ -3538,28 +4212,28 @@ function requireFactoryWithThrowingShims$6 () {
3538
4212
  * LICENSE file in the root directory of this source tree.
3539
4213
  */
3540
4214
 
3541
- var hasRequiredPropTypes$6;
4215
+ var hasRequiredPropTypes$7;
3542
4216
 
3543
- function requirePropTypes$6 () {
3544
- if (hasRequiredPropTypes$6) return propTypes$6.exports;
3545
- hasRequiredPropTypes$6 = 1;
4217
+ function requirePropTypes$7 () {
4218
+ if (hasRequiredPropTypes$7) return propTypes$7.exports;
4219
+ hasRequiredPropTypes$7 = 1;
3546
4220
  if (process.env.NODE_ENV !== 'production') {
3547
- var ReactIs = requireReactIs$6();
4221
+ var ReactIs = requireReactIs$7();
3548
4222
 
3549
4223
  // By explicitly using `prop-types` you are opting into new development behavior.
3550
4224
  // http://fb.me/prop-types-in-prod
3551
4225
  var throwOnDirectAccess = true;
3552
- propTypes$6.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers$6()(ReactIs.isElement, throwOnDirectAccess);
4226
+ propTypes$7.exports = /*@__PURE__*/ requireFactoryWithTypeCheckers$7()(ReactIs.isElement, throwOnDirectAccess);
3553
4227
  } else {
3554
4228
  // By explicitly using `prop-types` you are opting into new production behavior.
3555
4229
  // http://fb.me/prop-types-in-prod
3556
- propTypes$6.exports = /*@__PURE__*/ requireFactoryWithThrowingShims$6()();
4230
+ propTypes$7.exports = /*@__PURE__*/ requireFactoryWithThrowingShims$7()();
3557
4231
  }
3558
- return propTypes$6.exports;
4232
+ return propTypes$7.exports;
3559
4233
  }
3560
4234
 
3561
- var propTypesExports$6 = /*@__PURE__*/ requirePropTypes$6();
3562
- var PropTypes$6 = /*@__PURE__*/getDefaultExportFromCjs$6(propTypesExports$6);
4235
+ var propTypesExports$7 = /*@__PURE__*/ requirePropTypes$7();
4236
+ var PropTypes$7 = /*@__PURE__*/getDefaultExportFromCjs$7(propTypesExports$7);
3563
4237
 
3564
4238
  const SystemOperations = _ref => {
3565
4239
  let {
@@ -3650,15 +4324,15 @@ const SystemOperations = _ref => {
3650
4324
  });
3651
4325
  };
3652
4326
  SystemOperations.propTypes = {
3653
- onPowerOff: PropTypes$6.func,
3654
- onRestart: PropTypes$6.func,
3655
- powerOffLabel: PropTypes$6.string,
3656
- restartLabel: PropTypes$6.string,
3657
- iconClassName: PropTypes$6.string,
3658
- confirmTitle: PropTypes$6.string,
3659
- cancelText: PropTypes$6.string,
3660
- okText: PropTypes$6.string,
3661
- run: PropTypes$6.func
4327
+ onPowerOff: PropTypes$7.func,
4328
+ onRestart: PropTypes$7.func,
4329
+ powerOffLabel: PropTypes$7.string,
4330
+ restartLabel: PropTypes$7.string,
4331
+ iconClassName: PropTypes$7.string,
4332
+ confirmTitle: PropTypes$7.string,
4333
+ cancelText: PropTypes$7.string,
4334
+ okText: PropTypes$7.string,
4335
+ run: PropTypes$7.func
3662
4336
  };
3663
4337
  var SystemOperations$1 = SystemOperations;
3664
4338
 
@@ -3701,10 +4375,10 @@ const useSpaLogo = function () {
3701
4375
  }, "logo")];
3702
4376
  };
3703
4377
  useSpaLogo.propTypes = {
3704
- logoUrl: PropTypes$6.string,
3705
- logoWidth: PropTypes$6.number,
3706
- logoAlt: PropTypes$6.string,
3707
- onClick: PropTypes$6.func
4378
+ logoUrl: PropTypes$7.string,
4379
+ logoWidth: PropTypes$7.number,
4380
+ logoAlt: PropTypes$7.string,
4381
+ onClick: PropTypes$7.func
3708
4382
  };
3709
4383
  var useSpaLogo$1 = useSpaLogo;
3710
4384
 
@@ -3816,10 +4490,10 @@ const LSMLabelField = props => {
3816
4490
  };
3817
4491
  loadLsmData();
3818
4492
  }, [fetchLsmData]);
3819
- return /*#__PURE__*/jsx(Form.Item, _objectSpread2(_objectSpread2({
4493
+ return /*#__PURE__*/jsx(Form.Item, _objectSpread2$1(_objectSpread2$1({
3820
4494
  label: label
3821
4495
  }, formItemProps), {}, {
3822
- children: /*#__PURE__*/jsx(Select, _objectSpread2(_objectSpread2(_objectSpread2({}, field), selectProps), {}, {
4496
+ children: /*#__PURE__*/jsx(Select, _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, field), selectProps), {}, {
3823
4497
  options: lsmList,
3824
4498
  fieldNames: fieldNames,
3825
4499
  allowClear: true,
@@ -3835,15 +4509,15 @@ const LSMLabelField = props => {
3835
4509
  };
3836
4510
  var LSMLabelField$1 = /*#__PURE__*/memo(LSMLabelField);
3837
4511
 
3838
- function _defineProperty$1(e, r, t) {
3839
- return (r = _toPropertyKey$1(r)) in e ? Object.defineProperty(e, r, {
4512
+ function _defineProperty(e, r, t) {
4513
+ return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
3840
4514
  value: t,
3841
4515
  enumerable: !0,
3842
4516
  configurable: !0,
3843
4517
  writable: !0
3844
4518
  }) : e[r] = t, e;
3845
4519
  }
3846
- function ownKeys$1(e, r) {
4520
+ function ownKeys(e, r) {
3847
4521
  var t = Object.keys(e);
3848
4522
  if (Object.getOwnPropertySymbols) {
3849
4523
  var o = Object.getOwnPropertySymbols(e);
@@ -3853,29 +4527,29 @@ function ownKeys$1(e, r) {
3853
4527
  }
3854
4528
  return t;
3855
4529
  }
3856
- function _objectSpread2$1(e) {
4530
+ function _objectSpread2(e) {
3857
4531
  for (var r = 1; r < arguments.length; r++) {
3858
4532
  var t = null != arguments[r] ? arguments[r] : {};
3859
- r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) {
3860
- _defineProperty$1(e, r, t[r]);
3861
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) {
4533
+ r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
4534
+ _defineProperty(e, r, t[r]);
4535
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
3862
4536
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
3863
4537
  });
3864
4538
  }
3865
4539
  return e;
3866
4540
  }
3867
- function _objectWithoutProperties$1(e, t) {
4541
+ function _objectWithoutProperties(e, t) {
3868
4542
  if (null == e) return {};
3869
4543
  var o,
3870
4544
  r,
3871
- i = _objectWithoutPropertiesLoose$1(e, t);
4545
+ i = _objectWithoutPropertiesLoose(e, t);
3872
4546
  if (Object.getOwnPropertySymbols) {
3873
4547
  var n = Object.getOwnPropertySymbols(e);
3874
4548
  for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
3875
4549
  }
3876
4550
  return i;
3877
4551
  }
3878
- function _objectWithoutPropertiesLoose$1(r, e) {
4552
+ function _objectWithoutPropertiesLoose(r, e) {
3879
4553
  if (null == r) return {};
3880
4554
  var t = {};
3881
4555
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
@@ -3884,7 +4558,7 @@ function _objectWithoutPropertiesLoose$1(r, e) {
3884
4558
  }
3885
4559
  return t;
3886
4560
  }
3887
- function _toPrimitive$1(t, r) {
4561
+ function _toPrimitive(t, r) {
3888
4562
  if ("object" != typeof t || !t) return t;
3889
4563
  var e = t[Symbol.toPrimitive];
3890
4564
  if (void 0 !== e) {
@@ -3894,19 +4568,19 @@ function _toPrimitive$1(t, r) {
3894
4568
  }
3895
4569
  return ("string" === r ? String : Number)(t);
3896
4570
  }
3897
- function _toPropertyKey$1(t) {
3898
- var i = _toPrimitive$1(t, "string");
4571
+ function _toPropertyKey(t) {
4572
+ var i = _toPrimitive(t, "string");
3899
4573
  return "symbol" == typeof i ? i : i + "";
3900
4574
  }
3901
- const _excluded$4 = ["width", "okText", "cancelText", "styles"];
3902
- const StyledModal$2 = props => {
4575
+ const _excluded$3 = ["width", "okText", "cancelText", "styles"];
4576
+ const StyledModal = props => {
3903
4577
  const {
3904
4578
  width = "520px",
3905
4579
  okText = "Apply",
3906
4580
  cancelText = "Close",
3907
4581
  styles: propStyles = {}
3908
4582
  } = props,
3909
- restProps = _objectWithoutProperties$1(props, _excluded$4);
4583
+ restProps = _objectWithoutProperties(props, _excluded$3);
3910
4584
 
3911
4585
  // 基础样式配置
3912
4586
  const baseStyles = {
@@ -3934,15 +4608,1192 @@ const StyledModal$2 = props => {
3934
4608
  };
3935
4609
 
3936
4610
  // 合并样式
3937
- const styles = _objectSpread2$1(_objectSpread2$1({}, baseStyles), propStyles);
3938
- return /*#__PURE__*/jsx(Modal, _objectSpread2$1({
4611
+ const styles = _objectSpread2(_objectSpread2({}, baseStyles), propStyles);
4612
+ return /*#__PURE__*/jsx(Modal, _objectSpread2({
3939
4613
  width: width,
3940
4614
  okText: okText,
3941
4615
  cancelText: cancelText,
3942
4616
  styles: styles
3943
4617
  }, restProps));
3944
4618
  };
3945
- var StyledModal$3 = StyledModal$2;
4619
+ var StyledModal$1 = StyledModal;
4620
+ function getDefaultExportFromCjs$6(x) {
4621
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
4622
+ }
4623
+ var propTypes$6 = {
4624
+ exports: {}
4625
+ };
4626
+ var reactIs$6 = {
4627
+ exports: {}
4628
+ };
4629
+ var reactIs_production_min$6 = {};
4630
+
4631
+ /** @license React v16.13.1
4632
+ * react-is.production.min.js
4633
+ *
4634
+ * Copyright (c) Facebook, Inc. and its affiliates.
4635
+ *
4636
+ * This source code is licensed under the MIT license found in the
4637
+ * LICENSE file in the root directory of this source tree.
4638
+ */
4639
+
4640
+ var hasRequiredReactIs_production_min$6;
4641
+ function requireReactIs_production_min$6() {
4642
+ if (hasRequiredReactIs_production_min$6) return reactIs_production_min$6;
4643
+ hasRequiredReactIs_production_min$6 = 1;
4644
+ var b = "function" === typeof Symbol && Symbol.for,
4645
+ c = b ? Symbol.for("react.element") : 60103,
4646
+ d = b ? Symbol.for("react.portal") : 60106,
4647
+ e = b ? Symbol.for("react.fragment") : 60107,
4648
+ f = b ? Symbol.for("react.strict_mode") : 60108,
4649
+ g = b ? Symbol.for("react.profiler") : 60114,
4650
+ h = b ? Symbol.for("react.provider") : 60109,
4651
+ k = b ? Symbol.for("react.context") : 60110,
4652
+ l = b ? Symbol.for("react.async_mode") : 60111,
4653
+ m = b ? Symbol.for("react.concurrent_mode") : 60111,
4654
+ n = b ? Symbol.for("react.forward_ref") : 60112,
4655
+ p = b ? Symbol.for("react.suspense") : 60113,
4656
+ q = b ? Symbol.for("react.suspense_list") : 60120,
4657
+ r = b ? Symbol.for("react.memo") : 60115,
4658
+ t = b ? Symbol.for("react.lazy") : 60116,
4659
+ v = b ? Symbol.for("react.block") : 60121,
4660
+ w = b ? Symbol.for("react.fundamental") : 60117,
4661
+ x = b ? Symbol.for("react.responder") : 60118,
4662
+ y = b ? Symbol.for("react.scope") : 60119;
4663
+ function z(a) {
4664
+ if ("object" === typeof a && null !== a) {
4665
+ var u = a.$$typeof;
4666
+ switch (u) {
4667
+ case c:
4668
+ switch (a = a.type, a) {
4669
+ case l:
4670
+ case m:
4671
+ case e:
4672
+ case g:
4673
+ case f:
4674
+ case p:
4675
+ return a;
4676
+ default:
4677
+ switch (a = a && a.$$typeof, a) {
4678
+ case k:
4679
+ case n:
4680
+ case t:
4681
+ case r:
4682
+ case h:
4683
+ return a;
4684
+ default:
4685
+ return u;
4686
+ }
4687
+ }
4688
+ case d:
4689
+ return u;
4690
+ }
4691
+ }
4692
+ }
4693
+ function A(a) {
4694
+ return z(a) === m;
4695
+ }
4696
+ reactIs_production_min$6.AsyncMode = l;
4697
+ reactIs_production_min$6.ConcurrentMode = m;
4698
+ reactIs_production_min$6.ContextConsumer = k;
4699
+ reactIs_production_min$6.ContextProvider = h;
4700
+ reactIs_production_min$6.Element = c;
4701
+ reactIs_production_min$6.ForwardRef = n;
4702
+ reactIs_production_min$6.Fragment = e;
4703
+ reactIs_production_min$6.Lazy = t;
4704
+ reactIs_production_min$6.Memo = r;
4705
+ reactIs_production_min$6.Portal = d;
4706
+ reactIs_production_min$6.Profiler = g;
4707
+ reactIs_production_min$6.StrictMode = f;
4708
+ reactIs_production_min$6.Suspense = p;
4709
+ reactIs_production_min$6.isAsyncMode = function (a) {
4710
+ return A(a) || z(a) === l;
4711
+ };
4712
+ reactIs_production_min$6.isConcurrentMode = A;
4713
+ reactIs_production_min$6.isContextConsumer = function (a) {
4714
+ return z(a) === k;
4715
+ };
4716
+ reactIs_production_min$6.isContextProvider = function (a) {
4717
+ return z(a) === h;
4718
+ };
4719
+ reactIs_production_min$6.isElement = function (a) {
4720
+ return "object" === typeof a && null !== a && a.$$typeof === c;
4721
+ };
4722
+ reactIs_production_min$6.isForwardRef = function (a) {
4723
+ return z(a) === n;
4724
+ };
4725
+ reactIs_production_min$6.isFragment = function (a) {
4726
+ return z(a) === e;
4727
+ };
4728
+ reactIs_production_min$6.isLazy = function (a) {
4729
+ return z(a) === t;
4730
+ };
4731
+ reactIs_production_min$6.isMemo = function (a) {
4732
+ return z(a) === r;
4733
+ };
4734
+ reactIs_production_min$6.isPortal = function (a) {
4735
+ return z(a) === d;
4736
+ };
4737
+ reactIs_production_min$6.isProfiler = function (a) {
4738
+ return z(a) === g;
4739
+ };
4740
+ reactIs_production_min$6.isStrictMode = function (a) {
4741
+ return z(a) === f;
4742
+ };
4743
+ reactIs_production_min$6.isSuspense = function (a) {
4744
+ return z(a) === p;
4745
+ };
4746
+ reactIs_production_min$6.isValidElementType = function (a) {
4747
+ 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);
4748
+ };
4749
+ reactIs_production_min$6.typeOf = z;
4750
+ return reactIs_production_min$6;
4751
+ }
4752
+ var reactIs_development$6 = {};
4753
+
4754
+ /** @license React v16.13.1
4755
+ * react-is.development.js
4756
+ *
4757
+ * Copyright (c) Facebook, Inc. and its affiliates.
4758
+ *
4759
+ * This source code is licensed under the MIT license found in the
4760
+ * LICENSE file in the root directory of this source tree.
4761
+ */
4762
+
4763
+ var hasRequiredReactIs_development$6;
4764
+ function requireReactIs_development$6() {
4765
+ if (hasRequiredReactIs_development$6) return reactIs_development$6;
4766
+ hasRequiredReactIs_development$6 = 1;
4767
+ if (process.env.NODE_ENV !== "production") {
4768
+ (function () {
4769
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
4770
+ // nor polyfill, then a plain number is used for performance.
4771
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
4772
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
4773
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
4774
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
4775
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
4776
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
4777
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
4778
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
4779
+ // (unstable) APIs that have been removed. Can we remove the symbols?
4780
+
4781
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
4782
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
4783
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
4784
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
4785
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
4786
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
4787
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
4788
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
4789
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
4790
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
4791
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
4792
+ function isValidElementType(type) {
4793
+ return typeof type === 'string' || typeof type === 'function' ||
4794
+ // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
4795
+ 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);
4796
+ }
4797
+ function typeOf(object) {
4798
+ if (typeof object === 'object' && object !== null) {
4799
+ var $$typeof = object.$$typeof;
4800
+ switch ($$typeof) {
4801
+ case REACT_ELEMENT_TYPE:
4802
+ var type = object.type;
4803
+ switch (type) {
4804
+ case REACT_ASYNC_MODE_TYPE:
4805
+ case REACT_CONCURRENT_MODE_TYPE:
4806
+ case REACT_FRAGMENT_TYPE:
4807
+ case REACT_PROFILER_TYPE:
4808
+ case REACT_STRICT_MODE_TYPE:
4809
+ case REACT_SUSPENSE_TYPE:
4810
+ return type;
4811
+ default:
4812
+ var $$typeofType = type && type.$$typeof;
4813
+ switch ($$typeofType) {
4814
+ case REACT_CONTEXT_TYPE:
4815
+ case REACT_FORWARD_REF_TYPE:
4816
+ case REACT_LAZY_TYPE:
4817
+ case REACT_MEMO_TYPE:
4818
+ case REACT_PROVIDER_TYPE:
4819
+ return $$typeofType;
4820
+ default:
4821
+ return $$typeof;
4822
+ }
4823
+ }
4824
+ case REACT_PORTAL_TYPE:
4825
+ return $$typeof;
4826
+ }
4827
+ }
4828
+ return undefined;
4829
+ } // AsyncMode is deprecated along with isAsyncMode
4830
+
4831
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
4832
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
4833
+ var ContextConsumer = REACT_CONTEXT_TYPE;
4834
+ var ContextProvider = REACT_PROVIDER_TYPE;
4835
+ var Element = REACT_ELEMENT_TYPE;
4836
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
4837
+ var Fragment = REACT_FRAGMENT_TYPE;
4838
+ var Lazy = REACT_LAZY_TYPE;
4839
+ var Memo = REACT_MEMO_TYPE;
4840
+ var Portal = REACT_PORTAL_TYPE;
4841
+ var Profiler = REACT_PROFILER_TYPE;
4842
+ var StrictMode = REACT_STRICT_MODE_TYPE;
4843
+ var Suspense = REACT_SUSPENSE_TYPE;
4844
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
4845
+
4846
+ function isAsyncMode(object) {
4847
+ {
4848
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
4849
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
4850
+
4851
+ 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.');
4852
+ }
4853
+ }
4854
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
4855
+ }
4856
+ function isConcurrentMode(object) {
4857
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
4858
+ }
4859
+ function isContextConsumer(object) {
4860
+ return typeOf(object) === REACT_CONTEXT_TYPE;
4861
+ }
4862
+ function isContextProvider(object) {
4863
+ return typeOf(object) === REACT_PROVIDER_TYPE;
4864
+ }
4865
+ function isElement(object) {
4866
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
4867
+ }
4868
+ function isForwardRef(object) {
4869
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
4870
+ }
4871
+ function isFragment(object) {
4872
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
4873
+ }
4874
+ function isLazy(object) {
4875
+ return typeOf(object) === REACT_LAZY_TYPE;
4876
+ }
4877
+ function isMemo(object) {
4878
+ return typeOf(object) === REACT_MEMO_TYPE;
4879
+ }
4880
+ function isPortal(object) {
4881
+ return typeOf(object) === REACT_PORTAL_TYPE;
4882
+ }
4883
+ function isProfiler(object) {
4884
+ return typeOf(object) === REACT_PROFILER_TYPE;
4885
+ }
4886
+ function isStrictMode(object) {
4887
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
4888
+ }
4889
+ function isSuspense(object) {
4890
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
4891
+ }
4892
+ reactIs_development$6.AsyncMode = AsyncMode;
4893
+ reactIs_development$6.ConcurrentMode = ConcurrentMode;
4894
+ reactIs_development$6.ContextConsumer = ContextConsumer;
4895
+ reactIs_development$6.ContextProvider = ContextProvider;
4896
+ reactIs_development$6.Element = Element;
4897
+ reactIs_development$6.ForwardRef = ForwardRef;
4898
+ reactIs_development$6.Fragment = Fragment;
4899
+ reactIs_development$6.Lazy = Lazy;
4900
+ reactIs_development$6.Memo = Memo;
4901
+ reactIs_development$6.Portal = Portal;
4902
+ reactIs_development$6.Profiler = Profiler;
4903
+ reactIs_development$6.StrictMode = StrictMode;
4904
+ reactIs_development$6.Suspense = Suspense;
4905
+ reactIs_development$6.isAsyncMode = isAsyncMode;
4906
+ reactIs_development$6.isConcurrentMode = isConcurrentMode;
4907
+ reactIs_development$6.isContextConsumer = isContextConsumer;
4908
+ reactIs_development$6.isContextProvider = isContextProvider;
4909
+ reactIs_development$6.isElement = isElement;
4910
+ reactIs_development$6.isForwardRef = isForwardRef;
4911
+ reactIs_development$6.isFragment = isFragment;
4912
+ reactIs_development$6.isLazy = isLazy;
4913
+ reactIs_development$6.isMemo = isMemo;
4914
+ reactIs_development$6.isPortal = isPortal;
4915
+ reactIs_development$6.isProfiler = isProfiler;
4916
+ reactIs_development$6.isStrictMode = isStrictMode;
4917
+ reactIs_development$6.isSuspense = isSuspense;
4918
+ reactIs_development$6.isValidElementType = isValidElementType;
4919
+ reactIs_development$6.typeOf = typeOf;
4920
+ })();
4921
+ }
4922
+ return reactIs_development$6;
4923
+ }
4924
+ var hasRequiredReactIs$6;
4925
+ function requireReactIs$6() {
4926
+ if (hasRequiredReactIs$6) return reactIs$6.exports;
4927
+ hasRequiredReactIs$6 = 1;
4928
+ if (process.env.NODE_ENV === 'production') {
4929
+ reactIs$6.exports = requireReactIs_production_min$6();
4930
+ } else {
4931
+ reactIs$6.exports = requireReactIs_development$6();
4932
+ }
4933
+ return reactIs$6.exports;
4934
+ }
4935
+
4936
+ /*
4937
+ object-assign
4938
+ (c) Sindre Sorhus
4939
+ @license MIT
4940
+ */
4941
+
4942
+ var objectAssign$6;
4943
+ var hasRequiredObjectAssign$6;
4944
+ function requireObjectAssign$6() {
4945
+ if (hasRequiredObjectAssign$6) return objectAssign$6;
4946
+ hasRequiredObjectAssign$6 = 1;
4947
+ /* eslint-disable no-unused-vars */
4948
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
4949
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
4950
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
4951
+ function toObject(val) {
4952
+ if (val === null || val === undefined) {
4953
+ throw new TypeError('Object.assign cannot be called with null or undefined');
4954
+ }
4955
+ return Object(val);
4956
+ }
4957
+ function shouldUseNative() {
4958
+ try {
4959
+ if (!Object.assign) {
4960
+ return false;
4961
+ }
4962
+
4963
+ // Detect buggy property enumeration order in older V8 versions.
4964
+
4965
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
4966
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
4967
+ test1[5] = 'de';
4968
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
4969
+ return false;
4970
+ }
4971
+
4972
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4973
+ var test2 = {};
4974
+ for (var i = 0; i < 10; i++) {
4975
+ test2['_' + String.fromCharCode(i)] = i;
4976
+ }
4977
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
4978
+ return test2[n];
4979
+ });
4980
+ if (order2.join('') !== '0123456789') {
4981
+ return false;
4982
+ }
4983
+
4984
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
4985
+ var test3 = {};
4986
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
4987
+ test3[letter] = letter;
4988
+ });
4989
+ if (Object.keys(Object.assign({}, test3)).join('') !== 'abcdefghijklmnopqrst') {
4990
+ return false;
4991
+ }
4992
+ return true;
4993
+ } catch (err) {
4994
+ // We don't expect any of the above to throw, but better to be safe.
4995
+ return false;
4996
+ }
4997
+ }
4998
+ objectAssign$6 = shouldUseNative() ? Object.assign : function (target, source) {
4999
+ var from;
5000
+ var to = toObject(target);
5001
+ var symbols;
5002
+ for (var s = 1; s < arguments.length; s++) {
5003
+ from = Object(arguments[s]);
5004
+ for (var key in from) {
5005
+ if (hasOwnProperty.call(from, key)) {
5006
+ to[key] = from[key];
5007
+ }
5008
+ }
5009
+ if (getOwnPropertySymbols) {
5010
+ symbols = getOwnPropertySymbols(from);
5011
+ for (var i = 0; i < symbols.length; i++) {
5012
+ if (propIsEnumerable.call(from, symbols[i])) {
5013
+ to[symbols[i]] = from[symbols[i]];
5014
+ }
5015
+ }
5016
+ }
5017
+ }
5018
+ return to;
5019
+ };
5020
+ return objectAssign$6;
5021
+ }
5022
+
5023
+ /**
5024
+ * Copyright (c) 2013-present, Facebook, Inc.
5025
+ *
5026
+ * This source code is licensed under the MIT license found in the
5027
+ * LICENSE file in the root directory of this source tree.
5028
+ */
5029
+
5030
+ var ReactPropTypesSecret_1$6;
5031
+ var hasRequiredReactPropTypesSecret$6;
5032
+ function requireReactPropTypesSecret$6() {
5033
+ if (hasRequiredReactPropTypesSecret$6) return ReactPropTypesSecret_1$6;
5034
+ hasRequiredReactPropTypesSecret$6 = 1;
5035
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
5036
+ ReactPropTypesSecret_1$6 = ReactPropTypesSecret;
5037
+ return ReactPropTypesSecret_1$6;
5038
+ }
5039
+ var has$6;
5040
+ var hasRequiredHas$6;
5041
+ function requireHas$6() {
5042
+ if (hasRequiredHas$6) return has$6;
5043
+ hasRequiredHas$6 = 1;
5044
+ has$6 = Function.call.bind(Object.prototype.hasOwnProperty);
5045
+ return has$6;
5046
+ }
5047
+
5048
+ /**
5049
+ * Copyright (c) 2013-present, Facebook, Inc.
5050
+ *
5051
+ * This source code is licensed under the MIT license found in the
5052
+ * LICENSE file in the root directory of this source tree.
5053
+ */
5054
+
5055
+ var checkPropTypes_1$6;
5056
+ var hasRequiredCheckPropTypes$6;
5057
+ function requireCheckPropTypes$6() {
5058
+ if (hasRequiredCheckPropTypes$6) return checkPropTypes_1$6;
5059
+ hasRequiredCheckPropTypes$6 = 1;
5060
+ var printWarning = function () {};
5061
+ if (process.env.NODE_ENV !== 'production') {
5062
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$6();
5063
+ var loggedTypeFailures = {};
5064
+ var has = /*@__PURE__*/requireHas$6();
5065
+ printWarning = function (text) {
5066
+ var message = 'Warning: ' + text;
5067
+ if (typeof console !== 'undefined') {
5068
+ console.error(message);
5069
+ }
5070
+ try {
5071
+ // --- Welcome to debugging React ---
5072
+ // This error was thrown as a convenience so that you can use this stack
5073
+ // to find the callsite that caused this warning to fire.
5074
+ throw new Error(message);
5075
+ } catch (x) {/**/}
5076
+ };
5077
+ }
5078
+
5079
+ /**
5080
+ * Assert that the values match with the type specs.
5081
+ * Error messages are memorized and will only be shown once.
5082
+ *
5083
+ * @param {object} typeSpecs Map of name to a ReactPropType
5084
+ * @param {object} values Runtime values that need to be type-checked
5085
+ * @param {string} location e.g. "prop", "context", "child context"
5086
+ * @param {string} componentName Name of the component for error messages.
5087
+ * @param {?Function} getStack Returns the component stack.
5088
+ * @private
5089
+ */
5090
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
5091
+ if (process.env.NODE_ENV !== 'production') {
5092
+ for (var typeSpecName in typeSpecs) {
5093
+ if (has(typeSpecs, typeSpecName)) {
5094
+ var error;
5095
+ // Prop type validation may throw. In case they do, we don't want to
5096
+ // fail the render phase where it didn't fail before. So we log it.
5097
+ // After these have been cleaned up, we'll let them throw.
5098
+ try {
5099
+ // This is intentionally an invariant that gets caught. It's the same
5100
+ // behavior as without this statement except with a better message.
5101
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
5102
+ 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`.');
5103
+ err.name = 'Invariant Violation';
5104
+ throw err;
5105
+ }
5106
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
5107
+ } catch (ex) {
5108
+ error = ex;
5109
+ }
5110
+ if (error && !(error instanceof Error)) {
5111
+ 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).');
5112
+ }
5113
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
5114
+ // Only monitor this failure once because there tends to be a lot of the
5115
+ // same error.
5116
+ loggedTypeFailures[error.message] = true;
5117
+ var stack = getStack ? getStack() : '';
5118
+ printWarning('Failed ' + location + ' type: ' + error.message + (stack != null ? stack : ''));
5119
+ }
5120
+ }
5121
+ }
5122
+ }
5123
+ }
5124
+
5125
+ /**
5126
+ * Resets warning cache when testing.
5127
+ *
5128
+ * @private
5129
+ */
5130
+ checkPropTypes.resetWarningCache = function () {
5131
+ if (process.env.NODE_ENV !== 'production') {
5132
+ loggedTypeFailures = {};
5133
+ }
5134
+ };
5135
+ checkPropTypes_1$6 = checkPropTypes;
5136
+ return checkPropTypes_1$6;
5137
+ }
5138
+
5139
+ /**
5140
+ * Copyright (c) 2013-present, Facebook, Inc.
5141
+ *
5142
+ * This source code is licensed under the MIT license found in the
5143
+ * LICENSE file in the root directory of this source tree.
5144
+ */
5145
+
5146
+ var factoryWithTypeCheckers$6;
5147
+ var hasRequiredFactoryWithTypeCheckers$6;
5148
+ function requireFactoryWithTypeCheckers$6() {
5149
+ if (hasRequiredFactoryWithTypeCheckers$6) return factoryWithTypeCheckers$6;
5150
+ hasRequiredFactoryWithTypeCheckers$6 = 1;
5151
+ var ReactIs = requireReactIs$6();
5152
+ var assign = requireObjectAssign$6();
5153
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$6();
5154
+ var has = /*@__PURE__*/requireHas$6();
5155
+ var checkPropTypes = /*@__PURE__*/requireCheckPropTypes$6();
5156
+ var printWarning = function () {};
5157
+ if (process.env.NODE_ENV !== 'production') {
5158
+ printWarning = function (text) {
5159
+ var message = 'Warning: ' + text;
5160
+ if (typeof console !== 'undefined') {
5161
+ console.error(message);
5162
+ }
5163
+ try {
5164
+ // --- Welcome to debugging React ---
5165
+ // This error was thrown as a convenience so that you can use this stack
5166
+ // to find the callsite that caused this warning to fire.
5167
+ throw new Error(message);
5168
+ } catch (x) {}
5169
+ };
5170
+ }
5171
+ function emptyFunctionThatReturnsNull() {
5172
+ return null;
5173
+ }
5174
+ factoryWithTypeCheckers$6 = function (isValidElement, throwOnDirectAccess) {
5175
+ /* global Symbol */
5176
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
5177
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
5178
+
5179
+ /**
5180
+ * Returns the iterator method function contained on the iterable object.
5181
+ *
5182
+ * Be sure to invoke the function with the iterable as context:
5183
+ *
5184
+ * var iteratorFn = getIteratorFn(myIterable);
5185
+ * if (iteratorFn) {
5186
+ * var iterator = iteratorFn.call(myIterable);
5187
+ * ...
5188
+ * }
5189
+ *
5190
+ * @param {?object} maybeIterable
5191
+ * @return {?function}
5192
+ */
5193
+ function getIteratorFn(maybeIterable) {
5194
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
5195
+ if (typeof iteratorFn === 'function') {
5196
+ return iteratorFn;
5197
+ }
5198
+ }
5199
+
5200
+ /**
5201
+ * Collection of methods that allow declaration and validation of props that are
5202
+ * supplied to React components. Example usage:
5203
+ *
5204
+ * var Props = require('ReactPropTypes');
5205
+ * var MyArticle = React.createClass({
5206
+ * propTypes: {
5207
+ * // An optional string prop named "description".
5208
+ * description: Props.string,
5209
+ *
5210
+ * // A required enum prop named "category".
5211
+ * category: Props.oneOf(['News','Photos']).isRequired,
5212
+ *
5213
+ * // A prop named "dialog" that requires an instance of Dialog.
5214
+ * dialog: Props.instanceOf(Dialog).isRequired
5215
+ * },
5216
+ * render: function() { ... }
5217
+ * });
5218
+ *
5219
+ * A more formal specification of how these methods are used:
5220
+ *
5221
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
5222
+ * decl := ReactPropTypes.{type}(.isRequired)?
5223
+ *
5224
+ * Each and every declaration produces a function with the same signature. This
5225
+ * allows the creation of custom validation functions. For example:
5226
+ *
5227
+ * var MyLink = React.createClass({
5228
+ * propTypes: {
5229
+ * // An optional string or URI prop named "href".
5230
+ * href: function(props, propName, componentName) {
5231
+ * var propValue = props[propName];
5232
+ * if (propValue != null && typeof propValue !== 'string' &&
5233
+ * !(propValue instanceof URI)) {
5234
+ * return new Error(
5235
+ * 'Expected a string or an URI for ' + propName + ' in ' +
5236
+ * componentName
5237
+ * );
5238
+ * }
5239
+ * }
5240
+ * },
5241
+ * render: function() {...}
5242
+ * });
5243
+ *
5244
+ * @internal
5245
+ */
5246
+
5247
+ var ANONYMOUS = '<<anonymous>>';
5248
+
5249
+ // Important!
5250
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
5251
+ var ReactPropTypes = {
5252
+ array: createPrimitiveTypeChecker('array'),
5253
+ bigint: createPrimitiveTypeChecker('bigint'),
5254
+ bool: createPrimitiveTypeChecker('boolean'),
5255
+ func: createPrimitiveTypeChecker('function'),
5256
+ number: createPrimitiveTypeChecker('number'),
5257
+ object: createPrimitiveTypeChecker('object'),
5258
+ string: createPrimitiveTypeChecker('string'),
5259
+ symbol: createPrimitiveTypeChecker('symbol'),
5260
+ any: createAnyTypeChecker(),
5261
+ arrayOf: createArrayOfTypeChecker,
5262
+ element: createElementTypeChecker(),
5263
+ elementType: createElementTypeTypeChecker(),
5264
+ instanceOf: createInstanceTypeChecker,
5265
+ node: createNodeChecker(),
5266
+ objectOf: createObjectOfTypeChecker,
5267
+ oneOf: createEnumTypeChecker,
5268
+ oneOfType: createUnionTypeChecker,
5269
+ shape: createShapeTypeChecker,
5270
+ exact: createStrictShapeTypeChecker
5271
+ };
5272
+
5273
+ /**
5274
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
5275
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
5276
+ */
5277
+ /*eslint-disable no-self-compare*/
5278
+ function is(x, y) {
5279
+ // SameValue algorithm
5280
+ if (x === y) {
5281
+ // Steps 1-5, 7-10
5282
+ // Steps 6.b-6.e: +0 != -0
5283
+ return x !== 0 || 1 / x === 1 / y;
5284
+ } else {
5285
+ // Step 6.a: NaN == NaN
5286
+ return x !== x && y !== y;
5287
+ }
5288
+ }
5289
+ /*eslint-enable no-self-compare*/
5290
+
5291
+ /**
5292
+ * We use an Error-like object for backward compatibility as people may call
5293
+ * PropTypes directly and inspect their output. However, we don't use real
5294
+ * Errors anymore. We don't inspect their stack anyway, and creating them
5295
+ * is prohibitively expensive if they are created too often, such as what
5296
+ * happens in oneOfType() for any type before the one that matched.
5297
+ */
5298
+ function PropTypeError(message, data) {
5299
+ this.message = message;
5300
+ this.data = data && typeof data === 'object' ? data : {};
5301
+ this.stack = '';
5302
+ }
5303
+ // Make `instanceof Error` still work for returned errors.
5304
+ PropTypeError.prototype = Error.prototype;
5305
+ function createChainableTypeChecker(validate) {
5306
+ if (process.env.NODE_ENV !== 'production') {
5307
+ var manualPropTypeCallCache = {};
5308
+ var manualPropTypeWarningCount = 0;
5309
+ }
5310
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
5311
+ componentName = componentName || ANONYMOUS;
5312
+ propFullName = propFullName || propName;
5313
+ if (secret !== ReactPropTypesSecret) {
5314
+ if (throwOnDirectAccess) {
5315
+ // New behavior only for users of `prop-types` package
5316
+ 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');
5317
+ err.name = 'Invariant Violation';
5318
+ throw err;
5319
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
5320
+ // Old behavior for people using React.PropTypes
5321
+ var cacheKey = componentName + ':' + propName;
5322
+ if (!manualPropTypeCallCache[cacheKey] &&
5323
+ // Avoid spamming the console because they are often not actionable except for lib authors
5324
+ manualPropTypeWarningCount < 3) {
5325
+ 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.');
5326
+ manualPropTypeCallCache[cacheKey] = true;
5327
+ manualPropTypeWarningCount++;
5328
+ }
5329
+ }
5330
+ }
5331
+ if (props[propName] == null) {
5332
+ if (isRequired) {
5333
+ if (props[propName] === null) {
5334
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
5335
+ }
5336
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
5337
+ }
5338
+ return null;
5339
+ } else {
5340
+ return validate(props, propName, componentName, location, propFullName);
5341
+ }
5342
+ }
5343
+ var chainedCheckType = checkType.bind(null, false);
5344
+ chainedCheckType.isRequired = checkType.bind(null, true);
5345
+ return chainedCheckType;
5346
+ }
5347
+ function createPrimitiveTypeChecker(expectedType) {
5348
+ function validate(props, propName, componentName, location, propFullName, secret) {
5349
+ var propValue = props[propName];
5350
+ var propType = getPropType(propValue);
5351
+ if (propType !== expectedType) {
5352
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
5353
+ // check, but we can offer a more precise error message here rather than
5354
+ // 'of type `object`'.
5355
+ var preciseType = getPreciseType(propValue);
5356
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'), {
5357
+ expectedType: expectedType
5358
+ });
5359
+ }
5360
+ return null;
5361
+ }
5362
+ return createChainableTypeChecker(validate);
5363
+ }
5364
+ function createAnyTypeChecker() {
5365
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
5366
+ }
5367
+ function createArrayOfTypeChecker(typeChecker) {
5368
+ function validate(props, propName, componentName, location, propFullName) {
5369
+ if (typeof typeChecker !== 'function') {
5370
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
5371
+ }
5372
+ var propValue = props[propName];
5373
+ if (!Array.isArray(propValue)) {
5374
+ var propType = getPropType(propValue);
5375
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
5376
+ }
5377
+ for (var i = 0; i < propValue.length; i++) {
5378
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
5379
+ if (error instanceof Error) {
5380
+ return error;
5381
+ }
5382
+ }
5383
+ return null;
5384
+ }
5385
+ return createChainableTypeChecker(validate);
5386
+ }
5387
+ function createElementTypeChecker() {
5388
+ function validate(props, propName, componentName, location, propFullName) {
5389
+ var propValue = props[propName];
5390
+ if (!isValidElement(propValue)) {
5391
+ var propType = getPropType(propValue);
5392
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
5393
+ }
5394
+ return null;
5395
+ }
5396
+ return createChainableTypeChecker(validate);
5397
+ }
5398
+ function createElementTypeTypeChecker() {
5399
+ function validate(props, propName, componentName, location, propFullName) {
5400
+ var propValue = props[propName];
5401
+ if (!ReactIs.isValidElementType(propValue)) {
5402
+ var propType = getPropType(propValue);
5403
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
5404
+ }
5405
+ return null;
5406
+ }
5407
+ return createChainableTypeChecker(validate);
5408
+ }
5409
+ function createInstanceTypeChecker(expectedClass) {
5410
+ function validate(props, propName, componentName, location, propFullName) {
5411
+ if (!(props[propName] instanceof expectedClass)) {
5412
+ var expectedClassName = expectedClass.name || ANONYMOUS;
5413
+ var actualClassName = getClassName(props[propName]);
5414
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
5415
+ }
5416
+ return null;
5417
+ }
5418
+ return createChainableTypeChecker(validate);
5419
+ }
5420
+ function createEnumTypeChecker(expectedValues) {
5421
+ if (!Array.isArray(expectedValues)) {
5422
+ if (process.env.NODE_ENV !== 'production') {
5423
+ if (arguments.length > 1) {
5424
+ 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]).');
5425
+ } else {
5426
+ printWarning('Invalid argument supplied to oneOf, expected an array.');
5427
+ }
5428
+ }
5429
+ return emptyFunctionThatReturnsNull;
5430
+ }
5431
+ function validate(props, propName, componentName, location, propFullName) {
5432
+ var propValue = props[propName];
5433
+ for (var i = 0; i < expectedValues.length; i++) {
5434
+ if (is(propValue, expectedValues[i])) {
5435
+ return null;
5436
+ }
5437
+ }
5438
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
5439
+ var type = getPreciseType(value);
5440
+ if (type === 'symbol') {
5441
+ return String(value);
5442
+ }
5443
+ return value;
5444
+ });
5445
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
5446
+ }
5447
+ return createChainableTypeChecker(validate);
5448
+ }
5449
+ function createObjectOfTypeChecker(typeChecker) {
5450
+ function validate(props, propName, componentName, location, propFullName) {
5451
+ if (typeof typeChecker !== 'function') {
5452
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
5453
+ }
5454
+ var propValue = props[propName];
5455
+ var propType = getPropType(propValue);
5456
+ if (propType !== 'object') {
5457
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
5458
+ }
5459
+ for (var key in propValue) {
5460
+ if (has(propValue, key)) {
5461
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5462
+ if (error instanceof Error) {
5463
+ return error;
5464
+ }
5465
+ }
5466
+ }
5467
+ return null;
5468
+ }
5469
+ return createChainableTypeChecker(validate);
5470
+ }
5471
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
5472
+ if (!Array.isArray(arrayOfTypeCheckers)) {
5473
+ process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
5474
+ return emptyFunctionThatReturnsNull;
5475
+ }
5476
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5477
+ var checker = arrayOfTypeCheckers[i];
5478
+ if (typeof checker !== 'function') {
5479
+ printWarning('Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.');
5480
+ return emptyFunctionThatReturnsNull;
5481
+ }
5482
+ }
5483
+ function validate(props, propName, componentName, location, propFullName) {
5484
+ var expectedTypes = [];
5485
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
5486
+ var checker = arrayOfTypeCheckers[i];
5487
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
5488
+ if (checkerResult == null) {
5489
+ return null;
5490
+ }
5491
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
5492
+ expectedTypes.push(checkerResult.data.expectedType);
5493
+ }
5494
+ }
5495
+ var expectedTypesMessage = expectedTypes.length > 0 ? ', expected one of type [' + expectedTypes.join(', ') + ']' : '';
5496
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
5497
+ }
5498
+ return createChainableTypeChecker(validate);
5499
+ }
5500
+ function createNodeChecker() {
5501
+ function validate(props, propName, componentName, location, propFullName) {
5502
+ if (!isNode(props[propName])) {
5503
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
5504
+ }
5505
+ return null;
5506
+ }
5507
+ return createChainableTypeChecker(validate);
5508
+ }
5509
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
5510
+ 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 + '`.');
5511
+ }
5512
+ function createShapeTypeChecker(shapeTypes) {
5513
+ function validate(props, propName, componentName, location, propFullName) {
5514
+ var propValue = props[propName];
5515
+ var propType = getPropType(propValue);
5516
+ if (propType !== 'object') {
5517
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5518
+ }
5519
+ for (var key in shapeTypes) {
5520
+ var checker = shapeTypes[key];
5521
+ if (typeof checker !== 'function') {
5522
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5523
+ }
5524
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5525
+ if (error) {
5526
+ return error;
5527
+ }
5528
+ }
5529
+ return null;
5530
+ }
5531
+ return createChainableTypeChecker(validate);
5532
+ }
5533
+ function createStrictShapeTypeChecker(shapeTypes) {
5534
+ function validate(props, propName, componentName, location, propFullName) {
5535
+ var propValue = props[propName];
5536
+ var propType = getPropType(propValue);
5537
+ if (propType !== 'object') {
5538
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
5539
+ }
5540
+ // We need to check all keys in case some are required but missing from props.
5541
+ var allKeys = assign({}, props[propName], shapeTypes);
5542
+ for (var key in allKeys) {
5543
+ var checker = shapeTypes[key];
5544
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
5545
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
5546
+ }
5547
+ if (!checker) {
5548
+ 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, ' '));
5549
+ }
5550
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
5551
+ if (error) {
5552
+ return error;
5553
+ }
5554
+ }
5555
+ return null;
5556
+ }
5557
+ return createChainableTypeChecker(validate);
5558
+ }
5559
+ function isNode(propValue) {
5560
+ switch (typeof propValue) {
5561
+ case 'number':
5562
+ case 'string':
5563
+ case 'undefined':
5564
+ return true;
5565
+ case 'boolean':
5566
+ return !propValue;
5567
+ case 'object':
5568
+ if (Array.isArray(propValue)) {
5569
+ return propValue.every(isNode);
5570
+ }
5571
+ if (propValue === null || isValidElement(propValue)) {
5572
+ return true;
5573
+ }
5574
+ var iteratorFn = getIteratorFn(propValue);
5575
+ if (iteratorFn) {
5576
+ var iterator = iteratorFn.call(propValue);
5577
+ var step;
5578
+ if (iteratorFn !== propValue.entries) {
5579
+ while (!(step = iterator.next()).done) {
5580
+ if (!isNode(step.value)) {
5581
+ return false;
5582
+ }
5583
+ }
5584
+ } else {
5585
+ // Iterator will provide entry [k,v] tuples rather than values.
5586
+ while (!(step = iterator.next()).done) {
5587
+ var entry = step.value;
5588
+ if (entry) {
5589
+ if (!isNode(entry[1])) {
5590
+ return false;
5591
+ }
5592
+ }
5593
+ }
5594
+ }
5595
+ } else {
5596
+ return false;
5597
+ }
5598
+ return true;
5599
+ default:
5600
+ return false;
5601
+ }
5602
+ }
5603
+ function isSymbol(propType, propValue) {
5604
+ // Native Symbol.
5605
+ if (propType === 'symbol') {
5606
+ return true;
5607
+ }
5608
+
5609
+ // falsy value can't be a Symbol
5610
+ if (!propValue) {
5611
+ return false;
5612
+ }
5613
+
5614
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
5615
+ if (propValue['@@toStringTag'] === 'Symbol') {
5616
+ return true;
5617
+ }
5618
+
5619
+ // Fallback for non-spec compliant Symbols which are polyfilled.
5620
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
5621
+ return true;
5622
+ }
5623
+ return false;
5624
+ }
5625
+
5626
+ // Equivalent of `typeof` but with special handling for array and regexp.
5627
+ function getPropType(propValue) {
5628
+ var propType = typeof propValue;
5629
+ if (Array.isArray(propValue)) {
5630
+ return 'array';
5631
+ }
5632
+ if (propValue instanceof RegExp) {
5633
+ // Old webkits (at least until Android 4.0) return 'function' rather than
5634
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
5635
+ // passes PropTypes.object.
5636
+ return 'object';
5637
+ }
5638
+ if (isSymbol(propType, propValue)) {
5639
+ return 'symbol';
5640
+ }
5641
+ return propType;
5642
+ }
5643
+
5644
+ // This handles more types than `getPropType`. Only used for error messages.
5645
+ // See `createPrimitiveTypeChecker`.
5646
+ function getPreciseType(propValue) {
5647
+ if (typeof propValue === 'undefined' || propValue === null) {
5648
+ return '' + propValue;
5649
+ }
5650
+ var propType = getPropType(propValue);
5651
+ if (propType === 'object') {
5652
+ if (propValue instanceof Date) {
5653
+ return 'date';
5654
+ } else if (propValue instanceof RegExp) {
5655
+ return 'regexp';
5656
+ }
5657
+ }
5658
+ return propType;
5659
+ }
5660
+
5661
+ // Returns a string that is postfixed to a warning about an invalid type.
5662
+ // For example, "undefined" or "of type array"
5663
+ function getPostfixForTypeWarning(value) {
5664
+ var type = getPreciseType(value);
5665
+ switch (type) {
5666
+ case 'array':
5667
+ case 'object':
5668
+ return 'an ' + type;
5669
+ case 'boolean':
5670
+ case 'date':
5671
+ case 'regexp':
5672
+ return 'a ' + type;
5673
+ default:
5674
+ return type;
5675
+ }
5676
+ }
5677
+
5678
+ // Returns class name of the object, if any.
5679
+ function getClassName(propValue) {
5680
+ if (!propValue.constructor || !propValue.constructor.name) {
5681
+ return ANONYMOUS;
5682
+ }
5683
+ return propValue.constructor.name;
5684
+ }
5685
+ ReactPropTypes.checkPropTypes = checkPropTypes;
5686
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
5687
+ ReactPropTypes.PropTypes = ReactPropTypes;
5688
+ return ReactPropTypes;
5689
+ };
5690
+ return factoryWithTypeCheckers$6;
5691
+ }
5692
+
5693
+ /**
5694
+ * Copyright (c) 2013-present, Facebook, Inc.
5695
+ *
5696
+ * This source code is licensed under the MIT license found in the
5697
+ * LICENSE file in the root directory of this source tree.
5698
+ */
5699
+
5700
+ var factoryWithThrowingShims$6;
5701
+ var hasRequiredFactoryWithThrowingShims$6;
5702
+ function requireFactoryWithThrowingShims$6() {
5703
+ if (hasRequiredFactoryWithThrowingShims$6) return factoryWithThrowingShims$6;
5704
+ hasRequiredFactoryWithThrowingShims$6 = 1;
5705
+ var ReactPropTypesSecret = /*@__PURE__*/requireReactPropTypesSecret$6();
5706
+ function emptyFunction() {}
5707
+ function emptyFunctionWithReset() {}
5708
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
5709
+ factoryWithThrowingShims$6 = function () {
5710
+ function shim(props, propName, componentName, location, propFullName, secret) {
5711
+ if (secret === ReactPropTypesSecret) {
5712
+ // It is still safe when called from React.
5713
+ return;
5714
+ }
5715
+ 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');
5716
+ err.name = 'Invariant Violation';
5717
+ throw err;
5718
+ }
5719
+ shim.isRequired = shim;
5720
+ function getShim() {
5721
+ return shim;
5722
+ } // Important!
5723
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
5724
+ var ReactPropTypes = {
5725
+ array: shim,
5726
+ bigint: shim,
5727
+ bool: shim,
5728
+ func: shim,
5729
+ number: shim,
5730
+ object: shim,
5731
+ string: shim,
5732
+ symbol: shim,
5733
+ any: shim,
5734
+ arrayOf: getShim,
5735
+ element: shim,
5736
+ elementType: shim,
5737
+ instanceOf: getShim,
5738
+ node: shim,
5739
+ objectOf: getShim,
5740
+ oneOf: getShim,
5741
+ oneOfType: getShim,
5742
+ shape: getShim,
5743
+ exact: getShim,
5744
+ checkPropTypes: emptyFunctionWithReset,
5745
+ resetWarningCache: emptyFunction
5746
+ };
5747
+ ReactPropTypes.PropTypes = ReactPropTypes;
5748
+ return ReactPropTypes;
5749
+ };
5750
+ return factoryWithThrowingShims$6;
5751
+ }
5752
+
5753
+ /**
5754
+ * Copyright (c) 2013-present, Facebook, Inc.
5755
+ *
5756
+ * This source code is licensed under the MIT license found in the
5757
+ * LICENSE file in the root directory of this source tree.
5758
+ */
5759
+
5760
+ var hasRequiredPropTypes$6;
5761
+ function requirePropTypes$6() {
5762
+ if (hasRequiredPropTypes$6) return propTypes$6.exports;
5763
+ hasRequiredPropTypes$6 = 1;
5764
+ if (process.env.NODE_ENV !== 'production') {
5765
+ var ReactIs = requireReactIs$6();
5766
+
5767
+ // By explicitly using `prop-types` you are opting into new development behavior.
5768
+ // http://fb.me/prop-types-in-prod
5769
+ var throwOnDirectAccess = true;
5770
+ propTypes$6.exports = /*@__PURE__*/requireFactoryWithTypeCheckers$6()(ReactIs.isElement, throwOnDirectAccess);
5771
+ } else {
5772
+ // By explicitly using `prop-types` you are opting into new production behavior.
5773
+ // http://fb.me/prop-types-in-prod
5774
+ propTypes$6.exports = /*@__PURE__*/requireFactoryWithThrowingShims$6()();
5775
+ }
5776
+ return propTypes$6.exports;
5777
+ }
5778
+ var propTypesExports$6 = /*@__PURE__*/requirePropTypes$6();
5779
+ var PropTypes$6 = /*@__PURE__*/getDefaultExportFromCjs$6(propTypesExports$6);
5780
+ ({
5781
+ onPowerOff: PropTypes$6.func,
5782
+ onRestart: PropTypes$6.func,
5783
+ powerOffLabel: PropTypes$6.string,
5784
+ restartLabel: PropTypes$6.string,
5785
+ iconClassName: PropTypes$6.string,
5786
+ confirmTitle: PropTypes$6.string,
5787
+ cancelText: PropTypes$6.string,
5788
+ okText: PropTypes$6.string,
5789
+ run: PropTypes$6.func
5790
+ });
5791
+ ({
5792
+ logoUrl: PropTypes$6.string,
5793
+ logoWidth: PropTypes$6.number,
5794
+ logoAlt: PropTypes$6.string,
5795
+ onClick: PropTypes$6.func
5796
+ });
3946
5797
  function getDefaultExportFromCjs$5(x) {
3947
5798
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
3948
5799
  }
@@ -11165,7 +13016,7 @@ const NmosModal = _ref => {
11165
13016
  const values = await form.getFieldsValue();
11166
13017
  setLoading(true);
11167
13018
  try {
11168
- const response = await updateNmosSettings(_objectSpread2(_objectSpread2({}, nmosSettings), values));
13019
+ const response = await updateNmosSettings(_objectSpread2$1(_objectSpread2$1({}, nmosSettings), values));
11169
13020
  if (response) {
11170
13021
  message.success('Success');
11171
13022
  setTimeout(() => {
@@ -11178,16 +13029,16 @@ const NmosModal = _ref => {
11178
13029
  setLoading(false);
11179
13030
  }
11180
13031
  };
11181
- return /*#__PURE__*/jsx(StyledModal$3, _objectSpread2(_objectSpread2({
13032
+ return /*#__PURE__*/jsx(StyledModal$1, _objectSpread2$1(_objectSpread2$1({
11182
13033
  title: "NMOS",
11183
13034
  width: 650,
11184
13035
  open: open,
11185
13036
  onOk: handleSubmit,
11186
13037
  onCancel: onClose,
11187
13038
  confirmLoading: loading,
11188
- destroyOnClose: true // 关闭时销毁组件,确保下次打开重新初始化
13039
+ destroyOnHidden: true // 关闭时销毁组件,确保下次打开重新初始化
11189
13040
  }, modalProps), {}, {
11190
- children: /*#__PURE__*/jsxs(Form, _objectSpread2(_objectSpread2({
13041
+ children: /*#__PURE__*/jsxs(Form, _objectSpread2$1(_objectSpread2$1({
11191
13042
  form: form,
11192
13043
  name: "nmosForm",
11193
13044
  labelCol: {
@@ -11223,7 +13074,7 @@ const NmosModal = _ref => {
11223
13074
  }), /*#__PURE__*/jsx(Form.Item, {
11224
13075
  label: "Registry Port",
11225
13076
  name: "registration_port",
11226
- children: /*#__PURE__*/jsx(InputNumber, _objectSpread2(_objectSpread2({}, numberProps), {}, {
13077
+ children: /*#__PURE__*/jsx(InputNumber, _objectSpread2$1(_objectSpread2$1({}, numberProps), {}, {
11227
13078
  min: 0,
11228
13079
  max: 65535,
11229
13080
  style: {
@@ -11252,7 +13103,7 @@ const NmosModal = _ref => {
11252
13103
  }), /*#__PURE__*/jsx(Form.Item, {
11253
13104
  label: "Logging Level",
11254
13105
  name: "logging_level",
11255
- children: /*#__PURE__*/jsx(InputNumber, _objectSpread2(_objectSpread2({}, numberProps), {}, {
13106
+ children: /*#__PURE__*/jsx(InputNumber, _objectSpread2$1(_objectSpread2$1({}, numberProps), {}, {
11256
13107
  min: -40,
11257
13108
  max: 40,
11258
13109
  style: {
@@ -11538,7 +13389,7 @@ function DraggableNumberInput(_ref2) {
11538
13389
  // 新增 disabled 属性
11539
13390
  style
11540
13391
  } = _ref2,
11541
- restProps = _objectWithoutProperties(_ref2, _excluded$1);
13392
+ restProps = _objectWithoutProperties$1(_ref2, _excluded$1);
11542
13393
  const inputRef = useRef(null);
11543
13394
  const [isMouseDown, setIsMouseDown] = useState(false);
11544
13395
  const [isDragging, setIsDragging] = useState(false);
@@ -11647,7 +13498,7 @@ function DraggableNumberInput(_ref2) {
11647
13498
  applyMovement(totalMovement.current, e);
11648
13499
  }, [isMouseDown, disabled]);
11649
13500
  const getModifiers = useCallback(e => {
11650
- const mods = _objectSpread2(_objectSpread2({}, defaultModifiers), modifierKeys);
13501
+ const mods = _objectSpread2$1(_objectSpread2$1({}, defaultModifiers), modifierKeys);
11651
13502
  for (const key in mods) {
11652
13503
  if (key !== "default" && e[key]) {
11653
13504
  currentMultiplier.current = mods[key].multiplier;
@@ -11763,7 +13614,7 @@ function DraggableNumberInput(_ref2) {
11763
13614
  background: 'rgba(255, 255, 255, 0.08)',
11764
13615
  color: 'rgba(255, 255, 255, 0.25)'
11765
13616
  } : {};
11766
- return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement("input", _objectSpread2({
13617
+ return /* @__PURE__ */React.createElement(React.Fragment, null, /* @__PURE__ */React.createElement("input", _objectSpread2$1({
11767
13618
  ref: inputRef,
11768
13619
  type: "text",
11769
13620
  inputMode: "numeric",
@@ -11777,7 +13628,7 @@ function DraggableNumberInput(_ref2) {
11777
13628
  disabled: disabled,
11778
13629
  // 添加 disabled 属性
11779
13630
  className: "draggable-number-input ".concat(className, " ").concat(isDragging ? "dragging" : "", " ").concat(disabled ? "disabled" : ""),
11780
- style: _objectSpread2(_objectSpread2(_objectSpread2({}, {
13631
+ style: _objectSpread2$1(_objectSpread2$1(_objectSpread2$1({}, {
11781
13632
  cursor: disabled ? 'not-allowed' : 'ew-resize',
11782
13633
  userSelect: disabled ? 'none' : 'auto',
11783
13634
  caretColor: isDragging ? "transparent" : "initial"
@@ -11798,7 +13649,7 @@ const BoundedInput = _ref => {
11798
13649
  placeholder = 'Enter an integer',
11799
13650
  disabled = false
11800
13651
  } = _ref,
11801
- props = _objectWithoutProperties(_ref, _excluded);
13652
+ props = _objectWithoutProperties$1(_ref, _excluded);
11802
13653
  // 1. 处理输入变更:只管记录,不修正,不打断
11803
13654
  const handleChange = val => {
11804
13655
  if (val === null || val === undefined) {
@@ -11830,7 +13681,7 @@ const BoundedInput = _ref => {
11830
13681
  onChange === null || onChange === void 0 || onChange(safeVal);
11831
13682
  }
11832
13683
  };
11833
- return /*#__PURE__*/jsx(InputNumber, _objectSpread2({
13684
+ return /*#__PURE__*/jsx(InputNumber, _objectSpread2$1({
11834
13685
  value: value,
11835
13686
  onChange: handleChange,
11836
13687
  onBlur: handleBlur,
@@ -11857,7 +13708,7 @@ const BoundedInput = _ref => {
11857
13708
  /**
11858
13709
  * 专用端口输入框
11859
13710
  */
11860
- const PortInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2({
13711
+ const PortInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2$1({
11861
13712
  min: 0,
11862
13713
  max: 65535,
11863
13714
  placeholder: "Enter port (0-65535)"
@@ -11866,11 +13717,11 @@ const PortInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2({
11866
13717
  /**
11867
13718
  * 专用 Payload 输入框
11868
13719
  */
11869
- const PayloadInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2({
13720
+ const PayloadInput = props => /*#__PURE__*/jsx(BoundedInput, _objectSpread2$1({
11870
13721
  min: 96,
11871
13722
  max: 127,
11872
13723
  placeholder: "Enter payload (96-127)"
11873
13724
  }, props));
11874
13725
 
11875
- export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, MaintenancePage, NetworkSettingsModal$1 as NetworkSettingsModal, NmosModal$1 as NmosModal, PayloadInput, PortInput, PresetModal, PtpModal$1 as PtpModal, StyledModal$1 as StyledModal, SystemOperations$1 as SystemOperations, UpgradeManager$1 as UpgradeManager, useAuth, useHardwareUsage$1 as useHardwareUsage, usePageReload$1 as usePageReload, useSystemOperations$1 as useSystemOperations, useUpgrade$1 as useUpgrade };
13726
+ export { AuthorizationModal$1 as AuthorizationModal, CommonHeader$1 as CommonHeader, DraggableNumberInput, LSMLabelField$1 as LSMLabelField, MaintenancePage, NetworkSettingsModal$1 as NetworkSettingsModal, NmosModal$1 as NmosModal, PayloadInput, PortInput, PresetModal, PtpModal$1 as PtpModal, StyledModal$3 as StyledModal, SystemOperations$1 as SystemOperations, UpgradeManager$1 as UpgradeManager, addMessages, debugI18n, initI18n, setLocale, useAuth, useHardwareUsage$1 as useHardwareUsage, useIntl, usePageReload$1 as usePageReload, useSystemOperations$1 as useSystemOperations, useUpgrade$1 as useUpgrade, useWebSocketWithFeatures$1 as useWebSocketWithFeatures };
11876
13727
  //# sourceMappingURL=index.esm.js.map