antd-mobile 5.27.0 → 5.28.0
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/2x/README.md +1 -1
- package/2x/bundle/antd-mobile.cjs.development.js +473 -777
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +473 -777
- package/2x/bundle/antd-mobile.es.js +7227 -7550
- package/2x/bundle/antd-mobile.umd.development.js +469 -773
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/css-vars-patch.css +4 -0
- package/2x/cjs/components/calendar/calendar.d.ts +1 -0
- package/2x/cjs/components/calendar/calendar.js +1 -1
- package/2x/cjs/components/cascader/cascader.patch.css +3 -0
- package/2x/cjs/components/footer/footer.js +3 -3
- package/2x/cjs/components/input/input.js +1 -0
- package/2x/cjs/components/swiper/index.d.ts +1 -0
- package/2x/cjs/components/swiper/swiper.d.ts +9 -0
- package/2x/cjs/components/swiper/swiper.js +18 -2
- package/2x/cjs/global/css-vars-patch.css +4 -0
- package/2x/cjs/utils/with-func-props.d.ts +5 -0
- package/2x/cjs/utils/with-func-props.js +25 -0
- package/2x/es/components/calendar/calendar.d.ts +1 -0
- package/2x/es/components/calendar/calendar.js +1 -1
- package/2x/es/components/cascader/cascader.patch.css +3 -0
- package/2x/es/components/footer/footer.js +1 -1
- package/2x/es/components/input/input.js +1 -0
- package/2x/es/components/swiper/index.d.ts +1 -0
- package/2x/es/components/swiper/swiper.d.ts +9 -0
- package/2x/es/components/swiper/swiper.js +18 -2
- package/2x/es/global/css-vars-patch.css +4 -0
- package/2x/es/utils/with-func-props.d.ts +5 -0
- package/2x/es/utils/with-func-props.js +19 -0
- package/2x/package.json +1 -1
- package/README.md +1 -1
- package/bundle/antd-mobile.cjs.development.js +473 -777
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +473 -777
- package/bundle/antd-mobile.es.js +7227 -7550
- package/bundle/antd-mobile.umd.development.js +469 -773
- package/bundle/antd-mobile.umd.js +9 -9
- package/bundle/css-vars-patch.css +3 -0
- package/cjs/components/calendar/calendar.d.ts +1 -0
- package/cjs/components/calendar/calendar.js +1 -1
- package/cjs/components/cascader/cascader.patch.css +3 -0
- package/cjs/components/footer/footer.js +3 -3
- package/cjs/components/input/input.js +1 -0
- package/cjs/components/swiper/index.d.ts +1 -0
- package/cjs/components/swiper/swiper.d.ts +9 -0
- package/cjs/components/swiper/swiper.js +18 -2
- package/cjs/global/css-vars-patch.css +3 -0
- package/cjs/utils/with-func-props.d.ts +5 -0
- package/cjs/utils/with-func-props.js +25 -0
- package/es/components/calendar/calendar.d.ts +1 -0
- package/es/components/calendar/calendar.js +1 -1
- package/es/components/cascader/cascader.patch.css +3 -0
- package/es/components/footer/footer.js +1 -1
- package/es/components/input/input.js +1 -0
- package/es/components/swiper/index.d.ts +1 -0
- package/es/components/swiper/swiper.d.ts +9 -0
- package/es/components/swiper/swiper.js +18 -2
- package/es/global/css-vars-patch.css +3 -0
- package/es/utils/with-func-props.d.ts +5 -0
- package/es/utils/with-func-props.js +19 -0
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -20,7 +20,7 @@ function __rest(s, e) {
|
|
|
20
20
|
}
|
|
21
21
|
return t;
|
|
22
22
|
}
|
|
23
|
-
function __awaiter
|
|
23
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
24
24
|
function adopt(value) {
|
|
25
25
|
return value instanceof P ? value : new P(function(resolve) {
|
|
26
26
|
resolve(value);
|
|
@@ -882,48 +882,36 @@ function mergeProps(...items) {
|
|
|
882
882
|
return ret;
|
|
883
883
|
}
|
|
884
884
|
const popup = "";
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
}, deps);
|
|
900
|
-
};
|
|
901
|
-
};
|
|
902
|
-
var isFunction$1 = function isFunction(value) {
|
|
903
|
-
return typeof value === "function";
|
|
904
|
-
};
|
|
905
|
-
var isNumber = function isNumber2(value) {
|
|
906
|
-
return typeof value === "number";
|
|
885
|
+
const createUpdateEffect = (hook) => (effect, deps) => {
|
|
886
|
+
const isMounted = useRef(false);
|
|
887
|
+
hook(() => {
|
|
888
|
+
return () => {
|
|
889
|
+
isMounted.current = false;
|
|
890
|
+
};
|
|
891
|
+
}, []);
|
|
892
|
+
hook(() => {
|
|
893
|
+
if (!isMounted.current) {
|
|
894
|
+
isMounted.current = true;
|
|
895
|
+
} else {
|
|
896
|
+
return effect();
|
|
897
|
+
}
|
|
898
|
+
}, deps);
|
|
907
899
|
};
|
|
908
|
-
|
|
900
|
+
const isFunction$1 = (value) => typeof value === "function";
|
|
901
|
+
const isNumber = (value) => typeof value === "number";
|
|
902
|
+
const isDev$1 = true;
|
|
909
903
|
const isDev$2 = isDev$1;
|
|
910
904
|
function useMemoizedFn(fn) {
|
|
911
905
|
if (isDev$2) {
|
|
912
906
|
if (!isFunction$1(fn)) {
|
|
913
|
-
console.error(
|
|
907
|
+
console.error(`useMemoizedFn expected parameter is a function, got ${typeof fn}`);
|
|
914
908
|
}
|
|
915
909
|
}
|
|
916
|
-
|
|
917
|
-
fnRef.current = useMemo(
|
|
918
|
-
|
|
919
|
-
}, [fn]);
|
|
920
|
-
var memoizedFn = useRef();
|
|
910
|
+
const fnRef = useRef(fn);
|
|
911
|
+
fnRef.current = useMemo(() => fn, [fn]);
|
|
912
|
+
const memoizedFn = useRef();
|
|
921
913
|
if (!memoizedFn.current) {
|
|
922
|
-
memoizedFn.current = function() {
|
|
923
|
-
var args = [];
|
|
924
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
|
925
|
-
args[_i] = arguments[_i];
|
|
926
|
-
}
|
|
914
|
+
memoizedFn.current = function(...args) {
|
|
927
915
|
return fnRef.current.apply(this, args);
|
|
928
916
|
};
|
|
929
917
|
}
|
|
@@ -933,28 +921,26 @@ const useUpdateEffect = createUpdateEffect(useEffect);
|
|
|
933
921
|
function depsAreSame(oldDeps, deps) {
|
|
934
922
|
if (oldDeps === deps)
|
|
935
923
|
return true;
|
|
936
|
-
for (
|
|
924
|
+
for (let i = 0; i < oldDeps.length; i++) {
|
|
937
925
|
if (!Object.is(oldDeps[i], deps[i]))
|
|
938
926
|
return false;
|
|
939
927
|
}
|
|
940
928
|
return true;
|
|
941
929
|
}
|
|
942
930
|
function useLatest(value) {
|
|
943
|
-
|
|
931
|
+
const ref = useRef(value);
|
|
944
932
|
ref.current = value;
|
|
945
933
|
return ref;
|
|
946
934
|
}
|
|
947
|
-
|
|
935
|
+
const useUnmount = (fn) => {
|
|
948
936
|
if (isDev$2) {
|
|
949
937
|
if (!isFunction$1(fn)) {
|
|
950
|
-
console.error(
|
|
938
|
+
console.error(`useUnmount expected parameter is a function, got ${typeof fn}`);
|
|
951
939
|
}
|
|
952
940
|
}
|
|
953
|
-
|
|
954
|
-
useEffect(
|
|
955
|
-
|
|
956
|
-
fnRef.current();
|
|
957
|
-
};
|
|
941
|
+
const fnRef = useLatest(fn);
|
|
942
|
+
useEffect(() => () => {
|
|
943
|
+
fnRef.current();
|
|
958
944
|
}, []);
|
|
959
945
|
};
|
|
960
946
|
const useUnmount$1 = useUnmount;
|
|
@@ -1093,7 +1079,7 @@ function debounce$1(func, wait, options) {
|
|
|
1093
1079
|
return debounced;
|
|
1094
1080
|
}
|
|
1095
1081
|
var debounce_1 = debounce$1;
|
|
1096
|
-
|
|
1082
|
+
const isBrowser$2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
1097
1083
|
const isBrowser$3 = isBrowser$2;
|
|
1098
1084
|
var debounce = debounce_1, isObject$5 = isObject_1;
|
|
1099
1085
|
var FUNC_ERROR_TEXT$1 = "Expected a function";
|
|
@@ -1113,46 +1099,20 @@ function throttle$1(func, wait, options) {
|
|
|
1113
1099
|
});
|
|
1114
1100
|
}
|
|
1115
1101
|
var throttle_1 = throttle$1;
|
|
1116
|
-
|
|
1102
|
+
const useMount = (fn) => {
|
|
1117
1103
|
if (isDev$2) {
|
|
1118
1104
|
if (!isFunction$1(fn)) {
|
|
1119
|
-
console.error(
|
|
1105
|
+
console.error(`useMount: parameter \`fn\` expected to be a function, but got "${typeof fn}".`);
|
|
1120
1106
|
}
|
|
1121
1107
|
}
|
|
1122
|
-
useEffect(
|
|
1108
|
+
useEffect(() => {
|
|
1123
1109
|
fn === null || fn === void 0 ? void 0 : fn();
|
|
1124
1110
|
}, []);
|
|
1125
1111
|
};
|
|
1126
1112
|
const useMount$1 = useMount;
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
return o;
|
|
1131
|
-
var i = m.call(o), r, ar = [], e;
|
|
1132
|
-
try {
|
|
1133
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
1134
|
-
ar.push(r.value);
|
|
1135
|
-
}
|
|
1136
|
-
} catch (error) {
|
|
1137
|
-
e = {
|
|
1138
|
-
error
|
|
1139
|
-
};
|
|
1140
|
-
} finally {
|
|
1141
|
-
try {
|
|
1142
|
-
if (r && !r.done && (m = i["return"]))
|
|
1143
|
-
m.call(i);
|
|
1144
|
-
} finally {
|
|
1145
|
-
if (e)
|
|
1146
|
-
throw e.error;
|
|
1147
|
-
}
|
|
1148
|
-
}
|
|
1149
|
-
return ar;
|
|
1150
|
-
};
|
|
1151
|
-
var useUpdate = function useUpdate2() {
|
|
1152
|
-
var _a = __read$7(useState$1({}), 2), setState = _a[1];
|
|
1153
|
-
return useCallback(function() {
|
|
1154
|
-
return setState({});
|
|
1155
|
-
}, []);
|
|
1113
|
+
const useUpdate = () => {
|
|
1114
|
+
const [, setState] = useState$1({});
|
|
1115
|
+
return useCallback(() => setState({}), []);
|
|
1156
1116
|
};
|
|
1157
1117
|
const useUpdate$1 = useUpdate;
|
|
1158
1118
|
function getTargetElement(target, defaultElement) {
|
|
@@ -1162,7 +1122,7 @@ function getTargetElement(target, defaultElement) {
|
|
|
1162
1122
|
if (!target) {
|
|
1163
1123
|
return defaultElement;
|
|
1164
1124
|
}
|
|
1165
|
-
|
|
1125
|
+
let targetElement;
|
|
1166
1126
|
if (isFunction$1(target)) {
|
|
1167
1127
|
targetElement = target();
|
|
1168
1128
|
} else if ("current" in target) {
|
|
@@ -1172,44 +1132,42 @@ function getTargetElement(target, defaultElement) {
|
|
|
1172
1132
|
}
|
|
1173
1133
|
return targetElement;
|
|
1174
1134
|
}
|
|
1175
|
-
|
|
1176
|
-
return targets.every(
|
|
1177
|
-
|
|
1135
|
+
const checkIfAllInShadow = (targets) => {
|
|
1136
|
+
return targets.every((item) => {
|
|
1137
|
+
const targetElement = getTargetElement(item);
|
|
1178
1138
|
if (!targetElement)
|
|
1179
1139
|
return false;
|
|
1180
1140
|
if (targetElement.getRootNode() instanceof ShadowRoot)
|
|
1181
1141
|
return true;
|
|
1182
1142
|
});
|
|
1183
1143
|
};
|
|
1184
|
-
|
|
1144
|
+
const getShadow = (node) => {
|
|
1185
1145
|
if (!node) {
|
|
1186
1146
|
return document;
|
|
1187
1147
|
}
|
|
1188
1148
|
return node.getRootNode();
|
|
1189
1149
|
};
|
|
1190
|
-
|
|
1150
|
+
const getDocumentOrShadow = (target) => {
|
|
1191
1151
|
if (!target || !document.getRootNode) {
|
|
1192
1152
|
return document;
|
|
1193
1153
|
}
|
|
1194
|
-
|
|
1154
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
1195
1155
|
if (checkIfAllInShadow(targets)) {
|
|
1196
1156
|
return getShadow(getTargetElement(targets[0]));
|
|
1197
1157
|
}
|
|
1198
1158
|
return document;
|
|
1199
1159
|
};
|
|
1200
1160
|
const getDocumentOrShadow$1 = getDocumentOrShadow;
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
useEffectType(
|
|
1161
|
+
const createEffectWithTarget = (useEffectType) => {
|
|
1162
|
+
const useEffectWithTarget2 = (effect, deps, target) => {
|
|
1163
|
+
const hasInitRef = useRef(false);
|
|
1164
|
+
const lastElementRef = useRef([]);
|
|
1165
|
+
const lastDepsRef = useRef([]);
|
|
1166
|
+
const unLoadRef = useRef();
|
|
1167
|
+
useEffectType(() => {
|
|
1208
1168
|
var _a;
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
return getTargetElement(item);
|
|
1212
|
-
});
|
|
1169
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
1170
|
+
const els = targets.map((item) => getTargetElement(item));
|
|
1213
1171
|
if (!hasInitRef.current) {
|
|
1214
1172
|
hasInitRef.current = true;
|
|
1215
1173
|
lastElementRef.current = els;
|
|
@@ -1224,7 +1182,7 @@ var createEffectWithTarget = function createEffectWithTarget2(useEffectType) {
|
|
|
1224
1182
|
unLoadRef.current = effect();
|
|
1225
1183
|
}
|
|
1226
1184
|
});
|
|
1227
|
-
useUnmount$1(
|
|
1185
|
+
useUnmount$1(() => {
|
|
1228
1186
|
var _a;
|
|
1229
1187
|
(_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef);
|
|
1230
1188
|
hasInitRef.current = false;
|
|
@@ -1233,33 +1191,26 @@ var createEffectWithTarget = function createEffectWithTarget2(useEffectType) {
|
|
|
1233
1191
|
return useEffectWithTarget2;
|
|
1234
1192
|
};
|
|
1235
1193
|
const createEffectWithTarget$1 = createEffectWithTarget;
|
|
1236
|
-
|
|
1194
|
+
const useEffectWithTarget$1 = createEffectWithTarget$1(useEffect);
|
|
1237
1195
|
const useEffectWithTarget$2 = useEffectWithTarget$1;
|
|
1238
|
-
function useClickAway(onClickAway, target, eventName) {
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
var targets = Array.isArray(target) ? target : [target];
|
|
1246
|
-
if (targets.some(function(item) {
|
|
1247
|
-
var targetElement = getTargetElement(item);
|
|
1196
|
+
function useClickAway(onClickAway, target, eventName = "click") {
|
|
1197
|
+
const onClickAwayRef = useLatest(onClickAway);
|
|
1198
|
+
useEffectWithTarget$2(() => {
|
|
1199
|
+
const handler = (event) => {
|
|
1200
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
1201
|
+
if (targets.some((item) => {
|
|
1202
|
+
const targetElement = getTargetElement(item);
|
|
1248
1203
|
return !targetElement || targetElement.contains(event.target);
|
|
1249
1204
|
})) {
|
|
1250
1205
|
return;
|
|
1251
1206
|
}
|
|
1252
1207
|
onClickAwayRef.current(event);
|
|
1253
1208
|
};
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
eventNames.forEach(
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
return function() {
|
|
1260
|
-
eventNames.forEach(function(event) {
|
|
1261
|
-
return documentOrShadow.removeEventListener(event, handler);
|
|
1262
|
-
});
|
|
1209
|
+
const documentOrShadow = getDocumentOrShadow$1(target);
|
|
1210
|
+
const eventNames = Array.isArray(eventName) ? eventName : [eventName];
|
|
1211
|
+
eventNames.forEach((event) => documentOrShadow.addEventListener(event, handler));
|
|
1212
|
+
return () => {
|
|
1213
|
+
eventNames.forEach((event) => documentOrShadow.removeEventListener(event, handler));
|
|
1263
1214
|
};
|
|
1264
1215
|
}, Array.isArray(eventName) ? eventName : [eventName], target);
|
|
1265
1216
|
}
|
|
@@ -1472,60 +1423,19 @@ var dayjs_min = { exports: {} };
|
|
|
1472
1423
|
});
|
|
1473
1424
|
})(dayjs_min);
|
|
1474
1425
|
const dayjs = dayjs_min.exports;
|
|
1475
|
-
var __read$6 = globalThis && globalThis.__read || function(o, n) {
|
|
1476
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1477
|
-
if (!m)
|
|
1478
|
-
return o;
|
|
1479
|
-
var i = m.call(o), r, ar = [], e;
|
|
1480
|
-
try {
|
|
1481
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
1482
|
-
ar.push(r.value);
|
|
1483
|
-
}
|
|
1484
|
-
} catch (error) {
|
|
1485
|
-
e = {
|
|
1486
|
-
error
|
|
1487
|
-
};
|
|
1488
|
-
} finally {
|
|
1489
|
-
try {
|
|
1490
|
-
if (r && !r.done && (m = i["return"]))
|
|
1491
|
-
m.call(i);
|
|
1492
|
-
} finally {
|
|
1493
|
-
if (e)
|
|
1494
|
-
throw e.error;
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
return ar;
|
|
1498
|
-
};
|
|
1499
|
-
var __spreadArray$2 = globalThis && globalThis.__spreadArray || function(to2, from, pack) {
|
|
1500
|
-
if (pack || arguments.length === 2)
|
|
1501
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
1502
|
-
if (ar || !(i in from)) {
|
|
1503
|
-
if (!ar)
|
|
1504
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
1505
|
-
ar[i] = from[i];
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
return to2.concat(ar || Array.prototype.slice.call(from));
|
|
1509
|
-
};
|
|
1510
1426
|
function useDebounceFn(fn, options) {
|
|
1511
1427
|
var _a;
|
|
1512
1428
|
if (isDev$2) {
|
|
1513
1429
|
if (!isFunction$1(fn)) {
|
|
1514
|
-
console.error(
|
|
1430
|
+
console.error(`useDebounceFn expected parameter is a function, got ${typeof fn}`);
|
|
1515
1431
|
}
|
|
1516
1432
|
}
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
return
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
args[_i] = arguments[_i];
|
|
1524
|
-
}
|
|
1525
|
-
return fnRef.current.apply(fnRef, __spreadArray$2([], __read$6(args), false));
|
|
1526
|
-
}, wait, options);
|
|
1527
|
-
}, []);
|
|
1528
|
-
useUnmount$1(function() {
|
|
1433
|
+
const fnRef = useLatest(fn);
|
|
1434
|
+
const wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
|
|
1435
|
+
const debounced = useMemo(() => debounce_1((...args) => {
|
|
1436
|
+
return fnRef.current(...args);
|
|
1437
|
+
}, wait, options), []);
|
|
1438
|
+
useUnmount$1(() => {
|
|
1529
1439
|
debounced.cancel();
|
|
1530
1440
|
});
|
|
1531
1441
|
return {
|
|
@@ -1534,36 +1444,14 @@ function useDebounceFn(fn, options) {
|
|
|
1534
1444
|
flush: debounced.flush
|
|
1535
1445
|
};
|
|
1536
1446
|
}
|
|
1537
|
-
var __read$5 = globalThis && globalThis.__read || function(o, n) {
|
|
1538
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
1539
|
-
if (!m)
|
|
1540
|
-
return o;
|
|
1541
|
-
var i = m.call(o), r, ar = [], e;
|
|
1542
|
-
try {
|
|
1543
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
1544
|
-
ar.push(r.value);
|
|
1545
|
-
}
|
|
1546
|
-
} catch (error) {
|
|
1547
|
-
e = {
|
|
1548
|
-
error
|
|
1549
|
-
};
|
|
1550
|
-
} finally {
|
|
1551
|
-
try {
|
|
1552
|
-
if (r && !r.done && (m = i["return"]))
|
|
1553
|
-
m.call(i);
|
|
1554
|
-
} finally {
|
|
1555
|
-
if (e)
|
|
1556
|
-
throw e.error;
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
return ar;
|
|
1560
|
-
};
|
|
1561
1447
|
function useDebounceEffect(effect, deps, options) {
|
|
1562
|
-
|
|
1563
|
-
|
|
1448
|
+
const [flag, setFlag] = useState$1({});
|
|
1449
|
+
const {
|
|
1450
|
+
run
|
|
1451
|
+
} = useDebounceFn(() => {
|
|
1564
1452
|
setFlag({});
|
|
1565
|
-
}, options)
|
|
1566
|
-
useEffect(
|
|
1453
|
+
}, options);
|
|
1454
|
+
useEffect(() => {
|
|
1567
1455
|
return run();
|
|
1568
1456
|
}, deps);
|
|
1569
1457
|
useUpdateEffect(effect, [flag]);
|
|
@@ -2684,333 +2572,66 @@ var isEqual_1 = isEqual$1;
|
|
|
2684
2572
|
window.IntersectionObserver = IntersectionObserver2;
|
|
2685
2573
|
window.IntersectionObserverEntry = IntersectionObserverEntry;
|
|
2686
2574
|
})();
|
|
2687
|
-
var __assign = globalThis && globalThis.__assign || function() {
|
|
2688
|
-
__assign = Object.assign || function(t) {
|
|
2689
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
2690
|
-
s = arguments[i];
|
|
2691
|
-
for (var p in s) {
|
|
2692
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
2693
|
-
t[p] = s[p];
|
|
2694
|
-
}
|
|
2695
|
-
}
|
|
2696
|
-
return t;
|
|
2697
|
-
};
|
|
2698
|
-
return __assign.apply(this, arguments);
|
|
2699
|
-
};
|
|
2700
|
-
var __read$4 = globalThis && globalThis.__read || function(o, n) {
|
|
2701
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2702
|
-
if (!m)
|
|
2703
|
-
return o;
|
|
2704
|
-
var i = m.call(o), r, ar = [], e;
|
|
2705
|
-
try {
|
|
2706
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
2707
|
-
ar.push(r.value);
|
|
2708
|
-
}
|
|
2709
|
-
} catch (error) {
|
|
2710
|
-
e = {
|
|
2711
|
-
error
|
|
2712
|
-
};
|
|
2713
|
-
} finally {
|
|
2714
|
-
try {
|
|
2715
|
-
if (r && !r.done && (m = i["return"]))
|
|
2716
|
-
m.call(i);
|
|
2717
|
-
} finally {
|
|
2718
|
-
if (e)
|
|
2719
|
-
throw e.error;
|
|
2720
|
-
}
|
|
2721
|
-
}
|
|
2722
|
-
return ar;
|
|
2723
|
-
};
|
|
2724
|
-
var __values = globalThis && globalThis.__values || function(o) {
|
|
2725
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
2726
|
-
if (m)
|
|
2727
|
-
return m.call(o);
|
|
2728
|
-
if (o && typeof o.length === "number")
|
|
2729
|
-
return {
|
|
2730
|
-
next: function next() {
|
|
2731
|
-
if (o && i >= o.length)
|
|
2732
|
-
o = void 0;
|
|
2733
|
-
return {
|
|
2734
|
-
value: o && o[i++],
|
|
2735
|
-
done: !o
|
|
2736
|
-
};
|
|
2737
|
-
}
|
|
2738
|
-
};
|
|
2739
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
2740
|
-
};
|
|
2741
2575
|
function useInViewport(target, options) {
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
useEffectWithTarget$2(
|
|
2745
|
-
|
|
2576
|
+
const [state, setState] = useState$1();
|
|
2577
|
+
const [ratio, setRatio] = useState$1();
|
|
2578
|
+
useEffectWithTarget$2(() => {
|
|
2579
|
+
const el = getTargetElement(target);
|
|
2746
2580
|
if (!el) {
|
|
2747
2581
|
return;
|
|
2748
2582
|
}
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
var entry = entries_1_1.value;
|
|
2754
|
-
setRatio(entry.intersectionRatio);
|
|
2755
|
-
setState(entry.isIntersecting);
|
|
2756
|
-
}
|
|
2757
|
-
} catch (e_1_1) {
|
|
2758
|
-
e_1 = {
|
|
2759
|
-
error: e_1_1
|
|
2760
|
-
};
|
|
2761
|
-
} finally {
|
|
2762
|
-
try {
|
|
2763
|
-
if (entries_1_1 && !entries_1_1.done && (_a2 = entries_1["return"]))
|
|
2764
|
-
_a2.call(entries_1);
|
|
2765
|
-
} finally {
|
|
2766
|
-
if (e_1)
|
|
2767
|
-
throw e_1.error;
|
|
2768
|
-
}
|
|
2583
|
+
const observer = new IntersectionObserver((entries) => {
|
|
2584
|
+
for (const entry of entries) {
|
|
2585
|
+
setRatio(entry.intersectionRatio);
|
|
2586
|
+
setState(entry.isIntersecting);
|
|
2769
2587
|
}
|
|
2770
|
-
},
|
|
2588
|
+
}, Object.assign(Object.assign({}, options), {
|
|
2771
2589
|
root: getTargetElement(options === null || options === void 0 ? void 0 : options.root)
|
|
2772
2590
|
}));
|
|
2773
2591
|
observer.observe(el);
|
|
2774
|
-
return
|
|
2592
|
+
return () => {
|
|
2775
2593
|
observer.disconnect();
|
|
2776
2594
|
};
|
|
2777
|
-
}, [], target);
|
|
2595
|
+
}, [options === null || options === void 0 ? void 0 : options.rootMargin, options === null || options === void 0 ? void 0 : options.threshold], target);
|
|
2778
2596
|
return [state, ratio];
|
|
2779
2597
|
}
|
|
2780
|
-
|
|
2598
|
+
const useIsomorphicLayoutEffect$1 = isBrowser$3 ? useLayoutEffect$2 : useEffect;
|
|
2781
2599
|
const useIsomorphicLayoutEffect$2 = useIsomorphicLayoutEffect$1;
|
|
2782
|
-
var __awaiter = globalThis && globalThis.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
2783
|
-
function adopt(value) {
|
|
2784
|
-
return value instanceof P ? value : new P(function(resolve) {
|
|
2785
|
-
resolve(value);
|
|
2786
|
-
});
|
|
2787
|
-
}
|
|
2788
|
-
return new (P || (P = Promise))(function(resolve, reject) {
|
|
2789
|
-
function fulfilled(value) {
|
|
2790
|
-
try {
|
|
2791
|
-
step(generator.next(value));
|
|
2792
|
-
} catch (e) {
|
|
2793
|
-
reject(e);
|
|
2794
|
-
}
|
|
2795
|
-
}
|
|
2796
|
-
function rejected(value) {
|
|
2797
|
-
try {
|
|
2798
|
-
step(generator["throw"](value));
|
|
2799
|
-
} catch (e) {
|
|
2800
|
-
reject(e);
|
|
2801
|
-
}
|
|
2802
|
-
}
|
|
2803
|
-
function step(result2) {
|
|
2804
|
-
result2.done ? resolve(result2.value) : adopt(result2.value).then(fulfilled, rejected);
|
|
2805
|
-
}
|
|
2806
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2807
|
-
});
|
|
2808
|
-
};
|
|
2809
|
-
var __generator = globalThis && globalThis.__generator || function(thisArg, body) {
|
|
2810
|
-
var _ = {
|
|
2811
|
-
label: 0,
|
|
2812
|
-
sent: function sent() {
|
|
2813
|
-
if (t[0] & 1)
|
|
2814
|
-
throw t[1];
|
|
2815
|
-
return t[1];
|
|
2816
|
-
},
|
|
2817
|
-
trys: [],
|
|
2818
|
-
ops: []
|
|
2819
|
-
}, f, y, t, g;
|
|
2820
|
-
return g = {
|
|
2821
|
-
next: verb(0),
|
|
2822
|
-
"throw": verb(1),
|
|
2823
|
-
"return": verb(2)
|
|
2824
|
-
}, typeof Symbol === "function" && (g[Symbol.iterator] = function() {
|
|
2825
|
-
return this;
|
|
2826
|
-
}), g;
|
|
2827
|
-
function verb(n) {
|
|
2828
|
-
return function(v) {
|
|
2829
|
-
return step([n, v]);
|
|
2830
|
-
};
|
|
2831
|
-
}
|
|
2832
|
-
function step(op) {
|
|
2833
|
-
if (f)
|
|
2834
|
-
throw new TypeError("Generator is already executing.");
|
|
2835
|
-
while (_) {
|
|
2836
|
-
try {
|
|
2837
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
2838
|
-
return t;
|
|
2839
|
-
if (y = 0, t)
|
|
2840
|
-
op = [op[0] & 2, t.value];
|
|
2841
|
-
switch (op[0]) {
|
|
2842
|
-
case 0:
|
|
2843
|
-
case 1:
|
|
2844
|
-
t = op;
|
|
2845
|
-
break;
|
|
2846
|
-
case 4:
|
|
2847
|
-
_.label++;
|
|
2848
|
-
return {
|
|
2849
|
-
value: op[1],
|
|
2850
|
-
done: false
|
|
2851
|
-
};
|
|
2852
|
-
case 5:
|
|
2853
|
-
_.label++;
|
|
2854
|
-
y = op[1];
|
|
2855
|
-
op = [0];
|
|
2856
|
-
continue;
|
|
2857
|
-
case 7:
|
|
2858
|
-
op = _.ops.pop();
|
|
2859
|
-
_.trys.pop();
|
|
2860
|
-
continue;
|
|
2861
|
-
default:
|
|
2862
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
2863
|
-
_ = 0;
|
|
2864
|
-
continue;
|
|
2865
|
-
}
|
|
2866
|
-
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
2867
|
-
_.label = op[1];
|
|
2868
|
-
break;
|
|
2869
|
-
}
|
|
2870
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
2871
|
-
_.label = t[1];
|
|
2872
|
-
t = op;
|
|
2873
|
-
break;
|
|
2874
|
-
}
|
|
2875
|
-
if (t && _.label < t[2]) {
|
|
2876
|
-
_.label = t[2];
|
|
2877
|
-
_.ops.push(op);
|
|
2878
|
-
break;
|
|
2879
|
-
}
|
|
2880
|
-
if (t[2])
|
|
2881
|
-
_.ops.pop();
|
|
2882
|
-
_.trys.pop();
|
|
2883
|
-
continue;
|
|
2884
|
-
}
|
|
2885
|
-
op = body.call(thisArg, _);
|
|
2886
|
-
} catch (e) {
|
|
2887
|
-
op = [6, e];
|
|
2888
|
-
y = 0;
|
|
2889
|
-
} finally {
|
|
2890
|
-
f = t = 0;
|
|
2891
|
-
}
|
|
2892
|
-
}
|
|
2893
|
-
if (op[0] & 5)
|
|
2894
|
-
throw op[1];
|
|
2895
|
-
return {
|
|
2896
|
-
value: op[0] ? op[1] : void 0,
|
|
2897
|
-
done: true
|
|
2898
|
-
};
|
|
2899
|
-
}
|
|
2900
|
-
};
|
|
2901
|
-
var __read$3 = globalThis && globalThis.__read || function(o, n) {
|
|
2902
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2903
|
-
if (!m)
|
|
2904
|
-
return o;
|
|
2905
|
-
var i = m.call(o), r, ar = [], e;
|
|
2906
|
-
try {
|
|
2907
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
2908
|
-
ar.push(r.value);
|
|
2909
|
-
}
|
|
2910
|
-
} catch (error) {
|
|
2911
|
-
e = {
|
|
2912
|
-
error
|
|
2913
|
-
};
|
|
2914
|
-
} finally {
|
|
2915
|
-
try {
|
|
2916
|
-
if (r && !r.done && (m = i["return"]))
|
|
2917
|
-
m.call(i);
|
|
2918
|
-
} finally {
|
|
2919
|
-
if (e)
|
|
2920
|
-
throw e.error;
|
|
2921
|
-
}
|
|
2922
|
-
}
|
|
2923
|
-
return ar;
|
|
2924
|
-
};
|
|
2925
|
-
var __spreadArray$1 = globalThis && globalThis.__spreadArray || function(to2, from, pack) {
|
|
2926
|
-
if (pack || arguments.length === 2)
|
|
2927
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
2928
|
-
if (ar || !(i in from)) {
|
|
2929
|
-
if (!ar)
|
|
2930
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
2931
|
-
ar[i] = from[i];
|
|
2932
|
-
}
|
|
2933
|
-
}
|
|
2934
|
-
return to2.concat(ar || Array.prototype.slice.call(from));
|
|
2935
|
-
};
|
|
2936
2600
|
function useLockFn(fn) {
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
args[_i] = arguments[_i];
|
|
2943
|
-
}
|
|
2944
|
-
return __awaiter(_this, void 0, void 0, function() {
|
|
2945
|
-
var ret, e_1;
|
|
2946
|
-
return __generator(this, function(_a) {
|
|
2947
|
-
switch (_a.label) {
|
|
2948
|
-
case 0:
|
|
2949
|
-
if (lockRef.current)
|
|
2950
|
-
return [2];
|
|
2951
|
-
lockRef.current = true;
|
|
2952
|
-
_a.label = 1;
|
|
2953
|
-
case 1:
|
|
2954
|
-
_a.trys.push([1, 3, , 4]);
|
|
2955
|
-
return [4, fn.apply(void 0, __spreadArray$1([], __read$3(args), false))];
|
|
2956
|
-
case 2:
|
|
2957
|
-
ret = _a.sent();
|
|
2958
|
-
lockRef.current = false;
|
|
2959
|
-
return [2, ret];
|
|
2960
|
-
case 3:
|
|
2961
|
-
e_1 = _a.sent();
|
|
2962
|
-
lockRef.current = false;
|
|
2963
|
-
throw e_1;
|
|
2964
|
-
case 4:
|
|
2965
|
-
return [2];
|
|
2966
|
-
}
|
|
2967
|
-
});
|
|
2968
|
-
});
|
|
2969
|
-
}, [fn]);
|
|
2970
|
-
}
|
|
2971
|
-
var __read$2 = globalThis && globalThis.__read || function(o, n) {
|
|
2972
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
2973
|
-
if (!m)
|
|
2974
|
-
return o;
|
|
2975
|
-
var i = m.call(o), r, ar = [], e;
|
|
2976
|
-
try {
|
|
2977
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
2978
|
-
ar.push(r.value);
|
|
2979
|
-
}
|
|
2980
|
-
} catch (error) {
|
|
2981
|
-
e = {
|
|
2982
|
-
error
|
|
2983
|
-
};
|
|
2984
|
-
} finally {
|
|
2601
|
+
const lockRef = useRef(false);
|
|
2602
|
+
return useCallback((...args) => __awaiter(this, void 0, void 0, function* () {
|
|
2603
|
+
if (lockRef.current)
|
|
2604
|
+
return;
|
|
2605
|
+
lockRef.current = true;
|
|
2985
2606
|
try {
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2607
|
+
const ret = yield fn(...args);
|
|
2608
|
+
lockRef.current = false;
|
|
2609
|
+
return ret;
|
|
2610
|
+
} catch (e) {
|
|
2611
|
+
lockRef.current = false;
|
|
2612
|
+
throw e;
|
|
2991
2613
|
}
|
|
2992
|
-
}
|
|
2993
|
-
|
|
2994
|
-
};
|
|
2614
|
+
}), [fn]);
|
|
2615
|
+
}
|
|
2995
2616
|
function useRafState(initialState) {
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2617
|
+
const ref = useRef(0);
|
|
2618
|
+
const [state, setState] = useState$1(initialState);
|
|
2619
|
+
const setRafState = useCallback((value) => {
|
|
2999
2620
|
cancelAnimationFrame(ref.current);
|
|
3000
|
-
ref.current = requestAnimationFrame(
|
|
2621
|
+
ref.current = requestAnimationFrame(() => {
|
|
3001
2622
|
setState(value);
|
|
3002
2623
|
});
|
|
3003
2624
|
}, []);
|
|
3004
|
-
useUnmount$1(
|
|
2625
|
+
useUnmount$1(() => {
|
|
3005
2626
|
cancelAnimationFrame(ref.current);
|
|
3006
2627
|
});
|
|
3007
2628
|
return [state, setRafState];
|
|
3008
2629
|
}
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
useEffect(
|
|
2630
|
+
const useUnmountedRef = () => {
|
|
2631
|
+
const unmountedRef = useRef(false);
|
|
2632
|
+
useEffect(() => {
|
|
3012
2633
|
unmountedRef.current = false;
|
|
3013
|
-
return
|
|
2634
|
+
return () => {
|
|
3014
2635
|
unmountedRef.current = true;
|
|
3015
2636
|
};
|
|
3016
2637
|
}, []);
|
|
@@ -3488,44 +3109,23 @@ var index$k = function() {
|
|
|
3488
3109
|
}
|
|
3489
3110
|
return ResizeObserver$1;
|
|
3490
3111
|
}();
|
|
3491
|
-
|
|
3112
|
+
const useEffectWithTarget = createEffectWithTarget$1(useLayoutEffect$2);
|
|
3492
3113
|
const useLayoutEffectWithTarget = useEffectWithTarget;
|
|
3493
|
-
|
|
3114
|
+
const useIsomorphicLayoutEffectWithTarget = isBrowser$3 ? useLayoutEffectWithTarget : useEffectWithTarget$2;
|
|
3494
3115
|
const useIsomorphicLayoutEffectWithTarget$1 = useIsomorphicLayoutEffectWithTarget;
|
|
3495
|
-
var __read$1 = globalThis && globalThis.__read || function(o, n) {
|
|
3496
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3497
|
-
if (!m)
|
|
3498
|
-
return o;
|
|
3499
|
-
var i = m.call(o), r, ar = [], e;
|
|
3500
|
-
try {
|
|
3501
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
3502
|
-
ar.push(r.value);
|
|
3503
|
-
}
|
|
3504
|
-
} catch (error) {
|
|
3505
|
-
e = {
|
|
3506
|
-
error
|
|
3507
|
-
};
|
|
3508
|
-
} finally {
|
|
3509
|
-
try {
|
|
3510
|
-
if (r && !r.done && (m = i["return"]))
|
|
3511
|
-
m.call(i);
|
|
3512
|
-
} finally {
|
|
3513
|
-
if (e)
|
|
3514
|
-
throw e.error;
|
|
3515
|
-
}
|
|
3516
|
-
}
|
|
3517
|
-
return ar;
|
|
3518
|
-
};
|
|
3519
3116
|
function useSize(target) {
|
|
3520
|
-
|
|
3521
|
-
useIsomorphicLayoutEffectWithTarget$1(
|
|
3522
|
-
|
|
3117
|
+
const [state, setState] = useRafState();
|
|
3118
|
+
useIsomorphicLayoutEffectWithTarget$1(() => {
|
|
3119
|
+
const el = getTargetElement(target);
|
|
3523
3120
|
if (!el) {
|
|
3524
3121
|
return;
|
|
3525
3122
|
}
|
|
3526
|
-
|
|
3527
|
-
entries.forEach(
|
|
3528
|
-
|
|
3123
|
+
const resizeObserver = new index$k((entries) => {
|
|
3124
|
+
entries.forEach((entry) => {
|
|
3125
|
+
const {
|
|
3126
|
+
clientWidth,
|
|
3127
|
+
clientHeight
|
|
3128
|
+
} = entry.target;
|
|
3529
3129
|
setState({
|
|
3530
3130
|
width: clientWidth,
|
|
3531
3131
|
height: clientHeight
|
|
@@ -3533,66 +3133,25 @@ function useSize(target) {
|
|
|
3533
3133
|
});
|
|
3534
3134
|
});
|
|
3535
3135
|
resizeObserver.observe(el);
|
|
3536
|
-
return
|
|
3136
|
+
return () => {
|
|
3537
3137
|
resizeObserver.disconnect();
|
|
3538
3138
|
};
|
|
3539
3139
|
}, [], target);
|
|
3540
3140
|
return state;
|
|
3541
3141
|
}
|
|
3542
|
-
var __read = globalThis && globalThis.__read || function(o, n) {
|
|
3543
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
3544
|
-
if (!m)
|
|
3545
|
-
return o;
|
|
3546
|
-
var i = m.call(o), r, ar = [], e;
|
|
3547
|
-
try {
|
|
3548
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) {
|
|
3549
|
-
ar.push(r.value);
|
|
3550
|
-
}
|
|
3551
|
-
} catch (error) {
|
|
3552
|
-
e = {
|
|
3553
|
-
error
|
|
3554
|
-
};
|
|
3555
|
-
} finally {
|
|
3556
|
-
try {
|
|
3557
|
-
if (r && !r.done && (m = i["return"]))
|
|
3558
|
-
m.call(i);
|
|
3559
|
-
} finally {
|
|
3560
|
-
if (e)
|
|
3561
|
-
throw e.error;
|
|
3562
|
-
}
|
|
3563
|
-
}
|
|
3564
|
-
return ar;
|
|
3565
|
-
};
|
|
3566
|
-
var __spreadArray = globalThis && globalThis.__spreadArray || function(to2, from, pack) {
|
|
3567
|
-
if (pack || arguments.length === 2)
|
|
3568
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
3569
|
-
if (ar || !(i in from)) {
|
|
3570
|
-
if (!ar)
|
|
3571
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
3572
|
-
ar[i] = from[i];
|
|
3573
|
-
}
|
|
3574
|
-
}
|
|
3575
|
-
return to2.concat(ar || Array.prototype.slice.call(from));
|
|
3576
|
-
};
|
|
3577
3142
|
function useThrottleFn(fn, options) {
|
|
3578
3143
|
var _a;
|
|
3579
3144
|
if (isDev$2) {
|
|
3580
3145
|
if (!isFunction$1(fn)) {
|
|
3581
|
-
console.error(
|
|
3146
|
+
console.error(`useThrottleFn expected parameter is a function, got ${typeof fn}`);
|
|
3582
3147
|
}
|
|
3583
3148
|
}
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
return
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
args[_i] = arguments[_i];
|
|
3591
|
-
}
|
|
3592
|
-
return fnRef.current.apply(fnRef, __spreadArray([], __read(args), false));
|
|
3593
|
-
}, wait, options);
|
|
3594
|
-
}, []);
|
|
3595
|
-
useUnmount$1(function() {
|
|
3149
|
+
const fnRef = useLatest(fn);
|
|
3150
|
+
const wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
|
|
3151
|
+
const throttled = useMemo(() => throttle_1((...args) => {
|
|
3152
|
+
return fnRef.current(...args);
|
|
3153
|
+
}, wait, options), []);
|
|
3154
|
+
useUnmount$1(() => {
|
|
3596
3155
|
throttled.cancel();
|
|
3597
3156
|
});
|
|
3598
3157
|
return {
|
|
@@ -3602,22 +3161,22 @@ function useThrottleFn(fn, options) {
|
|
|
3602
3161
|
};
|
|
3603
3162
|
}
|
|
3604
3163
|
function useTimeout(fn, delay) {
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
useEffect(
|
|
3164
|
+
const fnRef = useLatest(fn);
|
|
3165
|
+
const timerRef = useRef(null);
|
|
3166
|
+
useEffect(() => {
|
|
3608
3167
|
if (!isNumber(delay) || delay < 0) {
|
|
3609
3168
|
return;
|
|
3610
3169
|
}
|
|
3611
|
-
timerRef.current = setTimeout(
|
|
3170
|
+
timerRef.current = setTimeout(() => {
|
|
3612
3171
|
fnRef.current();
|
|
3613
3172
|
}, delay);
|
|
3614
|
-
return
|
|
3173
|
+
return () => {
|
|
3615
3174
|
if (timerRef.current) {
|
|
3616
3175
|
clearTimeout(timerRef.current);
|
|
3617
3176
|
}
|
|
3618
3177
|
};
|
|
3619
3178
|
}, [delay]);
|
|
3620
|
-
|
|
3179
|
+
const clear2 = useCallback(() => {
|
|
3621
3180
|
if (timerRef.current) {
|
|
3622
3181
|
clearTimeout(timerRef.current);
|
|
3623
3182
|
}
|
|
@@ -4109,6 +3668,7 @@ function findIndex(arr, test) {
|
|
|
4109
3668
|
const index2 = arr.findIndex(test);
|
|
4110
3669
|
return index2 < 0 ? arr.length : index2;
|
|
4111
3670
|
}
|
|
3671
|
+
const clamp$1 = (min2, max2, v) => Math.min(Math.max(v, min2), max2);
|
|
4112
3672
|
const colors = {
|
|
4113
3673
|
transparent: 0,
|
|
4114
3674
|
aliceblue: 4042850303,
|
|
@@ -4430,6 +3990,64 @@ function findRange(input2, inputRange) {
|
|
|
4430
3990
|
break;
|
|
4431
3991
|
return i - 1;
|
|
4432
3992
|
}
|
|
3993
|
+
const steps$1 = (steps2, direction = "end") => (progress) => {
|
|
3994
|
+
progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 1e-3);
|
|
3995
|
+
const expanded = progress * steps2;
|
|
3996
|
+
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
|
|
3997
|
+
return clamp$1(0, 1, rounded / steps2);
|
|
3998
|
+
};
|
|
3999
|
+
const c1 = 1.70158;
|
|
4000
|
+
const c2 = c1 * 1.525;
|
|
4001
|
+
const c3 = c1 + 1;
|
|
4002
|
+
const c4 = 2 * Math.PI / 3;
|
|
4003
|
+
const c5 = 2 * Math.PI / 4.5;
|
|
4004
|
+
const bounceOut = (x) => {
|
|
4005
|
+
const n1 = 7.5625;
|
|
4006
|
+
const d1 = 2.75;
|
|
4007
|
+
if (x < 1 / d1) {
|
|
4008
|
+
return n1 * x * x;
|
|
4009
|
+
} else if (x < 2 / d1) {
|
|
4010
|
+
return n1 * (x -= 1.5 / d1) * x + 0.75;
|
|
4011
|
+
} else if (x < 2.5 / d1) {
|
|
4012
|
+
return n1 * (x -= 2.25 / d1) * x + 0.9375;
|
|
4013
|
+
} else {
|
|
4014
|
+
return n1 * (x -= 2.625 / d1) * x + 0.984375;
|
|
4015
|
+
}
|
|
4016
|
+
};
|
|
4017
|
+
const easings = {
|
|
4018
|
+
linear: (x) => x,
|
|
4019
|
+
easeInQuad: (x) => x * x,
|
|
4020
|
+
easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
|
|
4021
|
+
easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
|
|
4022
|
+
easeInCubic: (x) => x * x * x,
|
|
4023
|
+
easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
|
|
4024
|
+
easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
|
|
4025
|
+
easeInQuart: (x) => x * x * x * x,
|
|
4026
|
+
easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
|
|
4027
|
+
easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
|
|
4028
|
+
easeInQuint: (x) => x * x * x * x * x,
|
|
4029
|
+
easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
|
|
4030
|
+
easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
|
|
4031
|
+
easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
|
|
4032
|
+
easeOutSine: (x) => Math.sin(x * Math.PI / 2),
|
|
4033
|
+
easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
|
|
4034
|
+
easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
|
|
4035
|
+
easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
|
|
4036
|
+
easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,
|
|
4037
|
+
easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
|
|
4038
|
+
easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
|
|
4039
|
+
easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,
|
|
4040
|
+
easeInBack: (x) => c3 * x * x * x - c1 * x * x,
|
|
4041
|
+
easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
|
|
4042
|
+
easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
|
|
4043
|
+
easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
|
|
4044
|
+
easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
|
|
4045
|
+
easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,
|
|
4046
|
+
easeInBounce: (x) => 1 - bounceOut(1 - x),
|
|
4047
|
+
easeOutBounce: bounceOut,
|
|
4048
|
+
easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2,
|
|
4049
|
+
steps: steps$1
|
|
4050
|
+
};
|
|
4433
4051
|
function _extends$4() {
|
|
4434
4052
|
_extends$4 = Object.assign ? Object.assign.bind() : function(target) {
|
|
4435
4053
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5111,57 +4729,6 @@ const config$1 = {
|
|
|
5111
4729
|
friction: 120
|
|
5112
4730
|
}
|
|
5113
4731
|
};
|
|
5114
|
-
const c1 = 1.70158;
|
|
5115
|
-
const c2 = c1 * 1.525;
|
|
5116
|
-
const c3 = c1 + 1;
|
|
5117
|
-
const c4 = 2 * Math.PI / 3;
|
|
5118
|
-
const c5 = 2 * Math.PI / 4.5;
|
|
5119
|
-
const bounceOut = (x) => {
|
|
5120
|
-
const n1 = 7.5625;
|
|
5121
|
-
const d1 = 2.75;
|
|
5122
|
-
if (x < 1 / d1) {
|
|
5123
|
-
return n1 * x * x;
|
|
5124
|
-
} else if (x < 2 / d1) {
|
|
5125
|
-
return n1 * (x -= 1.5 / d1) * x + 0.75;
|
|
5126
|
-
} else if (x < 2.5 / d1) {
|
|
5127
|
-
return n1 * (x -= 2.25 / d1) * x + 0.9375;
|
|
5128
|
-
} else {
|
|
5129
|
-
return n1 * (x -= 2.625 / d1) * x + 0.984375;
|
|
5130
|
-
}
|
|
5131
|
-
};
|
|
5132
|
-
const easings = {
|
|
5133
|
-
linear: (x) => x,
|
|
5134
|
-
easeInQuad: (x) => x * x,
|
|
5135
|
-
easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
|
|
5136
|
-
easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
|
|
5137
|
-
easeInCubic: (x) => x * x * x,
|
|
5138
|
-
easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
|
|
5139
|
-
easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
|
|
5140
|
-
easeInQuart: (x) => x * x * x * x,
|
|
5141
|
-
easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
|
|
5142
|
-
easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
|
|
5143
|
-
easeInQuint: (x) => x * x * x * x * x,
|
|
5144
|
-
easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
|
|
5145
|
-
easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
|
|
5146
|
-
easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
|
|
5147
|
-
easeOutSine: (x) => Math.sin(x * Math.PI / 2),
|
|
5148
|
-
easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
|
|
5149
|
-
easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
|
|
5150
|
-
easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
|
|
5151
|
-
easeInOutExpo: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? Math.pow(2, 20 * x - 10) / 2 : (2 - Math.pow(2, -20 * x + 10)) / 2,
|
|
5152
|
-
easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
|
|
5153
|
-
easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
|
|
5154
|
-
easeInOutCirc: (x) => x < 0.5 ? (1 - Math.sqrt(1 - Math.pow(2 * x, 2))) / 2 : (Math.sqrt(1 - Math.pow(-2 * x + 2, 2)) + 1) / 2,
|
|
5155
|
-
easeInBack: (x) => c3 * x * x * x - c1 * x * x,
|
|
5156
|
-
easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
|
|
5157
|
-
easeInOutBack: (x) => x < 0.5 ? Math.pow(2 * x, 2) * ((c2 + 1) * 2 * x - c2) / 2 : (Math.pow(2 * x - 2, 2) * ((c2 + 1) * (x * 2 - 2) + c2) + 2) / 2,
|
|
5158
|
-
easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
|
|
5159
|
-
easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
|
|
5160
|
-
easeInOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : x < 0.5 ? -(Math.pow(2, 20 * x - 10) * Math.sin((20 * x - 11.125) * c5)) / 2 : Math.pow(2, -20 * x + 10) * Math.sin((20 * x - 11.125) * c5) / 2 + 1,
|
|
5161
|
-
easeInBounce: (x) => 1 - bounceOut(1 - x),
|
|
5162
|
-
easeOutBounce: bounceOut,
|
|
5163
|
-
easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2
|
|
5164
|
-
};
|
|
5165
4732
|
const defaults = _extends$2({}, config$1.default, {
|
|
5166
4733
|
mass: 1,
|
|
5167
4734
|
damping: 1,
|
|
@@ -5357,7 +4924,7 @@ function runAsync(to2, props, state, target) {
|
|
|
5357
4924
|
};
|
|
5358
4925
|
const animate = (arg1, arg2) => {
|
|
5359
4926
|
const bailSignal = new BailSignal();
|
|
5360
|
-
const skipAnimationSignal = new
|
|
4927
|
+
const skipAnimationSignal = new SkipAnimationSignal();
|
|
5361
4928
|
return (async () => {
|
|
5362
4929
|
if (globals.skipAnimation) {
|
|
5363
4930
|
stopAsync(state);
|
|
@@ -5406,7 +4973,7 @@ function runAsync(to2, props, state, target) {
|
|
|
5406
4973
|
} catch (err) {
|
|
5407
4974
|
if (err instanceof BailSignal) {
|
|
5408
4975
|
result2 = err.result;
|
|
5409
|
-
} else if (err instanceof
|
|
4976
|
+
} else if (err instanceof SkipAnimationSignal) {
|
|
5410
4977
|
result2 = err.result;
|
|
5411
4978
|
} else {
|
|
5412
4979
|
throw err;
|
|
@@ -5440,7 +5007,7 @@ class BailSignal extends Error {
|
|
|
5440
5007
|
this.result = void 0;
|
|
5441
5008
|
}
|
|
5442
5009
|
}
|
|
5443
|
-
class
|
|
5010
|
+
class SkipAnimationSignal extends Error {
|
|
5444
5011
|
constructor() {
|
|
5445
5012
|
super("SkipAnimationSignal");
|
|
5446
5013
|
this.result = void 0;
|
|
@@ -6471,11 +6038,11 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
|
6471
6038
|
}
|
|
6472
6039
|
return target;
|
|
6473
6040
|
}
|
|
6474
|
-
const _excluded$
|
|
6041
|
+
const _excluded$6 = ["children"];
|
|
6475
6042
|
const SpringContext = (_ref) => {
|
|
6476
6043
|
let {
|
|
6477
6044
|
children
|
|
6478
|
-
} = _ref, props = _objectWithoutPropertiesLoose$3(_ref, _excluded$
|
|
6045
|
+
} = _ref, props = _objectWithoutPropertiesLoose$3(_ref, _excluded$6);
|
|
6479
6046
|
const inherited = useContext(ctx);
|
|
6480
6047
|
const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
|
|
6481
6048
|
props = useMemoOne(() => ({
|
|
@@ -6779,7 +6346,7 @@ function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
|
6779
6346
|
}
|
|
6780
6347
|
return target;
|
|
6781
6348
|
}
|
|
6782
|
-
const _excluded$2$1 = ["style", "children", "scrollTop", "scrollLeft"];
|
|
6349
|
+
const _excluded$2$1 = ["style", "children", "scrollTop", "scrollLeft", "viewBox"];
|
|
6783
6350
|
const isCustomPropRE = /^--/;
|
|
6784
6351
|
function dangerousStyleValue(name, value) {
|
|
6785
6352
|
if (value == null || typeof value === "boolean" || value === "")
|
|
@@ -6798,7 +6365,8 @@ function applyAnimatedValues(instance, props) {
|
|
|
6798
6365
|
style,
|
|
6799
6366
|
children,
|
|
6800
6367
|
scrollTop,
|
|
6801
|
-
scrollLeft
|
|
6368
|
+
scrollLeft,
|
|
6369
|
+
viewBox
|
|
6802
6370
|
} = _ref, attributes = _objectWithoutPropertiesLoose$2(_ref, _excluded$2$1);
|
|
6803
6371
|
const values = Object.values(attributes);
|
|
6804
6372
|
const names = Object.keys(attributes).map((name) => isFilterElement || instance.hasAttribute(name) ? name : attributeCache[name] || (attributeCache[name] = name.replace(/([A-Z])/g, (n) => "-" + n.toLowerCase())));
|
|
@@ -6824,6 +6392,9 @@ function applyAnimatedValues(instance, props) {
|
|
|
6824
6392
|
if (scrollLeft !== void 0) {
|
|
6825
6393
|
instance.scrollLeft = scrollLeft;
|
|
6826
6394
|
}
|
|
6395
|
+
if (viewBox !== void 0) {
|
|
6396
|
+
instance.setAttribute("viewBox", viewBox);
|
|
6397
|
+
}
|
|
6827
6398
|
}
|
|
6828
6399
|
let isUnitlessNumber = {
|
|
6829
6400
|
animationIterationCount: true,
|
|
@@ -6996,13 +6567,13 @@ function useShouldRender(active, forceRender, destroyOnClose) {
|
|
|
6996
6567
|
return false;
|
|
6997
6568
|
return !destroyOnClose;
|
|
6998
6569
|
}
|
|
6999
|
-
const eventToPropRecord = {
|
|
6570
|
+
const eventToPropRecord$1 = {
|
|
7000
6571
|
"click": "onClick"
|
|
7001
6572
|
};
|
|
7002
6573
|
function withStopPropagation(events, element) {
|
|
7003
6574
|
const props = Object.assign({}, element.props);
|
|
7004
6575
|
for (const key of events) {
|
|
7005
|
-
const prop = eventToPropRecord[key];
|
|
6576
|
+
const prop = eventToPropRecord$1[key];
|
|
7006
6577
|
props[prop] = function(e) {
|
|
7007
6578
|
var _a, _b;
|
|
7008
6579
|
e.stopPropagation();
|
|
@@ -7856,7 +7427,7 @@ function legacyUnmount(container) {
|
|
|
7856
7427
|
return unmountComponentAtNode(container);
|
|
7857
7428
|
}
|
|
7858
7429
|
function concurrentUnmount(container) {
|
|
7859
|
-
return __awaiter
|
|
7430
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7860
7431
|
return Promise.resolve().then(() => {
|
|
7861
7432
|
var _a;
|
|
7862
7433
|
(_a = container[MARK]) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
@@ -8335,7 +7906,7 @@ const Button$1 = forwardRef((p, ref) => {
|
|
|
8335
7906
|
return nativeButtonRef.current;
|
|
8336
7907
|
}
|
|
8337
7908
|
}));
|
|
8338
|
-
const handleClick = (e) => __awaiter
|
|
7909
|
+
const handleClick = (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8339
7910
|
if (!props.onClick)
|
|
8340
7911
|
return;
|
|
8341
7912
|
const promise = props.onClick(e);
|
|
@@ -8677,7 +8248,7 @@ const Calendar$1 = forwardRef((p, ref) => {
|
|
|
8677
8248
|
}
|
|
8678
8249
|
}, React__default.createElement("div", {
|
|
8679
8250
|
className: `${classPrefix$1b}-cell-top`
|
|
8680
|
-
}, d.date()), React__default.createElement("div", {
|
|
8251
|
+
}, props.renderDate ? props.renderDate(d.toDate()) : d.date()), React__default.createElement("div", {
|
|
8681
8252
|
className: `${classPrefix$1b}-cell-bottom`
|
|
8682
8253
|
}, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate()))));
|
|
8683
8254
|
iterator = iterator.add(1, "day");
|
|
@@ -13419,7 +12990,7 @@ const Dialog = (p) => {
|
|
|
13419
12990
|
}, actions.map((action, index3) => React__default.createElement(DialogActionButton, {
|
|
13420
12991
|
key: action.key,
|
|
13421
12992
|
action,
|
|
13422
|
-
onAction: () => __awaiter
|
|
12993
|
+
onAction: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
13423
12994
|
var _a, _b, _c;
|
|
13424
12995
|
yield Promise.all([(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action), (_b = props.onAction) === null || _b === void 0 ? void 0 : _b.call(props, action, index3)]);
|
|
13425
12996
|
if (props.closeOnAction) {
|
|
@@ -13510,7 +13081,7 @@ function confirm$1(p) {
|
|
|
13510
13081
|
actions: [[{
|
|
13511
13082
|
key: "cancel",
|
|
13512
13083
|
text: props.cancelText,
|
|
13513
|
-
onClick: () => __awaiter
|
|
13084
|
+
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
13514
13085
|
var _a;
|
|
13515
13086
|
yield (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
13516
13087
|
resolve(false);
|
|
@@ -13519,7 +13090,7 @@ function confirm$1(p) {
|
|
|
13519
13090
|
key: "confirm",
|
|
13520
13091
|
text: props.confirmText,
|
|
13521
13092
|
bold: true,
|
|
13522
|
-
onClick: () => __awaiter
|
|
13093
|
+
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
13523
13094
|
var _b;
|
|
13524
13095
|
yield (_b = props.onConfirm) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
13525
13096
|
resolve(true);
|
|
@@ -14888,9 +14459,8 @@ function _objectSpread2(target) {
|
|
|
14888
14459
|
function _arrayLikeToArray(arr, len) {
|
|
14889
14460
|
if (len == null || len > arr.length)
|
|
14890
14461
|
len = arr.length;
|
|
14891
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
14462
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
14892
14463
|
arr2[i] = arr[i];
|
|
14893
|
-
}
|
|
14894
14464
|
return arr2;
|
|
14895
14465
|
}
|
|
14896
14466
|
function _arrayWithoutHoles(arr) {
|
|
@@ -15422,10 +14992,9 @@ function _regeneratorRuntime() {
|
|
|
15422
14992
|
return iterable;
|
|
15423
14993
|
if (!isNaN(iterable.length)) {
|
|
15424
14994
|
var i = -1, next = function next2() {
|
|
15425
|
-
for (; ++i < iterable.length; )
|
|
14995
|
+
for (; ++i < iterable.length; )
|
|
15426
14996
|
if (hasOwn.call(iterable, i))
|
|
15427
14997
|
return next2.value = iterable[i], next2.done = false, next2;
|
|
15428
|
-
}
|
|
15429
14998
|
return next2.value = void 0, next2.done = true, next2;
|
|
15430
14999
|
};
|
|
15431
15000
|
return next.next = next;
|
|
@@ -15470,9 +15039,8 @@ function _regeneratorRuntime() {
|
|
|
15470
15039
|
return "[object Generator]";
|
|
15471
15040
|
}), exports.keys = function(val) {
|
|
15472
15041
|
var object4 = Object(val), keys2 = [];
|
|
15473
|
-
for (var key in object4)
|
|
15042
|
+
for (var key in object4)
|
|
15474
15043
|
keys2.push(key);
|
|
15475
|
-
}
|
|
15476
15044
|
return keys2.reverse(), function next() {
|
|
15477
15045
|
for (; keys2.length; ) {
|
|
15478
15046
|
var key2 = keys2.pop();
|
|
@@ -15485,9 +15053,8 @@ function _regeneratorRuntime() {
|
|
|
15485
15053
|
constructor: Context2,
|
|
15486
15054
|
reset: function reset(skipTempReset) {
|
|
15487
15055
|
if (this.prev = 0, this.next = 0, this.sent = this._sent = void 0, this.done = false, this.delegate = null, this.method = "next", this.arg = void 0, this.tryEntries.forEach(resetTryEntry), !skipTempReset)
|
|
15488
|
-
for (var name in this)
|
|
15056
|
+
for (var name in this)
|
|
15489
15057
|
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = void 0);
|
|
15490
|
-
}
|
|
15491
15058
|
},
|
|
15492
15059
|
stop: function stop2() {
|
|
15493
15060
|
this.done = true;
|
|
@@ -17495,9 +17062,9 @@ var Field = /* @__PURE__ */ function(_React$Component) {
|
|
|
17495
17062
|
value: function render2() {
|
|
17496
17063
|
var resetCount = this.state.resetCount;
|
|
17497
17064
|
var children = this.props.children;
|
|
17498
|
-
var _this$getOnlyChild = this.getOnlyChild(children), child = _this$getOnlyChild.child,
|
|
17065
|
+
var _this$getOnlyChild = this.getOnlyChild(children), child = _this$getOnlyChild.child, isFunction2 = _this$getOnlyChild.isFunction;
|
|
17499
17066
|
var returnChildNode;
|
|
17500
|
-
if (
|
|
17067
|
+
if (isFunction2) {
|
|
17501
17068
|
returnChildNode = child;
|
|
17502
17069
|
} else if (/* @__PURE__ */ React$4.isValidElement(child)) {
|
|
17503
17070
|
returnChildNode = /* @__PURE__ */ React$4.cloneElement(child, this.getControlled(child.props));
|
|
@@ -17663,9 +17230,8 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
17663
17230
|
return;
|
|
17664
17231
|
_n = false;
|
|
17665
17232
|
} else
|
|
17666
|
-
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
|
|
17233
|
+
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
|
|
17667
17234
|
;
|
|
17668
|
-
}
|
|
17669
17235
|
} catch (err) {
|
|
17670
17236
|
_d = true, _e = err;
|
|
17671
17237
|
} finally {
|
|
@@ -18854,7 +18420,7 @@ function toPlainObject$1(value) {
|
|
|
18854
18420
|
return copyObject(value, keysIn$1(value));
|
|
18855
18421
|
}
|
|
18856
18422
|
var toPlainObject_1 = toPlainObject$1;
|
|
18857
|
-
var assignMergeValue$1 = _assignMergeValue, cloneBuffer = _cloneBuffer.exports, cloneTypedArray = _cloneTypedArray, copyArray = _copyArray, initCloneObject = _initCloneObject, isArguments = isArguments_1, isArray = isArray_1, isArrayLikeObject = isArrayLikeObject_1, isBuffer = isBuffer$3.exports,
|
|
18423
|
+
var assignMergeValue$1 = _assignMergeValue, cloneBuffer = _cloneBuffer.exports, cloneTypedArray = _cloneTypedArray, copyArray = _copyArray, initCloneObject = _initCloneObject, isArguments = isArguments_1, isArray = isArray_1, isArrayLikeObject = isArrayLikeObject_1, isBuffer = isBuffer$3.exports, isFunction = isFunction_1, isObject$1 = isObject_1, isPlainObject = isPlainObject_1, isTypedArray = isTypedArray_1, safeGet$1 = _safeGet, toPlainObject = toPlainObject_1;
|
|
18858
18424
|
function baseMergeDeep$1(object4, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
18859
18425
|
var objValue = safeGet$1(object4, key), srcValue = safeGet$1(source, key), stacked = stack.get(srcValue);
|
|
18860
18426
|
if (stacked) {
|
|
@@ -18884,7 +18450,7 @@ function baseMergeDeep$1(object4, source, key, srcIndex, mergeFunc, customizer,
|
|
|
18884
18450
|
newValue = objValue;
|
|
18885
18451
|
if (isArguments(objValue)) {
|
|
18886
18452
|
newValue = toPlainObject(objValue);
|
|
18887
|
-
} else if (!isObject$1(objValue) ||
|
|
18453
|
+
} else if (!isObject$1(objValue) || isFunction(objValue)) {
|
|
18888
18454
|
newValue = initCloneObject(srcValue);
|
|
18889
18455
|
}
|
|
18890
18456
|
} else {
|
|
@@ -19208,18 +18774,18 @@ const Arrow = memo((props) => {
|
|
|
19208
18774
|
d: "M0,0 L30,0 L18.07289,14.312538 C16.65863,16.009645 14.13637,16.238942 12.43926,14.824685 C12.25341,14.669808 12.08199,14.49839 11.92711,14.312538 L0,0 L0,0 Z"
|
|
19209
18775
|
}))));
|
|
19210
18776
|
});
|
|
19211
|
-
function getSide(placement) {
|
|
19212
|
-
return placement.split("-")[0];
|
|
19213
|
-
}
|
|
19214
18777
|
function getAlignment(placement) {
|
|
19215
18778
|
return placement.split("-")[1];
|
|
19216
18779
|
}
|
|
19217
|
-
function getMainAxisFromPlacement(placement) {
|
|
19218
|
-
return ["top", "bottom"].includes(getSide(placement)) ? "x" : "y";
|
|
19219
|
-
}
|
|
19220
18780
|
function getLengthFromAxis(axis) {
|
|
19221
18781
|
return axis === "y" ? "height" : "width";
|
|
19222
18782
|
}
|
|
18783
|
+
function getSide(placement) {
|
|
18784
|
+
return placement.split("-")[0];
|
|
18785
|
+
}
|
|
18786
|
+
function getMainAxisFromPlacement(placement) {
|
|
18787
|
+
return ["top", "bottom"].includes(getSide(placement)) ? "x" : "y";
|
|
18788
|
+
}
|
|
19223
18789
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
19224
18790
|
let {
|
|
19225
18791
|
reference,
|
|
@@ -19471,7 +19037,7 @@ const arrow = (options) => ({
|
|
|
19471
19037
|
const {
|
|
19472
19038
|
element,
|
|
19473
19039
|
padding = 0
|
|
19474
|
-
} = options
|
|
19040
|
+
} = options || {};
|
|
19475
19041
|
const {
|
|
19476
19042
|
x,
|
|
19477
19043
|
y,
|
|
@@ -19491,7 +19057,6 @@ const arrow = (options) => ({
|
|
|
19491
19057
|
y
|
|
19492
19058
|
};
|
|
19493
19059
|
const axis = getMainAxisFromPlacement(placement);
|
|
19494
|
-
const alignment = getAlignment(placement);
|
|
19495
19060
|
const length = getLengthFromAxis(axis);
|
|
19496
19061
|
const arrowDimensions = await platform2.getDimensions(element);
|
|
19497
19062
|
const minProp = axis === "y" ? "top" : "left";
|
|
@@ -19508,8 +19073,7 @@ const arrow = (options) => ({
|
|
|
19508
19073
|
const max2 = clientSize - arrowDimensions[length] - paddingObject[maxProp];
|
|
19509
19074
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
19510
19075
|
const offset2 = within(min2, center, max2);
|
|
19511
|
-
const
|
|
19512
|
-
const shouldAddOffset = alignmentPadding > 0 && center !== offset2 && rects.reference[length] <= rects.floating[length];
|
|
19076
|
+
const shouldAddOffset = getAlignment(placement) != null && center != offset2 && rects.reference[length] / 2 - (center < min2 ? paddingObject[minProp] : paddingObject[maxProp]) - arrowDimensions[length] / 2 < 0;
|
|
19513
19077
|
const alignmentOffset = shouldAddOffset ? center < min2 ? min2 - center : max2 - center : 0;
|
|
19514
19078
|
return {
|
|
19515
19079
|
[axis]: coords[axis] - alignmentOffset,
|
|
@@ -19520,14 +19084,15 @@ const arrow = (options) => ({
|
|
|
19520
19084
|
};
|
|
19521
19085
|
}
|
|
19522
19086
|
});
|
|
19523
|
-
const
|
|
19087
|
+
const sides = ["top", "right", "bottom", "left"];
|
|
19088
|
+
const oppositeSideMap = {
|
|
19524
19089
|
left: "right",
|
|
19525
19090
|
right: "left",
|
|
19526
19091
|
bottom: "top",
|
|
19527
19092
|
top: "bottom"
|
|
19528
19093
|
};
|
|
19529
19094
|
function getOppositePlacement(placement) {
|
|
19530
|
-
return placement.replace(/left|right|bottom|top/g, (
|
|
19095
|
+
return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
|
|
19531
19096
|
}
|
|
19532
19097
|
function getAlignmentSides(placement, rects, rtl) {
|
|
19533
19098
|
if (rtl === void 0) {
|
|
@@ -19545,18 +19110,46 @@ function getAlignmentSides(placement, rects, rtl) {
|
|
|
19545
19110
|
cross: getOppositePlacement(mainAlignmentSide)
|
|
19546
19111
|
};
|
|
19547
19112
|
}
|
|
19548
|
-
const
|
|
19113
|
+
const oppositeAlignmentMap = {
|
|
19549
19114
|
start: "end",
|
|
19550
19115
|
end: "start"
|
|
19551
19116
|
};
|
|
19552
19117
|
function getOppositeAlignmentPlacement(placement) {
|
|
19553
|
-
return placement.replace(/start|end/g, (
|
|
19118
|
+
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
19554
19119
|
}
|
|
19555
|
-
const sides = ["top", "right", "bottom", "left"];
|
|
19556
19120
|
function getExpandedPlacements(placement) {
|
|
19557
19121
|
const oppositePlacement = getOppositePlacement(placement);
|
|
19558
19122
|
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
19559
19123
|
}
|
|
19124
|
+
function getSideList(side, isStart, rtl) {
|
|
19125
|
+
const lr = ["left", "right"];
|
|
19126
|
+
const rl = ["right", "left"];
|
|
19127
|
+
const tb = ["top", "bottom"];
|
|
19128
|
+
const bt = ["bottom", "top"];
|
|
19129
|
+
switch (side) {
|
|
19130
|
+
case "top":
|
|
19131
|
+
case "bottom":
|
|
19132
|
+
if (rtl)
|
|
19133
|
+
return isStart ? rl : lr;
|
|
19134
|
+
return isStart ? lr : rl;
|
|
19135
|
+
case "left":
|
|
19136
|
+
case "right":
|
|
19137
|
+
return isStart ? tb : bt;
|
|
19138
|
+
default:
|
|
19139
|
+
return [];
|
|
19140
|
+
}
|
|
19141
|
+
}
|
|
19142
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
19143
|
+
const alignment = getAlignment(placement);
|
|
19144
|
+
let list2 = getSideList(getSide(placement), direction === "start", rtl);
|
|
19145
|
+
if (alignment) {
|
|
19146
|
+
list2 = list2.map((side) => side + "-" + alignment);
|
|
19147
|
+
if (flipAlignment) {
|
|
19148
|
+
list2 = list2.concat(list2.map(getOppositeAlignmentPlacement));
|
|
19149
|
+
}
|
|
19150
|
+
}
|
|
19151
|
+
return list2;
|
|
19152
|
+
}
|
|
19560
19153
|
const flip = function(options) {
|
|
19561
19154
|
if (options === void 0) {
|
|
19562
19155
|
options = {};
|
|
@@ -19579,12 +19172,17 @@ const flip = function(options) {
|
|
|
19579
19172
|
crossAxis: checkCrossAxis = true,
|
|
19580
19173
|
fallbackPlacements: specifiedFallbackPlacements,
|
|
19581
19174
|
fallbackStrategy = "bestFit",
|
|
19175
|
+
fallbackAxisSideDirection = "none",
|
|
19582
19176
|
flipAlignment = true,
|
|
19583
19177
|
...detectOverflowOptions
|
|
19584
19178
|
} = options;
|
|
19585
19179
|
const side = getSide(placement);
|
|
19586
|
-
const isBasePlacement =
|
|
19180
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
19181
|
+
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
19587
19182
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
19183
|
+
if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
|
|
19184
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
19185
|
+
}
|
|
19588
19186
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
19589
19187
|
const overflow = await detectOverflow(middlewareArguments, detectOverflowOptions);
|
|
19590
19188
|
const overflows = [];
|
|
@@ -19596,7 +19194,7 @@ const flip = function(options) {
|
|
|
19596
19194
|
const {
|
|
19597
19195
|
main,
|
|
19598
19196
|
cross
|
|
19599
|
-
} = getAlignmentSides(placement, rects,
|
|
19197
|
+
} = getAlignmentSides(placement, rects, rtl);
|
|
19600
19198
|
overflows.push(overflow[main], overflow[cross]);
|
|
19601
19199
|
}
|
|
19602
19200
|
overflowsData = [...overflowsData, {
|
|
@@ -19604,8 +19202,8 @@ const flip = function(options) {
|
|
|
19604
19202
|
overflows
|
|
19605
19203
|
}];
|
|
19606
19204
|
if (!overflows.every((side2) => side2 <= 0)) {
|
|
19607
|
-
var _middlewareData$
|
|
19608
|
-
const nextIndex = ((
|
|
19205
|
+
var _middlewareData$flip2;
|
|
19206
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
19609
19207
|
const nextPlacement = placements[nextIndex];
|
|
19610
19208
|
if (nextPlacement) {
|
|
19611
19209
|
return {
|
|
@@ -19655,14 +19253,18 @@ function getSideOffsets(overflow, rect) {
|
|
|
19655
19253
|
function isAnySideFullyClipped(overflow) {
|
|
19656
19254
|
return sides.some((side) => overflow[side] >= 0);
|
|
19657
19255
|
}
|
|
19658
|
-
const hide = function(
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
|
|
19662
|
-
} = _temp === void 0 ? {} : _temp;
|
|
19256
|
+
const hide = function(options) {
|
|
19257
|
+
if (options === void 0) {
|
|
19258
|
+
options = {};
|
|
19259
|
+
}
|
|
19663
19260
|
return {
|
|
19664
19261
|
name: "hide",
|
|
19262
|
+
options,
|
|
19665
19263
|
async fn(middlewareArguments) {
|
|
19264
|
+
const {
|
|
19265
|
+
strategy = "referenceHidden",
|
|
19266
|
+
...detectOverflowOptions
|
|
19267
|
+
} = options;
|
|
19666
19268
|
const {
|
|
19667
19269
|
rects
|
|
19668
19270
|
} = middlewareArguments;
|
|
@@ -19877,11 +19479,11 @@ const limitShift = function(options) {
|
|
|
19877
19479
|
}
|
|
19878
19480
|
}
|
|
19879
19481
|
if (checkCrossAxis) {
|
|
19880
|
-
var _middlewareData$offse, _middlewareData$offse2
|
|
19482
|
+
var _middlewareData$offse, _middlewareData$offse2;
|
|
19881
19483
|
const len = mainAxis === "y" ? "width" : "height";
|
|
19882
19484
|
const isOriginSide = ["top", "left"].includes(getSide(placement));
|
|
19883
|
-
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? (_middlewareData$offse =
|
|
19884
|
-
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : (
|
|
19485
|
+
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
19486
|
+
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
19885
19487
|
if (crossAxisCoord < limitMin) {
|
|
19886
19488
|
crossAxisCoord = limitMin;
|
|
19887
19489
|
} else if (crossAxisCoord > limitMax) {
|
|
@@ -19895,30 +19497,25 @@ const limitShift = function(options) {
|
|
|
19895
19497
|
}
|
|
19896
19498
|
};
|
|
19897
19499
|
};
|
|
19898
|
-
const min = Math.min;
|
|
19899
|
-
const max = Math.max;
|
|
19900
|
-
const round = Math.round;
|
|
19901
|
-
function getScale(element, paramRect) {
|
|
19902
|
-
const rect = paramRect || element.getBoundingClientRect();
|
|
19903
|
-
return {
|
|
19904
|
-
x: element.offsetWidth > 0 ? round(rect.width) / element.offsetWidth || 1 : 1,
|
|
19905
|
-
y: element.offsetHeight > 0 ? round(rect.height) / element.offsetHeight || 1 : 1
|
|
19906
|
-
};
|
|
19907
|
-
}
|
|
19908
19500
|
function getWindow(node) {
|
|
19909
19501
|
var _node$ownerDocument;
|
|
19910
19502
|
return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
19911
19503
|
}
|
|
19912
|
-
function getComputedStyle(element) {
|
|
19504
|
+
function getComputedStyle$1(element) {
|
|
19913
19505
|
return getWindow(element).getComputedStyle(element);
|
|
19914
19506
|
}
|
|
19915
19507
|
function getNodeName(node) {
|
|
19916
19508
|
return isNode(node) ? (node.nodeName || "").toLowerCase() : "";
|
|
19917
19509
|
}
|
|
19510
|
+
let uaString;
|
|
19918
19511
|
function getUAString() {
|
|
19512
|
+
if (uaString) {
|
|
19513
|
+
return uaString;
|
|
19514
|
+
}
|
|
19919
19515
|
const uaData = navigator.userAgentData;
|
|
19920
19516
|
if (uaData && Array.isArray(uaData.brands)) {
|
|
19921
|
-
|
|
19517
|
+
uaString = uaData.brands.map((item) => item.brand + "/" + item.version).join(" ");
|
|
19518
|
+
return uaString;
|
|
19922
19519
|
}
|
|
19923
19520
|
return navigator.userAgent;
|
|
19924
19521
|
}
|
|
@@ -19944,15 +19541,15 @@ function isOverflowElement(element) {
|
|
|
19944
19541
|
overflowX,
|
|
19945
19542
|
overflowY,
|
|
19946
19543
|
display
|
|
19947
|
-
} = getComputedStyle(element);
|
|
19948
|
-
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
|
|
19544
|
+
} = getComputedStyle$1(element);
|
|
19545
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
|
|
19949
19546
|
}
|
|
19950
19547
|
function isTableElement(element) {
|
|
19951
19548
|
return ["table", "td", "th"].includes(getNodeName(element));
|
|
19952
19549
|
}
|
|
19953
19550
|
function isContainingBlock(element) {
|
|
19954
19551
|
const isFirefox = /firefox/i.test(getUAString());
|
|
19955
|
-
const css = getComputedStyle(element);
|
|
19552
|
+
const css = getComputedStyle$1(element);
|
|
19956
19553
|
const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
|
|
19957
19554
|
return css.transform !== "none" || css.perspective !== "none" || (backdropFilter ? backdropFilter !== "none" : false) || isFirefox && css.willChange === "filter" || isFirefox && (css.filter ? css.filter !== "none" : false) || ["transform", "perspective"].some((value) => css.willChange.includes(value)) || ["paint", "layout", "strict", "content"].some(
|
|
19958
19555
|
(value) => {
|
|
@@ -19967,8 +19564,59 @@ function isLayoutViewport() {
|
|
|
19967
19564
|
function isLastTraversableNode(node) {
|
|
19968
19565
|
return ["html", "body", "#document"].includes(getNodeName(node));
|
|
19969
19566
|
}
|
|
19970
|
-
|
|
19971
|
-
|
|
19567
|
+
const min = Math.min;
|
|
19568
|
+
const max = Math.max;
|
|
19569
|
+
const round = Math.round;
|
|
19570
|
+
function getCssDimensions(element) {
|
|
19571
|
+
const css = getComputedStyle$1(element);
|
|
19572
|
+
let width = parseFloat(css.width);
|
|
19573
|
+
let height = parseFloat(css.height);
|
|
19574
|
+
const offsetWidth = element.offsetWidth;
|
|
19575
|
+
const offsetHeight = element.offsetHeight;
|
|
19576
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
19577
|
+
if (shouldFallback) {
|
|
19578
|
+
width = offsetWidth;
|
|
19579
|
+
height = offsetHeight;
|
|
19580
|
+
}
|
|
19581
|
+
return {
|
|
19582
|
+
width,
|
|
19583
|
+
height,
|
|
19584
|
+
fallback: shouldFallback
|
|
19585
|
+
};
|
|
19586
|
+
}
|
|
19587
|
+
function unwrapElement(element) {
|
|
19588
|
+
return !isElement(element) ? element.contextElement : element;
|
|
19589
|
+
}
|
|
19590
|
+
const FALLBACK_SCALE = {
|
|
19591
|
+
x: 1,
|
|
19592
|
+
y: 1
|
|
19593
|
+
};
|
|
19594
|
+
function getScale(element) {
|
|
19595
|
+
const domElement = unwrapElement(element);
|
|
19596
|
+
if (!isHTMLElement(domElement)) {
|
|
19597
|
+
return FALLBACK_SCALE;
|
|
19598
|
+
}
|
|
19599
|
+
const rect = domElement.getBoundingClientRect();
|
|
19600
|
+
const {
|
|
19601
|
+
width,
|
|
19602
|
+
height,
|
|
19603
|
+
fallback
|
|
19604
|
+
} = getCssDimensions(domElement);
|
|
19605
|
+
let x = (fallback ? round(rect.width) : rect.width) / width;
|
|
19606
|
+
let y = (fallback ? round(rect.height) : rect.height) / height;
|
|
19607
|
+
if (!x || !Number.isFinite(x)) {
|
|
19608
|
+
x = 1;
|
|
19609
|
+
}
|
|
19610
|
+
if (!y || !Number.isFinite(y)) {
|
|
19611
|
+
y = 1;
|
|
19612
|
+
}
|
|
19613
|
+
return {
|
|
19614
|
+
x,
|
|
19615
|
+
y
|
|
19616
|
+
};
|
|
19617
|
+
}
|
|
19618
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
19619
|
+
var _win$visualViewport, _win$visualViewport2;
|
|
19972
19620
|
if (includeScale === void 0) {
|
|
19973
19621
|
includeScale = false;
|
|
19974
19622
|
}
|
|
@@ -19976,25 +19624,42 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
|
19976
19624
|
isFixedStrategy = false;
|
|
19977
19625
|
}
|
|
19978
19626
|
const clientRect = element.getBoundingClientRect();
|
|
19979
|
-
|
|
19980
|
-
let
|
|
19981
|
-
|
|
19982
|
-
|
|
19983
|
-
|
|
19984
|
-
|
|
19985
|
-
|
|
19986
|
-
|
|
19987
|
-
|
|
19988
|
-
|
|
19989
|
-
if (includeScale && isHTMLElement(elementToCheckForScale)) {
|
|
19990
|
-
scale2 = getScale(elementToCheckForScale, contextRect);
|
|
19627
|
+
const domElement = unwrapElement(element);
|
|
19628
|
+
let scale2 = FALLBACK_SCALE;
|
|
19629
|
+
if (includeScale) {
|
|
19630
|
+
if (offsetParent) {
|
|
19631
|
+
if (isElement(offsetParent)) {
|
|
19632
|
+
scale2 = getScale(offsetParent);
|
|
19633
|
+
}
|
|
19634
|
+
} else {
|
|
19635
|
+
scale2 = getScale(element);
|
|
19636
|
+
}
|
|
19991
19637
|
}
|
|
19992
|
-
const win =
|
|
19638
|
+
const win = domElement ? getWindow(domElement) : window;
|
|
19993
19639
|
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
19994
|
-
|
|
19995
|
-
|
|
19996
|
-
|
|
19997
|
-
|
|
19640
|
+
let x = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale2.x;
|
|
19641
|
+
let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale2.y;
|
|
19642
|
+
let width = clientRect.width / scale2.x;
|
|
19643
|
+
let height = clientRect.height / scale2.y;
|
|
19644
|
+
if (domElement) {
|
|
19645
|
+
const win2 = getWindow(domElement);
|
|
19646
|
+
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
19647
|
+
let currentIFrame = win2.frameElement;
|
|
19648
|
+
while (currentIFrame && offsetParent && offsetWin !== win2) {
|
|
19649
|
+
const iframeScale = getScale(currentIFrame);
|
|
19650
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
19651
|
+
const css = getComputedStyle(currentIFrame);
|
|
19652
|
+
iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
19653
|
+
iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
19654
|
+
x *= iframeScale.x;
|
|
19655
|
+
y *= iframeScale.y;
|
|
19656
|
+
width *= iframeScale.x;
|
|
19657
|
+
height *= iframeScale.y;
|
|
19658
|
+
x += iframeRect.x;
|
|
19659
|
+
y += iframeRect.y;
|
|
19660
|
+
currentIFrame = getWindow(currentIFrame).frameElement;
|
|
19661
|
+
}
|
|
19662
|
+
}
|
|
19998
19663
|
return {
|
|
19999
19664
|
width,
|
|
20000
19665
|
height,
|
|
@@ -20024,18 +19689,10 @@ function getNodeScroll(element) {
|
|
|
20024
19689
|
function getWindowScrollBarX(element) {
|
|
20025
19690
|
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
20026
19691
|
}
|
|
20027
|
-
function isScaled(element) {
|
|
20028
|
-
const rect = getBoundingClientRect(element);
|
|
20029
|
-
return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
|
|
20030
|
-
}
|
|
20031
19692
|
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
20032
19693
|
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
20033
19694
|
const documentElement = getDocumentElement(offsetParent);
|
|
20034
|
-
const rect = getBoundingClientRect(
|
|
20035
|
-
element,
|
|
20036
|
-
isOffsetParentAnElement && isScaled(offsetParent),
|
|
20037
|
-
strategy === "fixed"
|
|
20038
|
-
);
|
|
19695
|
+
const rect = getBoundingClientRect(element, true, strategy === "fixed", offsetParent);
|
|
20039
19696
|
let scroll = {
|
|
20040
19697
|
scrollLeft: 0,
|
|
20041
19698
|
scrollTop: 0
|
|
@@ -20071,7 +19728,7 @@ function getParentNode(node) {
|
|
|
20071
19728
|
return isShadowRoot(result2) ? result2.host : result2;
|
|
20072
19729
|
}
|
|
20073
19730
|
function getTrueOffsetParent(element) {
|
|
20074
|
-
if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
|
|
19731
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
20075
19732
|
return null;
|
|
20076
19733
|
}
|
|
20077
19734
|
return element.offsetParent;
|
|
@@ -20090,26 +19747,16 @@ function getContainingBlock(element) {
|
|
|
20090
19747
|
function getOffsetParent(element) {
|
|
20091
19748
|
const window2 = getWindow(element);
|
|
20092
19749
|
let offsetParent = getTrueOffsetParent(element);
|
|
20093
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
|
|
19750
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
|
|
20094
19751
|
offsetParent = getTrueOffsetParent(offsetParent);
|
|
20095
19752
|
}
|
|
20096
|
-
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
19753
|
+
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
20097
19754
|
return window2;
|
|
20098
19755
|
}
|
|
20099
19756
|
return offsetParent || getContainingBlock(element) || window2;
|
|
20100
19757
|
}
|
|
20101
19758
|
function getDimensions(element) {
|
|
20102
|
-
|
|
20103
|
-
return {
|
|
20104
|
-
width: element.offsetWidth,
|
|
20105
|
-
height: element.offsetHeight
|
|
20106
|
-
};
|
|
20107
|
-
}
|
|
20108
|
-
const rect = getBoundingClientRect(element);
|
|
20109
|
-
return {
|
|
20110
|
-
width: rect.width,
|
|
20111
|
-
height: rect.height
|
|
20112
|
-
};
|
|
19759
|
+
return getCssDimensions(element);
|
|
20113
19760
|
}
|
|
20114
19761
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
20115
19762
|
let {
|
|
@@ -20185,7 +19832,7 @@ function getDocumentRect(element) {
|
|
|
20185
19832
|
const height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
|
20186
19833
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
20187
19834
|
const y = -scroll.scrollTop;
|
|
20188
|
-
if (getComputedStyle(body || html).direction === "rtl") {
|
|
19835
|
+
if (getComputedStyle$1(body || html).direction === "rtl") {
|
|
20189
19836
|
x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
|
20190
19837
|
}
|
|
20191
19838
|
return {
|
|
@@ -20250,13 +19897,17 @@ function getClientRectFromClippingAncestor(element, clippingAncestor, strategy)
|
|
|
20250
19897
|
}
|
|
20251
19898
|
return rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
20252
19899
|
}
|
|
20253
|
-
function getClippingElementAncestors(element) {
|
|
19900
|
+
function getClippingElementAncestors(element, cache) {
|
|
19901
|
+
const cachedResult = cache.get(element);
|
|
19902
|
+
if (cachedResult) {
|
|
19903
|
+
return cachedResult;
|
|
19904
|
+
}
|
|
20254
19905
|
let result2 = getOverflowAncestors(element).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
20255
19906
|
let currentContainingBlockComputedStyle = null;
|
|
20256
|
-
const elementIsFixed = getComputedStyle(element).position === "fixed";
|
|
19907
|
+
const elementIsFixed = getComputedStyle$1(element).position === "fixed";
|
|
20257
19908
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
20258
19909
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
20259
|
-
const computedStyle = getComputedStyle(currentNode);
|
|
19910
|
+
const computedStyle = getComputedStyle$1(currentNode);
|
|
20260
19911
|
const containingBlock = isContainingBlock(currentNode);
|
|
20261
19912
|
const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
|
|
20262
19913
|
if (shouldDropCurrentNode) {
|
|
@@ -20266,6 +19917,7 @@ function getClippingElementAncestors(element) {
|
|
|
20266
19917
|
}
|
|
20267
19918
|
currentNode = getParentNode(currentNode);
|
|
20268
19919
|
}
|
|
19920
|
+
cache.set(element, result2);
|
|
20269
19921
|
return result2;
|
|
20270
19922
|
}
|
|
20271
19923
|
function getClippingRect(_ref) {
|
|
@@ -20275,7 +19927,7 @@ function getClippingRect(_ref) {
|
|
|
20275
19927
|
rootBoundary,
|
|
20276
19928
|
strategy
|
|
20277
19929
|
} = _ref;
|
|
20278
|
-
const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element) : [].concat(boundary);
|
|
19930
|
+
const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
20279
19931
|
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
20280
19932
|
const firstClippingAncestor = clippingAncestors[0];
|
|
20281
19933
|
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
@@ -20319,7 +19971,7 @@ const platform = {
|
|
|
20319
19971
|
};
|
|
20320
19972
|
},
|
|
20321
19973
|
getClientRects: (element) => Array.from(element.getClientRects()),
|
|
20322
|
-
isRTL: (element) => getComputedStyle(element).direction === "rtl"
|
|
19974
|
+
isRTL: (element) => getComputedStyle$1(element).direction === "rtl"
|
|
20323
19975
|
};
|
|
20324
19976
|
function autoUpdate(reference, floating, update2, options) {
|
|
20325
19977
|
if (options === void 0) {
|
|
@@ -20381,10 +20033,21 @@ function autoUpdate(reference, floating, update2, options) {
|
|
|
20381
20033
|
}
|
|
20382
20034
|
};
|
|
20383
20035
|
}
|
|
20384
|
-
const computePosition = (reference, floating, options) =>
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20036
|
+
const computePosition = (reference, floating, options) => {
|
|
20037
|
+
const cache = /* @__PURE__ */ new Map();
|
|
20038
|
+
const mergedOptions = {
|
|
20039
|
+
platform,
|
|
20040
|
+
...options
|
|
20041
|
+
};
|
|
20042
|
+
const platformWithCache = {
|
|
20043
|
+
...mergedOptions.platform,
|
|
20044
|
+
_c: cache
|
|
20045
|
+
};
|
|
20046
|
+
return computePosition$1(reference, floating, {
|
|
20047
|
+
...mergedOptions,
|
|
20048
|
+
platform: platformWithCache
|
|
20049
|
+
});
|
|
20050
|
+
};
|
|
20388
20051
|
class Wrapper extends React__default.Component {
|
|
20389
20052
|
constructor() {
|
|
20390
20053
|
super(...arguments);
|
|
@@ -20488,7 +20151,7 @@ const Popover$1 = forwardRef((p, ref) => {
|
|
|
20488
20151
|
const [targetElement, setTargetElement] = useState$1(null);
|
|
20489
20152
|
function update2() {
|
|
20490
20153
|
var _a, _b, _c;
|
|
20491
|
-
return __awaiter
|
|
20154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20492
20155
|
const target = (_b = (_a = targetRef.current) === null || _a === void 0 ? void 0 : _a.element) !== null && _b !== void 0 ? _b : null;
|
|
20493
20156
|
const floating2 = floatingRef.current;
|
|
20494
20157
|
const arrowElement = arrowRef.current;
|
|
@@ -21502,7 +21165,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21502
21165
|
renderItem
|
|
21503
21166
|
} = props;
|
|
21504
21167
|
function processFile(file, fileList) {
|
|
21505
|
-
return __awaiter
|
|
21168
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21506
21169
|
const {
|
|
21507
21170
|
beforeUpload
|
|
21508
21171
|
} = props;
|
|
@@ -21516,7 +21179,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21516
21179
|
}
|
|
21517
21180
|
function onChange(e) {
|
|
21518
21181
|
var _a;
|
|
21519
|
-
return __awaiter
|
|
21182
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21520
21183
|
e.persist();
|
|
21521
21184
|
const {
|
|
21522
21185
|
files: rawFiles
|
|
@@ -21549,7 +21212,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21549
21212
|
file
|
|
21550
21213
|
}));
|
|
21551
21214
|
setTasks((prev) => [...getFinalTasks(prev), ...newTasks]);
|
|
21552
|
-
yield Promise.all(newTasks.map((currentTask) => __awaiter
|
|
21215
|
+
yield Promise.all(newTasks.map((currentTask) => __awaiter(this, void 0, void 0, function* () {
|
|
21553
21216
|
try {
|
|
21554
21217
|
const result2 = yield props.upload(currentTask.file);
|
|
21555
21218
|
setTasks((prev) => {
|
|
@@ -21614,7 +21277,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21614
21277
|
}
|
|
21615
21278
|
onPreview && onPreview(index2, fileItem);
|
|
21616
21279
|
},
|
|
21617
|
-
onDelete: () => __awaiter
|
|
21280
|
+
onDelete: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
21618
21281
|
var _c;
|
|
21619
21282
|
const canDelete = yield (_c = props.onDelete) === null || _c === void 0 ? void 0 : _c.call(props, fileItem);
|
|
21620
21283
|
if (canDelete === false)
|
|
@@ -21862,7 +21525,7 @@ const defaultProps$w = {
|
|
|
21862
21525
|
const InfiniteScroll$1 = (p) => {
|
|
21863
21526
|
const props = mergeProps(defaultProps$w, p);
|
|
21864
21527
|
const [failed, setFailed] = useState$1(false);
|
|
21865
|
-
const doLoadMore = useLockFn((isRetry) => __awaiter
|
|
21528
|
+
const doLoadMore = useLockFn((isRetry) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21866
21529
|
try {
|
|
21867
21530
|
yield props.loadMore(isRetry);
|
|
21868
21531
|
} catch (e) {
|
|
@@ -21876,7 +21539,7 @@ const InfiniteScroll$1 = (p) => {
|
|
|
21876
21539
|
const [scrollParent, setScrollParent] = useState$1();
|
|
21877
21540
|
const {
|
|
21878
21541
|
run: check
|
|
21879
|
-
} = useThrottleFn(() => __awaiter
|
|
21542
|
+
} = useThrottleFn(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
21880
21543
|
if (nextFlagRef.current !== flag)
|
|
21881
21544
|
return;
|
|
21882
21545
|
if (!props.hasMore)
|
|
@@ -21922,7 +21585,7 @@ const InfiniteScroll$1 = (p) => {
|
|
|
21922
21585
|
};
|
|
21923
21586
|
}, [scrollParent]);
|
|
21924
21587
|
function retry() {
|
|
21925
|
-
return __awaiter
|
|
21588
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21926
21589
|
setFailed(false);
|
|
21927
21590
|
yield doLoadMore(true);
|
|
21928
21591
|
setFlag(nextFlagRef.current);
|
|
@@ -22067,6 +21730,7 @@ const Input$1 = forwardRef((p, ref) => {
|
|
|
22067
21730
|
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
22068
21731
|
},
|
|
22069
21732
|
onClick: props.onClick,
|
|
21733
|
+
step: props.step,
|
|
22070
21734
|
role: props.role,
|
|
22071
21735
|
"aria-valuenow": props["aria-valuenow"],
|
|
22072
21736
|
"aria-valuemax": props["aria-valuemax"],
|
|
@@ -22234,7 +21898,7 @@ const Modal = (p) => {
|
|
|
22234
21898
|
return React__default.createElement(ModalActionButton, {
|
|
22235
21899
|
key: action.key,
|
|
22236
21900
|
action,
|
|
22237
|
-
onAction: () => __awaiter
|
|
21901
|
+
onAction: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
22238
21902
|
var _a, _b, _c;
|
|
22239
21903
|
yield Promise.all([(_a = action.onClick) === null || _a === void 0 ? void 0 : _a.call(action), (_b = props.onAction) === null || _b === void 0 ? void 0 : _b.call(props, action, index2)]);
|
|
22240
21904
|
if (props.closeOnAction) {
|
|
@@ -22324,7 +21988,7 @@ function confirm(p) {
|
|
|
22324
21988
|
key: "confirm",
|
|
22325
21989
|
text: props.confirmText,
|
|
22326
21990
|
primary: true,
|
|
22327
|
-
onClick: () => __awaiter
|
|
21991
|
+
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
22328
21992
|
var _a;
|
|
22329
21993
|
yield (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
22330
21994
|
resolve(true);
|
|
@@ -22332,7 +21996,7 @@ function confirm(p) {
|
|
|
22332
21996
|
}, {
|
|
22333
21997
|
key: "cancel",
|
|
22334
21998
|
text: props.cancelText,
|
|
22335
|
-
onClick: () => __awaiter
|
|
21999
|
+
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
22336
22000
|
var _b;
|
|
22337
22001
|
yield (_b = props.onCancel) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
22338
22002
|
resolve(false);
|
|
@@ -22900,7 +22564,7 @@ const PullToRefresh$1 = (p) => {
|
|
|
22900
22564
|
});
|
|
22901
22565
|
}, []);
|
|
22902
22566
|
function doRefresh() {
|
|
22903
|
-
return __awaiter
|
|
22567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22904
22568
|
api.start({
|
|
22905
22569
|
height: headHeight
|
|
22906
22570
|
});
|
|
@@ -22910,7 +22574,7 @@ const PullToRefresh$1 = (p) => {
|
|
|
22910
22574
|
setStatus("complete");
|
|
22911
22575
|
} catch (e) {
|
|
22912
22576
|
api.start({
|
|
22913
|
-
to: (next) => __awaiter
|
|
22577
|
+
to: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
22914
22578
|
yield next({
|
|
22915
22579
|
height: 0
|
|
22916
22580
|
});
|
|
@@ -22923,7 +22587,7 @@ const PullToRefresh$1 = (p) => {
|
|
|
22923
22587
|
yield sleep(props.completeDelay);
|
|
22924
22588
|
}
|
|
22925
22589
|
api.start({
|
|
22926
|
-
to: (next) => __awaiter
|
|
22590
|
+
to: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
22927
22591
|
yield next({
|
|
22928
22592
|
height: 0
|
|
22929
22593
|
});
|
|
@@ -24289,9 +23953,8 @@ var iterableToArrayLimit = { exports: {} };
|
|
|
24289
23953
|
return;
|
|
24290
23954
|
_n = false;
|
|
24291
23955
|
} else
|
|
24292
|
-
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
|
|
23956
|
+
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
|
|
24293
23957
|
;
|
|
24294
|
-
}
|
|
24295
23958
|
} catch (err) {
|
|
24296
23959
|
_d = true, _e = err;
|
|
24297
23960
|
} finally {
|
|
@@ -24314,9 +23977,8 @@ var arrayLikeToArray = { exports: {} };
|
|
|
24314
23977
|
function _arrayLikeToArray2(arr, len) {
|
|
24315
23978
|
if (len == null || len > arr.length)
|
|
24316
23979
|
len = arr.length;
|
|
24317
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
23980
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
24318
23981
|
arr2[i] = arr[i];
|
|
24319
|
-
}
|
|
24320
23982
|
return arr2;
|
|
24321
23983
|
}
|
|
24322
23984
|
module.exports = _arrayLikeToArray2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
@@ -24946,7 +24608,31 @@ function useRefState(initialState) {
|
|
|
24946
24608
|
}, [state]);
|
|
24947
24609
|
return [state, setState, ref];
|
|
24948
24610
|
}
|
|
24611
|
+
function mergeFuncProps(p1, p2) {
|
|
24612
|
+
const p1Keys = Object.keys(p1);
|
|
24613
|
+
const p2Keys = Object.keys(p2);
|
|
24614
|
+
const keys2 = /* @__PURE__ */ new Set([...p1Keys, ...p2Keys]);
|
|
24615
|
+
const res = {};
|
|
24616
|
+
keys2.forEach((key) => {
|
|
24617
|
+
const p1Value = p1[key];
|
|
24618
|
+
const p2Value = p2[key];
|
|
24619
|
+
if (typeof p1Value === "function" && typeof p2Value === "function") {
|
|
24620
|
+
res[key] = function(...args) {
|
|
24621
|
+
p1Value(...args);
|
|
24622
|
+
p2Value(...args);
|
|
24623
|
+
};
|
|
24624
|
+
} else {
|
|
24625
|
+
res[key] = p1Value || p2Value;
|
|
24626
|
+
}
|
|
24627
|
+
});
|
|
24628
|
+
return res;
|
|
24629
|
+
}
|
|
24949
24630
|
const classPrefix$a = `adm-swiper`;
|
|
24631
|
+
const eventToPropRecord = {
|
|
24632
|
+
"mousedown": "onMouseDown",
|
|
24633
|
+
"mousemove": "onMouseMove",
|
|
24634
|
+
"mouseup": "onMouseUp"
|
|
24635
|
+
};
|
|
24950
24636
|
const defaultProps$a = {
|
|
24951
24637
|
defaultIndex: 0,
|
|
24952
24638
|
allowTouchMove: true,
|
|
@@ -24957,7 +24643,8 @@ const defaultProps$a = {
|
|
|
24957
24643
|
slideSize: 100,
|
|
24958
24644
|
trackOffset: 0,
|
|
24959
24645
|
stuckAtBoundary: true,
|
|
24960
|
-
rubberband: true
|
|
24646
|
+
rubberband: true,
|
|
24647
|
+
stopPropagation: []
|
|
24961
24648
|
};
|
|
24962
24649
|
let currentUid;
|
|
24963
24650
|
const Swiper = forwardRef(staged_1((p, ref) => {
|
|
@@ -25184,6 +24871,15 @@ const Swiper = forwardRef(staged_1((p, ref) => {
|
|
|
25184
24871
|
"--slide-size": `${props.slideSize}%`,
|
|
25185
24872
|
"--track-offset": `${props.trackOffset}%`
|
|
25186
24873
|
};
|
|
24874
|
+
const dragProps = Object.assign({}, props.allowTouchMove ? bind() : {});
|
|
24875
|
+
const stopPropagationProps = {};
|
|
24876
|
+
for (const key of props.stopPropagation) {
|
|
24877
|
+
const prop = eventToPropRecord[key];
|
|
24878
|
+
stopPropagationProps[prop] = function(e) {
|
|
24879
|
+
e.stopPropagation();
|
|
24880
|
+
};
|
|
24881
|
+
}
|
|
24882
|
+
const mergedProps = mergeFuncProps(dragProps, stopPropagationProps);
|
|
25187
24883
|
return withNativeProps(props, React__default.createElement("div", {
|
|
25188
24884
|
className: classNames(classPrefix$a, `${classPrefix$a}-${props.direction}`),
|
|
25189
24885
|
style
|
|
@@ -25198,7 +24894,7 @@ const Swiper = forwardRef(staged_1((p, ref) => {
|
|
|
25198
24894
|
}
|
|
25199
24895
|
forceCancelDrag();
|
|
25200
24896
|
}
|
|
25201
|
-
},
|
|
24897
|
+
}, mergedProps), renderTrackInner()), props.indicator === void 0 ? React__default.createElement("div", {
|
|
25202
24898
|
className: `${classPrefix$a}-indicator`
|
|
25203
24899
|
}, React__default.createElement(PageIndicator, Object.assign({}, props.indicatorProps, {
|
|
25204
24900
|
total: count,
|
|
@@ -25253,7 +24949,7 @@ const Switch$1 = (p) => {
|
|
|
25253
24949
|
onChange: props.onChange
|
|
25254
24950
|
});
|
|
25255
24951
|
function onClick() {
|
|
25256
|
-
return __awaiter
|
|
24952
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25257
24953
|
if (disabled || props.loading || changing) {
|
|
25258
24954
|
return;
|
|
25259
24955
|
}
|
|
@@ -26205,7 +25901,7 @@ const Footer$1 = (p) => {
|
|
|
26205
25901
|
className: classNames(classPrefix)
|
|
26206
25902
|
}, label && React__default.createElement("div", {
|
|
26207
25903
|
className: `${classPrefix}-label`
|
|
26208
|
-
}, React__default.createElement(Divider
|
|
25904
|
+
}, React__default.createElement(Divider, null, label)), links && links.length > 0 && React__default.createElement("div", {
|
|
26209
25905
|
className: `${classPrefix}-links`
|
|
26210
25906
|
}, links.map((link, index2) => {
|
|
26211
25907
|
return React__default.createElement(React__default.Fragment, {
|
|
@@ -26214,7 +25910,7 @@ const Footer$1 = (p) => {
|
|
|
26214
25910
|
href: link.href,
|
|
26215
25911
|
rel: "noopener noreferrer",
|
|
26216
25912
|
onClick: (event) => clickLinkItem(link, index2, event)
|
|
26217
|
-
}, link.text), index2 !== links.length - 1 && React__default.createElement(Divider
|
|
25913
|
+
}, link.text), index2 !== links.length - 1 && React__default.createElement(Divider, {
|
|
26218
25914
|
direction: "vertical"
|
|
26219
25915
|
}));
|
|
26220
25916
|
})), content && React__default.createElement("div", {
|