antd-mobile 5.27.0 → 5.28.1
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 +681 -950
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +681 -950
- package/2x/bundle/antd-mobile.es.js +5047 -5350
- package/2x/bundle/antd-mobile.umd.development.js +677 -946
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/css-vars-patch.css +4 -0
- package/2x/bundle/style.css +0 -1
- 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/ellipsis/ellipsis.d.ts +1 -0
- package/2x/cjs/components/ellipsis/ellipsis.js +3 -2
- package/2x/cjs/components/footer/footer.js +3 -3
- package/2x/cjs/components/input/input.js +1 -0
- package/2x/cjs/components/nav-bar/nav-bar.d.ts +2 -2
- package/2x/cjs/components/popup/popup.js +7 -1
- package/2x/cjs/components/steps/steps.css +0 -1
- 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 +24 -5
- package/2x/cjs/components/text-area/text-area.js +4 -1
- package/2x/cjs/global/css-vars-patch.css +4 -0
- package/2x/cjs/locales/base.d.ts +1 -0
- package/2x/cjs/locales/base.js +2 -1
- package/2x/cjs/locales/en-US.d.ts +1 -0
- package/2x/cjs/locales/es-ES.d.ts +1 -0
- package/2x/cjs/locales/fa-IR.d.ts +1 -0
- package/2x/cjs/locales/fr-FR.d.ts +1 -0
- package/2x/cjs/locales/id-ID.d.ts +1 -0
- package/2x/cjs/locales/ja-JP.d.ts +1 -0
- package/2x/cjs/locales/kk-KZ.d.ts +1 -0
- package/2x/cjs/locales/ko-KR.d.ts +1 -0
- package/2x/cjs/locales/zh-CN.d.ts +1 -0
- package/2x/cjs/locales/zh-CN.js +2 -1
- package/2x/cjs/locales/zh-HK.d.ts +1 -0
- package/2x/cjs/locales/zh-HK.js +2 -1
- package/2x/cjs/locales/zh-TW.d.ts +1 -0
- package/2x/cjs/locales/zh-TW.js +2 -1
- 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/ellipsis/ellipsis.d.ts +1 -0
- package/2x/es/components/ellipsis/ellipsis.js +3 -2
- package/2x/es/components/footer/footer.js +1 -1
- package/2x/es/components/input/input.js +1 -0
- package/2x/es/components/nav-bar/nav-bar.d.ts +2 -2
- package/2x/es/components/popup/popup.js +7 -1
- package/2x/es/components/steps/steps.css +0 -1
- 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 +24 -5
- package/2x/es/components/text-area/text-area.js +4 -1
- package/2x/es/global/css-vars-patch.css +4 -0
- package/2x/es/locales/base.d.ts +1 -0
- package/2x/es/locales/base.js +2 -1
- package/2x/es/locales/en-US.d.ts +1 -0
- package/2x/es/locales/es-ES.d.ts +1 -0
- package/2x/es/locales/fa-IR.d.ts +1 -0
- package/2x/es/locales/fr-FR.d.ts +1 -0
- package/2x/es/locales/id-ID.d.ts +1 -0
- package/2x/es/locales/ja-JP.d.ts +1 -0
- package/2x/es/locales/kk-KZ.d.ts +1 -0
- package/2x/es/locales/ko-KR.d.ts +1 -0
- package/2x/es/locales/zh-CN.d.ts +1 -0
- package/2x/es/locales/zh-CN.js +2 -1
- package/2x/es/locales/zh-HK.d.ts +1 -0
- package/2x/es/locales/zh-HK.js +2 -1
- package/2x/es/locales/zh-TW.d.ts +1 -0
- package/2x/es/locales/zh-TW.js +2 -1
- 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 +2 -2
- package/README.md +1 -1
- package/bundle/antd-mobile.cjs.development.js +681 -950
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +681 -950
- package/bundle/antd-mobile.es.js +5047 -5350
- package/bundle/antd-mobile.umd.development.js +677 -946
- package/bundle/antd-mobile.umd.js +9 -9
- package/bundle/css-vars-patch.css +3 -0
- package/bundle/style.css +1 -1
- 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/ellipsis/ellipsis.d.ts +1 -0
- package/cjs/components/ellipsis/ellipsis.js +3 -2
- package/cjs/components/footer/footer.js +3 -3
- package/cjs/components/input/input.js +1 -0
- package/cjs/components/nav-bar/nav-bar.d.ts +2 -2
- package/cjs/components/popup/popup.js +7 -1
- package/cjs/components/steps/steps.css +0 -1
- package/cjs/components/swiper/index.d.ts +1 -0
- package/cjs/components/swiper/swiper.d.ts +9 -0
- package/cjs/components/swiper/swiper.js +24 -5
- package/cjs/components/text-area/text-area.js +4 -1
- package/cjs/global/css-vars-patch.css +3 -0
- package/cjs/locales/base.d.ts +1 -0
- package/cjs/locales/base.js +2 -1
- package/cjs/locales/en-US.d.ts +1 -0
- package/cjs/locales/es-ES.d.ts +1 -0
- package/cjs/locales/fa-IR.d.ts +1 -0
- package/cjs/locales/fr-FR.d.ts +1 -0
- package/cjs/locales/id-ID.d.ts +1 -0
- package/cjs/locales/ja-JP.d.ts +1 -0
- package/cjs/locales/kk-KZ.d.ts +1 -0
- package/cjs/locales/ko-KR.d.ts +1 -0
- package/cjs/locales/zh-CN.d.ts +1 -0
- package/cjs/locales/zh-CN.js +2 -1
- package/cjs/locales/zh-HK.d.ts +1 -0
- package/cjs/locales/zh-HK.js +2 -1
- package/cjs/locales/zh-TW.d.ts +1 -0
- package/cjs/locales/zh-TW.js +2 -1
- 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/ellipsis/ellipsis.d.ts +1 -0
- package/es/components/ellipsis/ellipsis.js +3 -2
- package/es/components/footer/footer.js +1 -1
- package/es/components/input/input.js +1 -0
- package/es/components/nav-bar/nav-bar.d.ts +2 -2
- package/es/components/popup/popup.js +7 -1
- package/es/components/steps/steps.css +0 -1
- package/es/components/swiper/index.d.ts +1 -0
- package/es/components/swiper/swiper.d.ts +9 -0
- package/es/components/swiper/swiper.js +24 -5
- package/es/components/text-area/text-area.js +4 -1
- package/es/global/css-vars-patch.css +3 -0
- package/es/locales/base.d.ts +1 -0
- package/es/locales/base.js +2 -1
- package/es/locales/en-US.d.ts +1 -0
- package/es/locales/es-ES.d.ts +1 -0
- package/es/locales/fa-IR.d.ts +1 -0
- package/es/locales/fr-FR.d.ts +1 -0
- package/es/locales/id-ID.d.ts +1 -0
- package/es/locales/ja-JP.d.ts +1 -0
- package/es/locales/kk-KZ.d.ts +1 -0
- package/es/locales/ko-KR.d.ts +1 -0
- package/es/locales/zh-CN.d.ts +1 -0
- package/es/locales/zh-CN.js +2 -1
- package/es/locales/zh-HK.d.ts +1 -0
- package/es/locales/zh-HK.js +2 -1
- package/es/locales/zh-TW.d.ts +1 -0
- package/es/locales/zh-TW.js +2 -1
- package/es/utils/with-func-props.d.ts +5 -0
- package/es/utils/with-func-props.js +19 -0
- package/package.json +2 -2
- 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);
|
|
@@ -68,7 +68,8 @@ const base = {
|
|
|
68
68
|
common: {
|
|
69
69
|
confirm: "Confirm",
|
|
70
70
|
cancel: "Cancel",
|
|
71
|
-
loading: "Loading"
|
|
71
|
+
loading: "Loading",
|
|
72
|
+
close: "Close"
|
|
72
73
|
},
|
|
73
74
|
Calendar: {
|
|
74
75
|
markItems: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"],
|
|
@@ -198,7 +199,8 @@ const zhCN = mergeLocale(base, {
|
|
|
198
199
|
common: {
|
|
199
200
|
confirm: "\u786E\u5B9A",
|
|
200
201
|
cancel: "\u53D6\u6D88",
|
|
201
|
-
loading: "\u52A0\u8F7D\u4E2D"
|
|
202
|
+
loading: "\u52A0\u8F7D\u4E2D",
|
|
203
|
+
close: "\u5173\u95ED"
|
|
202
204
|
},
|
|
203
205
|
Calendar: {
|
|
204
206
|
markItems: ["\u4E00", "\u4E8C", "\u4E09", "\u56DB", "\u4E94", "\u516D", "\u65E5"],
|
|
@@ -882,48 +884,36 @@ function mergeProps(...items) {
|
|
|
882
884
|
return ret;
|
|
883
885
|
}
|
|
884
886
|
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";
|
|
887
|
+
const createUpdateEffect = (hook) => (effect, deps) => {
|
|
888
|
+
const isMounted = useRef(false);
|
|
889
|
+
hook(() => {
|
|
890
|
+
return () => {
|
|
891
|
+
isMounted.current = false;
|
|
892
|
+
};
|
|
893
|
+
}, []);
|
|
894
|
+
hook(() => {
|
|
895
|
+
if (!isMounted.current) {
|
|
896
|
+
isMounted.current = true;
|
|
897
|
+
} else {
|
|
898
|
+
return effect();
|
|
899
|
+
}
|
|
900
|
+
}, deps);
|
|
907
901
|
};
|
|
908
|
-
|
|
902
|
+
const isFunction$1 = (value) => typeof value === "function";
|
|
903
|
+
const isNumber = (value) => typeof value === "number";
|
|
904
|
+
const isDev$1 = true;
|
|
909
905
|
const isDev$2 = isDev$1;
|
|
910
906
|
function useMemoizedFn(fn) {
|
|
911
907
|
if (isDev$2) {
|
|
912
908
|
if (!isFunction$1(fn)) {
|
|
913
|
-
console.error(
|
|
909
|
+
console.error(`useMemoizedFn expected parameter is a function, got ${typeof fn}`);
|
|
914
910
|
}
|
|
915
911
|
}
|
|
916
|
-
|
|
917
|
-
fnRef.current = useMemo(
|
|
918
|
-
|
|
919
|
-
}, [fn]);
|
|
920
|
-
var memoizedFn = useRef();
|
|
912
|
+
const fnRef = useRef(fn);
|
|
913
|
+
fnRef.current = useMemo(() => fn, [fn]);
|
|
914
|
+
const memoizedFn = useRef();
|
|
921
915
|
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
|
-
}
|
|
916
|
+
memoizedFn.current = function(...args) {
|
|
927
917
|
return fnRef.current.apply(this, args);
|
|
928
918
|
};
|
|
929
919
|
}
|
|
@@ -933,28 +923,26 @@ const useUpdateEffect = createUpdateEffect(useEffect);
|
|
|
933
923
|
function depsAreSame(oldDeps, deps) {
|
|
934
924
|
if (oldDeps === deps)
|
|
935
925
|
return true;
|
|
936
|
-
for (
|
|
926
|
+
for (let i = 0; i < oldDeps.length; i++) {
|
|
937
927
|
if (!Object.is(oldDeps[i], deps[i]))
|
|
938
928
|
return false;
|
|
939
929
|
}
|
|
940
930
|
return true;
|
|
941
931
|
}
|
|
942
932
|
function useLatest(value) {
|
|
943
|
-
|
|
933
|
+
const ref = useRef(value);
|
|
944
934
|
ref.current = value;
|
|
945
935
|
return ref;
|
|
946
936
|
}
|
|
947
|
-
|
|
937
|
+
const useUnmount = (fn) => {
|
|
948
938
|
if (isDev$2) {
|
|
949
939
|
if (!isFunction$1(fn)) {
|
|
950
|
-
console.error(
|
|
940
|
+
console.error(`useUnmount expected parameter is a function, got ${typeof fn}`);
|
|
951
941
|
}
|
|
952
942
|
}
|
|
953
|
-
|
|
954
|
-
useEffect(
|
|
955
|
-
|
|
956
|
-
fnRef.current();
|
|
957
|
-
};
|
|
943
|
+
const fnRef = useLatest(fn);
|
|
944
|
+
useEffect(() => () => {
|
|
945
|
+
fnRef.current();
|
|
958
946
|
}, []);
|
|
959
947
|
};
|
|
960
948
|
const useUnmount$1 = useUnmount;
|
|
@@ -1093,7 +1081,7 @@ function debounce$1(func, wait, options) {
|
|
|
1093
1081
|
return debounced;
|
|
1094
1082
|
}
|
|
1095
1083
|
var debounce_1 = debounce$1;
|
|
1096
|
-
|
|
1084
|
+
const isBrowser$2 = !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
1097
1085
|
const isBrowser$3 = isBrowser$2;
|
|
1098
1086
|
var debounce = debounce_1, isObject$5 = isObject_1;
|
|
1099
1087
|
var FUNC_ERROR_TEXT$1 = "Expected a function";
|
|
@@ -1113,46 +1101,20 @@ function throttle$1(func, wait, options) {
|
|
|
1113
1101
|
});
|
|
1114
1102
|
}
|
|
1115
1103
|
var throttle_1 = throttle$1;
|
|
1116
|
-
|
|
1104
|
+
const useMount = (fn) => {
|
|
1117
1105
|
if (isDev$2) {
|
|
1118
1106
|
if (!isFunction$1(fn)) {
|
|
1119
|
-
console.error(
|
|
1107
|
+
console.error(`useMount: parameter \`fn\` expected to be a function, but got "${typeof fn}".`);
|
|
1120
1108
|
}
|
|
1121
1109
|
}
|
|
1122
|
-
useEffect(
|
|
1110
|
+
useEffect(() => {
|
|
1123
1111
|
fn === null || fn === void 0 ? void 0 : fn();
|
|
1124
1112
|
}, []);
|
|
1125
1113
|
};
|
|
1126
1114
|
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
|
-
}, []);
|
|
1115
|
+
const useUpdate = () => {
|
|
1116
|
+
const [, setState] = useState$1({});
|
|
1117
|
+
return useCallback(() => setState({}), []);
|
|
1156
1118
|
};
|
|
1157
1119
|
const useUpdate$1 = useUpdate;
|
|
1158
1120
|
function getTargetElement(target, defaultElement) {
|
|
@@ -1162,7 +1124,7 @@ function getTargetElement(target, defaultElement) {
|
|
|
1162
1124
|
if (!target) {
|
|
1163
1125
|
return defaultElement;
|
|
1164
1126
|
}
|
|
1165
|
-
|
|
1127
|
+
let targetElement;
|
|
1166
1128
|
if (isFunction$1(target)) {
|
|
1167
1129
|
targetElement = target();
|
|
1168
1130
|
} else if ("current" in target) {
|
|
@@ -1172,44 +1134,42 @@ function getTargetElement(target, defaultElement) {
|
|
|
1172
1134
|
}
|
|
1173
1135
|
return targetElement;
|
|
1174
1136
|
}
|
|
1175
|
-
|
|
1176
|
-
return targets.every(
|
|
1177
|
-
|
|
1137
|
+
const checkIfAllInShadow = (targets) => {
|
|
1138
|
+
return targets.every((item) => {
|
|
1139
|
+
const targetElement = getTargetElement(item);
|
|
1178
1140
|
if (!targetElement)
|
|
1179
1141
|
return false;
|
|
1180
1142
|
if (targetElement.getRootNode() instanceof ShadowRoot)
|
|
1181
1143
|
return true;
|
|
1182
1144
|
});
|
|
1183
1145
|
};
|
|
1184
|
-
|
|
1146
|
+
const getShadow = (node) => {
|
|
1185
1147
|
if (!node) {
|
|
1186
1148
|
return document;
|
|
1187
1149
|
}
|
|
1188
1150
|
return node.getRootNode();
|
|
1189
1151
|
};
|
|
1190
|
-
|
|
1152
|
+
const getDocumentOrShadow = (target) => {
|
|
1191
1153
|
if (!target || !document.getRootNode) {
|
|
1192
1154
|
return document;
|
|
1193
1155
|
}
|
|
1194
|
-
|
|
1156
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
1195
1157
|
if (checkIfAllInShadow(targets)) {
|
|
1196
1158
|
return getShadow(getTargetElement(targets[0]));
|
|
1197
1159
|
}
|
|
1198
1160
|
return document;
|
|
1199
1161
|
};
|
|
1200
1162
|
const getDocumentOrShadow$1 = getDocumentOrShadow;
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
useEffectType(
|
|
1163
|
+
const createEffectWithTarget = (useEffectType) => {
|
|
1164
|
+
const useEffectWithTarget2 = (effect, deps, target) => {
|
|
1165
|
+
const hasInitRef = useRef(false);
|
|
1166
|
+
const lastElementRef = useRef([]);
|
|
1167
|
+
const lastDepsRef = useRef([]);
|
|
1168
|
+
const unLoadRef = useRef();
|
|
1169
|
+
useEffectType(() => {
|
|
1208
1170
|
var _a;
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
return getTargetElement(item);
|
|
1212
|
-
});
|
|
1171
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
1172
|
+
const els = targets.map((item) => getTargetElement(item));
|
|
1213
1173
|
if (!hasInitRef.current) {
|
|
1214
1174
|
hasInitRef.current = true;
|
|
1215
1175
|
lastElementRef.current = els;
|
|
@@ -1224,7 +1184,7 @@ var createEffectWithTarget = function createEffectWithTarget2(useEffectType) {
|
|
|
1224
1184
|
unLoadRef.current = effect();
|
|
1225
1185
|
}
|
|
1226
1186
|
});
|
|
1227
|
-
useUnmount$1(
|
|
1187
|
+
useUnmount$1(() => {
|
|
1228
1188
|
var _a;
|
|
1229
1189
|
(_a = unLoadRef.current) === null || _a === void 0 ? void 0 : _a.call(unLoadRef);
|
|
1230
1190
|
hasInitRef.current = false;
|
|
@@ -1233,33 +1193,26 @@ var createEffectWithTarget = function createEffectWithTarget2(useEffectType) {
|
|
|
1233
1193
|
return useEffectWithTarget2;
|
|
1234
1194
|
};
|
|
1235
1195
|
const createEffectWithTarget$1 = createEffectWithTarget;
|
|
1236
|
-
|
|
1196
|
+
const useEffectWithTarget$1 = createEffectWithTarget$1(useEffect);
|
|
1237
1197
|
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);
|
|
1198
|
+
function useClickAway(onClickAway, target, eventName = "click") {
|
|
1199
|
+
const onClickAwayRef = useLatest(onClickAway);
|
|
1200
|
+
useEffectWithTarget$2(() => {
|
|
1201
|
+
const handler = (event) => {
|
|
1202
|
+
const targets = Array.isArray(target) ? target : [target];
|
|
1203
|
+
if (targets.some((item) => {
|
|
1204
|
+
const targetElement = getTargetElement(item);
|
|
1248
1205
|
return !targetElement || targetElement.contains(event.target);
|
|
1249
1206
|
})) {
|
|
1250
1207
|
return;
|
|
1251
1208
|
}
|
|
1252
1209
|
onClickAwayRef.current(event);
|
|
1253
1210
|
};
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
eventNames.forEach(
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
return function() {
|
|
1260
|
-
eventNames.forEach(function(event) {
|
|
1261
|
-
return documentOrShadow.removeEventListener(event, handler);
|
|
1262
|
-
});
|
|
1211
|
+
const documentOrShadow = getDocumentOrShadow$1(target);
|
|
1212
|
+
const eventNames = Array.isArray(eventName) ? eventName : [eventName];
|
|
1213
|
+
eventNames.forEach((event) => documentOrShadow.addEventListener(event, handler));
|
|
1214
|
+
return () => {
|
|
1215
|
+
eventNames.forEach((event) => documentOrShadow.removeEventListener(event, handler));
|
|
1263
1216
|
};
|
|
1264
1217
|
}, Array.isArray(eventName) ? eventName : [eventName], target);
|
|
1265
1218
|
}
|
|
@@ -1472,60 +1425,19 @@ var dayjs_min = { exports: {} };
|
|
|
1472
1425
|
});
|
|
1473
1426
|
})(dayjs_min);
|
|
1474
1427
|
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
1428
|
function useDebounceFn(fn, options) {
|
|
1511
1429
|
var _a;
|
|
1512
1430
|
if (isDev$2) {
|
|
1513
1431
|
if (!isFunction$1(fn)) {
|
|
1514
|
-
console.error(
|
|
1432
|
+
console.error(`useDebounceFn expected parameter is a function, got ${typeof fn}`);
|
|
1515
1433
|
}
|
|
1516
1434
|
}
|
|
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() {
|
|
1435
|
+
const fnRef = useLatest(fn);
|
|
1436
|
+
const wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
|
|
1437
|
+
const debounced = useMemo(() => debounce_1((...args) => {
|
|
1438
|
+
return fnRef.current(...args);
|
|
1439
|
+
}, wait, options), []);
|
|
1440
|
+
useUnmount$1(() => {
|
|
1529
1441
|
debounced.cancel();
|
|
1530
1442
|
});
|
|
1531
1443
|
return {
|
|
@@ -1534,36 +1446,14 @@ function useDebounceFn(fn, options) {
|
|
|
1534
1446
|
flush: debounced.flush
|
|
1535
1447
|
};
|
|
1536
1448
|
}
|
|
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
1449
|
function useDebounceEffect(effect, deps, options) {
|
|
1562
|
-
|
|
1563
|
-
|
|
1450
|
+
const [flag, setFlag] = useState$1({});
|
|
1451
|
+
const {
|
|
1452
|
+
run
|
|
1453
|
+
} = useDebounceFn(() => {
|
|
1564
1454
|
setFlag({});
|
|
1565
|
-
}, options)
|
|
1566
|
-
useEffect(
|
|
1455
|
+
}, options);
|
|
1456
|
+
useEffect(() => {
|
|
1567
1457
|
return run();
|
|
1568
1458
|
}, deps);
|
|
1569
1459
|
useUpdateEffect(effect, [flag]);
|
|
@@ -2684,333 +2574,66 @@ var isEqual_1 = isEqual$1;
|
|
|
2684
2574
|
window.IntersectionObserver = IntersectionObserver2;
|
|
2685
2575
|
window.IntersectionObserverEntry = IntersectionObserverEntry;
|
|
2686
2576
|
})();
|
|
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
2577
|
function useInViewport(target, options) {
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
useEffectWithTarget$2(
|
|
2745
|
-
|
|
2578
|
+
const [state, setState] = useState$1();
|
|
2579
|
+
const [ratio, setRatio] = useState$1();
|
|
2580
|
+
useEffectWithTarget$2(() => {
|
|
2581
|
+
const el = getTargetElement(target);
|
|
2746
2582
|
if (!el) {
|
|
2747
2583
|
return;
|
|
2748
2584
|
}
|
|
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
|
-
}
|
|
2585
|
+
const observer = new IntersectionObserver((entries) => {
|
|
2586
|
+
for (const entry of entries) {
|
|
2587
|
+
setRatio(entry.intersectionRatio);
|
|
2588
|
+
setState(entry.isIntersecting);
|
|
2769
2589
|
}
|
|
2770
|
-
},
|
|
2590
|
+
}, Object.assign(Object.assign({}, options), {
|
|
2771
2591
|
root: getTargetElement(options === null || options === void 0 ? void 0 : options.root)
|
|
2772
2592
|
}));
|
|
2773
2593
|
observer.observe(el);
|
|
2774
|
-
return
|
|
2594
|
+
return () => {
|
|
2775
2595
|
observer.disconnect();
|
|
2776
2596
|
};
|
|
2777
|
-
}, [], target);
|
|
2597
|
+
}, [options === null || options === void 0 ? void 0 : options.rootMargin, options === null || options === void 0 ? void 0 : options.threshold], target);
|
|
2778
2598
|
return [state, ratio];
|
|
2779
2599
|
}
|
|
2780
|
-
|
|
2600
|
+
const useIsomorphicLayoutEffect$1 = isBrowser$3 ? useLayoutEffect$2 : useEffect;
|
|
2781
2601
|
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
2602
|
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 {
|
|
2603
|
+
const lockRef = useRef(false);
|
|
2604
|
+
return useCallback((...args) => __awaiter(this, void 0, void 0, function* () {
|
|
2605
|
+
if (lockRef.current)
|
|
2606
|
+
return;
|
|
2607
|
+
lockRef.current = true;
|
|
2985
2608
|
try {
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2609
|
+
const ret = yield fn(...args);
|
|
2610
|
+
lockRef.current = false;
|
|
2611
|
+
return ret;
|
|
2612
|
+
} catch (e) {
|
|
2613
|
+
lockRef.current = false;
|
|
2614
|
+
throw e;
|
|
2991
2615
|
}
|
|
2992
|
-
}
|
|
2993
|
-
|
|
2994
|
-
};
|
|
2616
|
+
}), [fn]);
|
|
2617
|
+
}
|
|
2995
2618
|
function useRafState(initialState) {
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2619
|
+
const ref = useRef(0);
|
|
2620
|
+
const [state, setState] = useState$1(initialState);
|
|
2621
|
+
const setRafState = useCallback((value) => {
|
|
2999
2622
|
cancelAnimationFrame(ref.current);
|
|
3000
|
-
ref.current = requestAnimationFrame(
|
|
2623
|
+
ref.current = requestAnimationFrame(() => {
|
|
3001
2624
|
setState(value);
|
|
3002
2625
|
});
|
|
3003
2626
|
}, []);
|
|
3004
|
-
useUnmount$1(
|
|
2627
|
+
useUnmount$1(() => {
|
|
3005
2628
|
cancelAnimationFrame(ref.current);
|
|
3006
2629
|
});
|
|
3007
2630
|
return [state, setRafState];
|
|
3008
2631
|
}
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
useEffect(
|
|
2632
|
+
const useUnmountedRef = () => {
|
|
2633
|
+
const unmountedRef = useRef(false);
|
|
2634
|
+
useEffect(() => {
|
|
3012
2635
|
unmountedRef.current = false;
|
|
3013
|
-
return
|
|
2636
|
+
return () => {
|
|
3014
2637
|
unmountedRef.current = true;
|
|
3015
2638
|
};
|
|
3016
2639
|
}, []);
|
|
@@ -3488,44 +3111,23 @@ var index$k = function() {
|
|
|
3488
3111
|
}
|
|
3489
3112
|
return ResizeObserver$1;
|
|
3490
3113
|
}();
|
|
3491
|
-
|
|
3114
|
+
const useEffectWithTarget = createEffectWithTarget$1(useLayoutEffect$2);
|
|
3492
3115
|
const useLayoutEffectWithTarget = useEffectWithTarget;
|
|
3493
|
-
|
|
3116
|
+
const useIsomorphicLayoutEffectWithTarget = isBrowser$3 ? useLayoutEffectWithTarget : useEffectWithTarget$2;
|
|
3494
3117
|
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
3118
|
function useSize(target) {
|
|
3520
|
-
|
|
3521
|
-
useIsomorphicLayoutEffectWithTarget$1(
|
|
3522
|
-
|
|
3119
|
+
const [state, setState] = useRafState();
|
|
3120
|
+
useIsomorphicLayoutEffectWithTarget$1(() => {
|
|
3121
|
+
const el = getTargetElement(target);
|
|
3523
3122
|
if (!el) {
|
|
3524
3123
|
return;
|
|
3525
3124
|
}
|
|
3526
|
-
|
|
3527
|
-
entries.forEach(
|
|
3528
|
-
|
|
3125
|
+
const resizeObserver = new index$k((entries) => {
|
|
3126
|
+
entries.forEach((entry) => {
|
|
3127
|
+
const {
|
|
3128
|
+
clientWidth,
|
|
3129
|
+
clientHeight
|
|
3130
|
+
} = entry.target;
|
|
3529
3131
|
setState({
|
|
3530
3132
|
width: clientWidth,
|
|
3531
3133
|
height: clientHeight
|
|
@@ -3533,66 +3135,25 @@ function useSize(target) {
|
|
|
3533
3135
|
});
|
|
3534
3136
|
});
|
|
3535
3137
|
resizeObserver.observe(el);
|
|
3536
|
-
return
|
|
3138
|
+
return () => {
|
|
3537
3139
|
resizeObserver.disconnect();
|
|
3538
3140
|
};
|
|
3539
3141
|
}, [], target);
|
|
3540
3142
|
return state;
|
|
3541
3143
|
}
|
|
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
3144
|
function useThrottleFn(fn, options) {
|
|
3578
3145
|
var _a;
|
|
3579
3146
|
if (isDev$2) {
|
|
3580
3147
|
if (!isFunction$1(fn)) {
|
|
3581
|
-
console.error(
|
|
3148
|
+
console.error(`useThrottleFn expected parameter is a function, got ${typeof fn}`);
|
|
3582
3149
|
}
|
|
3583
3150
|
}
|
|
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() {
|
|
3151
|
+
const fnRef = useLatest(fn);
|
|
3152
|
+
const wait = (_a = options === null || options === void 0 ? void 0 : options.wait) !== null && _a !== void 0 ? _a : 1e3;
|
|
3153
|
+
const throttled = useMemo(() => throttle_1((...args) => {
|
|
3154
|
+
return fnRef.current(...args);
|
|
3155
|
+
}, wait, options), []);
|
|
3156
|
+
useUnmount$1(() => {
|
|
3596
3157
|
throttled.cancel();
|
|
3597
3158
|
});
|
|
3598
3159
|
return {
|
|
@@ -3602,22 +3163,22 @@ function useThrottleFn(fn, options) {
|
|
|
3602
3163
|
};
|
|
3603
3164
|
}
|
|
3604
3165
|
function useTimeout(fn, delay) {
|
|
3605
|
-
|
|
3606
|
-
|
|
3607
|
-
useEffect(
|
|
3166
|
+
const fnRef = useLatest(fn);
|
|
3167
|
+
const timerRef = useRef(null);
|
|
3168
|
+
useEffect(() => {
|
|
3608
3169
|
if (!isNumber(delay) || delay < 0) {
|
|
3609
3170
|
return;
|
|
3610
3171
|
}
|
|
3611
|
-
timerRef.current = setTimeout(
|
|
3172
|
+
timerRef.current = setTimeout(() => {
|
|
3612
3173
|
fnRef.current();
|
|
3613
3174
|
}, delay);
|
|
3614
|
-
return
|
|
3175
|
+
return () => {
|
|
3615
3176
|
if (timerRef.current) {
|
|
3616
3177
|
clearTimeout(timerRef.current);
|
|
3617
3178
|
}
|
|
3618
3179
|
};
|
|
3619
3180
|
}, [delay]);
|
|
3620
|
-
|
|
3181
|
+
const clear2 = useCallback(() => {
|
|
3621
3182
|
if (timerRef.current) {
|
|
3622
3183
|
clearTimeout(timerRef.current);
|
|
3623
3184
|
}
|
|
@@ -4109,6 +3670,7 @@ function findIndex(arr, test) {
|
|
|
4109
3670
|
const index2 = arr.findIndex(test);
|
|
4110
3671
|
return index2 < 0 ? arr.length : index2;
|
|
4111
3672
|
}
|
|
3673
|
+
const clamp$1 = (min2, max2, v) => Math.min(Math.max(v, min2), max2);
|
|
4112
3674
|
const colors = {
|
|
4113
3675
|
transparent: 0,
|
|
4114
3676
|
aliceblue: 4042850303,
|
|
@@ -4430,6 +3992,64 @@ function findRange(input2, inputRange) {
|
|
|
4430
3992
|
break;
|
|
4431
3993
|
return i - 1;
|
|
4432
3994
|
}
|
|
3995
|
+
const steps$1 = (steps2, direction = "end") => (progress) => {
|
|
3996
|
+
progress = direction === "end" ? Math.min(progress, 0.999) : Math.max(progress, 1e-3);
|
|
3997
|
+
const expanded = progress * steps2;
|
|
3998
|
+
const rounded = direction === "end" ? Math.floor(expanded) : Math.ceil(expanded);
|
|
3999
|
+
return clamp$1(0, 1, rounded / steps2);
|
|
4000
|
+
};
|
|
4001
|
+
const c1 = 1.70158;
|
|
4002
|
+
const c2 = c1 * 1.525;
|
|
4003
|
+
const c3 = c1 + 1;
|
|
4004
|
+
const c4 = 2 * Math.PI / 3;
|
|
4005
|
+
const c5 = 2 * Math.PI / 4.5;
|
|
4006
|
+
const bounceOut = (x) => {
|
|
4007
|
+
const n1 = 7.5625;
|
|
4008
|
+
const d1 = 2.75;
|
|
4009
|
+
if (x < 1 / d1) {
|
|
4010
|
+
return n1 * x * x;
|
|
4011
|
+
} else if (x < 2 / d1) {
|
|
4012
|
+
return n1 * (x -= 1.5 / d1) * x + 0.75;
|
|
4013
|
+
} else if (x < 2.5 / d1) {
|
|
4014
|
+
return n1 * (x -= 2.25 / d1) * x + 0.9375;
|
|
4015
|
+
} else {
|
|
4016
|
+
return n1 * (x -= 2.625 / d1) * x + 0.984375;
|
|
4017
|
+
}
|
|
4018
|
+
};
|
|
4019
|
+
const easings = {
|
|
4020
|
+
linear: (x) => x,
|
|
4021
|
+
easeInQuad: (x) => x * x,
|
|
4022
|
+
easeOutQuad: (x) => 1 - (1 - x) * (1 - x),
|
|
4023
|
+
easeInOutQuad: (x) => x < 0.5 ? 2 * x * x : 1 - Math.pow(-2 * x + 2, 2) / 2,
|
|
4024
|
+
easeInCubic: (x) => x * x * x,
|
|
4025
|
+
easeOutCubic: (x) => 1 - Math.pow(1 - x, 3),
|
|
4026
|
+
easeInOutCubic: (x) => x < 0.5 ? 4 * x * x * x : 1 - Math.pow(-2 * x + 2, 3) / 2,
|
|
4027
|
+
easeInQuart: (x) => x * x * x * x,
|
|
4028
|
+
easeOutQuart: (x) => 1 - Math.pow(1 - x, 4),
|
|
4029
|
+
easeInOutQuart: (x) => x < 0.5 ? 8 * x * x * x * x : 1 - Math.pow(-2 * x + 2, 4) / 2,
|
|
4030
|
+
easeInQuint: (x) => x * x * x * x * x,
|
|
4031
|
+
easeOutQuint: (x) => 1 - Math.pow(1 - x, 5),
|
|
4032
|
+
easeInOutQuint: (x) => x < 0.5 ? 16 * x * x * x * x * x : 1 - Math.pow(-2 * x + 2, 5) / 2,
|
|
4033
|
+
easeInSine: (x) => 1 - Math.cos(x * Math.PI / 2),
|
|
4034
|
+
easeOutSine: (x) => Math.sin(x * Math.PI / 2),
|
|
4035
|
+
easeInOutSine: (x) => -(Math.cos(Math.PI * x) - 1) / 2,
|
|
4036
|
+
easeInExpo: (x) => x === 0 ? 0 : Math.pow(2, 10 * x - 10),
|
|
4037
|
+
easeOutExpo: (x) => x === 1 ? 1 : 1 - Math.pow(2, -10 * x),
|
|
4038
|
+
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,
|
|
4039
|
+
easeInCirc: (x) => 1 - Math.sqrt(1 - Math.pow(x, 2)),
|
|
4040
|
+
easeOutCirc: (x) => Math.sqrt(1 - Math.pow(x - 1, 2)),
|
|
4041
|
+
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,
|
|
4042
|
+
easeInBack: (x) => c3 * x * x * x - c1 * x * x,
|
|
4043
|
+
easeOutBack: (x) => 1 + c3 * Math.pow(x - 1, 3) + c1 * Math.pow(x - 1, 2),
|
|
4044
|
+
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,
|
|
4045
|
+
easeInElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : -Math.pow(2, 10 * x - 10) * Math.sin((x * 10 - 10.75) * c4),
|
|
4046
|
+
easeOutElastic: (x) => x === 0 ? 0 : x === 1 ? 1 : Math.pow(2, -10 * x) * Math.sin((x * 10 - 0.75) * c4) + 1,
|
|
4047
|
+
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,
|
|
4048
|
+
easeInBounce: (x) => 1 - bounceOut(1 - x),
|
|
4049
|
+
easeOutBounce: bounceOut,
|
|
4050
|
+
easeInOutBounce: (x) => x < 0.5 ? (1 - bounceOut(1 - 2 * x)) / 2 : (1 + bounceOut(2 * x - 1)) / 2,
|
|
4051
|
+
steps: steps$1
|
|
4052
|
+
};
|
|
4433
4053
|
function _extends$4() {
|
|
4434
4054
|
_extends$4 = Object.assign ? Object.assign.bind() : function(target) {
|
|
4435
4055
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -5111,57 +4731,6 @@ const config$1 = {
|
|
|
5111
4731
|
friction: 120
|
|
5112
4732
|
}
|
|
5113
4733
|
};
|
|
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
4734
|
const defaults = _extends$2({}, config$1.default, {
|
|
5166
4735
|
mass: 1,
|
|
5167
4736
|
damping: 1,
|
|
@@ -5357,7 +4926,7 @@ function runAsync(to2, props, state, target) {
|
|
|
5357
4926
|
};
|
|
5358
4927
|
const animate = (arg1, arg2) => {
|
|
5359
4928
|
const bailSignal = new BailSignal();
|
|
5360
|
-
const skipAnimationSignal = new
|
|
4929
|
+
const skipAnimationSignal = new SkipAnimationSignal();
|
|
5361
4930
|
return (async () => {
|
|
5362
4931
|
if (globals.skipAnimation) {
|
|
5363
4932
|
stopAsync(state);
|
|
@@ -5406,7 +4975,7 @@ function runAsync(to2, props, state, target) {
|
|
|
5406
4975
|
} catch (err) {
|
|
5407
4976
|
if (err instanceof BailSignal) {
|
|
5408
4977
|
result2 = err.result;
|
|
5409
|
-
} else if (err instanceof
|
|
4978
|
+
} else if (err instanceof SkipAnimationSignal) {
|
|
5410
4979
|
result2 = err.result;
|
|
5411
4980
|
} else {
|
|
5412
4981
|
throw err;
|
|
@@ -5440,7 +5009,7 @@ class BailSignal extends Error {
|
|
|
5440
5009
|
this.result = void 0;
|
|
5441
5010
|
}
|
|
5442
5011
|
}
|
|
5443
|
-
class
|
|
5012
|
+
class SkipAnimationSignal extends Error {
|
|
5444
5013
|
constructor() {
|
|
5445
5014
|
super("SkipAnimationSignal");
|
|
5446
5015
|
this.result = void 0;
|
|
@@ -6471,11 +6040,11 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
|
6471
6040
|
}
|
|
6472
6041
|
return target;
|
|
6473
6042
|
}
|
|
6474
|
-
const _excluded$
|
|
6043
|
+
const _excluded$6 = ["children"];
|
|
6475
6044
|
const SpringContext = (_ref) => {
|
|
6476
6045
|
let {
|
|
6477
6046
|
children
|
|
6478
|
-
} = _ref, props = _objectWithoutPropertiesLoose$3(_ref, _excluded$
|
|
6047
|
+
} = _ref, props = _objectWithoutPropertiesLoose$3(_ref, _excluded$6);
|
|
6479
6048
|
const inherited = useContext(ctx);
|
|
6480
6049
|
const pause = props.pause || !!inherited.pause, immediate = props.immediate || !!inherited.immediate;
|
|
6481
6050
|
props = useMemoOne(() => ({
|
|
@@ -6779,7 +6348,7 @@ function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
|
6779
6348
|
}
|
|
6780
6349
|
return target;
|
|
6781
6350
|
}
|
|
6782
|
-
const _excluded$2$1 = ["style", "children", "scrollTop", "scrollLeft"];
|
|
6351
|
+
const _excluded$2$1 = ["style", "children", "scrollTop", "scrollLeft", "viewBox"];
|
|
6783
6352
|
const isCustomPropRE = /^--/;
|
|
6784
6353
|
function dangerousStyleValue(name, value) {
|
|
6785
6354
|
if (value == null || typeof value === "boolean" || value === "")
|
|
@@ -6798,7 +6367,8 @@ function applyAnimatedValues(instance, props) {
|
|
|
6798
6367
|
style,
|
|
6799
6368
|
children,
|
|
6800
6369
|
scrollTop,
|
|
6801
|
-
scrollLeft
|
|
6370
|
+
scrollLeft,
|
|
6371
|
+
viewBox
|
|
6802
6372
|
} = _ref, attributes = _objectWithoutPropertiesLoose$2(_ref, _excluded$2$1);
|
|
6803
6373
|
const values = Object.values(attributes);
|
|
6804
6374
|
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 +6394,9 @@ function applyAnimatedValues(instance, props) {
|
|
|
6824
6394
|
if (scrollLeft !== void 0) {
|
|
6825
6395
|
instance.scrollLeft = scrollLeft;
|
|
6826
6396
|
}
|
|
6397
|
+
if (viewBox !== void 0) {
|
|
6398
|
+
instance.setAttribute("viewBox", viewBox);
|
|
6399
|
+
}
|
|
6827
6400
|
}
|
|
6828
6401
|
let isUnitlessNumber = {
|
|
6829
6402
|
animationIterationCount: true,
|
|
@@ -6996,13 +6569,13 @@ function useShouldRender(active, forceRender, destroyOnClose) {
|
|
|
6996
6569
|
return false;
|
|
6997
6570
|
return !destroyOnClose;
|
|
6998
6571
|
}
|
|
6999
|
-
const eventToPropRecord = {
|
|
6572
|
+
const eventToPropRecord$1 = {
|
|
7000
6573
|
"click": "onClick"
|
|
7001
6574
|
};
|
|
7002
6575
|
function withStopPropagation(events, element) {
|
|
7003
6576
|
const props = Object.assign({}, element.props);
|
|
7004
6577
|
for (const key of events) {
|
|
7005
|
-
const prop = eventToPropRecord[key];
|
|
6578
|
+
const prop = eventToPropRecord$1[key];
|
|
7006
6579
|
props[prop] = function(e) {
|
|
7007
6580
|
var _a, _b;
|
|
7008
6581
|
e.stopPropagation();
|
|
@@ -7716,6 +7289,9 @@ const defaultProps$12 = Object.assign(Object.assign({}, defaultPopupBaseProps),
|
|
|
7716
7289
|
});
|
|
7717
7290
|
const Popup$1 = (p) => {
|
|
7718
7291
|
const props = mergeProps(defaultProps$12, p);
|
|
7292
|
+
const {
|
|
7293
|
+
locale
|
|
7294
|
+
} = useConfig();
|
|
7719
7295
|
const bodyCls = classNames(`${classPrefix$1k}-body`, props.bodyClassName, `${classPrefix$1k}-body-position-${props.position}`);
|
|
7720
7296
|
const [active, setActive] = useState$1(props.visible);
|
|
7721
7297
|
useIsomorphicLayoutEffect$2(() => {
|
|
@@ -7795,7 +7371,9 @@ const Popup$1 = (p) => {
|
|
|
7795
7371
|
onClick: () => {
|
|
7796
7372
|
var _a;
|
|
7797
7373
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
7798
|
-
}
|
|
7374
|
+
},
|
|
7375
|
+
role: "button",
|
|
7376
|
+
"aria-label": locale.common.close
|
|
7799
7377
|
}, React__default.createElement(CloseOutline, null)), props.children))));
|
|
7800
7378
|
return React__default.createElement(ShouldRender, {
|
|
7801
7379
|
active,
|
|
@@ -7856,7 +7434,7 @@ function legacyUnmount(container) {
|
|
|
7856
7434
|
return unmountComponentAtNode(container);
|
|
7857
7435
|
}
|
|
7858
7436
|
function concurrentUnmount(container) {
|
|
7859
|
-
return __awaiter
|
|
7437
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7860
7438
|
return Promise.resolve().then(() => {
|
|
7861
7439
|
var _a;
|
|
7862
7440
|
(_a = container[MARK]) === null || _a === void 0 ? void 0 : _a.unmount();
|
|
@@ -8335,7 +7913,7 @@ const Button$1 = forwardRef((p, ref) => {
|
|
|
8335
7913
|
return nativeButtonRef.current;
|
|
8336
7914
|
}
|
|
8337
7915
|
}));
|
|
8338
|
-
const handleClick = (e) => __awaiter
|
|
7916
|
+
const handleClick = (e) => __awaiter(void 0, void 0, void 0, function* () {
|
|
8339
7917
|
if (!props.onClick)
|
|
8340
7918
|
return;
|
|
8341
7919
|
const promise = props.onClick(e);
|
|
@@ -8677,7 +8255,7 @@ const Calendar$1 = forwardRef((p, ref) => {
|
|
|
8677
8255
|
}
|
|
8678
8256
|
}, React__default.createElement("div", {
|
|
8679
8257
|
className: `${classPrefix$1b}-cell-top`
|
|
8680
|
-
}, d.date()), React__default.createElement("div", {
|
|
8258
|
+
}, props.renderDate ? props.renderDate(d.toDate()) : d.date()), React__default.createElement("div", {
|
|
8681
8259
|
className: `${classPrefix$1b}-cell-bottom`
|
|
8682
8260
|
}, (_a = props.renderLabel) === null || _a === void 0 ? void 0 : _a.call(props, d.toDate()))));
|
|
8683
8261
|
iterator = iterator.add(1, "day");
|
|
@@ -13419,7 +12997,7 @@ const Dialog = (p) => {
|
|
|
13419
12997
|
}, actions.map((action, index3) => React__default.createElement(DialogActionButton, {
|
|
13420
12998
|
key: action.key,
|
|
13421
12999
|
action,
|
|
13422
|
-
onAction: () => __awaiter
|
|
13000
|
+
onAction: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
13423
13001
|
var _a, _b, _c;
|
|
13424
13002
|
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
13003
|
if (props.closeOnAction) {
|
|
@@ -13510,7 +13088,7 @@ function confirm$1(p) {
|
|
|
13510
13088
|
actions: [[{
|
|
13511
13089
|
key: "cancel",
|
|
13512
13090
|
text: props.cancelText,
|
|
13513
|
-
onClick: () => __awaiter
|
|
13091
|
+
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
13514
13092
|
var _a;
|
|
13515
13093
|
yield (_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
13516
13094
|
resolve(false);
|
|
@@ -13519,7 +13097,7 @@ function confirm$1(p) {
|
|
|
13519
13097
|
key: "confirm",
|
|
13520
13098
|
text: props.confirmText,
|
|
13521
13099
|
bold: true,
|
|
13522
|
-
onClick: () => __awaiter
|
|
13100
|
+
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
13523
13101
|
var _b;
|
|
13524
13102
|
yield (_b = props.onConfirm) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
13525
13103
|
resolve(true);
|
|
@@ -13818,13 +13396,14 @@ const defaultProps$G = {
|
|
|
13818
13396
|
collapseText: "",
|
|
13819
13397
|
stopPropagationForActionButtons: [],
|
|
13820
13398
|
onContentClick: () => {
|
|
13821
|
-
}
|
|
13399
|
+
},
|
|
13400
|
+
defaultExpanded: false
|
|
13822
13401
|
};
|
|
13823
13402
|
const Ellipsis$1 = (p) => {
|
|
13824
13403
|
const props = mergeProps(defaultProps$G, p);
|
|
13825
13404
|
const rootRef = useRef(null);
|
|
13826
13405
|
const [ellipsised, setEllipsised] = useState$1({});
|
|
13827
|
-
const [expanded, setExpanded] = useState$1(
|
|
13406
|
+
const [expanded, setExpanded] = useState$1(props.defaultExpanded);
|
|
13828
13407
|
const [exceeded, setExceeded] = useState$1(false);
|
|
13829
13408
|
const chars = useMemo(() => _runes_0_4_3_runes.exports(props.content), [props.content]);
|
|
13830
13409
|
function getSubString(start2, end) {
|
|
@@ -14888,9 +14467,8 @@ function _objectSpread2(target) {
|
|
|
14888
14467
|
function _arrayLikeToArray(arr, len) {
|
|
14889
14468
|
if (len == null || len > arr.length)
|
|
14890
14469
|
len = arr.length;
|
|
14891
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
14470
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
14892
14471
|
arr2[i] = arr[i];
|
|
14893
|
-
}
|
|
14894
14472
|
return arr2;
|
|
14895
14473
|
}
|
|
14896
14474
|
function _arrayWithoutHoles(arr) {
|
|
@@ -15422,10 +15000,9 @@ function _regeneratorRuntime() {
|
|
|
15422
15000
|
return iterable;
|
|
15423
15001
|
if (!isNaN(iterable.length)) {
|
|
15424
15002
|
var i = -1, next = function next2() {
|
|
15425
|
-
for (; ++i < iterable.length; )
|
|
15003
|
+
for (; ++i < iterable.length; )
|
|
15426
15004
|
if (hasOwn.call(iterable, i))
|
|
15427
15005
|
return next2.value = iterable[i], next2.done = false, next2;
|
|
15428
|
-
}
|
|
15429
15006
|
return next2.value = void 0, next2.done = true, next2;
|
|
15430
15007
|
};
|
|
15431
15008
|
return next.next = next;
|
|
@@ -15470,9 +15047,8 @@ function _regeneratorRuntime() {
|
|
|
15470
15047
|
return "[object Generator]";
|
|
15471
15048
|
}), exports.keys = function(val) {
|
|
15472
15049
|
var object4 = Object(val), keys2 = [];
|
|
15473
|
-
for (var key in object4)
|
|
15050
|
+
for (var key in object4)
|
|
15474
15051
|
keys2.push(key);
|
|
15475
|
-
}
|
|
15476
15052
|
return keys2.reverse(), function next() {
|
|
15477
15053
|
for (; keys2.length; ) {
|
|
15478
15054
|
var key2 = keys2.pop();
|
|
@@ -15485,9 +15061,8 @@ function _regeneratorRuntime() {
|
|
|
15485
15061
|
constructor: Context2,
|
|
15486
15062
|
reset: function reset(skipTempReset) {
|
|
15487
15063
|
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)
|
|
15064
|
+
for (var name in this)
|
|
15489
15065
|
"t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = void 0);
|
|
15490
|
-
}
|
|
15491
15066
|
},
|
|
15492
15067
|
stop: function stop2() {
|
|
15493
15068
|
this.done = true;
|
|
@@ -16884,7 +16459,7 @@ function _validateRule() {
|
|
|
16884
16459
|
_validateRule = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee2(name, value, rule, options, messageVariables) {
|
|
16885
16460
|
var cloneRule, originValidator, subRuleField, validator, messages2, result2, subResults, kv, fillVariableResult;
|
|
16886
16461
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
16887
|
-
while (1)
|
|
16462
|
+
while (1)
|
|
16888
16463
|
switch (_context2.prev = _context2.next) {
|
|
16889
16464
|
case 0:
|
|
16890
16465
|
cloneRule = _objectSpread2({}, rule);
|
|
@@ -16957,7 +16532,6 @@ function _validateRule() {
|
|
|
16957
16532
|
case "end":
|
|
16958
16533
|
return _context2.stop();
|
|
16959
16534
|
}
|
|
16960
|
-
}
|
|
16961
16535
|
}, _callee2, null, [[9, 14]]);
|
|
16962
16536
|
}));
|
|
16963
16537
|
return _validateRule.apply(this, arguments);
|
|
@@ -17013,7 +16587,7 @@ function validateRules(namePath, value, rules2, options, validateFirst, messageV
|
|
|
17013
16587
|
var _ref3 = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee(resolve, reject) {
|
|
17014
16588
|
var i, rule, errors;
|
|
17015
16589
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
17016
|
-
while (1)
|
|
16590
|
+
while (1)
|
|
17017
16591
|
switch (_context.prev = _context.next) {
|
|
17018
16592
|
case 0:
|
|
17019
16593
|
i = 0;
|
|
@@ -17046,7 +16620,6 @@ function validateRules(namePath, value, rules2, options, validateFirst, messageV
|
|
|
17046
16620
|
case "end":
|
|
17047
16621
|
return _context.stop();
|
|
17048
16622
|
}
|
|
17049
|
-
}
|
|
17050
16623
|
}, _callee);
|
|
17051
16624
|
}));
|
|
17052
16625
|
return function(_x6, _x7) {
|
|
@@ -17077,7 +16650,7 @@ function finishOnAllFailed(_x8) {
|
|
|
17077
16650
|
function _finishOnAllFailed() {
|
|
17078
16651
|
_finishOnAllFailed = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee3(rulePromises) {
|
|
17079
16652
|
return _regeneratorRuntime().wrap(function _callee3$(_context3) {
|
|
17080
|
-
while (1)
|
|
16653
|
+
while (1)
|
|
17081
16654
|
switch (_context3.prev = _context3.next) {
|
|
17082
16655
|
case 0:
|
|
17083
16656
|
return _context3.abrupt("return", Promise.all(rulePromises).then(function(errorsList) {
|
|
@@ -17089,7 +16662,6 @@ function _finishOnAllFailed() {
|
|
|
17089
16662
|
case "end":
|
|
17090
16663
|
return _context3.stop();
|
|
17091
16664
|
}
|
|
17092
|
-
}
|
|
17093
16665
|
}, _callee3);
|
|
17094
16666
|
}));
|
|
17095
16667
|
return _finishOnAllFailed.apply(this, arguments);
|
|
@@ -17101,7 +16673,7 @@ function _finishOnFirstFailed() {
|
|
|
17101
16673
|
_finishOnFirstFailed = _asyncToGenerator(/* @__PURE__ */ _regeneratorRuntime().mark(function _callee4(rulePromises) {
|
|
17102
16674
|
var count;
|
|
17103
16675
|
return _regeneratorRuntime().wrap(function _callee4$(_context4) {
|
|
17104
|
-
while (1)
|
|
16676
|
+
while (1)
|
|
17105
16677
|
switch (_context4.prev = _context4.next) {
|
|
17106
16678
|
case 0:
|
|
17107
16679
|
count = 0;
|
|
@@ -17122,7 +16694,6 @@ function _finishOnFirstFailed() {
|
|
|
17122
16694
|
case "end":
|
|
17123
16695
|
return _context4.stop();
|
|
17124
16696
|
}
|
|
17125
|
-
}
|
|
17126
16697
|
}, _callee4);
|
|
17127
16698
|
}));
|
|
17128
16699
|
return _finishOnFirstFailed.apply(this, arguments);
|
|
@@ -17495,9 +17066,9 @@ var Field = /* @__PURE__ */ function(_React$Component) {
|
|
|
17495
17066
|
value: function render2() {
|
|
17496
17067
|
var resetCount = this.state.resetCount;
|
|
17497
17068
|
var children = this.props.children;
|
|
17498
|
-
var _this$getOnlyChild = this.getOnlyChild(children), child = _this$getOnlyChild.child,
|
|
17069
|
+
var _this$getOnlyChild = this.getOnlyChild(children), child = _this$getOnlyChild.child, isFunction2 = _this$getOnlyChild.isFunction;
|
|
17499
17070
|
var returnChildNode;
|
|
17500
|
-
if (
|
|
17071
|
+
if (isFunction2) {
|
|
17501
17072
|
returnChildNode = child;
|
|
17502
17073
|
} else if (/* @__PURE__ */ React$4.isValidElement(child)) {
|
|
17503
17074
|
returnChildNode = /* @__PURE__ */ React$4.cloneElement(child, this.getControlled(child.props));
|
|
@@ -17663,9 +17234,8 @@ function _iterableToArrayLimit(arr, i) {
|
|
|
17663
17234
|
return;
|
|
17664
17235
|
_n = false;
|
|
17665
17236
|
} else
|
|
17666
|
-
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
|
|
17237
|
+
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
|
|
17667
17238
|
;
|
|
17668
|
-
}
|
|
17669
17239
|
} catch (err) {
|
|
17670
17240
|
_d = true, _e = err;
|
|
17671
17241
|
} finally {
|
|
@@ -18636,6 +18206,11 @@ function stringify(value) {
|
|
|
18636
18206
|
return Math.random();
|
|
18637
18207
|
}
|
|
18638
18208
|
}
|
|
18209
|
+
var useWatchWarning = function(namePath) {
|
|
18210
|
+
var fullyStr = namePath.join("__RC_FIELD_FORM_SPLIT__");
|
|
18211
|
+
var nameStrRef = useRef(fullyStr);
|
|
18212
|
+
warningOnce$1(nameStrRef.current === fullyStr, "`useWatch` is not support dynamic `namePath`. Please provide static instead.");
|
|
18213
|
+
};
|
|
18639
18214
|
function useWatch() {
|
|
18640
18215
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18641
18216
|
args[_key] = arguments[_key];
|
|
@@ -18656,6 +18231,7 @@ function useWatch() {
|
|
|
18656
18231
|
var namePath = getNamePath(dependencies);
|
|
18657
18232
|
var namePathRef = useRef(namePath);
|
|
18658
18233
|
namePathRef.current = namePath;
|
|
18234
|
+
useWatchWarning(namePath);
|
|
18659
18235
|
useEffect(
|
|
18660
18236
|
function() {
|
|
18661
18237
|
if (!isValidForm) {
|
|
@@ -18854,7 +18430,7 @@ function toPlainObject$1(value) {
|
|
|
18854
18430
|
return copyObject(value, keysIn$1(value));
|
|
18855
18431
|
}
|
|
18856
18432
|
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,
|
|
18433
|
+
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
18434
|
function baseMergeDeep$1(object4, source, key, srcIndex, mergeFunc, customizer, stack) {
|
|
18859
18435
|
var objValue = safeGet$1(object4, key), srcValue = safeGet$1(source, key), stacked = stack.get(srcValue);
|
|
18860
18436
|
if (stacked) {
|
|
@@ -18884,7 +18460,7 @@ function baseMergeDeep$1(object4, source, key, srcIndex, mergeFunc, customizer,
|
|
|
18884
18460
|
newValue = objValue;
|
|
18885
18461
|
if (isArguments(objValue)) {
|
|
18886
18462
|
newValue = toPlainObject(objValue);
|
|
18887
|
-
} else if (!isObject$1(objValue) ||
|
|
18463
|
+
} else if (!isObject$1(objValue) || isFunction(objValue)) {
|
|
18888
18464
|
newValue = initCloneObject(srcValue);
|
|
18889
18465
|
}
|
|
18890
18466
|
} else {
|
|
@@ -19208,18 +18784,18 @@ const Arrow = memo((props) => {
|
|
|
19208
18784
|
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
18785
|
}))));
|
|
19210
18786
|
});
|
|
19211
|
-
function getSide(placement) {
|
|
19212
|
-
return placement.split("-")[0];
|
|
19213
|
-
}
|
|
19214
18787
|
function getAlignment(placement) {
|
|
19215
18788
|
return placement.split("-")[1];
|
|
19216
18789
|
}
|
|
19217
|
-
function getMainAxisFromPlacement(placement) {
|
|
19218
|
-
return ["top", "bottom"].includes(getSide(placement)) ? "x" : "y";
|
|
19219
|
-
}
|
|
19220
18790
|
function getLengthFromAxis(axis) {
|
|
19221
18791
|
return axis === "y" ? "height" : "width";
|
|
19222
18792
|
}
|
|
18793
|
+
function getSide(placement) {
|
|
18794
|
+
return placement.split("-")[0];
|
|
18795
|
+
}
|
|
18796
|
+
function getMainAxisFromPlacement(placement) {
|
|
18797
|
+
return ["top", "bottom"].includes(getSide(placement)) ? "x" : "y";
|
|
18798
|
+
}
|
|
19223
18799
|
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
19224
18800
|
let {
|
|
19225
18801
|
reference,
|
|
@@ -19405,7 +18981,7 @@ function rectToClientRect(rect) {
|
|
|
19405
18981
|
bottom: rect.y + rect.height
|
|
19406
18982
|
};
|
|
19407
18983
|
}
|
|
19408
|
-
async function detectOverflow(
|
|
18984
|
+
async function detectOverflow(state, options) {
|
|
19409
18985
|
var _await$platform$isEle;
|
|
19410
18986
|
if (options === void 0) {
|
|
19411
18987
|
options = {};
|
|
@@ -19417,7 +18993,7 @@ async function detectOverflow(middlewareArguments, options) {
|
|
|
19417
18993
|
rects,
|
|
19418
18994
|
elements,
|
|
19419
18995
|
strategy
|
|
19420
|
-
} =
|
|
18996
|
+
} = state;
|
|
19421
18997
|
const {
|
|
19422
18998
|
boundary = "clippingAncestors",
|
|
19423
18999
|
rootBoundary = "viewport",
|
|
@@ -19467,18 +19043,18 @@ function within(min$1$1, value, max$1$1) {
|
|
|
19467
19043
|
const arrow = (options) => ({
|
|
19468
19044
|
name: "arrow",
|
|
19469
19045
|
options,
|
|
19470
|
-
async fn(
|
|
19046
|
+
async fn(state) {
|
|
19471
19047
|
const {
|
|
19472
19048
|
element,
|
|
19473
19049
|
padding = 0
|
|
19474
|
-
} = options
|
|
19050
|
+
} = options || {};
|
|
19475
19051
|
const {
|
|
19476
19052
|
x,
|
|
19477
19053
|
y,
|
|
19478
19054
|
placement,
|
|
19479
19055
|
rects,
|
|
19480
19056
|
platform: platform2
|
|
19481
|
-
} =
|
|
19057
|
+
} = state;
|
|
19482
19058
|
if (element == null) {
|
|
19483
19059
|
{
|
|
19484
19060
|
console.warn("Floating UI: No `element` was passed to the `arrow` middleware.");
|
|
@@ -19491,7 +19067,6 @@ const arrow = (options) => ({
|
|
|
19491
19067
|
y
|
|
19492
19068
|
};
|
|
19493
19069
|
const axis = getMainAxisFromPlacement(placement);
|
|
19494
|
-
const alignment = getAlignment(placement);
|
|
19495
19070
|
const length = getLengthFromAxis(axis);
|
|
19496
19071
|
const arrowDimensions = await platform2.getDimensions(element);
|
|
19497
19072
|
const minProp = axis === "y" ? "top" : "left";
|
|
@@ -19508,8 +19083,7 @@ const arrow = (options) => ({
|
|
|
19508
19083
|
const max2 = clientSize - arrowDimensions[length] - paddingObject[maxProp];
|
|
19509
19084
|
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
19510
19085
|
const offset2 = within(min2, center, max2);
|
|
19511
|
-
const
|
|
19512
|
-
const shouldAddOffset = alignmentPadding > 0 && center !== offset2 && rects.reference[length] <= rects.floating[length];
|
|
19086
|
+
const shouldAddOffset = getAlignment(placement) != null && center != offset2 && rects.reference[length] / 2 - (center < min2 ? paddingObject[minProp] : paddingObject[maxProp]) - arrowDimensions[length] / 2 < 0;
|
|
19513
19087
|
const alignmentOffset = shouldAddOffset ? center < min2 ? min2 - center : max2 - center : 0;
|
|
19514
19088
|
return {
|
|
19515
19089
|
[axis]: coords[axis] - alignmentOffset,
|
|
@@ -19520,14 +19094,15 @@ const arrow = (options) => ({
|
|
|
19520
19094
|
};
|
|
19521
19095
|
}
|
|
19522
19096
|
});
|
|
19523
|
-
const
|
|
19097
|
+
const sides = ["top", "right", "bottom", "left"];
|
|
19098
|
+
const oppositeSideMap = {
|
|
19524
19099
|
left: "right",
|
|
19525
19100
|
right: "left",
|
|
19526
19101
|
bottom: "top",
|
|
19527
19102
|
top: "bottom"
|
|
19528
19103
|
};
|
|
19529
19104
|
function getOppositePlacement(placement) {
|
|
19530
|
-
return placement.replace(/left|right|bottom|top/g, (
|
|
19105
|
+
return placement.replace(/left|right|bottom|top/g, (side) => oppositeSideMap[side]);
|
|
19531
19106
|
}
|
|
19532
19107
|
function getAlignmentSides(placement, rects, rtl) {
|
|
19533
19108
|
if (rtl === void 0) {
|
|
@@ -19545,18 +19120,46 @@ function getAlignmentSides(placement, rects, rtl) {
|
|
|
19545
19120
|
cross: getOppositePlacement(mainAlignmentSide)
|
|
19546
19121
|
};
|
|
19547
19122
|
}
|
|
19548
|
-
const
|
|
19123
|
+
const oppositeAlignmentMap = {
|
|
19549
19124
|
start: "end",
|
|
19550
19125
|
end: "start"
|
|
19551
19126
|
};
|
|
19552
19127
|
function getOppositeAlignmentPlacement(placement) {
|
|
19553
|
-
return placement.replace(/start|end/g, (
|
|
19128
|
+
return placement.replace(/start|end/g, (alignment) => oppositeAlignmentMap[alignment]);
|
|
19554
19129
|
}
|
|
19555
|
-
const sides = ["top", "right", "bottom", "left"];
|
|
19556
19130
|
function getExpandedPlacements(placement) {
|
|
19557
19131
|
const oppositePlacement = getOppositePlacement(placement);
|
|
19558
19132
|
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
19559
19133
|
}
|
|
19134
|
+
function getSideList(side, isStart, rtl) {
|
|
19135
|
+
const lr = ["left", "right"];
|
|
19136
|
+
const rl = ["right", "left"];
|
|
19137
|
+
const tb = ["top", "bottom"];
|
|
19138
|
+
const bt = ["bottom", "top"];
|
|
19139
|
+
switch (side) {
|
|
19140
|
+
case "top":
|
|
19141
|
+
case "bottom":
|
|
19142
|
+
if (rtl)
|
|
19143
|
+
return isStart ? rl : lr;
|
|
19144
|
+
return isStart ? lr : rl;
|
|
19145
|
+
case "left":
|
|
19146
|
+
case "right":
|
|
19147
|
+
return isStart ? tb : bt;
|
|
19148
|
+
default:
|
|
19149
|
+
return [];
|
|
19150
|
+
}
|
|
19151
|
+
}
|
|
19152
|
+
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
19153
|
+
const alignment = getAlignment(placement);
|
|
19154
|
+
let list2 = getSideList(getSide(placement), direction === "start", rtl);
|
|
19155
|
+
if (alignment) {
|
|
19156
|
+
list2 = list2.map((side) => side + "-" + alignment);
|
|
19157
|
+
if (flipAlignment) {
|
|
19158
|
+
list2 = list2.concat(list2.map(getOppositeAlignmentPlacement));
|
|
19159
|
+
}
|
|
19160
|
+
}
|
|
19161
|
+
return list2;
|
|
19162
|
+
}
|
|
19560
19163
|
const flip = function(options) {
|
|
19561
19164
|
if (options === void 0) {
|
|
19562
19165
|
options = {};
|
|
@@ -19564,7 +19167,7 @@ const flip = function(options) {
|
|
|
19564
19167
|
return {
|
|
19565
19168
|
name: "flip",
|
|
19566
19169
|
options,
|
|
19567
|
-
async fn(
|
|
19170
|
+
async fn(state) {
|
|
19568
19171
|
var _middlewareData$flip;
|
|
19569
19172
|
const {
|
|
19570
19173
|
placement,
|
|
@@ -19573,20 +19176,25 @@ const flip = function(options) {
|
|
|
19573
19176
|
initialPlacement,
|
|
19574
19177
|
platform: platform2,
|
|
19575
19178
|
elements
|
|
19576
|
-
} =
|
|
19179
|
+
} = state;
|
|
19577
19180
|
const {
|
|
19578
19181
|
mainAxis: checkMainAxis = true,
|
|
19579
19182
|
crossAxis: checkCrossAxis = true,
|
|
19580
19183
|
fallbackPlacements: specifiedFallbackPlacements,
|
|
19581
19184
|
fallbackStrategy = "bestFit",
|
|
19185
|
+
fallbackAxisSideDirection = "none",
|
|
19582
19186
|
flipAlignment = true,
|
|
19583
19187
|
...detectOverflowOptions
|
|
19584
19188
|
} = options;
|
|
19585
19189
|
const side = getSide(placement);
|
|
19586
|
-
const isBasePlacement =
|
|
19190
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
19191
|
+
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
19587
19192
|
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
19193
|
+
if (!specifiedFallbackPlacements && fallbackAxisSideDirection !== "none") {
|
|
19194
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
19195
|
+
}
|
|
19588
19196
|
const placements = [initialPlacement, ...fallbackPlacements];
|
|
19589
|
-
const overflow = await detectOverflow(
|
|
19197
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
19590
19198
|
const overflows = [];
|
|
19591
19199
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
19592
19200
|
if (checkMainAxis) {
|
|
@@ -19596,7 +19204,7 @@ const flip = function(options) {
|
|
|
19596
19204
|
const {
|
|
19597
19205
|
main,
|
|
19598
19206
|
cross
|
|
19599
|
-
} = getAlignmentSides(placement, rects,
|
|
19207
|
+
} = getAlignmentSides(placement, rects, rtl);
|
|
19600
19208
|
overflows.push(overflow[main], overflow[cross]);
|
|
19601
19209
|
}
|
|
19602
19210
|
overflowsData = [...overflowsData, {
|
|
@@ -19604,8 +19212,8 @@ const flip = function(options) {
|
|
|
19604
19212
|
overflows
|
|
19605
19213
|
}];
|
|
19606
19214
|
if (!overflows.every((side2) => side2 <= 0)) {
|
|
19607
|
-
var _middlewareData$
|
|
19608
|
-
const nextIndex = ((
|
|
19215
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
19216
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
19609
19217
|
const nextPlacement = placements[nextIndex];
|
|
19610
19218
|
if (nextPlacement) {
|
|
19611
19219
|
return {
|
|
@@ -19618,19 +19226,21 @@ const flip = function(options) {
|
|
|
19618
19226
|
}
|
|
19619
19227
|
};
|
|
19620
19228
|
}
|
|
19621
|
-
let resetPlacement =
|
|
19622
|
-
|
|
19623
|
-
|
|
19624
|
-
|
|
19625
|
-
|
|
19626
|
-
|
|
19627
|
-
|
|
19229
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
19230
|
+
if (!resetPlacement) {
|
|
19231
|
+
switch (fallbackStrategy) {
|
|
19232
|
+
case "bestFit": {
|
|
19233
|
+
var _overflowsData$map$so;
|
|
19234
|
+
const placement2 = (_overflowsData$map$so = overflowsData.map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$map$so[0];
|
|
19235
|
+
if (placement2) {
|
|
19236
|
+
resetPlacement = placement2;
|
|
19237
|
+
}
|
|
19238
|
+
break;
|
|
19628
19239
|
}
|
|
19629
|
-
|
|
19240
|
+
case "initialPlacement":
|
|
19241
|
+
resetPlacement = initialPlacement;
|
|
19242
|
+
break;
|
|
19630
19243
|
}
|
|
19631
|
-
case "initialPlacement":
|
|
19632
|
-
resetPlacement = initialPlacement;
|
|
19633
|
-
break;
|
|
19634
19244
|
}
|
|
19635
19245
|
if (placement !== resetPlacement) {
|
|
19636
19246
|
return {
|
|
@@ -19655,20 +19265,24 @@ function getSideOffsets(overflow, rect) {
|
|
|
19655
19265
|
function isAnySideFullyClipped(overflow) {
|
|
19656
19266
|
return sides.some((side) => overflow[side] >= 0);
|
|
19657
19267
|
}
|
|
19658
|
-
const hide = function(
|
|
19659
|
-
|
|
19660
|
-
|
|
19661
|
-
|
|
19662
|
-
} = _temp === void 0 ? {} : _temp;
|
|
19268
|
+
const hide = function(options) {
|
|
19269
|
+
if (options === void 0) {
|
|
19270
|
+
options = {};
|
|
19271
|
+
}
|
|
19663
19272
|
return {
|
|
19664
19273
|
name: "hide",
|
|
19665
|
-
|
|
19274
|
+
options,
|
|
19275
|
+
async fn(state) {
|
|
19276
|
+
const {
|
|
19277
|
+
strategy = "referenceHidden",
|
|
19278
|
+
...detectOverflowOptions
|
|
19279
|
+
} = options;
|
|
19666
19280
|
const {
|
|
19667
19281
|
rects
|
|
19668
|
-
} =
|
|
19282
|
+
} = state;
|
|
19669
19283
|
switch (strategy) {
|
|
19670
19284
|
case "referenceHidden": {
|
|
19671
|
-
const overflow = await detectOverflow(
|
|
19285
|
+
const overflow = await detectOverflow(state, {
|
|
19672
19286
|
...detectOverflowOptions,
|
|
19673
19287
|
elementContext: "reference"
|
|
19674
19288
|
});
|
|
@@ -19681,7 +19295,7 @@ const hide = function(_temp) {
|
|
|
19681
19295
|
};
|
|
19682
19296
|
}
|
|
19683
19297
|
case "escaped": {
|
|
19684
|
-
const overflow = await detectOverflow(
|
|
19298
|
+
const overflow = await detectOverflow(state, {
|
|
19685
19299
|
...detectOverflowOptions,
|
|
19686
19300
|
altBoundary: true
|
|
19687
19301
|
});
|
|
@@ -19700,19 +19314,19 @@ const hide = function(_temp) {
|
|
|
19700
19314
|
}
|
|
19701
19315
|
};
|
|
19702
19316
|
};
|
|
19703
|
-
async function convertValueToCoords(
|
|
19317
|
+
async function convertValueToCoords(state, value) {
|
|
19704
19318
|
const {
|
|
19705
19319
|
placement,
|
|
19706
19320
|
platform: platform2,
|
|
19707
19321
|
elements
|
|
19708
|
-
} =
|
|
19322
|
+
} = state;
|
|
19709
19323
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
19710
19324
|
const side = getSide(placement);
|
|
19711
19325
|
const alignment = getAlignment(placement);
|
|
19712
19326
|
const isVertical = getMainAxisFromPlacement(placement) === "x";
|
|
19713
19327
|
const mainAxisMulti = ["left", "top"].includes(side) ? -1 : 1;
|
|
19714
19328
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
19715
|
-
const rawValue = typeof value === "function" ? value(
|
|
19329
|
+
const rawValue = typeof value === "function" ? value(state) : value;
|
|
19716
19330
|
let {
|
|
19717
19331
|
mainAxis,
|
|
19718
19332
|
crossAxis,
|
|
@@ -19745,12 +19359,12 @@ const offset = function(value) {
|
|
|
19745
19359
|
return {
|
|
19746
19360
|
name: "offset",
|
|
19747
19361
|
options: value,
|
|
19748
|
-
async fn(
|
|
19362
|
+
async fn(state) {
|
|
19749
19363
|
const {
|
|
19750
19364
|
x,
|
|
19751
19365
|
y
|
|
19752
|
-
} =
|
|
19753
|
-
const diffCoords = await convertValueToCoords(
|
|
19366
|
+
} = state;
|
|
19367
|
+
const diffCoords = await convertValueToCoords(state, value);
|
|
19754
19368
|
return {
|
|
19755
19369
|
x: x + diffCoords.x,
|
|
19756
19370
|
y: y + diffCoords.y,
|
|
@@ -19769,12 +19383,12 @@ const shift = function(options) {
|
|
|
19769
19383
|
return {
|
|
19770
19384
|
name: "shift",
|
|
19771
19385
|
options,
|
|
19772
|
-
async fn(
|
|
19386
|
+
async fn(state) {
|
|
19773
19387
|
const {
|
|
19774
19388
|
x,
|
|
19775
19389
|
y,
|
|
19776
19390
|
placement
|
|
19777
|
-
} =
|
|
19391
|
+
} = state;
|
|
19778
19392
|
const {
|
|
19779
19393
|
mainAxis: checkMainAxis = true,
|
|
19780
19394
|
crossAxis: checkCrossAxis = false,
|
|
@@ -19796,7 +19410,7 @@ const shift = function(options) {
|
|
|
19796
19410
|
x,
|
|
19797
19411
|
y
|
|
19798
19412
|
};
|
|
19799
|
-
const overflow = await detectOverflow(
|
|
19413
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
19800
19414
|
const mainAxis = getMainAxisFromPlacement(getSide(placement));
|
|
19801
19415
|
const crossAxis = getCrossAxis(mainAxis);
|
|
19802
19416
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -19816,7 +19430,7 @@ const shift = function(options) {
|
|
|
19816
19430
|
crossAxisCoord = within(min2, crossAxisCoord, max2);
|
|
19817
19431
|
}
|
|
19818
19432
|
const limitedCoords = limiter.fn({
|
|
19819
|
-
...
|
|
19433
|
+
...state,
|
|
19820
19434
|
[mainAxis]: mainAxisCoord,
|
|
19821
19435
|
[crossAxis]: crossAxisCoord
|
|
19822
19436
|
});
|
|
@@ -19836,14 +19450,14 @@ const limitShift = function(options) {
|
|
|
19836
19450
|
}
|
|
19837
19451
|
return {
|
|
19838
19452
|
options,
|
|
19839
|
-
fn(
|
|
19453
|
+
fn(state) {
|
|
19840
19454
|
const {
|
|
19841
19455
|
x,
|
|
19842
19456
|
y,
|
|
19843
19457
|
placement,
|
|
19844
19458
|
rects,
|
|
19845
19459
|
middlewareData
|
|
19846
|
-
} =
|
|
19460
|
+
} = state;
|
|
19847
19461
|
const {
|
|
19848
19462
|
offset: offset2 = 0,
|
|
19849
19463
|
mainAxis: checkMainAxis = true,
|
|
@@ -19857,7 +19471,7 @@ const limitShift = function(options) {
|
|
|
19857
19471
|
const crossAxis = getCrossAxis(mainAxis);
|
|
19858
19472
|
let mainAxisCoord = coords[mainAxis];
|
|
19859
19473
|
let crossAxisCoord = coords[crossAxis];
|
|
19860
|
-
const rawOffset = typeof offset2 === "function" ? offset2(
|
|
19474
|
+
const rawOffset = typeof offset2 === "function" ? offset2(state) : offset2;
|
|
19861
19475
|
const computedOffset = typeof rawOffset === "number" ? {
|
|
19862
19476
|
mainAxis: rawOffset,
|
|
19863
19477
|
crossAxis: 0
|
|
@@ -19877,11 +19491,11 @@ const limitShift = function(options) {
|
|
|
19877
19491
|
}
|
|
19878
19492
|
}
|
|
19879
19493
|
if (checkCrossAxis) {
|
|
19880
|
-
var _middlewareData$offse, _middlewareData$offse2
|
|
19494
|
+
var _middlewareData$offse, _middlewareData$offse2;
|
|
19881
19495
|
const len = mainAxis === "y" ? "width" : "height";
|
|
19882
19496
|
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 : (
|
|
19497
|
+
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);
|
|
19498
|
+
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
19499
|
if (crossAxisCoord < limitMin) {
|
|
19886
19500
|
crossAxisCoord = limitMin;
|
|
19887
19501
|
} else if (crossAxisCoord > limitMax) {
|
|
@@ -19895,30 +19509,45 @@ const limitShift = function(options) {
|
|
|
19895
19509
|
}
|
|
19896
19510
|
};
|
|
19897
19511
|
};
|
|
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
19512
|
function getWindow(node) {
|
|
19909
19513
|
var _node$ownerDocument;
|
|
19910
19514
|
return ((_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;
|
|
19911
19515
|
}
|
|
19912
|
-
function getComputedStyle(element) {
|
|
19516
|
+
function getComputedStyle$1(element) {
|
|
19913
19517
|
return getWindow(element).getComputedStyle(element);
|
|
19914
19518
|
}
|
|
19519
|
+
const min = Math.min;
|
|
19520
|
+
const max = Math.max;
|
|
19521
|
+
const round = Math.round;
|
|
19522
|
+
function getCssDimensions(element) {
|
|
19523
|
+
const css = getComputedStyle$1(element);
|
|
19524
|
+
let width = parseFloat(css.width);
|
|
19525
|
+
let height = parseFloat(css.height);
|
|
19526
|
+
const offsetWidth = element.offsetWidth;
|
|
19527
|
+
const offsetHeight = element.offsetHeight;
|
|
19528
|
+
const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;
|
|
19529
|
+
if (shouldFallback) {
|
|
19530
|
+
width = offsetWidth;
|
|
19531
|
+
height = offsetHeight;
|
|
19532
|
+
}
|
|
19533
|
+
return {
|
|
19534
|
+
width,
|
|
19535
|
+
height,
|
|
19536
|
+
fallback: shouldFallback
|
|
19537
|
+
};
|
|
19538
|
+
}
|
|
19915
19539
|
function getNodeName(node) {
|
|
19916
19540
|
return isNode(node) ? (node.nodeName || "").toLowerCase() : "";
|
|
19917
19541
|
}
|
|
19542
|
+
let uaString;
|
|
19918
19543
|
function getUAString() {
|
|
19544
|
+
if (uaString) {
|
|
19545
|
+
return uaString;
|
|
19546
|
+
}
|
|
19919
19547
|
const uaData = navigator.userAgentData;
|
|
19920
19548
|
if (uaData && Array.isArray(uaData.brands)) {
|
|
19921
|
-
|
|
19549
|
+
uaString = uaData.brands.map((item) => item.brand + "/" + item.version).join(" ");
|
|
19550
|
+
return uaString;
|
|
19922
19551
|
}
|
|
19923
19552
|
return navigator.userAgent;
|
|
19924
19553
|
}
|
|
@@ -19944,31 +19573,60 @@ function isOverflowElement(element) {
|
|
|
19944
19573
|
overflowX,
|
|
19945
19574
|
overflowY,
|
|
19946
19575
|
display
|
|
19947
|
-
} = getComputedStyle(element);
|
|
19948
|
-
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
|
|
19576
|
+
} = getComputedStyle$1(element);
|
|
19577
|
+
return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !["inline", "contents"].includes(display);
|
|
19949
19578
|
}
|
|
19950
19579
|
function isTableElement(element) {
|
|
19951
19580
|
return ["table", "td", "th"].includes(getNodeName(element));
|
|
19952
19581
|
}
|
|
19953
19582
|
function isContainingBlock(element) {
|
|
19954
19583
|
const isFirefox = /firefox/i.test(getUAString());
|
|
19955
|
-
const css = getComputedStyle(element);
|
|
19584
|
+
const css = getComputedStyle$1(element);
|
|
19956
19585
|
const backdropFilter = css.backdropFilter || css.WebkitBackdropFilter;
|
|
19957
|
-
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
|
-
|
|
19959
|
-
|
|
19960
|
-
|
|
19961
|
-
}
|
|
19962
|
-
);
|
|
19586
|
+
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((value) => {
|
|
19587
|
+
const contain = css.contain;
|
|
19588
|
+
return contain != null ? contain.includes(value) : false;
|
|
19589
|
+
});
|
|
19963
19590
|
}
|
|
19964
|
-
function
|
|
19965
|
-
return
|
|
19591
|
+
function isClientRectVisualViewportBased() {
|
|
19592
|
+
return /^((?!chrome|android).)*safari/i.test(getUAString());
|
|
19966
19593
|
}
|
|
19967
19594
|
function isLastTraversableNode(node) {
|
|
19968
19595
|
return ["html", "body", "#document"].includes(getNodeName(node));
|
|
19969
19596
|
}
|
|
19970
|
-
function
|
|
19971
|
-
|
|
19597
|
+
function unwrapElement(element) {
|
|
19598
|
+
return !isElement(element) ? element.contextElement : element;
|
|
19599
|
+
}
|
|
19600
|
+
const FALLBACK_SCALE = {
|
|
19601
|
+
x: 1,
|
|
19602
|
+
y: 1
|
|
19603
|
+
};
|
|
19604
|
+
function getScale(element) {
|
|
19605
|
+
const domElement = unwrapElement(element);
|
|
19606
|
+
if (!isHTMLElement(domElement)) {
|
|
19607
|
+
return FALLBACK_SCALE;
|
|
19608
|
+
}
|
|
19609
|
+
const rect = domElement.getBoundingClientRect();
|
|
19610
|
+
const {
|
|
19611
|
+
width,
|
|
19612
|
+
height,
|
|
19613
|
+
fallback
|
|
19614
|
+
} = getCssDimensions(domElement);
|
|
19615
|
+
let x = (fallback ? round(rect.width) : rect.width) / width;
|
|
19616
|
+
let y = (fallback ? round(rect.height) : rect.height) / height;
|
|
19617
|
+
if (!x || !Number.isFinite(x)) {
|
|
19618
|
+
x = 1;
|
|
19619
|
+
}
|
|
19620
|
+
if (!y || !Number.isFinite(y)) {
|
|
19621
|
+
y = 1;
|
|
19622
|
+
}
|
|
19623
|
+
return {
|
|
19624
|
+
x,
|
|
19625
|
+
y
|
|
19626
|
+
};
|
|
19627
|
+
}
|
|
19628
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {
|
|
19629
|
+
var _win$visualViewport, _win$visualViewport2;
|
|
19972
19630
|
if (includeScale === void 0) {
|
|
19973
19631
|
includeScale = false;
|
|
19974
19632
|
}
|
|
@@ -19976,25 +19634,42 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
|
19976
19634
|
isFixedStrategy = false;
|
|
19977
19635
|
}
|
|
19978
19636
|
const clientRect = element.getBoundingClientRect();
|
|
19979
|
-
|
|
19980
|
-
let
|
|
19981
|
-
|
|
19982
|
-
|
|
19983
|
-
|
|
19984
|
-
|
|
19985
|
-
|
|
19986
|
-
|
|
19987
|
-
|
|
19988
|
-
|
|
19989
|
-
|
|
19990
|
-
|
|
19637
|
+
const domElement = unwrapElement(element);
|
|
19638
|
+
let scale2 = FALLBACK_SCALE;
|
|
19639
|
+
if (includeScale) {
|
|
19640
|
+
if (offsetParent) {
|
|
19641
|
+
if (isElement(offsetParent)) {
|
|
19642
|
+
scale2 = getScale(offsetParent);
|
|
19643
|
+
}
|
|
19644
|
+
} else {
|
|
19645
|
+
scale2 = getScale(element);
|
|
19646
|
+
}
|
|
19647
|
+
}
|
|
19648
|
+
const win = domElement ? getWindow(domElement) : window;
|
|
19649
|
+
const addVisualOffsets = isClientRectVisualViewportBased() && isFixedStrategy;
|
|
19650
|
+
let x = (clientRect.left + (addVisualOffsets ? ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0 : 0)) / scale2.x;
|
|
19651
|
+
let y = (clientRect.top + (addVisualOffsets ? ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0 : 0)) / scale2.y;
|
|
19652
|
+
let width = clientRect.width / scale2.x;
|
|
19653
|
+
let height = clientRect.height / scale2.y;
|
|
19654
|
+
if (domElement) {
|
|
19655
|
+
const win2 = getWindow(domElement);
|
|
19656
|
+
const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;
|
|
19657
|
+
let currentIFrame = win2.frameElement;
|
|
19658
|
+
while (currentIFrame && offsetParent && offsetWin !== win2) {
|
|
19659
|
+
const iframeScale = getScale(currentIFrame);
|
|
19660
|
+
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
19661
|
+
const css = getComputedStyle(currentIFrame);
|
|
19662
|
+
iframeRect.x += (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;
|
|
19663
|
+
iframeRect.y += (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;
|
|
19664
|
+
x *= iframeScale.x;
|
|
19665
|
+
y *= iframeScale.y;
|
|
19666
|
+
width *= iframeScale.x;
|
|
19667
|
+
height *= iframeScale.y;
|
|
19668
|
+
x += iframeRect.x;
|
|
19669
|
+
y += iframeRect.y;
|
|
19670
|
+
currentIFrame = getWindow(currentIFrame).frameElement;
|
|
19671
|
+
}
|
|
19991
19672
|
}
|
|
19992
|
-
const win = isElement(element) ? getWindow(element) : window;
|
|
19993
|
-
const addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
19994
|
-
const x = (clientRect.left + (addVisualOffsets ? (_win$visualViewport$o = (_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) != null ? _win$visualViewport$o : 0 : 0)) / scale2.x;
|
|
19995
|
-
const y = (clientRect.top + (addVisualOffsets ? (_win$visualViewport$o2 = (_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) != null ? _win$visualViewport$o2 : 0 : 0)) / scale2.y;
|
|
19996
|
-
const width = clientRect.width / scale2.x;
|
|
19997
|
-
const height = clientRect.height / scale2.y;
|
|
19998
19673
|
return {
|
|
19999
19674
|
width,
|
|
20000
19675
|
height,
|
|
@@ -20021,96 +19696,6 @@ function getNodeScroll(element) {
|
|
|
20021
19696
|
scrollTop: element.pageYOffset
|
|
20022
19697
|
};
|
|
20023
19698
|
}
|
|
20024
|
-
function getWindowScrollBarX(element) {
|
|
20025
|
-
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
20026
|
-
}
|
|
20027
|
-
function isScaled(element) {
|
|
20028
|
-
const rect = getBoundingClientRect(element);
|
|
20029
|
-
return round(rect.width) !== element.offsetWidth || round(rect.height) !== element.offsetHeight;
|
|
20030
|
-
}
|
|
20031
|
-
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
20032
|
-
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
20033
|
-
const documentElement = getDocumentElement(offsetParent);
|
|
20034
|
-
const rect = getBoundingClientRect(
|
|
20035
|
-
element,
|
|
20036
|
-
isOffsetParentAnElement && isScaled(offsetParent),
|
|
20037
|
-
strategy === "fixed"
|
|
20038
|
-
);
|
|
20039
|
-
let scroll = {
|
|
20040
|
-
scrollLeft: 0,
|
|
20041
|
-
scrollTop: 0
|
|
20042
|
-
};
|
|
20043
|
-
const offsets = {
|
|
20044
|
-
x: 0,
|
|
20045
|
-
y: 0
|
|
20046
|
-
};
|
|
20047
|
-
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
|
|
20048
|
-
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
20049
|
-
scroll = getNodeScroll(offsetParent);
|
|
20050
|
-
}
|
|
20051
|
-
if (isHTMLElement(offsetParent)) {
|
|
20052
|
-
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
20053
|
-
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
20054
|
-
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
20055
|
-
} else if (documentElement) {
|
|
20056
|
-
offsets.x = getWindowScrollBarX(documentElement);
|
|
20057
|
-
}
|
|
20058
|
-
}
|
|
20059
|
-
return {
|
|
20060
|
-
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
20061
|
-
y: rect.top + scroll.scrollTop - offsets.y,
|
|
20062
|
-
width: rect.width,
|
|
20063
|
-
height: rect.height
|
|
20064
|
-
};
|
|
20065
|
-
}
|
|
20066
|
-
function getParentNode(node) {
|
|
20067
|
-
if (getNodeName(node) === "html") {
|
|
20068
|
-
return node;
|
|
20069
|
-
}
|
|
20070
|
-
const result2 = node.assignedSlot || node.parentNode || (isShadowRoot(node) ? node.host : null) || getDocumentElement(node);
|
|
20071
|
-
return isShadowRoot(result2) ? result2.host : result2;
|
|
20072
|
-
}
|
|
20073
|
-
function getTrueOffsetParent(element) {
|
|
20074
|
-
if (!isHTMLElement(element) || getComputedStyle(element).position === "fixed") {
|
|
20075
|
-
return null;
|
|
20076
|
-
}
|
|
20077
|
-
return element.offsetParent;
|
|
20078
|
-
}
|
|
20079
|
-
function getContainingBlock(element) {
|
|
20080
|
-
let currentNode = getParentNode(element);
|
|
20081
|
-
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
20082
|
-
if (isContainingBlock(currentNode)) {
|
|
20083
|
-
return currentNode;
|
|
20084
|
-
} else {
|
|
20085
|
-
currentNode = getParentNode(currentNode);
|
|
20086
|
-
}
|
|
20087
|
-
}
|
|
20088
|
-
return null;
|
|
20089
|
-
}
|
|
20090
|
-
function getOffsetParent(element) {
|
|
20091
|
-
const window2 = getWindow(element);
|
|
20092
|
-
let offsetParent = getTrueOffsetParent(element);
|
|
20093
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === "static") {
|
|
20094
|
-
offsetParent = getTrueOffsetParent(offsetParent);
|
|
20095
|
-
}
|
|
20096
|
-
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
20097
|
-
return window2;
|
|
20098
|
-
}
|
|
20099
|
-
return offsetParent || getContainingBlock(element) || window2;
|
|
20100
|
-
}
|
|
20101
|
-
function getDimensions(element) {
|
|
20102
|
-
if (isHTMLElement(element)) {
|
|
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
|
-
};
|
|
20113
|
-
}
|
|
20114
19699
|
function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
20115
19700
|
let {
|
|
20116
19701
|
rect,
|
|
@@ -20152,41 +19737,19 @@ function convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {
|
|
|
20152
19737
|
y: rect.y * scale2.y - scroll.scrollTop * scale2.y + offsets.y
|
|
20153
19738
|
};
|
|
20154
19739
|
}
|
|
20155
|
-
function
|
|
20156
|
-
|
|
20157
|
-
const html = getDocumentElement(element);
|
|
20158
|
-
const visualViewport = win.visualViewport;
|
|
20159
|
-
let width = html.clientWidth;
|
|
20160
|
-
let height = html.clientHeight;
|
|
20161
|
-
let x = 0;
|
|
20162
|
-
let y = 0;
|
|
20163
|
-
if (visualViewport) {
|
|
20164
|
-
width = visualViewport.width;
|
|
20165
|
-
height = visualViewport.height;
|
|
20166
|
-
const layoutViewport = isLayoutViewport();
|
|
20167
|
-
if (layoutViewport || !layoutViewport && strategy === "fixed") {
|
|
20168
|
-
x = visualViewport.offsetLeft;
|
|
20169
|
-
y = visualViewport.offsetTop;
|
|
20170
|
-
}
|
|
20171
|
-
}
|
|
20172
|
-
return {
|
|
20173
|
-
width,
|
|
20174
|
-
height,
|
|
20175
|
-
x,
|
|
20176
|
-
y
|
|
20177
|
-
};
|
|
19740
|
+
function getWindowScrollBarX(element) {
|
|
19741
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getNodeScroll(element).scrollLeft;
|
|
20178
19742
|
}
|
|
20179
19743
|
function getDocumentRect(element) {
|
|
20180
|
-
var _element$ownerDocumen;
|
|
20181
19744
|
const html = getDocumentElement(element);
|
|
20182
19745
|
const scroll = getNodeScroll(element);
|
|
20183
|
-
const body =
|
|
20184
|
-
const width = max(html.scrollWidth, html.clientWidth, body
|
|
20185
|
-
const height = max(html.scrollHeight, html.clientHeight, body
|
|
19746
|
+
const body = element.ownerDocument.body;
|
|
19747
|
+
const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);
|
|
19748
|
+
const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);
|
|
20186
19749
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
20187
19750
|
const y = -scroll.scrollTop;
|
|
20188
|
-
if (getComputedStyle(body
|
|
20189
|
-
x += max(html.clientWidth, body
|
|
19751
|
+
if (getComputedStyle$1(body).direction === "rtl") {
|
|
19752
|
+
x += max(html.clientWidth, body.clientWidth) - width;
|
|
20190
19753
|
}
|
|
20191
19754
|
return {
|
|
20192
19755
|
width,
|
|
@@ -20195,10 +19758,17 @@ function getDocumentRect(element) {
|
|
|
20195
19758
|
y
|
|
20196
19759
|
};
|
|
20197
19760
|
}
|
|
19761
|
+
function getParentNode(node) {
|
|
19762
|
+
if (getNodeName(node) === "html") {
|
|
19763
|
+
return node;
|
|
19764
|
+
}
|
|
19765
|
+
const result2 = node.assignedSlot || node.parentNode || isShadowRoot(node) && node.host || getDocumentElement(node);
|
|
19766
|
+
return isShadowRoot(result2) ? result2.host : result2;
|
|
19767
|
+
}
|
|
20198
19768
|
function getNearestOverflowAncestor(node) {
|
|
20199
19769
|
const parentNode = getParentNode(node);
|
|
20200
19770
|
if (isLastTraversableNode(parentNode)) {
|
|
20201
|
-
return
|
|
19771
|
+
return parentNode.ownerDocument.body;
|
|
20202
19772
|
}
|
|
20203
19773
|
if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {
|
|
20204
19774
|
return parentNode;
|
|
@@ -20218,6 +19788,30 @@ function getOverflowAncestors(node, list2) {
|
|
|
20218
19788
|
}
|
|
20219
19789
|
return list2.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor));
|
|
20220
19790
|
}
|
|
19791
|
+
function getViewportRect(element, strategy) {
|
|
19792
|
+
const win = getWindow(element);
|
|
19793
|
+
const html = getDocumentElement(element);
|
|
19794
|
+
const visualViewport = win.visualViewport;
|
|
19795
|
+
let width = html.clientWidth;
|
|
19796
|
+
let height = html.clientHeight;
|
|
19797
|
+
let x = 0;
|
|
19798
|
+
let y = 0;
|
|
19799
|
+
if (visualViewport) {
|
|
19800
|
+
width = visualViewport.width;
|
|
19801
|
+
height = visualViewport.height;
|
|
19802
|
+
const visualViewportBased = isClientRectVisualViewportBased();
|
|
19803
|
+
if (!visualViewportBased || visualViewportBased && strategy === "fixed") {
|
|
19804
|
+
x = visualViewport.offsetLeft;
|
|
19805
|
+
y = visualViewport.offsetTop;
|
|
19806
|
+
}
|
|
19807
|
+
}
|
|
19808
|
+
return {
|
|
19809
|
+
width,
|
|
19810
|
+
height,
|
|
19811
|
+
x,
|
|
19812
|
+
y
|
|
19813
|
+
};
|
|
19814
|
+
}
|
|
20221
19815
|
function getInnerBoundingClientRect(element, strategy) {
|
|
20222
19816
|
const clientRect = getBoundingClientRect(element, true, strategy === "fixed");
|
|
20223
19817
|
const top = clientRect.top + element.clientTop;
|
|
@@ -20231,41 +19825,60 @@ function getInnerBoundingClientRect(element, strategy) {
|
|
|
20231
19825
|
const x = left * scale2.x;
|
|
20232
19826
|
const y = top * scale2.y;
|
|
20233
19827
|
return {
|
|
20234
|
-
top: y,
|
|
20235
|
-
left: x,
|
|
20236
|
-
right: x + width,
|
|
20237
|
-
bottom: y + height,
|
|
20238
|
-
x,
|
|
20239
|
-
y,
|
|
20240
19828
|
width,
|
|
20241
|
-
height
|
|
19829
|
+
height,
|
|
19830
|
+
x,
|
|
19831
|
+
y
|
|
20242
19832
|
};
|
|
20243
19833
|
}
|
|
20244
19834
|
function getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {
|
|
19835
|
+
let rect;
|
|
20245
19836
|
if (clippingAncestor === "viewport") {
|
|
20246
|
-
|
|
20247
|
-
}
|
|
20248
|
-
|
|
20249
|
-
|
|
19837
|
+
rect = getViewportRect(element, strategy);
|
|
19838
|
+
} else if (clippingAncestor === "document") {
|
|
19839
|
+
rect = getDocumentRect(getDocumentElement(element));
|
|
19840
|
+
} else if (isElement(clippingAncestor)) {
|
|
19841
|
+
rect = getInnerBoundingClientRect(clippingAncestor, strategy);
|
|
19842
|
+
} else {
|
|
19843
|
+
const mutableRect = {
|
|
19844
|
+
...clippingAncestor
|
|
19845
|
+
};
|
|
19846
|
+
if (isClientRectVisualViewportBased()) {
|
|
19847
|
+
var _win$visualViewport, _win$visualViewport2;
|
|
19848
|
+
const win = getWindow(element);
|
|
19849
|
+
mutableRect.x -= ((_win$visualViewport = win.visualViewport) == null ? void 0 : _win$visualViewport.offsetLeft) || 0;
|
|
19850
|
+
mutableRect.y -= ((_win$visualViewport2 = win.visualViewport) == null ? void 0 : _win$visualViewport2.offsetTop) || 0;
|
|
19851
|
+
}
|
|
19852
|
+
rect = mutableRect;
|
|
20250
19853
|
}
|
|
20251
|
-
return rectToClientRect(
|
|
19854
|
+
return rectToClientRect(rect);
|
|
20252
19855
|
}
|
|
20253
|
-
function getClippingElementAncestors(element) {
|
|
19856
|
+
function getClippingElementAncestors(element, cache) {
|
|
19857
|
+
const cachedResult = cache.get(element);
|
|
19858
|
+
if (cachedResult) {
|
|
19859
|
+
return cachedResult;
|
|
19860
|
+
}
|
|
20254
19861
|
let result2 = getOverflowAncestors(element).filter((el) => isElement(el) && getNodeName(el) !== "body");
|
|
20255
19862
|
let currentContainingBlockComputedStyle = null;
|
|
20256
|
-
const elementIsFixed = getComputedStyle(element).position === "fixed";
|
|
19863
|
+
const elementIsFixed = getComputedStyle$1(element).position === "fixed";
|
|
20257
19864
|
let currentNode = elementIsFixed ? getParentNode(element) : element;
|
|
20258
19865
|
while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
20259
|
-
const computedStyle = getComputedStyle(currentNode);
|
|
19866
|
+
const computedStyle = getComputedStyle$1(currentNode);
|
|
20260
19867
|
const containingBlock = isContainingBlock(currentNode);
|
|
20261
|
-
const
|
|
20262
|
-
if (
|
|
20263
|
-
|
|
19868
|
+
const shouldIgnoreCurrentNode = computedStyle.position === "fixed";
|
|
19869
|
+
if (shouldIgnoreCurrentNode) {
|
|
19870
|
+
currentContainingBlockComputedStyle = null;
|
|
20264
19871
|
} else {
|
|
20265
|
-
|
|
19872
|
+
const shouldDropCurrentNode = elementIsFixed ? !containingBlock && !currentContainingBlockComputedStyle : !containingBlock && computedStyle.position === "static" && !!currentContainingBlockComputedStyle && ["absolute", "fixed"].includes(currentContainingBlockComputedStyle.position);
|
|
19873
|
+
if (shouldDropCurrentNode) {
|
|
19874
|
+
result2 = result2.filter((ancestor) => ancestor !== currentNode);
|
|
19875
|
+
} else {
|
|
19876
|
+
currentContainingBlockComputedStyle = computedStyle;
|
|
19877
|
+
}
|
|
20266
19878
|
}
|
|
20267
19879
|
currentNode = getParentNode(currentNode);
|
|
20268
19880
|
}
|
|
19881
|
+
cache.set(element, result2);
|
|
20269
19882
|
return result2;
|
|
20270
19883
|
}
|
|
20271
19884
|
function getClippingRect(_ref) {
|
|
@@ -20275,7 +19888,7 @@ function getClippingRect(_ref) {
|
|
|
20275
19888
|
rootBoundary,
|
|
20276
19889
|
strategy
|
|
20277
19890
|
} = _ref;
|
|
20278
|
-
const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element) : [].concat(boundary);
|
|
19891
|
+
const elementClippingAncestors = boundary === "clippingAncestors" ? getClippingElementAncestors(element, this._c) : [].concat(boundary);
|
|
20279
19892
|
const clippingAncestors = [...elementClippingAncestors, rootBoundary];
|
|
20280
19893
|
const firstClippingAncestor = clippingAncestors[0];
|
|
20281
19894
|
const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {
|
|
@@ -20293,6 +19906,74 @@ function getClippingRect(_ref) {
|
|
|
20293
19906
|
y: clippingRect.top
|
|
20294
19907
|
};
|
|
20295
19908
|
}
|
|
19909
|
+
function getDimensions(element) {
|
|
19910
|
+
if (isHTMLElement(element)) {
|
|
19911
|
+
return getCssDimensions(element);
|
|
19912
|
+
}
|
|
19913
|
+
return element.getBoundingClientRect();
|
|
19914
|
+
}
|
|
19915
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
19916
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === "fixed") {
|
|
19917
|
+
return null;
|
|
19918
|
+
}
|
|
19919
|
+
if (polyfill) {
|
|
19920
|
+
return polyfill(element);
|
|
19921
|
+
}
|
|
19922
|
+
return element.offsetParent;
|
|
19923
|
+
}
|
|
19924
|
+
function getContainingBlock(element) {
|
|
19925
|
+
let currentNode = getParentNode(element);
|
|
19926
|
+
while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {
|
|
19927
|
+
if (isContainingBlock(currentNode)) {
|
|
19928
|
+
return currentNode;
|
|
19929
|
+
} else {
|
|
19930
|
+
currentNode = getParentNode(currentNode);
|
|
19931
|
+
}
|
|
19932
|
+
}
|
|
19933
|
+
return null;
|
|
19934
|
+
}
|
|
19935
|
+
function getOffsetParent(element, polyfill) {
|
|
19936
|
+
const window2 = getWindow(element);
|
|
19937
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
19938
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === "static") {
|
|
19939
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
19940
|
+
}
|
|
19941
|
+
if (offsetParent && (getNodeName(offsetParent) === "html" || getNodeName(offsetParent) === "body" && getComputedStyle$1(offsetParent).position === "static" && !isContainingBlock(offsetParent))) {
|
|
19942
|
+
return window2;
|
|
19943
|
+
}
|
|
19944
|
+
return offsetParent || getContainingBlock(element) || window2;
|
|
19945
|
+
}
|
|
19946
|
+
function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
19947
|
+
const isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
19948
|
+
const documentElement = getDocumentElement(offsetParent);
|
|
19949
|
+
const rect = getBoundingClientRect(element, true, strategy === "fixed", offsetParent);
|
|
19950
|
+
let scroll = {
|
|
19951
|
+
scrollLeft: 0,
|
|
19952
|
+
scrollTop: 0
|
|
19953
|
+
};
|
|
19954
|
+
const offsets = {
|
|
19955
|
+
x: 0,
|
|
19956
|
+
y: 0
|
|
19957
|
+
};
|
|
19958
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && strategy !== "fixed") {
|
|
19959
|
+
if (getNodeName(offsetParent) !== "body" || isOverflowElement(documentElement)) {
|
|
19960
|
+
scroll = getNodeScroll(offsetParent);
|
|
19961
|
+
}
|
|
19962
|
+
if (isHTMLElement(offsetParent)) {
|
|
19963
|
+
const offsetRect = getBoundingClientRect(offsetParent, true);
|
|
19964
|
+
offsets.x = offsetRect.x + offsetParent.clientLeft;
|
|
19965
|
+
offsets.y = offsetRect.y + offsetParent.clientTop;
|
|
19966
|
+
} else if (documentElement) {
|
|
19967
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
19968
|
+
}
|
|
19969
|
+
}
|
|
19970
|
+
return {
|
|
19971
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
19972
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
|
19973
|
+
width: rect.width,
|
|
19974
|
+
height: rect.height
|
|
19975
|
+
};
|
|
19976
|
+
}
|
|
20296
19977
|
const platform = {
|
|
20297
19978
|
getClippingRect,
|
|
20298
19979
|
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
@@ -20319,7 +20000,7 @@ const platform = {
|
|
|
20319
20000
|
};
|
|
20320
20001
|
},
|
|
20321
20002
|
getClientRects: (element) => Array.from(element.getClientRects()),
|
|
20322
|
-
isRTL: (element) => getComputedStyle(element).direction === "rtl"
|
|
20003
|
+
isRTL: (element) => getComputedStyle$1(element).direction === "rtl"
|
|
20323
20004
|
};
|
|
20324
20005
|
function autoUpdate(reference, floating, update2, options) {
|
|
20325
20006
|
if (options === void 0) {
|
|
@@ -20381,10 +20062,21 @@ function autoUpdate(reference, floating, update2, options) {
|
|
|
20381
20062
|
}
|
|
20382
20063
|
};
|
|
20383
20064
|
}
|
|
20384
|
-
const computePosition = (reference, floating, options) =>
|
|
20385
|
-
|
|
20386
|
-
|
|
20387
|
-
|
|
20065
|
+
const computePosition = (reference, floating, options) => {
|
|
20066
|
+
const cache = /* @__PURE__ */ new Map();
|
|
20067
|
+
const mergedOptions = {
|
|
20068
|
+
platform,
|
|
20069
|
+
...options
|
|
20070
|
+
};
|
|
20071
|
+
const platformWithCache = {
|
|
20072
|
+
...mergedOptions.platform,
|
|
20073
|
+
_c: cache
|
|
20074
|
+
};
|
|
20075
|
+
return computePosition$1(reference, floating, {
|
|
20076
|
+
...mergedOptions,
|
|
20077
|
+
platform: platformWithCache
|
|
20078
|
+
});
|
|
20079
|
+
};
|
|
20388
20080
|
class Wrapper extends React__default.Component {
|
|
20389
20081
|
constructor() {
|
|
20390
20082
|
super(...arguments);
|
|
@@ -20488,7 +20180,7 @@ const Popover$1 = forwardRef((p, ref) => {
|
|
|
20488
20180
|
const [targetElement, setTargetElement] = useState$1(null);
|
|
20489
20181
|
function update2() {
|
|
20490
20182
|
var _a, _b, _c;
|
|
20491
|
-
return __awaiter
|
|
20183
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
20492
20184
|
const target = (_b = (_a = targetRef.current) === null || _a === void 0 ? void 0 : _a.element) !== null && _b !== void 0 ? _b : null;
|
|
20493
20185
|
const floating2 = floatingRef.current;
|
|
20494
20186
|
const arrowElement = arrowRef.current;
|
|
@@ -21502,7 +21194,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21502
21194
|
renderItem
|
|
21503
21195
|
} = props;
|
|
21504
21196
|
function processFile(file, fileList) {
|
|
21505
|
-
return __awaiter
|
|
21197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21506
21198
|
const {
|
|
21507
21199
|
beforeUpload
|
|
21508
21200
|
} = props;
|
|
@@ -21516,7 +21208,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21516
21208
|
}
|
|
21517
21209
|
function onChange(e) {
|
|
21518
21210
|
var _a;
|
|
21519
|
-
return __awaiter
|
|
21211
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21520
21212
|
e.persist();
|
|
21521
21213
|
const {
|
|
21522
21214
|
files: rawFiles
|
|
@@ -21549,7 +21241,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21549
21241
|
file
|
|
21550
21242
|
}));
|
|
21551
21243
|
setTasks((prev) => [...getFinalTasks(prev), ...newTasks]);
|
|
21552
|
-
yield Promise.all(newTasks.map((currentTask) => __awaiter
|
|
21244
|
+
yield Promise.all(newTasks.map((currentTask) => __awaiter(this, void 0, void 0, function* () {
|
|
21553
21245
|
try {
|
|
21554
21246
|
const result2 = yield props.upload(currentTask.file);
|
|
21555
21247
|
setTasks((prev) => {
|
|
@@ -21614,7 +21306,7 @@ const ImageUploader$1 = (p) => {
|
|
|
21614
21306
|
}
|
|
21615
21307
|
onPreview && onPreview(index2, fileItem);
|
|
21616
21308
|
},
|
|
21617
|
-
onDelete: () => __awaiter
|
|
21309
|
+
onDelete: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
21618
21310
|
var _c;
|
|
21619
21311
|
const canDelete = yield (_c = props.onDelete) === null || _c === void 0 ? void 0 : _c.call(props, fileItem);
|
|
21620
21312
|
if (canDelete === false)
|
|
@@ -21862,7 +21554,7 @@ const defaultProps$w = {
|
|
|
21862
21554
|
const InfiniteScroll$1 = (p) => {
|
|
21863
21555
|
const props = mergeProps(defaultProps$w, p);
|
|
21864
21556
|
const [failed, setFailed] = useState$1(false);
|
|
21865
|
-
const doLoadMore = useLockFn((isRetry) => __awaiter
|
|
21557
|
+
const doLoadMore = useLockFn((isRetry) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21866
21558
|
try {
|
|
21867
21559
|
yield props.loadMore(isRetry);
|
|
21868
21560
|
} catch (e) {
|
|
@@ -21876,7 +21568,7 @@ const InfiniteScroll$1 = (p) => {
|
|
|
21876
21568
|
const [scrollParent, setScrollParent] = useState$1();
|
|
21877
21569
|
const {
|
|
21878
21570
|
run: check
|
|
21879
|
-
} = useThrottleFn(() => __awaiter
|
|
21571
|
+
} = useThrottleFn(() => __awaiter(void 0, void 0, void 0, function* () {
|
|
21880
21572
|
if (nextFlagRef.current !== flag)
|
|
21881
21573
|
return;
|
|
21882
21574
|
if (!props.hasMore)
|
|
@@ -21922,7 +21614,7 @@ const InfiniteScroll$1 = (p) => {
|
|
|
21922
21614
|
};
|
|
21923
21615
|
}, [scrollParent]);
|
|
21924
21616
|
function retry() {
|
|
21925
|
-
return __awaiter
|
|
21617
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
21926
21618
|
setFailed(false);
|
|
21927
21619
|
yield doLoadMore(true);
|
|
21928
21620
|
setFlag(nextFlagRef.current);
|
|
@@ -22067,6 +21759,7 @@ const Input$1 = forwardRef((p, ref) => {
|
|
|
22067
21759
|
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
22068
21760
|
},
|
|
22069
21761
|
onClick: props.onClick,
|
|
21762
|
+
step: props.step,
|
|
22070
21763
|
role: props.role,
|
|
22071
21764
|
"aria-valuenow": props["aria-valuenow"],
|
|
22072
21765
|
"aria-valuemax": props["aria-valuemax"],
|
|
@@ -22234,7 +21927,7 @@ const Modal = (p) => {
|
|
|
22234
21927
|
return React__default.createElement(ModalActionButton, {
|
|
22235
21928
|
key: action.key,
|
|
22236
21929
|
action,
|
|
22237
|
-
onAction: () => __awaiter
|
|
21930
|
+
onAction: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
22238
21931
|
var _a, _b, _c;
|
|
22239
21932
|
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
21933
|
if (props.closeOnAction) {
|
|
@@ -22324,7 +22017,7 @@ function confirm(p) {
|
|
|
22324
22017
|
key: "confirm",
|
|
22325
22018
|
text: props.confirmText,
|
|
22326
22019
|
primary: true,
|
|
22327
|
-
onClick: () => __awaiter
|
|
22020
|
+
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
22328
22021
|
var _a;
|
|
22329
22022
|
yield (_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
22330
22023
|
resolve(true);
|
|
@@ -22332,7 +22025,7 @@ function confirm(p) {
|
|
|
22332
22025
|
}, {
|
|
22333
22026
|
key: "cancel",
|
|
22334
22027
|
text: props.cancelText,
|
|
22335
|
-
onClick: () => __awaiter
|
|
22028
|
+
onClick: () => __awaiter(this, void 0, void 0, function* () {
|
|
22336
22029
|
var _b;
|
|
22337
22030
|
yield (_b = props.onCancel) === null || _b === void 0 ? void 0 : _b.call(props);
|
|
22338
22031
|
resolve(false);
|
|
@@ -22900,7 +22593,7 @@ const PullToRefresh$1 = (p) => {
|
|
|
22900
22593
|
});
|
|
22901
22594
|
}, []);
|
|
22902
22595
|
function doRefresh() {
|
|
22903
|
-
return __awaiter
|
|
22596
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
22904
22597
|
api.start({
|
|
22905
22598
|
height: headHeight
|
|
22906
22599
|
});
|
|
@@ -22910,7 +22603,7 @@ const PullToRefresh$1 = (p) => {
|
|
|
22910
22603
|
setStatus("complete");
|
|
22911
22604
|
} catch (e) {
|
|
22912
22605
|
api.start({
|
|
22913
|
-
to: (next) => __awaiter
|
|
22606
|
+
to: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
22914
22607
|
yield next({
|
|
22915
22608
|
height: 0
|
|
22916
22609
|
});
|
|
@@ -22923,7 +22616,7 @@ const PullToRefresh$1 = (p) => {
|
|
|
22923
22616
|
yield sleep(props.completeDelay);
|
|
22924
22617
|
}
|
|
22925
22618
|
api.start({
|
|
22926
|
-
to: (next) => __awaiter
|
|
22619
|
+
to: (next) => __awaiter(this, void 0, void 0, function* () {
|
|
22927
22620
|
yield next({
|
|
22928
22621
|
height: 0
|
|
22929
22622
|
});
|
|
@@ -24289,9 +23982,8 @@ var iterableToArrayLimit = { exports: {} };
|
|
|
24289
23982
|
return;
|
|
24290
23983
|
_n = false;
|
|
24291
23984
|
} else
|
|
24292
|
-
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
|
|
23985
|
+
for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = true)
|
|
24293
23986
|
;
|
|
24294
|
-
}
|
|
24295
23987
|
} catch (err) {
|
|
24296
23988
|
_d = true, _e = err;
|
|
24297
23989
|
} finally {
|
|
@@ -24314,9 +24006,8 @@ var arrayLikeToArray = { exports: {} };
|
|
|
24314
24006
|
function _arrayLikeToArray2(arr, len) {
|
|
24315
24007
|
if (len == null || len > arr.length)
|
|
24316
24008
|
len = arr.length;
|
|
24317
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
24009
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
24318
24010
|
arr2[i] = arr[i];
|
|
24319
|
-
}
|
|
24320
24011
|
return arr2;
|
|
24321
24012
|
}
|
|
24322
24013
|
module.exports = _arrayLikeToArray2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
@@ -24946,7 +24637,31 @@ function useRefState(initialState) {
|
|
|
24946
24637
|
}, [state]);
|
|
24947
24638
|
return [state, setState, ref];
|
|
24948
24639
|
}
|
|
24640
|
+
function mergeFuncProps(p1, p2) {
|
|
24641
|
+
const p1Keys = Object.keys(p1);
|
|
24642
|
+
const p2Keys = Object.keys(p2);
|
|
24643
|
+
const keys2 = /* @__PURE__ */ new Set([...p1Keys, ...p2Keys]);
|
|
24644
|
+
const res = {};
|
|
24645
|
+
keys2.forEach((key) => {
|
|
24646
|
+
const p1Value = p1[key];
|
|
24647
|
+
const p2Value = p2[key];
|
|
24648
|
+
if (typeof p1Value === "function" && typeof p2Value === "function") {
|
|
24649
|
+
res[key] = function(...args) {
|
|
24650
|
+
p1Value(...args);
|
|
24651
|
+
p2Value(...args);
|
|
24652
|
+
};
|
|
24653
|
+
} else {
|
|
24654
|
+
res[key] = p1Value || p2Value;
|
|
24655
|
+
}
|
|
24656
|
+
});
|
|
24657
|
+
return res;
|
|
24658
|
+
}
|
|
24949
24659
|
const classPrefix$a = `adm-swiper`;
|
|
24660
|
+
const eventToPropRecord = {
|
|
24661
|
+
"mousedown": "onMouseDown",
|
|
24662
|
+
"mousemove": "onMouseMove",
|
|
24663
|
+
"mouseup": "onMouseUp"
|
|
24664
|
+
};
|
|
24950
24665
|
const defaultProps$a = {
|
|
24951
24666
|
defaultIndex: 0,
|
|
24952
24667
|
allowTouchMove: true,
|
|
@@ -24957,7 +24672,8 @@ const defaultProps$a = {
|
|
|
24957
24672
|
slideSize: 100,
|
|
24958
24673
|
trackOffset: 0,
|
|
24959
24674
|
stuckAtBoundary: true,
|
|
24960
|
-
rubberband: true
|
|
24675
|
+
rubberband: true,
|
|
24676
|
+
stopPropagation: []
|
|
24961
24677
|
};
|
|
24962
24678
|
let currentUid;
|
|
24963
24679
|
const Swiper = forwardRef(staged_1((p, ref) => {
|
|
@@ -25141,11 +24857,15 @@ const Swiper = forwardRef(staged_1((p, ref) => {
|
|
|
25141
24857
|
useEffect(() => {
|
|
25142
24858
|
if (!autoplay || dragging)
|
|
25143
24859
|
return;
|
|
25144
|
-
|
|
24860
|
+
let interval;
|
|
24861
|
+
function tick() {
|
|
24862
|
+
interval = window.setTimeout(tick, autoplayInterval);
|
|
25145
24863
|
swipeNext();
|
|
25146
|
-
}
|
|
24864
|
+
}
|
|
24865
|
+
interval = window.setTimeout(tick, autoplayInterval);
|
|
25147
24866
|
return () => {
|
|
25148
|
-
|
|
24867
|
+
if (interval)
|
|
24868
|
+
window.clearTimeout(interval);
|
|
25149
24869
|
};
|
|
25150
24870
|
}, [autoplay, autoplayInterval, dragging, count]);
|
|
25151
24871
|
function renderTrackInner() {
|
|
@@ -25184,6 +24904,15 @@ const Swiper = forwardRef(staged_1((p, ref) => {
|
|
|
25184
24904
|
"--slide-size": `${props.slideSize}%`,
|
|
25185
24905
|
"--track-offset": `${props.trackOffset}%`
|
|
25186
24906
|
};
|
|
24907
|
+
const dragProps = Object.assign({}, props.allowTouchMove ? bind() : {});
|
|
24908
|
+
const stopPropagationProps = {};
|
|
24909
|
+
for (const key of props.stopPropagation) {
|
|
24910
|
+
const prop = eventToPropRecord[key];
|
|
24911
|
+
stopPropagationProps[prop] = function(e) {
|
|
24912
|
+
e.stopPropagation();
|
|
24913
|
+
};
|
|
24914
|
+
}
|
|
24915
|
+
const mergedProps = mergeFuncProps(dragProps, stopPropagationProps);
|
|
25187
24916
|
return withNativeProps(props, React__default.createElement("div", {
|
|
25188
24917
|
className: classNames(classPrefix$a, `${classPrefix$a}-${props.direction}`),
|
|
25189
24918
|
style
|
|
@@ -25198,7 +24927,7 @@ const Swiper = forwardRef(staged_1((p, ref) => {
|
|
|
25198
24927
|
}
|
|
25199
24928
|
forceCancelDrag();
|
|
25200
24929
|
}
|
|
25201
|
-
},
|
|
24930
|
+
}, mergedProps), renderTrackInner()), props.indicator === void 0 ? React__default.createElement("div", {
|
|
25202
24931
|
className: `${classPrefix$a}-indicator`
|
|
25203
24932
|
}, React__default.createElement(PageIndicator, Object.assign({}, props.indicatorProps, {
|
|
25204
24933
|
total: count,
|
|
@@ -25253,7 +24982,7 @@ const Switch$1 = (p) => {
|
|
|
25253
24982
|
onChange: props.onChange
|
|
25254
24983
|
});
|
|
25255
24984
|
function onClick() {
|
|
25256
|
-
return __awaiter
|
|
24985
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
25257
24986
|
if (disabled || props.loading || changing) {
|
|
25258
24987
|
return;
|
|
25259
24988
|
}
|
|
@@ -25437,6 +25166,7 @@ const TextArea$1 = forwardRef((p, ref) => {
|
|
|
25437
25166
|
devError("TextArea", "`value` prop on `TextArea` should not be `null`. Consider using an empty string to clear the component.");
|
|
25438
25167
|
}
|
|
25439
25168
|
const nativeTextAreaRef = useRef(null);
|
|
25169
|
+
const heightRef = useRef("auto");
|
|
25440
25170
|
useImperativeHandle(ref, () => ({
|
|
25441
25171
|
clear: () => {
|
|
25442
25172
|
setValue2("");
|
|
@@ -25459,7 +25189,7 @@ const TextArea$1 = forwardRef((p, ref) => {
|
|
|
25459
25189
|
const textArea2 = nativeTextAreaRef.current;
|
|
25460
25190
|
if (!textArea2)
|
|
25461
25191
|
return;
|
|
25462
|
-
textArea2.style.height =
|
|
25192
|
+
textArea2.style.height = heightRef.current;
|
|
25463
25193
|
let height = textArea2.scrollHeight;
|
|
25464
25194
|
if (typeof autoSize === "object") {
|
|
25465
25195
|
const computedStyle = window.getComputedStyle(textArea2);
|
|
@@ -25471,6 +25201,7 @@ const TextArea$1 = forwardRef((p, ref) => {
|
|
|
25471
25201
|
height = Math.min(height, autoSize.maxRows * lineHeight);
|
|
25472
25202
|
}
|
|
25473
25203
|
}
|
|
25204
|
+
heightRef.current = `${height}px`;
|
|
25474
25205
|
textArea2.style.height = `${height}px`;
|
|
25475
25206
|
}, [value, autoSize]);
|
|
25476
25207
|
const compositingRef = useRef(false);
|
|
@@ -26205,7 +25936,7 @@ const Footer$1 = (p) => {
|
|
|
26205
25936
|
className: classNames(classPrefix)
|
|
26206
25937
|
}, label && React__default.createElement("div", {
|
|
26207
25938
|
className: `${classPrefix}-label`
|
|
26208
|
-
}, React__default.createElement(Divider
|
|
25939
|
+
}, React__default.createElement(Divider, null, label)), links && links.length > 0 && React__default.createElement("div", {
|
|
26209
25940
|
className: `${classPrefix}-links`
|
|
26210
25941
|
}, links.map((link, index2) => {
|
|
26211
25942
|
return React__default.createElement(React__default.Fragment, {
|
|
@@ -26214,7 +25945,7 @@ const Footer$1 = (p) => {
|
|
|
26214
25945
|
href: link.href,
|
|
26215
25946
|
rel: "noopener noreferrer",
|
|
26216
25947
|
onClick: (event) => clickLinkItem(link, index2, event)
|
|
26217
|
-
}, link.text), index2 !== links.length - 1 && React__default.createElement(Divider
|
|
25948
|
+
}, link.text), index2 !== links.length - 1 && React__default.createElement(Divider, {
|
|
26218
25949
|
direction: "vertical"
|
|
26219
25950
|
}));
|
|
26220
25951
|
})), content && React__default.createElement("div", {
|