@amateescu/portal-ui-components 0.0.34 → 0.0.37
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/README.md +113 -0
- package/dist/{Button-xgiLW4_3.js → Button-BM72-1G6.js} +107 -106
- package/dist/ButtonBase-D6nf3ymf.js +990 -0
- package/dist/{CircularProgress-Dq_bUtxt.js → CircularProgress-BlQFR6DW.js} +107 -80
- package/dist/Clear-BauR3cPE.js +8 -0
- package/dist/DefaultPropsProvider-BtPfTrMq.js +3449 -0
- package/dist/UserInfoDropdown-rBF0pwlq.js +23 -0
- package/dist/assets/KpiCard.css +1 -1
- package/dist/assets/PassportConfirmationModal.css +1 -0
- package/dist/assets/PassportErrorModal.css +1 -0
- package/dist/assets/PassportKpiCard.css +1 -0
- package/dist/assets/PassportTabHeader.css +1 -0
- package/dist/assets/index.css +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts +2 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.d.ts.map +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.js +10 -2
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.d.ts.map +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.types.d.ts +1 -0
- package/dist/components/ConfirmationModal/ConfirmationModal.types.d.ts.map +1 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.d.ts +3 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.d.ts.map +1 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.js +31 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.stories.d.ts +23 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.stories.d.ts.map +1 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.types.d.ts +8 -0
- package/dist/components/DebouncedPassportInput/DebouncedPassportInput.types.d.ts.map +1 -0
- package/dist/components/ErrorModal/ErrorModal.d.ts +2 -1
- package/dist/components/ErrorModal/ErrorModal.d.ts.map +1 -0
- package/dist/components/ErrorModal/ErrorModal.js +11 -5
- package/dist/components/ErrorModal/ErrorModal.stories.d.ts +1 -0
- package/dist/components/ErrorModal/ErrorModal.stories.d.ts.map +1 -0
- package/dist/components/ErrorModal/ErrorModal.types.d.ts +1 -0
- package/dist/components/ErrorModal/ErrorModal.types.d.ts.map +1 -0
- package/dist/components/InfoModal/InfoModal.d.ts +2 -1
- package/dist/components/InfoModal/InfoModal.d.ts.map +1 -0
- package/dist/components/InfoModal/InfoModal.js +15 -3
- package/dist/components/InfoModal/InfoModal.stories.d.ts +1 -0
- package/dist/components/InfoModal/InfoModal.stories.d.ts.map +1 -0
- package/dist/components/InfoModal/InfoModal.types.d.ts +1 -0
- package/dist/components/InfoModal/InfoModal.types.d.ts.map +1 -0
- package/dist/components/KpiCard/KpiCard.d.ts +1 -0
- package/dist/components/KpiCard/KpiCard.d.ts.map +1 -0
- package/dist/components/KpiCard/KpiCard.js +29 -2401
- package/dist/components/KpiCard/KpiCard.stories.d.ts +1 -0
- package/dist/components/KpiCard/KpiCard.stories.d.ts.map +1 -0
- package/dist/components/KpiCard/KpiCard.types.d.ts +1 -0
- package/dist/components/KpiCard/KpiCard.types.d.ts.map +1 -0
- package/dist/components/LoadingAnimation/LoadingAnimation.d.ts +1 -0
- package/dist/components/LoadingAnimation/LoadingAnimation.d.ts.map +1 -0
- package/dist/components/LoadingAnimation/LoadingAnimation.js +66 -6
- package/dist/components/LoadingAnimation/LoadingAnimation.stories.d.ts +1 -0
- package/dist/components/LoadingAnimation/LoadingAnimation.stories.d.ts.map +1 -0
- package/dist/components/Login/Login.d.ts +2 -1
- package/dist/components/Login/Login.d.ts.map +1 -0
- package/dist/components/Login/Login.js +43 -8870
- package/dist/components/Login/Login.stories.d.ts +3 -2
- package/dist/components/Login/Login.stories.d.ts.map +1 -0
- package/dist/components/Login/Login.types.d.ts +1 -0
- package/dist/components/Login/Login.types.d.ts.map +1 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.d.ts +3 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.d.ts.map +1 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.js +41 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.stories.d.ts +22 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.stories.d.ts.map +1 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.types.d.ts +14 -0
- package/dist/components/PassportAutocomplete/PassportAutocomplete.types.d.ts.map +1 -0
- package/dist/components/PassportButton/PassportButton.d.ts +4 -0
- package/dist/components/PassportButton/PassportButton.d.ts.map +1 -0
- package/dist/components/{CustomButton/CustomButton.js → PassportButton/PassportButton.js} +10 -6
- package/dist/components/{CustomButton/CustomButton.stories.d.ts → PassportButton/PassportButton.stories.d.ts} +2 -1
- package/dist/components/PassportButton/PassportButton.stories.d.ts.map +1 -0
- package/dist/components/PassportButton/PassportButton.types.d.ts +9 -0
- package/dist/components/PassportButton/PassportButton.types.d.ts.map +1 -0
- package/dist/components/PassportConfirmationModal/PassportConfirmationModal.d.ts +9 -0
- package/dist/components/PassportConfirmationModal/PassportConfirmationModal.d.ts.map +1 -0
- package/dist/components/PassportConfirmationModal/PassportConfirmationModal.js +108 -0
- package/dist/components/{KpiWrapper/KpiWrapper.stories.d.ts → PassportConfirmationModal/PassportConfirmationModal.stories.d.ts} +5 -8
- package/dist/components/PassportConfirmationModal/PassportConfirmationModal.stories.d.ts.map +1 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.d.ts +3 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.d.ts.map +1 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.js +1514 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.stories.d.ts +25 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.stories.d.ts.map +1 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.types.d.ts +15 -0
- package/dist/components/PassportDatePicker/PassportDatePicker.types.d.ts.map +1 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.d.ts +3 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.d.ts.map +1 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.js +5419 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.stories.d.ts +30 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.stories.d.ts.map +1 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.d.ts +16 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.d.ts.map +1 -0
- package/dist/components/PassportDateTimePicker/PassportDateTimePicker.types.js +1 -0
- package/dist/components/PassportDropdown/PassportDropdown.d.ts +3 -0
- package/dist/components/PassportDropdown/PassportDropdown.d.ts.map +1 -0
- package/dist/components/PassportDropdown/PassportDropdown.js +37 -0
- package/dist/components/PassportDropdown/PassportDropdown.stories.d.ts +25 -0
- package/dist/components/PassportDropdown/PassportDropdown.stories.d.ts.map +1 -0
- package/dist/components/PassportDropdown/PassportDropdown.types.d.ts +14 -0
- package/dist/components/PassportDropdown/PassportDropdown.types.d.ts.map +1 -0
- package/dist/components/PassportDropdown/PassportDropdown.types.js +1 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.d.ts +8 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.d.ts.map +1 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.js +68 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.stories.d.ts +19 -0
- package/dist/components/PassportErrorModal/PassportErrorModal.stories.d.ts.map +1 -0
- package/dist/components/PassportFooter/PassportFooter.d.ts +3 -0
- package/dist/components/PassportFooter/PassportFooter.d.ts.map +1 -0
- package/dist/components/PassportFooter/PassportFooter.js +46 -0
- package/dist/components/{CustomFooter/CustomFooter.stories.d.ts → PassportFooter/PassportFooter.stories.d.ts} +1 -0
- package/dist/components/PassportFooter/PassportFooter.stories.d.ts.map +1 -0
- package/dist/components/{CustomFooter/CustomFooter.types.d.ts → PassportFooter/PassportFooter.types.d.ts} +3 -2
- package/dist/components/PassportFooter/PassportFooter.types.d.ts.map +1 -0
- package/dist/components/PassportFooter/PassportFooter.types.js +1 -0
- package/dist/components/PassportInput/PassportInput.d.ts +3 -0
- package/dist/components/PassportInput/PassportInput.d.ts.map +1 -0
- package/dist/components/PassportInput/PassportInput.js +51 -0
- package/dist/components/PassportInput/PassportInput.stories.d.ts +24 -0
- package/dist/components/PassportInput/PassportInput.stories.d.ts.map +1 -0
- package/dist/components/PassportInput/PassportInput.types.d.ts +9 -0
- package/dist/components/PassportInput/PassportInput.types.d.ts.map +1 -0
- package/dist/components/PassportInput/PassportInput.types.js +1 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.d.ts +3 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.d.ts.map +1 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.js +43 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.stories.d.ts +21 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.stories.d.ts.map +1 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.types.d.ts +11 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.types.d.ts.map +1 -0
- package/dist/components/PassportKpiCard/PassportKpiCard.types.js +1 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.d.ts +3 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.d.ts.map +1 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.js +22 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.stories.d.ts +23 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.stories.d.ts.map +1 -0
- package/dist/components/{KpiWrapper/KpiWrapper.types.d.ts → PassportKpiWrapper/PassportKpiWrapper.types.d.ts} +2 -1
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.types.d.ts.map +1 -0
- package/dist/components/PassportKpiWrapper/PassportKpiWrapper.types.js +1 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.d.ts +3 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.d.ts.map +1 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.js +72 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.stories.d.ts +24 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.stories.d.ts.map +1 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.types.d.ts +12 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.types.d.ts.map +1 -0
- package/dist/components/PassportMultiSelect/PassportMultiSelect.types.js +1 -0
- package/dist/components/PassportPagination/PassportPagination.d.ts +3 -0
- package/dist/components/PassportPagination/PassportPagination.d.ts.map +1 -0
- package/dist/components/{CustomPagination/CustomPagination.js → PassportPagination/PassportPagination.js} +215 -218
- package/dist/components/{CustomPagination/CustomPagination.stories.d.ts → PassportPagination/PassportPagination.stories.d.ts} +3 -2
- package/dist/components/PassportPagination/PassportPagination.stories.d.ts.map +1 -0
- package/dist/components/{CustomPagination/CustomPagination.types.d.ts → PassportPagination/PassportPagination.types.d.ts} +2 -1
- package/dist/components/PassportPagination/PassportPagination.types.d.ts.map +1 -0
- package/dist/components/PassportPagination/PassportPagination.types.js +1 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.d.ts +7 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.d.ts.map +1 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.js +14 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.stories.d.ts +21 -0
- package/dist/components/PassportTabHeader/PassportTabHeader.stories.d.ts.map +1 -0
- package/dist/components/PassportTextField/PassportTextField.d.ts +3 -0
- package/dist/components/PassportTextField/PassportTextField.d.ts.map +1 -0
- package/dist/components/PassportTextField/PassportTextField.js +23 -0
- package/dist/components/PassportTextField/PassportTextField.stories.d.ts +22 -0
- package/dist/components/PassportTextField/PassportTextField.stories.d.ts.map +1 -0
- package/dist/components/SideMenu/SideMenu.d.ts +1 -0
- package/dist/components/SideMenu/SideMenu.d.ts.map +1 -0
- package/dist/components/SideMenu/SideMenu.js +89 -41
- package/dist/components/SideMenu/SideMenu.stories.d.ts +1 -0
- package/dist/components/SideMenu/SideMenu.stories.d.ts.map +1 -0
- package/dist/components/SideMenu/SideMenu.types.d.ts +1 -0
- package/dist/components/SideMenu/SideMenu.types.d.ts.map +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.d.ts +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.d.ts.map +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.js +3 -3
- package/dist/components/TotalDataGrid/TotalDataGrid.stories.d.ts +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.stories.d.ts.map +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.types.d.ts +1 -0
- package/dist/components/TotalDataGrid/TotalDataGrid.types.d.ts.map +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.d.ts +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.d.ts.map +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.js +3 -2
- package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.d.ts +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.d.ts.map +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.types.d.ts +1 -0
- package/dist/components/UserInfoDropdown/UserInfoDropdown.types.d.ts.map +1 -0
- package/dist/components/index.d.ts +17 -4
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +51 -28
- package/dist/createSimplePaletteValueFilter-Bz8RuRaa.js +23 -0
- package/dist/{createSvgIcon-CgFXfzFk.js → createSvgIcon-B-eIQ7rU.js} +118 -124
- package/dist/extendSxProp-QNe1Nf_s.js +51 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +67 -44
- package/dist/mock.d.ts +1 -0
- package/dist/mock.d.ts.map +1 -0
- package/dist/portal-utils/chunkArray.d.ts +1 -0
- package/dist/portal-utils/chunkArray.d.ts.map +1 -0
- package/dist/portal-utils/cn.d.ts +1 -0
- package/dist/portal-utils/cn.d.ts.map +1 -0
- package/dist/portal-utils/formatters.d.ts +1 -0
- package/dist/portal-utils/formatters.d.ts.map +1 -0
- package/dist/portal-utils/formatters.js +291 -334
- package/dist/portal-utils/index.d.ts +2 -1
- package/dist/portal-utils/index.d.ts.map +1 -0
- package/dist/portal-utils/loggerService.d.ts +1 -0
- package/dist/portal-utils/loggerService.d.ts.map +1 -0
- package/dist/portal-utils/pageCount.d.ts +1 -0
- package/dist/portal-utils/pageCount.d.ts.map +1 -0
- package/dist/types/BusinessDayRange.d.ts +1 -0
- package/dist/types/BusinessDayRange.d.ts.map +1 -0
- package/dist/types/Column.d.ts +1 -0
- package/dist/types/Column.d.ts.map +1 -0
- package/dist/types/CultureStore.d.ts +1 -0
- package/dist/types/CultureStore.d.ts.map +1 -0
- package/dist/types/CustomSvg.d.ts +1 -0
- package/dist/types/CustomSvg.d.ts.map +1 -0
- package/dist/types/LoginRequest.d.ts +1 -0
- package/dist/types/LoginRequest.d.ts.map +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/useMobilePicker-hk2kq6ev.js +19662 -0
- package/dist/useSlot-CXnK24LX.js +189 -0
- package/package.json +43 -42
- package/dist/Box-D-aleOLf.js +0 -102
- package/dist/ButtonBase-DUKuDCWw.js +0 -966
- package/dist/EllipsisOutlined-CmR4hXJ_.js +0 -2467
- package/dist/InvencoGVR-qnTq-d6S.js +0 -5
- package/dist/PurePanel-CykVuv66.js +0 -2213
- package/dist/Skeleton-BBwDqRB3.js +0 -568
- package/dist/UserInfoDropdown-Bf6STdbW.js +0 -3790
- package/dist/_commonjsHelpers-C6fGbg64.js +0 -6
- package/dist/assets/globals.css +0 -1
- package/dist/components/ConfirmationModal/ConfirmationModal.stories.js +0 -36
- package/dist/components/CustomButton/CustomButton.d.ts +0 -3
- package/dist/components/CustomButton/CustomButton.stories.js +0 -42
- package/dist/components/CustomButton/CustomeButton.types.d.ts +0 -8
- package/dist/components/CustomFooter/CustomFooter.d.ts +0 -2
- package/dist/components/CustomFooter/CustomFooter.js +0 -32
- package/dist/components/CustomFooter/CustomFooter.stories.js +0 -40
- package/dist/components/CustomPagination/CustomPagination.d.ts +0 -3
- package/dist/components/CustomPagination/CustomPagination.stories.js +0 -25
- package/dist/components/ErrorModal/ErrorModal.stories.js +0 -33
- package/dist/components/InfoModal/InfoModal.stories.js +0 -33
- package/dist/components/KpiCard/KpiCard.stories.js +0 -26
- package/dist/components/KpiWrapper/KpiWrapper.d.ts +0 -2
- package/dist/components/KpiWrapper/KpiWrapper.js +0 -11
- package/dist/components/KpiWrapper/KpiWrapper.stories.js +0 -56
- package/dist/components/LoadingAnimation/LoadingAnimation.stories.js +0 -14
- package/dist/components/Login/Login.stories.js +0 -24209
- package/dist/components/SideMenu/SideMenu.stories.js +0 -81
- package/dist/components/TotalDataGrid/TotalDataGrid.stories.js +0 -23
- package/dist/components/UserInfoDropdown/UserInfoDropdown.stories.js +0 -36
- package/dist/context-4ttylmIf.js +0 -7356
- package/dist/createSimplePaletteValueFilter-evt-Xthj.js +0 -3444
- package/dist/index-BBBjHj3B.js +0 -411
- package/dist/index-Dz00OoV7.js +0 -1687
- package/dist/objectWithoutPropertiesLoose-BTau6TOn.js +0 -33
- package/dist/useSlot-Baxtq84W.js +0 -188
- /package/dist/assets/{CustomFooter.css → PassportFooter.css} +0 -0
- /package/dist/assets/{KpiWrapper.css → PassportKpiWrapper.css} +0 -0
- /package/dist/components/{CustomButton/CustomeButton.types.js → DebouncedPassportInput/DebouncedPassportInput.types.js} +0 -0
- /package/dist/components/{CustomFooter/CustomFooter.types.js → PassportAutocomplete/PassportAutocomplete.types.js} +0 -0
- /package/dist/components/{CustomPagination/CustomPagination.types.js → PassportButton/PassportButton.types.js} +0 -0
- /package/dist/components/{KpiWrapper/KpiWrapper.types.js → PassportDatePicker/PassportDatePicker.types.js} +0 -0
|
@@ -1,2467 +0,0 @@
|
|
|
1
|
-
import { a6 as Tr, a7 as Lr, a8 as Ar, a9 as $r, a3 as $n, a4 as zn, n as ur, e as T, ag as Gn, h as zr, x as Vr, M as Zn, K as Lt, H as ba, p as De, c as ke, w as Ht, _ as k, k as Kt, ah as it, q as cr, a2 as fr, ai as pa, aj as Qn, a5 as Wr, l as Rt, ak as Yn, N as Ca, P as Fr, j as st, i as he, al as wa, am as Hr, r as un, s as Dn, o as vr, I as Ma } from "./context-4ttylmIf.js";
|
|
2
|
-
import * as a from "react";
|
|
3
|
-
import qe, { useState as Jn, useMemo as Xn, useCallback as Tt, forwardRef as Ra, useRef as xn, useImperativeHandle as Ea } from "react";
|
|
4
|
-
import { _ as ae } from "./objectWithoutPropertiesLoose-BTau6TOn.js";
|
|
5
|
-
import { r as Br } from "./index-BBBjHj3B.js";
|
|
6
|
-
var er = /* @__PURE__ */ a.createContext(null);
|
|
7
|
-
function Sa(e) {
|
|
8
|
-
var n = e.children, t = e.onBatchResize, r = a.useRef(0), i = a.useRef([]), o = a.useContext(er), s = a.useCallback(function(l, u, c) {
|
|
9
|
-
r.current += 1;
|
|
10
|
-
var b = r.current;
|
|
11
|
-
i.current.push({
|
|
12
|
-
size: l,
|
|
13
|
-
element: u,
|
|
14
|
-
data: c
|
|
15
|
-
}), Promise.resolve().then(function() {
|
|
16
|
-
b === r.current && (t == null || t(i.current), i.current = []);
|
|
17
|
-
}), o == null || o(l, u, c);
|
|
18
|
-
}, [t, o]);
|
|
19
|
-
return /* @__PURE__ */ a.createElement(er.Provider, {
|
|
20
|
-
value: s
|
|
21
|
-
}, n);
|
|
22
|
-
}
|
|
23
|
-
var Ur = function() {
|
|
24
|
-
if (typeof Map < "u")
|
|
25
|
-
return Map;
|
|
26
|
-
function e(n, t) {
|
|
27
|
-
var r = -1;
|
|
28
|
-
return n.some(function(i, o) {
|
|
29
|
-
return i[0] === t ? (r = o, !0) : !1;
|
|
30
|
-
}), r;
|
|
31
|
-
}
|
|
32
|
-
return (
|
|
33
|
-
/** @class */
|
|
34
|
-
function() {
|
|
35
|
-
function n() {
|
|
36
|
-
this.__entries__ = [];
|
|
37
|
-
}
|
|
38
|
-
return Object.defineProperty(n.prototype, "size", {
|
|
39
|
-
/**
|
|
40
|
-
* @returns {boolean}
|
|
41
|
-
*/
|
|
42
|
-
get: function() {
|
|
43
|
-
return this.__entries__.length;
|
|
44
|
-
},
|
|
45
|
-
enumerable: !0,
|
|
46
|
-
configurable: !0
|
|
47
|
-
}), n.prototype.get = function(t) {
|
|
48
|
-
var r = e(this.__entries__, t), i = this.__entries__[r];
|
|
49
|
-
return i && i[1];
|
|
50
|
-
}, n.prototype.set = function(t, r) {
|
|
51
|
-
var i = e(this.__entries__, t);
|
|
52
|
-
~i ? this.__entries__[i][1] = r : this.__entries__.push([t, r]);
|
|
53
|
-
}, n.prototype.delete = function(t) {
|
|
54
|
-
var r = this.__entries__, i = e(r, t);
|
|
55
|
-
~i && r.splice(i, 1);
|
|
56
|
-
}, n.prototype.has = function(t) {
|
|
57
|
-
return !!~e(this.__entries__, t);
|
|
58
|
-
}, n.prototype.clear = function() {
|
|
59
|
-
this.__entries__.splice(0);
|
|
60
|
-
}, n.prototype.forEach = function(t, r) {
|
|
61
|
-
r === void 0 && (r = null);
|
|
62
|
-
for (var i = 0, o = this.__entries__; i < o.length; i++) {
|
|
63
|
-
var s = o[i];
|
|
64
|
-
t.call(r, s[1], s[0]);
|
|
65
|
-
}
|
|
66
|
-
}, n;
|
|
67
|
-
}()
|
|
68
|
-
);
|
|
69
|
-
}(), tr = typeof window < "u" && typeof document < "u" && window.document === document, Kn = function() {
|
|
70
|
-
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
71
|
-
}(), Pa = function() {
|
|
72
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(Kn) : function(e) {
|
|
73
|
-
return setTimeout(function() {
|
|
74
|
-
return e(Date.now());
|
|
75
|
-
}, 1e3 / 60);
|
|
76
|
-
};
|
|
77
|
-
}(), Na = 2;
|
|
78
|
-
function _a(e, n) {
|
|
79
|
-
var t = !1, r = !1, i = 0;
|
|
80
|
-
function o() {
|
|
81
|
-
t && (t = !1, e()), r && l();
|
|
82
|
-
}
|
|
83
|
-
function s() {
|
|
84
|
-
Pa(o);
|
|
85
|
-
}
|
|
86
|
-
function l() {
|
|
87
|
-
var u = Date.now();
|
|
88
|
-
if (t) {
|
|
89
|
-
if (u - i < Na)
|
|
90
|
-
return;
|
|
91
|
-
r = !0;
|
|
92
|
-
} else
|
|
93
|
-
t = !0, r = !1, setTimeout(s, n);
|
|
94
|
-
i = u;
|
|
95
|
-
}
|
|
96
|
-
return l;
|
|
97
|
-
}
|
|
98
|
-
var Ia = 20, xa = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], Da = typeof MutationObserver < "u", ka = (
|
|
99
|
-
/** @class */
|
|
100
|
-
function() {
|
|
101
|
-
function e() {
|
|
102
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = _a(this.refresh.bind(this), Ia);
|
|
103
|
-
}
|
|
104
|
-
return e.prototype.addObserver = function(n) {
|
|
105
|
-
~this.observers_.indexOf(n) || this.observers_.push(n), this.connected_ || this.connect_();
|
|
106
|
-
}, e.prototype.removeObserver = function(n) {
|
|
107
|
-
var t = this.observers_, r = t.indexOf(n);
|
|
108
|
-
~r && t.splice(r, 1), !t.length && this.connected_ && this.disconnect_();
|
|
109
|
-
}, e.prototype.refresh = function() {
|
|
110
|
-
var n = this.updateObservers_();
|
|
111
|
-
n && this.refresh();
|
|
112
|
-
}, e.prototype.updateObservers_ = function() {
|
|
113
|
-
var n = this.observers_.filter(function(t) {
|
|
114
|
-
return t.gatherActive(), t.hasActive();
|
|
115
|
-
});
|
|
116
|
-
return n.forEach(function(t) {
|
|
117
|
-
return t.broadcastActive();
|
|
118
|
-
}), n.length > 0;
|
|
119
|
-
}, e.prototype.connect_ = function() {
|
|
120
|
-
!tr || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), Da ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
121
|
-
attributes: !0,
|
|
122
|
-
childList: !0,
|
|
123
|
-
characterData: !0,
|
|
124
|
-
subtree: !0
|
|
125
|
-
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
126
|
-
}, e.prototype.disconnect_ = function() {
|
|
127
|
-
!tr || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
128
|
-
}, e.prototype.onTransitionEnd_ = function(n) {
|
|
129
|
-
var t = n.propertyName, r = t === void 0 ? "" : t, i = xa.some(function(o) {
|
|
130
|
-
return !!~r.indexOf(o);
|
|
131
|
-
});
|
|
132
|
-
i && this.refresh();
|
|
133
|
-
}, e.getInstance = function() {
|
|
134
|
-
return this.instance_ || (this.instance_ = new e()), this.instance_;
|
|
135
|
-
}, e.instance_ = null, e;
|
|
136
|
-
}()
|
|
137
|
-
), jr = function(e, n) {
|
|
138
|
-
for (var t = 0, r = Object.keys(n); t < r.length; t++) {
|
|
139
|
-
var i = r[t];
|
|
140
|
-
Object.defineProperty(e, i, {
|
|
141
|
-
value: n[i],
|
|
142
|
-
enumerable: !1,
|
|
143
|
-
writable: !1,
|
|
144
|
-
configurable: !0
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
return e;
|
|
148
|
-
}, ln = function(e) {
|
|
149
|
-
var n = e && e.ownerDocument && e.ownerDocument.defaultView;
|
|
150
|
-
return n || Kn;
|
|
151
|
-
}, qr = Vn(0, 0, 0, 0);
|
|
152
|
-
function Tn(e) {
|
|
153
|
-
return parseFloat(e) || 0;
|
|
154
|
-
}
|
|
155
|
-
function wr(e) {
|
|
156
|
-
for (var n = [], t = 1; t < arguments.length; t++)
|
|
157
|
-
n[t - 1] = arguments[t];
|
|
158
|
-
return n.reduce(function(r, i) {
|
|
159
|
-
var o = e["border-" + i + "-width"];
|
|
160
|
-
return r + Tn(o);
|
|
161
|
-
}, 0);
|
|
162
|
-
}
|
|
163
|
-
function Oa(e) {
|
|
164
|
-
for (var n = ["top", "right", "bottom", "left"], t = {}, r = 0, i = n; r < i.length; r++) {
|
|
165
|
-
var o = i[r], s = e["padding-" + o];
|
|
166
|
-
t[o] = Tn(s);
|
|
167
|
-
}
|
|
168
|
-
return t;
|
|
169
|
-
}
|
|
170
|
-
function Ka(e) {
|
|
171
|
-
var n = e.getBBox();
|
|
172
|
-
return Vn(0, 0, n.width, n.height);
|
|
173
|
-
}
|
|
174
|
-
function Ta(e) {
|
|
175
|
-
var n = e.clientWidth, t = e.clientHeight;
|
|
176
|
-
if (!n && !t)
|
|
177
|
-
return qr;
|
|
178
|
-
var r = ln(e).getComputedStyle(e), i = Oa(r), o = i.left + i.right, s = i.top + i.bottom, l = Tn(r.width), u = Tn(r.height);
|
|
179
|
-
if (r.boxSizing === "border-box" && (Math.round(l + o) !== n && (l -= wr(r, "left", "right") + o), Math.round(u + s) !== t && (u -= wr(r, "top", "bottom") + s)), !Aa(e)) {
|
|
180
|
-
var c = Math.round(l + o) - n, b = Math.round(u + s) - t;
|
|
181
|
-
Math.abs(c) !== 1 && (l -= c), Math.abs(b) !== 1 && (u -= b);
|
|
182
|
-
}
|
|
183
|
-
return Vn(i.left, i.top, l, u);
|
|
184
|
-
}
|
|
185
|
-
var La = /* @__PURE__ */ function() {
|
|
186
|
-
return typeof SVGGraphicsElement < "u" ? function(e) {
|
|
187
|
-
return e instanceof ln(e).SVGGraphicsElement;
|
|
188
|
-
} : function(e) {
|
|
189
|
-
return e instanceof ln(e).SVGElement && typeof e.getBBox == "function";
|
|
190
|
-
};
|
|
191
|
-
}();
|
|
192
|
-
function Aa(e) {
|
|
193
|
-
return e === ln(e).document.documentElement;
|
|
194
|
-
}
|
|
195
|
-
function $a(e) {
|
|
196
|
-
return tr ? La(e) ? Ka(e) : Ta(e) : qr;
|
|
197
|
-
}
|
|
198
|
-
function za(e) {
|
|
199
|
-
var n = e.x, t = e.y, r = e.width, i = e.height, o = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, s = Object.create(o.prototype);
|
|
200
|
-
return jr(s, {
|
|
201
|
-
x: n,
|
|
202
|
-
y: t,
|
|
203
|
-
width: r,
|
|
204
|
-
height: i,
|
|
205
|
-
top: t,
|
|
206
|
-
right: n + r,
|
|
207
|
-
bottom: i + t,
|
|
208
|
-
left: n
|
|
209
|
-
}), s;
|
|
210
|
-
}
|
|
211
|
-
function Vn(e, n, t, r) {
|
|
212
|
-
return { x: e, y: n, width: t, height: r };
|
|
213
|
-
}
|
|
214
|
-
var Va = (
|
|
215
|
-
/** @class */
|
|
216
|
-
function() {
|
|
217
|
-
function e(n) {
|
|
218
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = Vn(0, 0, 0, 0), this.target = n;
|
|
219
|
-
}
|
|
220
|
-
return e.prototype.isActive = function() {
|
|
221
|
-
var n = $a(this.target);
|
|
222
|
-
return this.contentRect_ = n, n.width !== this.broadcastWidth || n.height !== this.broadcastHeight;
|
|
223
|
-
}, e.prototype.broadcastRect = function() {
|
|
224
|
-
var n = this.contentRect_;
|
|
225
|
-
return this.broadcastWidth = n.width, this.broadcastHeight = n.height, n;
|
|
226
|
-
}, e;
|
|
227
|
-
}()
|
|
228
|
-
), Wa = (
|
|
229
|
-
/** @class */
|
|
230
|
-
/* @__PURE__ */ function() {
|
|
231
|
-
function e(n, t) {
|
|
232
|
-
var r = za(t);
|
|
233
|
-
jr(this, { target: n, contentRect: r });
|
|
234
|
-
}
|
|
235
|
-
return e;
|
|
236
|
-
}()
|
|
237
|
-
), Fa = (
|
|
238
|
-
/** @class */
|
|
239
|
-
function() {
|
|
240
|
-
function e(n, t, r) {
|
|
241
|
-
if (this.activeObservations_ = [], this.observations_ = new Ur(), typeof n != "function")
|
|
242
|
-
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
243
|
-
this.callback_ = n, this.controller_ = t, this.callbackCtx_ = r;
|
|
244
|
-
}
|
|
245
|
-
return e.prototype.observe = function(n) {
|
|
246
|
-
if (!arguments.length)
|
|
247
|
-
throw new TypeError("1 argument required, but only 0 present.");
|
|
248
|
-
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
249
|
-
if (!(n instanceof ln(n).Element))
|
|
250
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
251
|
-
var t = this.observations_;
|
|
252
|
-
t.has(n) || (t.set(n, new Va(n)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
253
|
-
}
|
|
254
|
-
}, e.prototype.unobserve = function(n) {
|
|
255
|
-
if (!arguments.length)
|
|
256
|
-
throw new TypeError("1 argument required, but only 0 present.");
|
|
257
|
-
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
258
|
-
if (!(n instanceof ln(n).Element))
|
|
259
|
-
throw new TypeError('parameter 1 is not of type "Element".');
|
|
260
|
-
var t = this.observations_;
|
|
261
|
-
t.has(n) && (t.delete(n), t.size || this.controller_.removeObserver(this));
|
|
262
|
-
}
|
|
263
|
-
}, e.prototype.disconnect = function() {
|
|
264
|
-
this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);
|
|
265
|
-
}, e.prototype.gatherActive = function() {
|
|
266
|
-
var n = this;
|
|
267
|
-
this.clearActive(), this.observations_.forEach(function(t) {
|
|
268
|
-
t.isActive() && n.activeObservations_.push(t);
|
|
269
|
-
});
|
|
270
|
-
}, e.prototype.broadcastActive = function() {
|
|
271
|
-
if (this.hasActive()) {
|
|
272
|
-
var n = this.callbackCtx_, t = this.activeObservations_.map(function(r) {
|
|
273
|
-
return new Wa(r.target, r.broadcastRect());
|
|
274
|
-
});
|
|
275
|
-
this.callback_.call(n, t, n), this.clearActive();
|
|
276
|
-
}
|
|
277
|
-
}, e.prototype.clearActive = function() {
|
|
278
|
-
this.activeObservations_.splice(0);
|
|
279
|
-
}, e.prototype.hasActive = function() {
|
|
280
|
-
return this.activeObservations_.length > 0;
|
|
281
|
-
}, e;
|
|
282
|
-
}()
|
|
283
|
-
), Gr = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new Ur(), Jr = (
|
|
284
|
-
/** @class */
|
|
285
|
-
/* @__PURE__ */ function() {
|
|
286
|
-
function e(n) {
|
|
287
|
-
if (!(this instanceof e))
|
|
288
|
-
throw new TypeError("Cannot call a class as a function.");
|
|
289
|
-
if (!arguments.length)
|
|
290
|
-
throw new TypeError("1 argument required, but only 0 present.");
|
|
291
|
-
var t = ka.getInstance(), r = new Fa(n, t, this);
|
|
292
|
-
Gr.set(this, r);
|
|
293
|
-
}
|
|
294
|
-
return e;
|
|
295
|
-
}()
|
|
296
|
-
);
|
|
297
|
-
[
|
|
298
|
-
"observe",
|
|
299
|
-
"unobserve",
|
|
300
|
-
"disconnect"
|
|
301
|
-
].forEach(function(e) {
|
|
302
|
-
Jr.prototype[e] = function() {
|
|
303
|
-
var n;
|
|
304
|
-
return (n = Gr.get(this))[e].apply(n, arguments);
|
|
305
|
-
};
|
|
306
|
-
});
|
|
307
|
-
var Ha = function() {
|
|
308
|
-
return typeof Kn.ResizeObserver < "u" ? Kn.ResizeObserver : Jr;
|
|
309
|
-
}(), wt = /* @__PURE__ */ new Map();
|
|
310
|
-
function Zr(e) {
|
|
311
|
-
e.forEach(function(n) {
|
|
312
|
-
var t, r = n.target;
|
|
313
|
-
(t = wt.get(r)) === null || t === void 0 || t.forEach(function(i) {
|
|
314
|
-
return i(r);
|
|
315
|
-
});
|
|
316
|
-
});
|
|
317
|
-
}
|
|
318
|
-
var Qr = new Ha(Zr);
|
|
319
|
-
process.env.NODE_ENV;
|
|
320
|
-
process.env.NODE_ENV;
|
|
321
|
-
function Ba(e, n) {
|
|
322
|
-
wt.has(e) || (wt.set(e, /* @__PURE__ */ new Set()), Qr.observe(e)), wt.get(e).add(n);
|
|
323
|
-
}
|
|
324
|
-
function Ua(e, n) {
|
|
325
|
-
wt.has(e) && (wt.get(e).delete(n), wt.get(e).size || (Qr.unobserve(e), wt.delete(e)));
|
|
326
|
-
}
|
|
327
|
-
var ja = /* @__PURE__ */ function(e) {
|
|
328
|
-
Tr(t, e);
|
|
329
|
-
var n = Lr(t);
|
|
330
|
-
function t() {
|
|
331
|
-
return Ar(this, t), n.apply(this, arguments);
|
|
332
|
-
}
|
|
333
|
-
return $r(t, [{
|
|
334
|
-
key: "render",
|
|
335
|
-
value: function() {
|
|
336
|
-
return this.props.children;
|
|
337
|
-
}
|
|
338
|
-
}]), t;
|
|
339
|
-
}(a.Component);
|
|
340
|
-
function qa(e, n) {
|
|
341
|
-
var t = e.children, r = e.disabled, i = a.useRef(null), o = a.useRef(null), s = a.useContext(er), l = typeof t == "function", u = l ? t(i) : t, c = a.useRef({
|
|
342
|
-
width: -1,
|
|
343
|
-
height: -1,
|
|
344
|
-
offsetWidth: -1,
|
|
345
|
-
offsetHeight: -1
|
|
346
|
-
}), b = !l && /* @__PURE__ */ a.isValidElement(u) && $n(u), f = b ? zn(u) : null, d = ur(f, i), m = function() {
|
|
347
|
-
var M;
|
|
348
|
-
return Gn(i.current) || // Support `nativeElement` format
|
|
349
|
-
(i.current && zr(i.current) === "object" ? Gn((M = i.current) === null || M === void 0 ? void 0 : M.nativeElement) : null) || Gn(o.current);
|
|
350
|
-
};
|
|
351
|
-
a.useImperativeHandle(n, function() {
|
|
352
|
-
return m();
|
|
353
|
-
});
|
|
354
|
-
var h = a.useRef(e);
|
|
355
|
-
h.current = e;
|
|
356
|
-
var E = a.useCallback(function(g) {
|
|
357
|
-
var M = h.current, S = M.onResize, y = M.data, w = g.getBoundingClientRect(), C = w.width, v = w.height, N = g.offsetWidth, O = g.offsetHeight, D = Math.floor(C), B = Math.floor(v);
|
|
358
|
-
if (c.current.width !== D || c.current.height !== B || c.current.offsetWidth !== N || c.current.offsetHeight !== O) {
|
|
359
|
-
var $ = {
|
|
360
|
-
width: D,
|
|
361
|
-
height: B,
|
|
362
|
-
offsetWidth: N,
|
|
363
|
-
offsetHeight: O
|
|
364
|
-
};
|
|
365
|
-
c.current = $;
|
|
366
|
-
var z = N === Math.round(C) ? C : N, L = O === Math.round(v) ? v : O, j = T(T({}, $), {}, {
|
|
367
|
-
offsetWidth: z,
|
|
368
|
-
offsetHeight: L
|
|
369
|
-
});
|
|
370
|
-
s == null || s(j, g, y), S && Promise.resolve().then(function() {
|
|
371
|
-
S(j, g);
|
|
372
|
-
});
|
|
373
|
-
}
|
|
374
|
-
}, []);
|
|
375
|
-
return a.useEffect(function() {
|
|
376
|
-
var g = m();
|
|
377
|
-
return g && !r && Ba(g, E), function() {
|
|
378
|
-
return Ua(g, E);
|
|
379
|
-
};
|
|
380
|
-
}, [i.current, r]), /* @__PURE__ */ a.createElement(ja, {
|
|
381
|
-
ref: o
|
|
382
|
-
}, b ? /* @__PURE__ */ a.cloneElement(u, {
|
|
383
|
-
ref: d
|
|
384
|
-
}) : u);
|
|
385
|
-
}
|
|
386
|
-
var Yr = /* @__PURE__ */ a.forwardRef(qa);
|
|
387
|
-
process.env.NODE_ENV !== "production" && (Yr.displayName = "SingleObserver");
|
|
388
|
-
var Ga = "rc-observer-key";
|
|
389
|
-
function Ja(e, n) {
|
|
390
|
-
var t = e.children, r = typeof t == "function" ? [t] : Vr(t);
|
|
391
|
-
return process.env.NODE_ENV !== "production" && (r.length > 1 ? Zn(!1, "Find more than one child node with `children` in ResizeObserver. Please use ResizeObserver.Collection instead.") : r.length === 0 && Zn(!1, "`children` of ResizeObserver is empty. Nothing is in observe.")), r.map(function(i, o) {
|
|
392
|
-
var s = (i == null ? void 0 : i.key) || "".concat(Ga, "-").concat(o);
|
|
393
|
-
return /* @__PURE__ */ a.createElement(Yr, ae({}, e, {
|
|
394
|
-
key: s,
|
|
395
|
-
ref: o === 0 ? n : void 0
|
|
396
|
-
}), i);
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
var cn = /* @__PURE__ */ a.forwardRef(Ja);
|
|
400
|
-
process.env.NODE_ENV !== "production" && (cn.displayName = "ResizeObserver");
|
|
401
|
-
cn.Collection = Sa;
|
|
402
|
-
const Za = new Lt("antSlideUpIn", {
|
|
403
|
-
"0%": {
|
|
404
|
-
transform: "scaleY(0.8)",
|
|
405
|
-
transformOrigin: "0% 0%",
|
|
406
|
-
opacity: 0
|
|
407
|
-
},
|
|
408
|
-
"100%": {
|
|
409
|
-
transform: "scaleY(1)",
|
|
410
|
-
transformOrigin: "0% 0%",
|
|
411
|
-
opacity: 1
|
|
412
|
-
}
|
|
413
|
-
}), Qa = new Lt("antSlideUpOut", {
|
|
414
|
-
"0%": {
|
|
415
|
-
transform: "scaleY(1)",
|
|
416
|
-
transformOrigin: "0% 0%",
|
|
417
|
-
opacity: 1
|
|
418
|
-
},
|
|
419
|
-
"100%": {
|
|
420
|
-
transform: "scaleY(0.8)",
|
|
421
|
-
transformOrigin: "0% 0%",
|
|
422
|
-
opacity: 0
|
|
423
|
-
}
|
|
424
|
-
}), Ya = new Lt("antSlideDownIn", {
|
|
425
|
-
"0%": {
|
|
426
|
-
transform: "scaleY(0.8)",
|
|
427
|
-
transformOrigin: "100% 100%",
|
|
428
|
-
opacity: 0
|
|
429
|
-
},
|
|
430
|
-
"100%": {
|
|
431
|
-
transform: "scaleY(1)",
|
|
432
|
-
transformOrigin: "100% 100%",
|
|
433
|
-
opacity: 1
|
|
434
|
-
}
|
|
435
|
-
}), Xa = new Lt("antSlideDownOut", {
|
|
436
|
-
"0%": {
|
|
437
|
-
transform: "scaleY(1)",
|
|
438
|
-
transformOrigin: "100% 100%",
|
|
439
|
-
opacity: 1
|
|
440
|
-
},
|
|
441
|
-
"100%": {
|
|
442
|
-
transform: "scaleY(0.8)",
|
|
443
|
-
transformOrigin: "100% 100%",
|
|
444
|
-
opacity: 0
|
|
445
|
-
}
|
|
446
|
-
}), ei = new Lt("antSlideLeftIn", {
|
|
447
|
-
"0%": {
|
|
448
|
-
transform: "scaleX(0.8)",
|
|
449
|
-
transformOrigin: "0% 0%",
|
|
450
|
-
opacity: 0
|
|
451
|
-
},
|
|
452
|
-
"100%": {
|
|
453
|
-
transform: "scaleX(1)",
|
|
454
|
-
transformOrigin: "0% 0%",
|
|
455
|
-
opacity: 1
|
|
456
|
-
}
|
|
457
|
-
}), ti = new Lt("antSlideLeftOut", {
|
|
458
|
-
"0%": {
|
|
459
|
-
transform: "scaleX(1)",
|
|
460
|
-
transformOrigin: "0% 0%",
|
|
461
|
-
opacity: 1
|
|
462
|
-
},
|
|
463
|
-
"100%": {
|
|
464
|
-
transform: "scaleX(0.8)",
|
|
465
|
-
transformOrigin: "0% 0%",
|
|
466
|
-
opacity: 0
|
|
467
|
-
}
|
|
468
|
-
}), ni = new Lt("antSlideRightIn", {
|
|
469
|
-
"0%": {
|
|
470
|
-
transform: "scaleX(0.8)",
|
|
471
|
-
transformOrigin: "100% 0%",
|
|
472
|
-
opacity: 0
|
|
473
|
-
},
|
|
474
|
-
"100%": {
|
|
475
|
-
transform: "scaleX(1)",
|
|
476
|
-
transformOrigin: "100% 0%",
|
|
477
|
-
opacity: 1
|
|
478
|
-
}
|
|
479
|
-
}), ri = new Lt("antSlideRightOut", {
|
|
480
|
-
"0%": {
|
|
481
|
-
transform: "scaleX(1)",
|
|
482
|
-
transformOrigin: "100% 0%",
|
|
483
|
-
opacity: 1
|
|
484
|
-
},
|
|
485
|
-
"100%": {
|
|
486
|
-
transform: "scaleX(0.8)",
|
|
487
|
-
transformOrigin: "100% 0%",
|
|
488
|
-
opacity: 0
|
|
489
|
-
}
|
|
490
|
-
}), ai = {
|
|
491
|
-
"slide-up": {
|
|
492
|
-
inKeyframes: Za,
|
|
493
|
-
outKeyframes: Qa
|
|
494
|
-
},
|
|
495
|
-
"slide-down": {
|
|
496
|
-
inKeyframes: Ya,
|
|
497
|
-
outKeyframes: Xa
|
|
498
|
-
},
|
|
499
|
-
"slide-left": {
|
|
500
|
-
inKeyframes: ei,
|
|
501
|
-
outKeyframes: ti
|
|
502
|
-
},
|
|
503
|
-
"slide-right": {
|
|
504
|
-
inKeyframes: ni,
|
|
505
|
-
outKeyframes: ri
|
|
506
|
-
}
|
|
507
|
-
}, Ro = (e, n) => {
|
|
508
|
-
const {
|
|
509
|
-
antCls: t
|
|
510
|
-
} = e, r = `${t}-${n}`, {
|
|
511
|
-
inKeyframes: i,
|
|
512
|
-
outKeyframes: o
|
|
513
|
-
} = ai[n];
|
|
514
|
-
return [ba(r, i, o, e.motionDurationMid), {
|
|
515
|
-
[`
|
|
516
|
-
${r}-enter,
|
|
517
|
-
${r}-appear
|
|
518
|
-
`]: {
|
|
519
|
-
transform: "scale(0)",
|
|
520
|
-
transformOrigin: "0% 0%",
|
|
521
|
-
opacity: 0,
|
|
522
|
-
animationTimingFunction: e.motionEaseOutQuint,
|
|
523
|
-
"&-prepare": {
|
|
524
|
-
transform: "scale(1)"
|
|
525
|
-
}
|
|
526
|
-
},
|
|
527
|
-
[`${r}-leave`]: {
|
|
528
|
-
animationTimingFunction: e.motionEaseInQuint
|
|
529
|
-
}
|
|
530
|
-
}];
|
|
531
|
-
}, ii = function() {
|
|
532
|
-
if (typeof navigator > "u" || typeof window > "u")
|
|
533
|
-
return !1;
|
|
534
|
-
var e = navigator.userAgent || navigator.vendor || window.opera;
|
|
535
|
-
return /(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e) || /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e == null ? void 0 : e.substr(0, 4));
|
|
536
|
-
};
|
|
537
|
-
var oi = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"], rn = void 0;
|
|
538
|
-
function si(e, n) {
|
|
539
|
-
var t = e.prefixCls, r = e.invalidate, i = e.item, o = e.renderItem, s = e.responsive, l = e.responsiveDisabled, u = e.registerSize, c = e.itemKey, b = e.className, f = e.style, d = e.children, m = e.display, h = e.order, E = e.component, g = E === void 0 ? "div" : E, M = De(e, oi), S = s && !m;
|
|
540
|
-
function y(O) {
|
|
541
|
-
u(c, O);
|
|
542
|
-
}
|
|
543
|
-
a.useEffect(function() {
|
|
544
|
-
return function() {
|
|
545
|
-
y(null);
|
|
546
|
-
};
|
|
547
|
-
}, []);
|
|
548
|
-
var w = o && i !== rn ? o(i, {
|
|
549
|
-
index: h
|
|
550
|
-
}) : d, C;
|
|
551
|
-
r || (C = {
|
|
552
|
-
opacity: S ? 0 : 1,
|
|
553
|
-
height: S ? 0 : rn,
|
|
554
|
-
overflowY: S ? "hidden" : rn,
|
|
555
|
-
order: s ? h : rn,
|
|
556
|
-
pointerEvents: S ? "none" : rn,
|
|
557
|
-
position: S ? "absolute" : rn
|
|
558
|
-
});
|
|
559
|
-
var v = {};
|
|
560
|
-
S && (v["aria-hidden"] = !0);
|
|
561
|
-
var N = /* @__PURE__ */ a.createElement(g, ae({
|
|
562
|
-
className: ke(!r && t, b),
|
|
563
|
-
style: T(T({}, C), f)
|
|
564
|
-
}, v, M, {
|
|
565
|
-
ref: n
|
|
566
|
-
}), w);
|
|
567
|
-
return s && (N = /* @__PURE__ */ a.createElement(cn, {
|
|
568
|
-
onResize: function(D) {
|
|
569
|
-
var B = D.offsetWidth;
|
|
570
|
-
y(B);
|
|
571
|
-
},
|
|
572
|
-
disabled: l
|
|
573
|
-
}, N)), N;
|
|
574
|
-
}
|
|
575
|
-
var wn = /* @__PURE__ */ a.forwardRef(si);
|
|
576
|
-
wn.displayName = "Item";
|
|
577
|
-
function li(e) {
|
|
578
|
-
if (typeof MessageChannel > "u")
|
|
579
|
-
Ht(e);
|
|
580
|
-
else {
|
|
581
|
-
var n = new MessageChannel();
|
|
582
|
-
n.port1.onmessage = function() {
|
|
583
|
-
return e();
|
|
584
|
-
}, n.port2.postMessage(void 0);
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
function ui() {
|
|
588
|
-
var e = a.useRef(null), n = function(r) {
|
|
589
|
-
e.current || (e.current = [], li(function() {
|
|
590
|
-
Br.unstable_batchedUpdates(function() {
|
|
591
|
-
e.current.forEach(function(i) {
|
|
592
|
-
i();
|
|
593
|
-
}), e.current = null;
|
|
594
|
-
});
|
|
595
|
-
})), e.current.push(r);
|
|
596
|
-
};
|
|
597
|
-
return n;
|
|
598
|
-
}
|
|
599
|
-
function gn(e, n) {
|
|
600
|
-
var t = a.useState(n), r = k(t, 2), i = r[0], o = r[1], s = Kt(function(l) {
|
|
601
|
-
e(function() {
|
|
602
|
-
o(l);
|
|
603
|
-
});
|
|
604
|
-
});
|
|
605
|
-
return [i, s];
|
|
606
|
-
}
|
|
607
|
-
var Ln = /* @__PURE__ */ qe.createContext(null), ci = ["component"], fi = ["className"], vi = ["className"], di = function(n, t) {
|
|
608
|
-
var r = a.useContext(Ln);
|
|
609
|
-
if (!r) {
|
|
610
|
-
var i = n.component, o = i === void 0 ? "div" : i, s = De(n, ci);
|
|
611
|
-
return /* @__PURE__ */ a.createElement(o, ae({}, s, {
|
|
612
|
-
ref: t
|
|
613
|
-
}));
|
|
614
|
-
}
|
|
615
|
-
var l = r.className, u = De(r, fi), c = n.className, b = De(n, vi);
|
|
616
|
-
return /* @__PURE__ */ a.createElement(Ln.Provider, {
|
|
617
|
-
value: null
|
|
618
|
-
}, /* @__PURE__ */ a.createElement(wn, ae({
|
|
619
|
-
ref: t,
|
|
620
|
-
className: ke(l, c)
|
|
621
|
-
}, u, b)));
|
|
622
|
-
}, Xr = /* @__PURE__ */ a.forwardRef(di);
|
|
623
|
-
Xr.displayName = "RawItem";
|
|
624
|
-
var mi = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "suffix", "component", "itemComponent", "onVisibleChange"], ea = "responsive", ta = "invalidate";
|
|
625
|
-
function hi(e) {
|
|
626
|
-
return "+ ".concat(e.length, " ...");
|
|
627
|
-
}
|
|
628
|
-
function gi(e, n) {
|
|
629
|
-
var t = e.prefixCls, r = t === void 0 ? "rc-overflow" : t, i = e.data, o = i === void 0 ? [] : i, s = e.renderItem, l = e.renderRawItem, u = e.itemKey, c = e.itemWidth, b = c === void 0 ? 10 : c, f = e.ssr, d = e.style, m = e.className, h = e.maxCount, E = e.renderRest, g = e.renderRawRest, M = e.suffix, S = e.component, y = S === void 0 ? "div" : S, w = e.itemComponent, C = e.onVisibleChange, v = De(e, mi), N = f === "full", O = ui(), D = gn(O, null), B = k(D, 2), $ = B[0], z = B[1], L = $ || 0, j = gn(O, /* @__PURE__ */ new Map()), Z = k(j, 2), q = Z[0], Q = Z[1], V = gn(O, 0), A = k(V, 2), x = A[0], Me = A[1], ue = gn(O, 0), G = k(ue, 2), K = G[0], W = G[1], ie = gn(O, 0), be = k(ie, 2), F = be[0], Y = be[1], te = Jn(null), pe = k(te, 2), oe = pe[0], _e = pe[1], Re = Jn(null), se = k(Re, 2), He = se[0], Be = se[1], ce = a.useMemo(function() {
|
|
630
|
-
return He === null && N ? Number.MAX_SAFE_INTEGER : He || 0;
|
|
631
|
-
}, [He, $]), Ie = Jn(!1), Ve = k(Ie, 2), de = Ve[0], ht = Ve[1], H = "".concat(r, "-item"), Ge = Math.max(x, K), Ce = h === ea, J = o.length && Ce, We = h === ta, Te = J || typeof h == "number" && o.length > h, Le = Xn(function() {
|
|
632
|
-
var P = o;
|
|
633
|
-
return J ? $ === null && N ? P = o : P = o.slice(0, Math.min(o.length, L / b)) : typeof h == "number" && (P = o.slice(0, h)), P;
|
|
634
|
-
}, [o, b, $, h, J]), Je = Xn(function() {
|
|
635
|
-
return J ? o.slice(ce + 1) : o.slice(Le.length);
|
|
636
|
-
}, [o, Le, J, ce]), Ae = Tt(function(P, R) {
|
|
637
|
-
var I;
|
|
638
|
-
return typeof u == "function" ? u(P) : (I = u && (P == null ? void 0 : P[u])) !== null && I !== void 0 ? I : R;
|
|
639
|
-
}, [u]), we = Tt(s || function(P) {
|
|
640
|
-
return P;
|
|
641
|
-
}, [s]);
|
|
642
|
-
function fe(P, R, I) {
|
|
643
|
-
He === P && (R === void 0 || R === oe) || (Be(P), I || (ht(P < o.length - 1), C == null || C(P)), R !== void 0 && _e(R));
|
|
644
|
-
}
|
|
645
|
-
function Ee(P, R) {
|
|
646
|
-
z(R.clientWidth);
|
|
647
|
-
}
|
|
648
|
-
function Ze(P, R) {
|
|
649
|
-
Q(function(I) {
|
|
650
|
-
var le = new Map(I);
|
|
651
|
-
return R === null ? le.delete(P) : le.set(P, R), le;
|
|
652
|
-
});
|
|
653
|
-
}
|
|
654
|
-
function ne(P, R) {
|
|
655
|
-
W(R), Me(K);
|
|
656
|
-
}
|
|
657
|
-
function re(P, R) {
|
|
658
|
-
Y(R);
|
|
659
|
-
}
|
|
660
|
-
function $e(P) {
|
|
661
|
-
return q.get(Ae(Le[P], P));
|
|
662
|
-
}
|
|
663
|
-
it(function() {
|
|
664
|
-
if (L && typeof Ge == "number" && Le) {
|
|
665
|
-
var P = F, R = Le.length, I = R - 1;
|
|
666
|
-
if (!R) {
|
|
667
|
-
fe(0, null);
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
for (var le = 0; le < R; le += 1) {
|
|
671
|
-
var ge = $e(le);
|
|
672
|
-
if (N && (ge = ge || 0), ge === void 0) {
|
|
673
|
-
fe(le - 1, void 0, !0);
|
|
674
|
-
break;
|
|
675
|
-
}
|
|
676
|
-
if (P += ge, // Only one means `totalWidth` is the final width
|
|
677
|
-
I === 0 && P <= L || // Last two width will be the final width
|
|
678
|
-
le === I - 1 && P + $e(I) <= L) {
|
|
679
|
-
fe(I, null);
|
|
680
|
-
break;
|
|
681
|
-
} else if (P + Ge > L) {
|
|
682
|
-
fe(le - 1, P - ge - F + K);
|
|
683
|
-
break;
|
|
684
|
-
}
|
|
685
|
-
}
|
|
686
|
-
M && $e(0) + F > L && _e(null);
|
|
687
|
-
}
|
|
688
|
-
}, [L, q, K, F, Ae, Le]);
|
|
689
|
-
var Et = de && !!Je.length, lt = {};
|
|
690
|
-
oe !== null && J && (lt = {
|
|
691
|
-
position: "absolute",
|
|
692
|
-
left: oe,
|
|
693
|
-
top: 0
|
|
694
|
-
});
|
|
695
|
-
var rt = {
|
|
696
|
-
prefixCls: H,
|
|
697
|
-
responsive: J,
|
|
698
|
-
component: w,
|
|
699
|
-
invalidate: We
|
|
700
|
-
}, At = l ? function(P, R) {
|
|
701
|
-
var I = Ae(P, R);
|
|
702
|
-
return /* @__PURE__ */ a.createElement(Ln.Provider, {
|
|
703
|
-
key: I,
|
|
704
|
-
value: T(T({}, rt), {}, {
|
|
705
|
-
order: R,
|
|
706
|
-
item: P,
|
|
707
|
-
itemKey: I,
|
|
708
|
-
registerSize: Ze,
|
|
709
|
-
display: R <= ce
|
|
710
|
-
})
|
|
711
|
-
}, l(P, R));
|
|
712
|
-
} : function(P, R) {
|
|
713
|
-
var I = Ae(P, R);
|
|
714
|
-
return /* @__PURE__ */ a.createElement(wn, ae({}, rt, {
|
|
715
|
-
order: R,
|
|
716
|
-
key: I,
|
|
717
|
-
item: P,
|
|
718
|
-
renderItem: we,
|
|
719
|
-
itemKey: I,
|
|
720
|
-
registerSize: Ze,
|
|
721
|
-
display: R <= ce
|
|
722
|
-
}));
|
|
723
|
-
}, Oe = {
|
|
724
|
-
order: Et ? ce : Number.MAX_SAFE_INTEGER,
|
|
725
|
-
className: "".concat(H, "-rest"),
|
|
726
|
-
registerSize: ne,
|
|
727
|
-
display: Et
|
|
728
|
-
}, Pe = E || hi, ut = g ? /* @__PURE__ */ a.createElement(Ln.Provider, {
|
|
729
|
-
value: T(T({}, rt), Oe)
|
|
730
|
-
}, g(Je)) : /* @__PURE__ */ a.createElement(wn, ae({}, rt, Oe), typeof Pe == "function" ? Pe(Je) : Pe), me = /* @__PURE__ */ a.createElement(y, ae({
|
|
731
|
-
className: ke(!We && r, m),
|
|
732
|
-
style: d,
|
|
733
|
-
ref: n
|
|
734
|
-
}, v), Le.map(At), Te ? ut : null, M && /* @__PURE__ */ a.createElement(wn, ae({}, rt, {
|
|
735
|
-
responsive: Ce,
|
|
736
|
-
responsiveDisabled: !J,
|
|
737
|
-
order: ce,
|
|
738
|
-
className: "".concat(H, "-suffix"),
|
|
739
|
-
registerSize: re,
|
|
740
|
-
display: !0,
|
|
741
|
-
style: lt
|
|
742
|
-
}), M));
|
|
743
|
-
return Ce ? /* @__PURE__ */ a.createElement(cn, {
|
|
744
|
-
onResize: Ee,
|
|
745
|
-
disabled: !J
|
|
746
|
-
}, me) : me;
|
|
747
|
-
}
|
|
748
|
-
var Mt = /* @__PURE__ */ a.forwardRef(gi);
|
|
749
|
-
Mt.displayName = "Overflow";
|
|
750
|
-
Mt.Item = Xr;
|
|
751
|
-
Mt.RESPONSIVE = ea;
|
|
752
|
-
Mt.INVALIDATE = ta;
|
|
753
|
-
function yi(e) {
|
|
754
|
-
var n = e.prefixCls, t = e.align, r = e.arrow, i = e.arrowPos, o = r || {}, s = o.className, l = o.content, u = i.x, c = u === void 0 ? 0 : u, b = i.y, f = b === void 0 ? 0 : b, d = a.useRef();
|
|
755
|
-
if (!t || !t.points)
|
|
756
|
-
return null;
|
|
757
|
-
var m = {
|
|
758
|
-
position: "absolute"
|
|
759
|
-
};
|
|
760
|
-
if (t.autoArrow !== !1) {
|
|
761
|
-
var h = t.points[0], E = t.points[1], g = h[0], M = h[1], S = E[0], y = E[1];
|
|
762
|
-
g === S || !["t", "b"].includes(g) ? m.top = f : g === "t" ? m.top = 0 : m.bottom = 0, M === y || !["l", "r"].includes(M) ? m.left = c : M === "l" ? m.left = 0 : m.right = 0;
|
|
763
|
-
}
|
|
764
|
-
return /* @__PURE__ */ a.createElement("div", {
|
|
765
|
-
ref: d,
|
|
766
|
-
className: ke("".concat(n, "-arrow"), s),
|
|
767
|
-
style: m
|
|
768
|
-
}, l);
|
|
769
|
-
}
|
|
770
|
-
function bi(e) {
|
|
771
|
-
var n = e.prefixCls, t = e.open, r = e.zIndex, i = e.mask, o = e.motion;
|
|
772
|
-
return i ? /* @__PURE__ */ a.createElement(cr, ae({}, o, {
|
|
773
|
-
motionAppear: !0,
|
|
774
|
-
visible: t,
|
|
775
|
-
removeOnLeave: !0
|
|
776
|
-
}), function(s) {
|
|
777
|
-
var l = s.className;
|
|
778
|
-
return /* @__PURE__ */ a.createElement("div", {
|
|
779
|
-
style: {
|
|
780
|
-
zIndex: r
|
|
781
|
-
},
|
|
782
|
-
className: ke("".concat(n, "-mask"), l)
|
|
783
|
-
});
|
|
784
|
-
}) : null;
|
|
785
|
-
}
|
|
786
|
-
var na = /* @__PURE__ */ a.memo(function(e) {
|
|
787
|
-
var n = e.children;
|
|
788
|
-
return n;
|
|
789
|
-
}, function(e, n) {
|
|
790
|
-
return n.cache;
|
|
791
|
-
});
|
|
792
|
-
process.env.NODE_ENV !== "production" && (na.displayName = "PopupContent");
|
|
793
|
-
var ra = /* @__PURE__ */ a.forwardRef(function(e, n) {
|
|
794
|
-
var t = e.popup, r = e.className, i = e.prefixCls, o = e.style, s = e.target, l = e.onVisibleChanged, u = e.open, c = e.keepDom, b = e.fresh, f = e.onClick, d = e.mask, m = e.arrow, h = e.arrowPos, E = e.align, g = e.motion, M = e.maskMotion, S = e.forceRender, y = e.getPopupContainer, w = e.autoDestroy, C = e.portal, v = e.zIndex, N = e.onMouseEnter, O = e.onMouseLeave, D = e.onPointerEnter, B = e.onPointerDownCapture, $ = e.ready, z = e.offsetX, L = e.offsetY, j = e.offsetR, Z = e.offsetB, q = e.onAlign, Q = e.onPrepare, V = e.stretch, A = e.targetWidth, x = e.targetHeight, Me = typeof t == "function" ? t() : t, ue = u || c, G = (y == null ? void 0 : y.length) > 0, K = a.useState(!y || !G), W = k(K, 2), ie = W[0], be = W[1];
|
|
795
|
-
if (it(function() {
|
|
796
|
-
!ie && G && s && be(!0);
|
|
797
|
-
}, [ie, G, s]), !ie)
|
|
798
|
-
return null;
|
|
799
|
-
var F = "auto", Y = {
|
|
800
|
-
left: "-1000vw",
|
|
801
|
-
top: "-1000vh",
|
|
802
|
-
right: F,
|
|
803
|
-
bottom: F
|
|
804
|
-
};
|
|
805
|
-
if ($ || !u) {
|
|
806
|
-
var te, pe = E.points, oe = E.dynamicInset || ((te = E._experimental) === null || te === void 0 ? void 0 : te.dynamicInset), _e = oe && pe[0][1] === "r", Re = oe && pe[0][0] === "b";
|
|
807
|
-
_e ? (Y.right = j, Y.left = F) : (Y.left = z, Y.right = F), Re ? (Y.bottom = Z, Y.top = F) : (Y.top = L, Y.bottom = F);
|
|
808
|
-
}
|
|
809
|
-
var se = {};
|
|
810
|
-
return V && (V.includes("height") && x ? se.height = x : V.includes("minHeight") && x && (se.minHeight = x), V.includes("width") && A ? se.width = A : V.includes("minWidth") && A && (se.minWidth = A)), u || (se.pointerEvents = "none"), /* @__PURE__ */ a.createElement(C, {
|
|
811
|
-
open: S || ue,
|
|
812
|
-
getContainer: y && function() {
|
|
813
|
-
return y(s);
|
|
814
|
-
},
|
|
815
|
-
autoDestroy: w
|
|
816
|
-
}, /* @__PURE__ */ a.createElement(bi, {
|
|
817
|
-
prefixCls: i,
|
|
818
|
-
open: u,
|
|
819
|
-
zIndex: v,
|
|
820
|
-
mask: d,
|
|
821
|
-
motion: M
|
|
822
|
-
}), /* @__PURE__ */ a.createElement(cn, {
|
|
823
|
-
onResize: q,
|
|
824
|
-
disabled: !u
|
|
825
|
-
}, function(He) {
|
|
826
|
-
return /* @__PURE__ */ a.createElement(cr, ae({
|
|
827
|
-
motionAppear: !0,
|
|
828
|
-
motionEnter: !0,
|
|
829
|
-
motionLeave: !0,
|
|
830
|
-
removeOnLeave: !1,
|
|
831
|
-
forceRender: S,
|
|
832
|
-
leavedClassName: "".concat(i, "-hidden")
|
|
833
|
-
}, g, {
|
|
834
|
-
onAppearPrepare: Q,
|
|
835
|
-
onEnterPrepare: Q,
|
|
836
|
-
visible: u,
|
|
837
|
-
onVisibleChanged: function(ce) {
|
|
838
|
-
var Ie;
|
|
839
|
-
g == null || (Ie = g.onVisibleChanged) === null || Ie === void 0 || Ie.call(g, ce), l(ce);
|
|
840
|
-
}
|
|
841
|
-
}), function(Be, ce) {
|
|
842
|
-
var Ie = Be.className, Ve = Be.style, de = ke(i, Ie, r);
|
|
843
|
-
return /* @__PURE__ */ a.createElement("div", {
|
|
844
|
-
ref: fr(He, n, ce),
|
|
845
|
-
className: de,
|
|
846
|
-
style: T(T(T(T({
|
|
847
|
-
"--arrow-x": "".concat(h.x || 0, "px"),
|
|
848
|
-
"--arrow-y": "".concat(h.y || 0, "px")
|
|
849
|
-
}, Y), se), Ve), {}, {
|
|
850
|
-
boxSizing: "border-box",
|
|
851
|
-
zIndex: v
|
|
852
|
-
}, o),
|
|
853
|
-
onMouseEnter: N,
|
|
854
|
-
onMouseLeave: O,
|
|
855
|
-
onPointerEnter: D,
|
|
856
|
-
onClick: f,
|
|
857
|
-
onPointerDownCapture: B
|
|
858
|
-
}, m && /* @__PURE__ */ a.createElement(yi, {
|
|
859
|
-
prefixCls: i,
|
|
860
|
-
arrow: m,
|
|
861
|
-
arrowPos: h,
|
|
862
|
-
align: E
|
|
863
|
-
}), /* @__PURE__ */ a.createElement(na, {
|
|
864
|
-
cache: !u && !b
|
|
865
|
-
}, Me));
|
|
866
|
-
});
|
|
867
|
-
}));
|
|
868
|
-
});
|
|
869
|
-
process.env.NODE_ENV !== "production" && (ra.displayName = "Popup");
|
|
870
|
-
var aa = /* @__PURE__ */ a.forwardRef(function(e, n) {
|
|
871
|
-
var t = e.children, r = e.getTriggerDOMNode, i = $n(t), o = a.useCallback(function(l) {
|
|
872
|
-
pa(n, r ? r(l) : l);
|
|
873
|
-
}, [r]), s = ur(o, zn(t));
|
|
874
|
-
return i ? /* @__PURE__ */ a.cloneElement(t, {
|
|
875
|
-
ref: s
|
|
876
|
-
}) : t;
|
|
877
|
-
});
|
|
878
|
-
process.env.NODE_ENV !== "production" && (aa.displayName = "TriggerWrapper");
|
|
879
|
-
var Mr = /* @__PURE__ */ a.createContext(null);
|
|
880
|
-
function Rr(e) {
|
|
881
|
-
return e ? Array.isArray(e) ? e : [e] : [];
|
|
882
|
-
}
|
|
883
|
-
function pi(e, n, t, r) {
|
|
884
|
-
return a.useMemo(function() {
|
|
885
|
-
var i = Rr(t ?? n), o = Rr(r ?? n), s = new Set(i), l = new Set(o);
|
|
886
|
-
return e && (s.has("hover") && (s.delete("hover"), s.add("click")), l.has("hover") && (l.delete("hover"), l.add("click"))), [s, l];
|
|
887
|
-
}, [e, n, t, r]);
|
|
888
|
-
}
|
|
889
|
-
function Ci() {
|
|
890
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [], t = arguments.length > 2 ? arguments[2] : void 0;
|
|
891
|
-
return t ? e[0] === n[0] : e[0] === n[0] && e[1] === n[1];
|
|
892
|
-
}
|
|
893
|
-
function wi(e, n, t, r) {
|
|
894
|
-
for (var i = t.points, o = Object.keys(e), s = 0; s < o.length; s += 1) {
|
|
895
|
-
var l, u = o[s];
|
|
896
|
-
if (Ci((l = e[u]) === null || l === void 0 ? void 0 : l.points, i, r))
|
|
897
|
-
return "".concat(n, "-placement-").concat(u);
|
|
898
|
-
}
|
|
899
|
-
return "";
|
|
900
|
-
}
|
|
901
|
-
function Er(e, n, t, r) {
|
|
902
|
-
return n || (t ? {
|
|
903
|
-
motionName: "".concat(e, "-").concat(t)
|
|
904
|
-
} : r ? {
|
|
905
|
-
motionName: r
|
|
906
|
-
} : null);
|
|
907
|
-
}
|
|
908
|
-
function En(e) {
|
|
909
|
-
return e.ownerDocument.defaultView;
|
|
910
|
-
}
|
|
911
|
-
function nr(e) {
|
|
912
|
-
for (var n = [], t = e == null ? void 0 : e.parentElement, r = ["hidden", "scroll", "clip", "auto"]; t; ) {
|
|
913
|
-
var i = En(t).getComputedStyle(t), o = i.overflowX, s = i.overflowY, l = i.overflow;
|
|
914
|
-
[o, s, l].some(function(u) {
|
|
915
|
-
return r.includes(u);
|
|
916
|
-
}) && n.push(t), t = t.parentElement;
|
|
917
|
-
}
|
|
918
|
-
return n;
|
|
919
|
-
}
|
|
920
|
-
function Mn(e) {
|
|
921
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1;
|
|
922
|
-
return Number.isNaN(e) ? n : e;
|
|
923
|
-
}
|
|
924
|
-
function yn(e) {
|
|
925
|
-
return Mn(parseFloat(e), 0);
|
|
926
|
-
}
|
|
927
|
-
function Sr(e, n) {
|
|
928
|
-
var t = T({}, e);
|
|
929
|
-
return (n || []).forEach(function(r) {
|
|
930
|
-
if (!(r instanceof HTMLBodyElement || r instanceof HTMLHtmlElement)) {
|
|
931
|
-
var i = En(r).getComputedStyle(r), o = i.overflow, s = i.overflowClipMargin, l = i.borderTopWidth, u = i.borderBottomWidth, c = i.borderLeftWidth, b = i.borderRightWidth, f = r.getBoundingClientRect(), d = r.offsetHeight, m = r.clientHeight, h = r.offsetWidth, E = r.clientWidth, g = yn(l), M = yn(u), S = yn(c), y = yn(b), w = Mn(Math.round(f.width / h * 1e3) / 1e3), C = Mn(Math.round(f.height / d * 1e3) / 1e3), v = (h - E - S - y) * w, N = (d - m - g - M) * C, O = g * C, D = M * C, B = S * w, $ = y * w, z = 0, L = 0;
|
|
932
|
-
if (o === "clip") {
|
|
933
|
-
var j = yn(s);
|
|
934
|
-
z = j * w, L = j * C;
|
|
935
|
-
}
|
|
936
|
-
var Z = f.x + B - z, q = f.y + O - L, Q = Z + f.width + 2 * z - B - $ - v, V = q + f.height + 2 * L - O - D - N;
|
|
937
|
-
t.left = Math.max(t.left, Z), t.top = Math.max(t.top, q), t.right = Math.min(t.right, Q), t.bottom = Math.min(t.bottom, V);
|
|
938
|
-
}
|
|
939
|
-
}), t;
|
|
940
|
-
}
|
|
941
|
-
function Pr(e) {
|
|
942
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, t = "".concat(n), r = t.match(/^(.*)\%$/);
|
|
943
|
-
return r ? e * (parseFloat(r[1]) / 100) : parseFloat(t);
|
|
944
|
-
}
|
|
945
|
-
function Nr(e, n) {
|
|
946
|
-
var t = n || [], r = k(t, 2), i = r[0], o = r[1];
|
|
947
|
-
return [Pr(e.width, i), Pr(e.height, o)];
|
|
948
|
-
}
|
|
949
|
-
function _r() {
|
|
950
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
951
|
-
return [e[0], e[1]];
|
|
952
|
-
}
|
|
953
|
-
function an(e, n) {
|
|
954
|
-
var t = n[0], r = n[1], i, o;
|
|
955
|
-
return t === "t" ? o = e.y : t === "b" ? o = e.y + e.height : o = e.y + e.height / 2, r === "l" ? i = e.x : r === "r" ? i = e.x + e.width : i = e.x + e.width / 2, {
|
|
956
|
-
x: i,
|
|
957
|
-
y: o
|
|
958
|
-
};
|
|
959
|
-
}
|
|
960
|
-
function Ot(e, n) {
|
|
961
|
-
var t = {
|
|
962
|
-
t: "b",
|
|
963
|
-
b: "t",
|
|
964
|
-
l: "r",
|
|
965
|
-
r: "l"
|
|
966
|
-
};
|
|
967
|
-
return e.map(function(r, i) {
|
|
968
|
-
return i === n ? t[r] || "c" : r;
|
|
969
|
-
}).join("");
|
|
970
|
-
}
|
|
971
|
-
function Mi(e, n, t, r, i, o, s) {
|
|
972
|
-
var l = a.useState({
|
|
973
|
-
ready: !1,
|
|
974
|
-
offsetX: 0,
|
|
975
|
-
offsetY: 0,
|
|
976
|
-
offsetR: 0,
|
|
977
|
-
offsetB: 0,
|
|
978
|
-
arrowX: 0,
|
|
979
|
-
arrowY: 0,
|
|
980
|
-
scaleX: 1,
|
|
981
|
-
scaleY: 1,
|
|
982
|
-
align: i[r] || {}
|
|
983
|
-
}), u = k(l, 2), c = u[0], b = u[1], f = a.useRef(0), d = a.useMemo(function() {
|
|
984
|
-
return n ? nr(n) : [];
|
|
985
|
-
}, [n]), m = a.useRef({}), h = function() {
|
|
986
|
-
m.current = {};
|
|
987
|
-
};
|
|
988
|
-
e || h();
|
|
989
|
-
var E = Kt(function() {
|
|
990
|
-
if (n && t && e) {
|
|
991
|
-
let nt = function(nn, Dt) {
|
|
992
|
-
var kt = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Ge, hn = K.x + nn, Nn = K.y + Dt, Bn = hn + _e, Un = Nn + oe, jn = Math.max(hn, kt.left), p = Math.max(Nn, kt.top), _ = Math.min(Bn, kt.right), ve = Math.min(Un, kt.bottom);
|
|
993
|
-
return Math.max(0, (_ - jn) * (ve - p));
|
|
994
|
-
}, Pn = function() {
|
|
995
|
-
Fe = K.y + I, vt = Fe + oe, Ye = K.x + R, Pt = Ye + _e;
|
|
996
|
-
};
|
|
997
|
-
var S, y, w, C, v = n, N = v.ownerDocument, O = En(v), D = O.getComputedStyle(v), B = D.width, $ = D.height, z = D.position, L = v.style.left, j = v.style.top, Z = v.style.right, q = v.style.bottom, Q = v.style.overflow, V = T(T({}, i[r]), o), A = N.createElement("div");
|
|
998
|
-
(S = v.parentElement) === null || S === void 0 || S.appendChild(A), A.style.left = "".concat(v.offsetLeft, "px"), A.style.top = "".concat(v.offsetTop, "px"), A.style.position = z, A.style.height = "".concat(v.offsetHeight, "px"), A.style.width = "".concat(v.offsetWidth, "px"), v.style.left = "0", v.style.top = "0", v.style.right = "auto", v.style.bottom = "auto", v.style.overflow = "hidden";
|
|
999
|
-
var x;
|
|
1000
|
-
if (Array.isArray(t))
|
|
1001
|
-
x = {
|
|
1002
|
-
x: t[0],
|
|
1003
|
-
y: t[1],
|
|
1004
|
-
width: 0,
|
|
1005
|
-
height: 0
|
|
1006
|
-
};
|
|
1007
|
-
else {
|
|
1008
|
-
var Me, ue, G = t.getBoundingClientRect();
|
|
1009
|
-
G.x = (Me = G.x) !== null && Me !== void 0 ? Me : G.left, G.y = (ue = G.y) !== null && ue !== void 0 ? ue : G.top, x = {
|
|
1010
|
-
x: G.x,
|
|
1011
|
-
y: G.y,
|
|
1012
|
-
width: G.width,
|
|
1013
|
-
height: G.height
|
|
1014
|
-
};
|
|
1015
|
-
}
|
|
1016
|
-
var K = v.getBoundingClientRect();
|
|
1017
|
-
K.x = (y = K.x) !== null && y !== void 0 ? y : K.left, K.y = (w = K.y) !== null && w !== void 0 ? w : K.top;
|
|
1018
|
-
var W = N.documentElement, ie = W.clientWidth, be = W.clientHeight, F = W.scrollWidth, Y = W.scrollHeight, te = W.scrollTop, pe = W.scrollLeft, oe = K.height, _e = K.width, Re = x.height, se = x.width, He = {
|
|
1019
|
-
left: 0,
|
|
1020
|
-
top: 0,
|
|
1021
|
-
right: ie,
|
|
1022
|
-
bottom: be
|
|
1023
|
-
}, Be = {
|
|
1024
|
-
left: -pe,
|
|
1025
|
-
top: -te,
|
|
1026
|
-
right: F - pe,
|
|
1027
|
-
bottom: Y - te
|
|
1028
|
-
}, ce = V.htmlRegion, Ie = "visible", Ve = "visibleFirst";
|
|
1029
|
-
ce !== "scroll" && ce !== Ve && (ce = Ie);
|
|
1030
|
-
var de = ce === Ve, ht = Sr(Be, d), H = Sr(He, d), Ge = ce === Ie ? H : ht, Ce = de ? H : Ge;
|
|
1031
|
-
v.style.left = "auto", v.style.top = "auto", v.style.right = "0", v.style.bottom = "0";
|
|
1032
|
-
var J = v.getBoundingClientRect();
|
|
1033
|
-
v.style.left = L, v.style.top = j, v.style.right = Z, v.style.bottom = q, v.style.overflow = Q, (C = v.parentElement) === null || C === void 0 || C.removeChild(A);
|
|
1034
|
-
var We = Mn(Math.round(_e / parseFloat(B) * 1e3) / 1e3), Te = Mn(Math.round(oe / parseFloat($) * 1e3) / 1e3);
|
|
1035
|
-
if (We === 0 || Te === 0 || Qn(t) && !Wr(t))
|
|
1036
|
-
return;
|
|
1037
|
-
var Le = V.offset, Je = V.targetOffset, Ae = Nr(K, Le), we = k(Ae, 2), fe = we[0], Ee = we[1], Ze = Nr(x, Je), ne = k(Ze, 2), re = ne[0], $e = ne[1];
|
|
1038
|
-
x.x -= re, x.y -= $e;
|
|
1039
|
-
var Et = V.points || [], lt = k(Et, 2), rt = lt[0], At = lt[1], Oe = _r(At), Pe = _r(rt), ut = an(x, Oe), me = an(K, Pe), P = T({}, V), R = ut.x - me.x + fe, I = ut.y - me.y + Ee, le = nt(R, I), ge = nt(R, I, H), $t = an(x, ["t", "l"]), Ue = an(K, ["t", "l"]), zt = an(x, ["b", "r"]), Vt = an(K, ["b", "r"]), ct = V.overflow || {}, Bt = ct.adjustX, Ut = ct.adjustY, ft = ct.shiftX, St = ct.shiftY, gt = function(Dt) {
|
|
1040
|
-
return typeof Dt == "boolean" ? Dt : Dt >= 0;
|
|
1041
|
-
}, Fe, vt, Ye, Pt;
|
|
1042
|
-
Pn();
|
|
1043
|
-
var dt = gt(Ut), jt = Pe[0] === Oe[0];
|
|
1044
|
-
if (dt && Pe[0] === "t" && (vt > Ce.bottom || m.current.bt)) {
|
|
1045
|
-
var Se = I;
|
|
1046
|
-
jt ? Se -= oe - Re : Se = $t.y - Vt.y - Ee;
|
|
1047
|
-
var qt = nt(R, Se), fn = nt(R, Se, H);
|
|
1048
|
-
// Of course use larger one
|
|
1049
|
-
qt > le || qt === le && (!de || // Choose recommend one
|
|
1050
|
-
fn >= ge) ? (m.current.bt = !0, I = Se, Ee = -Ee, P.points = [Ot(Pe, 0), Ot(Oe, 0)]) : m.current.bt = !1;
|
|
1051
|
-
}
|
|
1052
|
-
if (dt && Pe[0] === "b" && (Fe < Ce.top || m.current.tb)) {
|
|
1053
|
-
var yt = I;
|
|
1054
|
-
jt ? yt += oe - Re : yt = zt.y - Ue.y - Ee;
|
|
1055
|
-
var Gt = nt(R, yt), Jt = nt(R, yt, H);
|
|
1056
|
-
// Of course use larger one
|
|
1057
|
-
Gt > le || Gt === le && (!de || // Choose recommend one
|
|
1058
|
-
Jt >= ge) ? (m.current.tb = !0, I = yt, Ee = -Ee, P.points = [Ot(Pe, 0), Ot(Oe, 0)]) : m.current.tb = !1;
|
|
1059
|
-
}
|
|
1060
|
-
var mt = gt(Bt), Nt = Pe[1] === Oe[1];
|
|
1061
|
-
if (mt && Pe[1] === "l" && (Pt > Ce.right || m.current.rl)) {
|
|
1062
|
-
var bt = R;
|
|
1063
|
-
Nt ? bt -= _e - se : bt = $t.x - Vt.x - fe;
|
|
1064
|
-
var Zt = nt(bt, I), _t = nt(bt, I, H);
|
|
1065
|
-
// Of course use larger one
|
|
1066
|
-
Zt > le || Zt === le && (!de || // Choose recommend one
|
|
1067
|
-
_t >= ge) ? (m.current.rl = !0, R = bt, fe = -fe, P.points = [Ot(Pe, 1), Ot(Oe, 1)]) : m.current.rl = !1;
|
|
1068
|
-
}
|
|
1069
|
-
if (mt && Pe[1] === "r" && (Ye < Ce.left || m.current.lr)) {
|
|
1070
|
-
var Xe = R;
|
|
1071
|
-
Nt ? Xe += _e - se : Xe = zt.x - Ue.x - fe;
|
|
1072
|
-
var pt = nt(Xe, I), Qt = nt(Xe, I, H);
|
|
1073
|
-
// Of course use larger one
|
|
1074
|
-
pt > le || pt === le && (!de || // Choose recommend one
|
|
1075
|
-
Qt >= ge) ? (m.current.lr = !0, R = Xe, fe = -fe, P.points = [Ot(Pe, 1), Ot(Oe, 1)]) : m.current.lr = !1;
|
|
1076
|
-
}
|
|
1077
|
-
Pn();
|
|
1078
|
-
var et = ft === !0 ? 0 : ft;
|
|
1079
|
-
typeof et == "number" && (Ye < H.left && (R -= Ye - H.left - fe, x.x + se < H.left + et && (R += x.x - H.left + se - et)), Pt > H.right && (R -= Pt - H.right - fe, x.x > H.right - et && (R += x.x - H.right + et)));
|
|
1080
|
-
var Qe = St === !0 ? 0 : St;
|
|
1081
|
-
typeof Qe == "number" && (Fe < H.top && (I -= Fe - H.top - Ee, x.y + Re < H.top + Qe && (I += x.y - H.top + Re - Qe)), vt > H.bottom && (I -= vt - H.bottom - Ee, x.y > H.bottom - Qe && (I += x.y - H.bottom + Qe)));
|
|
1082
|
-
var Ct = K.x + R, It = Ct + _e, tt = K.y + I, vn = tt + oe, Yt = x.x, dn = Yt + se, X = x.y, U = X + Re, ee = Math.max(Ct, Yt), Ke = Math.min(It, dn), xe = (ee + Ke) / 2, xt = xe - Ct, Wt = Math.max(tt, X), Xt = Math.min(vn, U), en = (Wt + Xt) / 2, tn = en - tt;
|
|
1083
|
-
s == null || s(n, P);
|
|
1084
|
-
var at = J.right - K.x - (R + K.width), je = J.bottom - K.y - (I + K.height);
|
|
1085
|
-
We === 1 && (R = Math.round(R), at = Math.round(at)), Te === 1 && (I = Math.round(I), je = Math.round(je));
|
|
1086
|
-
var mn = {
|
|
1087
|
-
ready: !0,
|
|
1088
|
-
offsetX: R / We,
|
|
1089
|
-
offsetY: I / Te,
|
|
1090
|
-
offsetR: at / We,
|
|
1091
|
-
offsetB: je / Te,
|
|
1092
|
-
arrowX: xt / We,
|
|
1093
|
-
arrowY: tn / Te,
|
|
1094
|
-
scaleX: We,
|
|
1095
|
-
scaleY: Te,
|
|
1096
|
-
align: P
|
|
1097
|
-
};
|
|
1098
|
-
b(mn);
|
|
1099
|
-
}
|
|
1100
|
-
}), g = function() {
|
|
1101
|
-
f.current += 1;
|
|
1102
|
-
var y = f.current;
|
|
1103
|
-
Promise.resolve().then(function() {
|
|
1104
|
-
f.current === y && E();
|
|
1105
|
-
});
|
|
1106
|
-
}, M = function() {
|
|
1107
|
-
b(function(y) {
|
|
1108
|
-
return T(T({}, y), {}, {
|
|
1109
|
-
ready: !1
|
|
1110
|
-
});
|
|
1111
|
-
});
|
|
1112
|
-
};
|
|
1113
|
-
return it(M, [r]), it(function() {
|
|
1114
|
-
e || M();
|
|
1115
|
-
}, [e]), [c.ready, c.offsetX, c.offsetY, c.offsetR, c.offsetB, c.arrowX, c.arrowY, c.scaleX, c.scaleY, c.align, g];
|
|
1116
|
-
}
|
|
1117
|
-
function Ri(e, n, t, r, i) {
|
|
1118
|
-
it(function() {
|
|
1119
|
-
if (e && n && t) {
|
|
1120
|
-
let f = function() {
|
|
1121
|
-
r(), i();
|
|
1122
|
-
};
|
|
1123
|
-
var o = n, s = t, l = nr(o), u = nr(s), c = En(s), b = new Set([c].concat(Rt(l), Rt(u)));
|
|
1124
|
-
return b.forEach(function(d) {
|
|
1125
|
-
d.addEventListener("scroll", f, {
|
|
1126
|
-
passive: !0
|
|
1127
|
-
});
|
|
1128
|
-
}), c.addEventListener("resize", f, {
|
|
1129
|
-
passive: !0
|
|
1130
|
-
}), r(), function() {
|
|
1131
|
-
b.forEach(function(d) {
|
|
1132
|
-
d.removeEventListener("scroll", f), c.removeEventListener("resize", f);
|
|
1133
|
-
});
|
|
1134
|
-
};
|
|
1135
|
-
}
|
|
1136
|
-
}, [e, n, t]);
|
|
1137
|
-
}
|
|
1138
|
-
function Ei(e, n, t, r, i, o, s, l) {
|
|
1139
|
-
var u = a.useRef(e);
|
|
1140
|
-
u.current = e;
|
|
1141
|
-
var c = a.useRef(!1);
|
|
1142
|
-
a.useEffect(function() {
|
|
1143
|
-
if (n && r && (!i || o)) {
|
|
1144
|
-
var f = function() {
|
|
1145
|
-
c.current = !1;
|
|
1146
|
-
}, d = function(w) {
|
|
1147
|
-
var C;
|
|
1148
|
-
u.current && !s(((C = w.composedPath) === null || C === void 0 || (C = C.call(w)) === null || C === void 0 ? void 0 : C[0]) || w.target) && !c.current && l(!1);
|
|
1149
|
-
}, m = En(r);
|
|
1150
|
-
m.addEventListener("pointerdown", f, !0), m.addEventListener("mousedown", d, !0), m.addEventListener("contextmenu", d, !0);
|
|
1151
|
-
var h = Yn(t);
|
|
1152
|
-
if (h && (h.addEventListener("mousedown", d, !0), h.addEventListener("contextmenu", d, !0)), process.env.NODE_ENV !== "production") {
|
|
1153
|
-
var E, g, M = t == null || (E = t.getRootNode) === null || E === void 0 ? void 0 : E.call(t), S = (g = r.getRootNode) === null || g === void 0 ? void 0 : g.call(r);
|
|
1154
|
-
Zn(M === S, "trigger element and popup element should in same shadow root.");
|
|
1155
|
-
}
|
|
1156
|
-
return function() {
|
|
1157
|
-
m.removeEventListener("pointerdown", f, !0), m.removeEventListener("mousedown", d, !0), m.removeEventListener("contextmenu", d, !0), h && (h.removeEventListener("mousedown", d, !0), h.removeEventListener("contextmenu", d, !0));
|
|
1158
|
-
};
|
|
1159
|
-
}
|
|
1160
|
-
}, [n, t, r, i, o]);
|
|
1161
|
-
function b() {
|
|
1162
|
-
c.current = !0;
|
|
1163
|
-
}
|
|
1164
|
-
return b;
|
|
1165
|
-
}
|
|
1166
|
-
var Si = ["prefixCls", "children", "action", "showAction", "hideAction", "popupVisible", "defaultPopupVisible", "onPopupVisibleChange", "afterPopupVisibleChange", "mouseEnterDelay", "mouseLeaveDelay", "focusDelay", "blurDelay", "mask", "maskClosable", "getPopupContainer", "forceRender", "autoDestroy", "destroyPopupOnHide", "popup", "popupClassName", "popupStyle", "popupPlacement", "builtinPlacements", "popupAlign", "zIndex", "stretch", "getPopupClassNameFromAlign", "fresh", "alignPoint", "onPopupClick", "onPopupAlign", "arrow", "popupMotion", "maskMotion", "popupTransitionName", "popupAnimation", "maskTransitionName", "maskAnimation", "className", "getTriggerDOMNode"];
|
|
1167
|
-
function Pi() {
|
|
1168
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Fr, n = /* @__PURE__ */ a.forwardRef(function(t, r) {
|
|
1169
|
-
var i = t.prefixCls, o = i === void 0 ? "rc-trigger-popup" : i, s = t.children, l = t.action, u = l === void 0 ? "hover" : l, c = t.showAction, b = t.hideAction, f = t.popupVisible, d = t.defaultPopupVisible, m = t.onPopupVisibleChange, h = t.afterPopupVisibleChange, E = t.mouseEnterDelay, g = t.mouseLeaveDelay, M = g === void 0 ? 0.1 : g, S = t.focusDelay, y = t.blurDelay, w = t.mask, C = t.maskClosable, v = C === void 0 ? !0 : C, N = t.getPopupContainer, O = t.forceRender, D = t.autoDestroy, B = t.destroyPopupOnHide, $ = t.popup, z = t.popupClassName, L = t.popupStyle, j = t.popupPlacement, Z = t.builtinPlacements, q = Z === void 0 ? {} : Z, Q = t.popupAlign, V = t.zIndex, A = t.stretch, x = t.getPopupClassNameFromAlign, Me = t.fresh, ue = t.alignPoint, G = t.onPopupClick, K = t.onPopupAlign, W = t.arrow, ie = t.popupMotion, be = t.maskMotion, F = t.popupTransitionName, Y = t.popupAnimation, te = t.maskTransitionName, pe = t.maskAnimation, oe = t.className, _e = t.getTriggerDOMNode, Re = De(t, Si), se = D || B || !1, He = a.useState(!1), Be = k(He, 2), ce = Be[0], Ie = Be[1];
|
|
1170
|
-
it(function() {
|
|
1171
|
-
Ie(ii());
|
|
1172
|
-
}, []);
|
|
1173
|
-
var Ve = a.useRef({}), de = a.useContext(Mr), ht = a.useMemo(function() {
|
|
1174
|
-
return {
|
|
1175
|
-
registerSubPopup: function(_, ve) {
|
|
1176
|
-
Ve.current[_] = ve, de == null || de.registerSubPopup(_, ve);
|
|
1177
|
-
}
|
|
1178
|
-
};
|
|
1179
|
-
}, [de]), H = Ca(), Ge = a.useState(null), Ce = k(Ge, 2), J = Ce[0], We = Ce[1], Te = a.useRef(null), Le = Kt(function(p) {
|
|
1180
|
-
Te.current = p, Qn(p) && J !== p && We(p), de == null || de.registerSubPopup(H, p);
|
|
1181
|
-
}), Je = a.useState(null), Ae = k(Je, 2), we = Ae[0], fe = Ae[1], Ee = a.useRef(null), Ze = Kt(function(p) {
|
|
1182
|
-
Qn(p) && we !== p && (fe(p), Ee.current = p);
|
|
1183
|
-
}), ne = a.Children.only(s), re = (ne == null ? void 0 : ne.props) || {}, $e = {}, Et = Kt(function(p) {
|
|
1184
|
-
var _, ve, Ne = we;
|
|
1185
|
-
return (Ne == null ? void 0 : Ne.contains(p)) || ((_ = Yn(Ne)) === null || _ === void 0 ? void 0 : _.host) === p || p === Ne || (J == null ? void 0 : J.contains(p)) || ((ve = Yn(J)) === null || ve === void 0 ? void 0 : ve.host) === p || p === J || Object.values(Ve.current).some(function(ye) {
|
|
1186
|
-
return (ye == null ? void 0 : ye.contains(p)) || p === ye;
|
|
1187
|
-
});
|
|
1188
|
-
}), lt = Er(o, ie, Y, F), rt = Er(o, be, pe, te), At = a.useState(d || !1), Oe = k(At, 2), Pe = Oe[0], ut = Oe[1], me = f ?? Pe, P = Kt(function(p) {
|
|
1189
|
-
f === void 0 && ut(p);
|
|
1190
|
-
});
|
|
1191
|
-
it(function() {
|
|
1192
|
-
ut(f || !1);
|
|
1193
|
-
}, [f]);
|
|
1194
|
-
var R = a.useRef(me);
|
|
1195
|
-
R.current = me;
|
|
1196
|
-
var I = a.useRef([]);
|
|
1197
|
-
I.current = [];
|
|
1198
|
-
var le = Kt(function(p) {
|
|
1199
|
-
var _;
|
|
1200
|
-
P(p), ((_ = I.current[I.current.length - 1]) !== null && _ !== void 0 ? _ : me) !== p && (I.current.push(p), m == null || m(p));
|
|
1201
|
-
}), ge = a.useRef(), $t = function() {
|
|
1202
|
-
clearTimeout(ge.current);
|
|
1203
|
-
}, Ue = function(_) {
|
|
1204
|
-
var ve = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
1205
|
-
$t(), ve === 0 ? le(_) : ge.current = setTimeout(function() {
|
|
1206
|
-
le(_);
|
|
1207
|
-
}, ve * 1e3);
|
|
1208
|
-
};
|
|
1209
|
-
a.useEffect(function() {
|
|
1210
|
-
return $t;
|
|
1211
|
-
}, []);
|
|
1212
|
-
var zt = a.useState(!1), Vt = k(zt, 2), ct = Vt[0], Bt = Vt[1];
|
|
1213
|
-
it(function(p) {
|
|
1214
|
-
(!p || me) && Bt(!0);
|
|
1215
|
-
}, [me]);
|
|
1216
|
-
var Ut = a.useState(null), ft = k(Ut, 2), St = ft[0], gt = ft[1], Fe = a.useState(null), vt = k(Fe, 2), Ye = vt[0], Pt = vt[1], dt = function(_) {
|
|
1217
|
-
Pt([_.clientX, _.clientY]);
|
|
1218
|
-
}, jt = Mi(me, J, ue && Ye !== null ? Ye : we, j, q, Q, K), Se = k(jt, 11), qt = Se[0], fn = Se[1], yt = Se[2], Gt = Se[3], Jt = Se[4], mt = Se[5], Nt = Se[6], bt = Se[7], Zt = Se[8], _t = Se[9], Xe = Se[10], pt = pi(ce, u, c, b), Qt = k(pt, 2), et = Qt[0], Qe = Qt[1], Ct = et.has("click"), It = Qe.has("click") || Qe.has("contextMenu"), tt = Kt(function() {
|
|
1219
|
-
ct || Xe();
|
|
1220
|
-
}), vn = function() {
|
|
1221
|
-
R.current && ue && It && Ue(!1);
|
|
1222
|
-
};
|
|
1223
|
-
Ri(me, we, J, tt, vn), it(function() {
|
|
1224
|
-
tt();
|
|
1225
|
-
}, [Ye, j]), it(function() {
|
|
1226
|
-
me && !(q != null && q[j]) && tt();
|
|
1227
|
-
}, [JSON.stringify(Q)]);
|
|
1228
|
-
var Yt = a.useMemo(function() {
|
|
1229
|
-
var p = wi(q, o, _t, ue);
|
|
1230
|
-
return ke(p, x == null ? void 0 : x(_t));
|
|
1231
|
-
}, [_t, x, q, o, ue]);
|
|
1232
|
-
a.useImperativeHandle(r, function() {
|
|
1233
|
-
return {
|
|
1234
|
-
nativeElement: Ee.current,
|
|
1235
|
-
popupElement: Te.current,
|
|
1236
|
-
forceAlign: tt
|
|
1237
|
-
};
|
|
1238
|
-
});
|
|
1239
|
-
var dn = a.useState(0), X = k(dn, 2), U = X[0], ee = X[1], Ke = a.useState(0), xe = k(Ke, 2), xt = xe[0], Wt = xe[1], Xt = function() {
|
|
1240
|
-
if (A && we) {
|
|
1241
|
-
var _ = we.getBoundingClientRect();
|
|
1242
|
-
ee(_.width), Wt(_.height);
|
|
1243
|
-
}
|
|
1244
|
-
}, en = function() {
|
|
1245
|
-
Xt(), tt();
|
|
1246
|
-
}, tn = function(_) {
|
|
1247
|
-
Bt(!1), Xe(), h == null || h(_);
|
|
1248
|
-
}, at = function() {
|
|
1249
|
-
return new Promise(function(_) {
|
|
1250
|
-
Xt(), gt(function() {
|
|
1251
|
-
return _;
|
|
1252
|
-
});
|
|
1253
|
-
});
|
|
1254
|
-
};
|
|
1255
|
-
it(function() {
|
|
1256
|
-
St && (Xe(), St(), gt(null));
|
|
1257
|
-
}, [St]);
|
|
1258
|
-
function je(p, _, ve, Ne) {
|
|
1259
|
-
$e[p] = function(ye) {
|
|
1260
|
-
var _n;
|
|
1261
|
-
Ne == null || Ne(ye), Ue(_, ve);
|
|
1262
|
-
for (var qn = arguments.length, Cr = new Array(qn > 1 ? qn - 1 : 0), In = 1; In < qn; In++)
|
|
1263
|
-
Cr[In - 1] = arguments[In];
|
|
1264
|
-
(_n = re[p]) === null || _n === void 0 || _n.call.apply(_n, [re, ye].concat(Cr));
|
|
1265
|
-
};
|
|
1266
|
-
}
|
|
1267
|
-
(Ct || It) && ($e.onClick = function(p) {
|
|
1268
|
-
var _;
|
|
1269
|
-
R.current && It ? Ue(!1) : !R.current && Ct && (dt(p), Ue(!0));
|
|
1270
|
-
for (var ve = arguments.length, Ne = new Array(ve > 1 ? ve - 1 : 0), ye = 1; ye < ve; ye++)
|
|
1271
|
-
Ne[ye - 1] = arguments[ye];
|
|
1272
|
-
(_ = re.onClick) === null || _ === void 0 || _.call.apply(_, [re, p].concat(Ne));
|
|
1273
|
-
});
|
|
1274
|
-
var mn = Ei(me, It, we, J, w, v, Et, Ue), nt = et.has("hover"), Pn = Qe.has("hover"), nn, Dt;
|
|
1275
|
-
nt && (je("onMouseEnter", !0, E, function(p) {
|
|
1276
|
-
dt(p);
|
|
1277
|
-
}), je("onPointerEnter", !0, E, function(p) {
|
|
1278
|
-
dt(p);
|
|
1279
|
-
}), nn = function(_) {
|
|
1280
|
-
(me || ct) && J !== null && J !== void 0 && J.contains(_.target) && Ue(!0, E);
|
|
1281
|
-
}, ue && ($e.onMouseMove = function(p) {
|
|
1282
|
-
var _;
|
|
1283
|
-
(_ = re.onMouseMove) === null || _ === void 0 || _.call(re, p);
|
|
1284
|
-
})), Pn && (je("onMouseLeave", !1, M), je("onPointerLeave", !1, M), Dt = function() {
|
|
1285
|
-
Ue(!1, M);
|
|
1286
|
-
}), et.has("focus") && je("onFocus", !0, S), Qe.has("focus") && je("onBlur", !1, y), et.has("contextMenu") && ($e.onContextMenu = function(p) {
|
|
1287
|
-
var _;
|
|
1288
|
-
R.current && Qe.has("contextMenu") ? Ue(!1) : (dt(p), Ue(!0)), p.preventDefault();
|
|
1289
|
-
for (var ve = arguments.length, Ne = new Array(ve > 1 ? ve - 1 : 0), ye = 1; ye < ve; ye++)
|
|
1290
|
-
Ne[ye - 1] = arguments[ye];
|
|
1291
|
-
(_ = re.onContextMenu) === null || _ === void 0 || _.call.apply(_, [re, p].concat(Ne));
|
|
1292
|
-
}), oe && ($e.className = ke(re.className, oe));
|
|
1293
|
-
var kt = T(T({}, re), $e), hn = {}, Nn = ["onContextMenu", "onClick", "onMouseDown", "onTouchStart", "onMouseEnter", "onMouseLeave", "onFocus", "onBlur"];
|
|
1294
|
-
Nn.forEach(function(p) {
|
|
1295
|
-
Re[p] && (hn[p] = function() {
|
|
1296
|
-
for (var _, ve = arguments.length, Ne = new Array(ve), ye = 0; ye < ve; ye++)
|
|
1297
|
-
Ne[ye] = arguments[ye];
|
|
1298
|
-
(_ = kt[p]) === null || _ === void 0 || _.call.apply(_, [kt].concat(Ne)), Re[p].apply(Re, Ne);
|
|
1299
|
-
});
|
|
1300
|
-
});
|
|
1301
|
-
var Bn = /* @__PURE__ */ a.cloneElement(ne, T(T({}, kt), hn)), Un = {
|
|
1302
|
-
x: mt,
|
|
1303
|
-
y: Nt
|
|
1304
|
-
}, jn = W ? T({}, W !== !0 ? W : {}) : null;
|
|
1305
|
-
return /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement(cn, {
|
|
1306
|
-
disabled: !me,
|
|
1307
|
-
ref: Ze,
|
|
1308
|
-
onResize: en
|
|
1309
|
-
}, /* @__PURE__ */ a.createElement(aa, {
|
|
1310
|
-
getTriggerDOMNode: _e
|
|
1311
|
-
}, Bn)), /* @__PURE__ */ a.createElement(Mr.Provider, {
|
|
1312
|
-
value: ht
|
|
1313
|
-
}, /* @__PURE__ */ a.createElement(ra, {
|
|
1314
|
-
portal: e,
|
|
1315
|
-
ref: Le,
|
|
1316
|
-
prefixCls: o,
|
|
1317
|
-
popup: $,
|
|
1318
|
-
className: ke(z, Yt),
|
|
1319
|
-
style: L,
|
|
1320
|
-
target: we,
|
|
1321
|
-
onMouseEnter: nn,
|
|
1322
|
-
onMouseLeave: Dt,
|
|
1323
|
-
onPointerEnter: nn,
|
|
1324
|
-
zIndex: V,
|
|
1325
|
-
open: me,
|
|
1326
|
-
keepDom: ct,
|
|
1327
|
-
fresh: Me,
|
|
1328
|
-
onClick: G,
|
|
1329
|
-
onPointerDownCapture: mn,
|
|
1330
|
-
mask: w,
|
|
1331
|
-
motion: lt,
|
|
1332
|
-
maskMotion: rt,
|
|
1333
|
-
onVisibleChanged: tn,
|
|
1334
|
-
onPrepare: at,
|
|
1335
|
-
forceRender: O,
|
|
1336
|
-
autoDestroy: se,
|
|
1337
|
-
getPopupContainer: N,
|
|
1338
|
-
align: _t,
|
|
1339
|
-
arrow: jn,
|
|
1340
|
-
arrowPos: Un,
|
|
1341
|
-
ready: qt,
|
|
1342
|
-
offsetX: fn,
|
|
1343
|
-
offsetY: yt,
|
|
1344
|
-
offsetR: Gt,
|
|
1345
|
-
offsetB: Jt,
|
|
1346
|
-
onAlign: tt,
|
|
1347
|
-
stretch: A,
|
|
1348
|
-
targetWidth: U / bt,
|
|
1349
|
-
targetHeight: xt / Zt
|
|
1350
|
-
})));
|
|
1351
|
-
});
|
|
1352
|
-
return process.env.NODE_ENV !== "production" && (n.displayName = "Trigger"), n;
|
|
1353
|
-
}
|
|
1354
|
-
const ia = Pi(Fr);
|
|
1355
|
-
var Ni = st.ESC, _i = st.TAB;
|
|
1356
|
-
function Ii(e) {
|
|
1357
|
-
var n = e.visible, t = e.triggerRef, r = e.onVisibleChange, i = e.autoFocus, o = e.overlayRef, s = a.useRef(!1), l = function() {
|
|
1358
|
-
if (n) {
|
|
1359
|
-
var f, d;
|
|
1360
|
-
(f = t.current) === null || f === void 0 || (d = f.focus) === null || d === void 0 || d.call(f), r == null || r(!1);
|
|
1361
|
-
}
|
|
1362
|
-
}, u = function() {
|
|
1363
|
-
var f;
|
|
1364
|
-
return (f = o.current) !== null && f !== void 0 && f.focus ? (o.current.focus(), s.current = !0, !0) : !1;
|
|
1365
|
-
}, c = function(f) {
|
|
1366
|
-
switch (f.keyCode) {
|
|
1367
|
-
case Ni:
|
|
1368
|
-
l();
|
|
1369
|
-
break;
|
|
1370
|
-
case _i: {
|
|
1371
|
-
var d = !1;
|
|
1372
|
-
s.current || (d = u()), d ? f.preventDefault() : l();
|
|
1373
|
-
break;
|
|
1374
|
-
}
|
|
1375
|
-
}
|
|
1376
|
-
};
|
|
1377
|
-
a.useEffect(function() {
|
|
1378
|
-
return n ? (window.addEventListener("keydown", c), i && Ht(u, 3), function() {
|
|
1379
|
-
window.removeEventListener("keydown", c), s.current = !1;
|
|
1380
|
-
}) : function() {
|
|
1381
|
-
s.current = !1;
|
|
1382
|
-
};
|
|
1383
|
-
}, [n]);
|
|
1384
|
-
}
|
|
1385
|
-
var xi = /* @__PURE__ */ Ra(function(e, n) {
|
|
1386
|
-
var t = e.overlay, r = e.arrow, i = e.prefixCls, o = Xn(function() {
|
|
1387
|
-
var l;
|
|
1388
|
-
return typeof t == "function" ? l = t() : l = t, l;
|
|
1389
|
-
}, [t]), s = fr(n, zn(o));
|
|
1390
|
-
return /* @__PURE__ */ qe.createElement(qe.Fragment, null, r && /* @__PURE__ */ qe.createElement("div", {
|
|
1391
|
-
className: "".concat(i, "-arrow")
|
|
1392
|
-
}), /* @__PURE__ */ qe.cloneElement(o, {
|
|
1393
|
-
ref: $n(o) ? s : void 0
|
|
1394
|
-
}));
|
|
1395
|
-
}), on = {
|
|
1396
|
-
adjustX: 1,
|
|
1397
|
-
adjustY: 1
|
|
1398
|
-
}, sn = [0, 0], Di = {
|
|
1399
|
-
topLeft: {
|
|
1400
|
-
points: ["bl", "tl"],
|
|
1401
|
-
overflow: on,
|
|
1402
|
-
offset: [0, -4],
|
|
1403
|
-
targetOffset: sn
|
|
1404
|
-
},
|
|
1405
|
-
top: {
|
|
1406
|
-
points: ["bc", "tc"],
|
|
1407
|
-
overflow: on,
|
|
1408
|
-
offset: [0, -4],
|
|
1409
|
-
targetOffset: sn
|
|
1410
|
-
},
|
|
1411
|
-
topRight: {
|
|
1412
|
-
points: ["br", "tr"],
|
|
1413
|
-
overflow: on,
|
|
1414
|
-
offset: [0, -4],
|
|
1415
|
-
targetOffset: sn
|
|
1416
|
-
},
|
|
1417
|
-
bottomLeft: {
|
|
1418
|
-
points: ["tl", "bl"],
|
|
1419
|
-
overflow: on,
|
|
1420
|
-
offset: [0, 4],
|
|
1421
|
-
targetOffset: sn
|
|
1422
|
-
},
|
|
1423
|
-
bottom: {
|
|
1424
|
-
points: ["tc", "bc"],
|
|
1425
|
-
overflow: on,
|
|
1426
|
-
offset: [0, 4],
|
|
1427
|
-
targetOffset: sn
|
|
1428
|
-
},
|
|
1429
|
-
bottomRight: {
|
|
1430
|
-
points: ["tr", "br"],
|
|
1431
|
-
overflow: on,
|
|
1432
|
-
offset: [0, 4],
|
|
1433
|
-
targetOffset: sn
|
|
1434
|
-
}
|
|
1435
|
-
}, ki = ["arrow", "prefixCls", "transitionName", "animation", "align", "placement", "placements", "getPopupContainer", "showAction", "hideAction", "overlayClassName", "overlayStyle", "visible", "trigger", "autoFocus", "overlay", "children", "onVisibleChange"];
|
|
1436
|
-
function Oi(e, n) {
|
|
1437
|
-
var t, r = e.arrow, i = r === void 0 ? !1 : r, o = e.prefixCls, s = o === void 0 ? "rc-dropdown" : o, l = e.transitionName, u = e.animation, c = e.align, b = e.placement, f = b === void 0 ? "bottomLeft" : b, d = e.placements, m = d === void 0 ? Di : d, h = e.getPopupContainer, E = e.showAction, g = e.hideAction, M = e.overlayClassName, S = e.overlayStyle, y = e.visible, w = e.trigger, C = w === void 0 ? ["hover"] : w, v = e.autoFocus, N = e.overlay, O = e.children, D = e.onVisibleChange, B = De(e, ki), $ = qe.useState(), z = k($, 2), L = z[0], j = z[1], Z = "visible" in e ? y : L, q = qe.useRef(null), Q = qe.useRef(null), V = qe.useRef(null);
|
|
1438
|
-
qe.useImperativeHandle(n, function() {
|
|
1439
|
-
return q.current;
|
|
1440
|
-
});
|
|
1441
|
-
var A = function(F) {
|
|
1442
|
-
j(F), D == null || D(F);
|
|
1443
|
-
};
|
|
1444
|
-
Ii({
|
|
1445
|
-
visible: Z,
|
|
1446
|
-
triggerRef: V,
|
|
1447
|
-
onVisibleChange: A,
|
|
1448
|
-
autoFocus: v,
|
|
1449
|
-
overlayRef: Q
|
|
1450
|
-
});
|
|
1451
|
-
var x = function(F) {
|
|
1452
|
-
var Y = e.onOverlayClick;
|
|
1453
|
-
j(!1), Y && Y(F);
|
|
1454
|
-
}, Me = function() {
|
|
1455
|
-
return /* @__PURE__ */ qe.createElement(xi, {
|
|
1456
|
-
ref: Q,
|
|
1457
|
-
overlay: N,
|
|
1458
|
-
prefixCls: s,
|
|
1459
|
-
arrow: i
|
|
1460
|
-
});
|
|
1461
|
-
}, ue = function() {
|
|
1462
|
-
return typeof N == "function" ? Me : Me();
|
|
1463
|
-
}, G = function() {
|
|
1464
|
-
var F = e.minOverlayWidthMatchTrigger, Y = e.alignPoint;
|
|
1465
|
-
return "minOverlayWidthMatchTrigger" in e ? F : !Y;
|
|
1466
|
-
}, K = function() {
|
|
1467
|
-
var F = e.openClassName;
|
|
1468
|
-
return F !== void 0 ? F : "".concat(s, "-open");
|
|
1469
|
-
}, W = /* @__PURE__ */ qe.cloneElement(O, {
|
|
1470
|
-
className: ke((t = O.props) === null || t === void 0 ? void 0 : t.className, Z && K()),
|
|
1471
|
-
ref: $n(O) ? fr(V, zn(O)) : void 0
|
|
1472
|
-
}), ie = g;
|
|
1473
|
-
return !ie && C.indexOf("contextMenu") !== -1 && (ie = ["click"]), /* @__PURE__ */ qe.createElement(ia, ae({
|
|
1474
|
-
builtinPlacements: m
|
|
1475
|
-
}, B, {
|
|
1476
|
-
prefixCls: s,
|
|
1477
|
-
ref: q,
|
|
1478
|
-
popupClassName: ke(M, he({}, "".concat(s, "-show-arrow"), i)),
|
|
1479
|
-
popupStyle: S,
|
|
1480
|
-
action: C,
|
|
1481
|
-
showAction: E,
|
|
1482
|
-
hideAction: ie,
|
|
1483
|
-
popupPlacement: f,
|
|
1484
|
-
popupAlign: c,
|
|
1485
|
-
popupTransitionName: l,
|
|
1486
|
-
popupAnimation: u,
|
|
1487
|
-
popupVisible: Z,
|
|
1488
|
-
stretch: G() ? "minWidth" : "",
|
|
1489
|
-
popup: ue(),
|
|
1490
|
-
onPopupVisibleChange: A,
|
|
1491
|
-
onPopupClick: x,
|
|
1492
|
-
getPopupContainer: h
|
|
1493
|
-
}), W);
|
|
1494
|
-
}
|
|
1495
|
-
const Eo = /* @__PURE__ */ qe.forwardRef(Oi);
|
|
1496
|
-
var oa = /* @__PURE__ */ a.createContext(null);
|
|
1497
|
-
function sa(e, n) {
|
|
1498
|
-
return e === void 0 ? null : "".concat(e, "-").concat(n);
|
|
1499
|
-
}
|
|
1500
|
-
function la(e) {
|
|
1501
|
-
var n = a.useContext(oa);
|
|
1502
|
-
return sa(n, e);
|
|
1503
|
-
}
|
|
1504
|
-
var Ki = ["children", "locked"], ot = /* @__PURE__ */ a.createContext(null);
|
|
1505
|
-
function Ti(e, n) {
|
|
1506
|
-
var t = T({}, e);
|
|
1507
|
-
return Object.keys(n).forEach(function(r) {
|
|
1508
|
-
var i = n[r];
|
|
1509
|
-
i !== void 0 && (t[r] = i);
|
|
1510
|
-
}), t;
|
|
1511
|
-
}
|
|
1512
|
-
function Rn(e) {
|
|
1513
|
-
var n = e.children, t = e.locked, r = De(e, Ki), i = a.useContext(ot), o = wa(function() {
|
|
1514
|
-
return Ti(i, r);
|
|
1515
|
-
}, [i, r], function(s, l) {
|
|
1516
|
-
return !t && (s[0] !== l[0] || !Hr(s[1], l[1], !0));
|
|
1517
|
-
});
|
|
1518
|
-
return /* @__PURE__ */ a.createElement(ot.Provider, {
|
|
1519
|
-
value: o
|
|
1520
|
-
}, n);
|
|
1521
|
-
}
|
|
1522
|
-
var Li = [], ua = /* @__PURE__ */ a.createContext(null);
|
|
1523
|
-
function Wn() {
|
|
1524
|
-
return a.useContext(ua);
|
|
1525
|
-
}
|
|
1526
|
-
var ca = /* @__PURE__ */ a.createContext(Li);
|
|
1527
|
-
function Sn(e) {
|
|
1528
|
-
var n = a.useContext(ca);
|
|
1529
|
-
return a.useMemo(function() {
|
|
1530
|
-
return e !== void 0 ? [].concat(Rt(n), [e]) : n;
|
|
1531
|
-
}, [n, e]);
|
|
1532
|
-
}
|
|
1533
|
-
var fa = /* @__PURE__ */ a.createContext(null), dr = /* @__PURE__ */ a.createContext({});
|
|
1534
|
-
function Ir(e) {
|
|
1535
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1536
|
-
if (Wr(e)) {
|
|
1537
|
-
var t = e.nodeName.toLowerCase(), r = (
|
|
1538
|
-
// Focusable element
|
|
1539
|
-
["input", "select", "textarea", "button"].includes(t) || // Editable element
|
|
1540
|
-
e.isContentEditable || // Anchor with href element
|
|
1541
|
-
t === "a" && !!e.getAttribute("href")
|
|
1542
|
-
), i = e.getAttribute("tabindex"), o = Number(i), s = null;
|
|
1543
|
-
return i && !Number.isNaN(o) ? s = o : r && s === null && (s = 0), r && e.disabled && (s = null), s !== null && (s >= 0 || n && s < 0);
|
|
1544
|
-
}
|
|
1545
|
-
return !1;
|
|
1546
|
-
}
|
|
1547
|
-
function Ai(e) {
|
|
1548
|
-
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, t = Rt(e.querySelectorAll("*")).filter(function(r) {
|
|
1549
|
-
return Ir(r, n);
|
|
1550
|
-
});
|
|
1551
|
-
return Ir(e, n) && t.unshift(e), t;
|
|
1552
|
-
}
|
|
1553
|
-
var rr = st.LEFT, ar = st.RIGHT, ir = st.UP, kn = st.DOWN, On = st.ENTER, va = st.ESC, bn = st.HOME, pn = st.END, xr = [ir, kn, rr, ar];
|
|
1554
|
-
function $i(e, n, t, r) {
|
|
1555
|
-
var i, o = "prev", s = "next", l = "children", u = "parent";
|
|
1556
|
-
if (e === "inline" && r === On)
|
|
1557
|
-
return {
|
|
1558
|
-
inlineTrigger: !0
|
|
1559
|
-
};
|
|
1560
|
-
var c = he(he({}, ir, o), kn, s), b = he(he(he(he({}, rr, t ? s : o), ar, t ? o : s), kn, l), On, l), f = he(he(he(he(he(he({}, ir, o), kn, s), On, l), va, u), rr, t ? l : u), ar, t ? u : l), d = {
|
|
1561
|
-
inline: c,
|
|
1562
|
-
horizontal: b,
|
|
1563
|
-
vertical: f,
|
|
1564
|
-
inlineSub: c,
|
|
1565
|
-
horizontalSub: f,
|
|
1566
|
-
verticalSub: f
|
|
1567
|
-
}, m = (i = d["".concat(e).concat(n ? "" : "Sub")]) === null || i === void 0 ? void 0 : i[r];
|
|
1568
|
-
switch (m) {
|
|
1569
|
-
case o:
|
|
1570
|
-
return {
|
|
1571
|
-
offset: -1,
|
|
1572
|
-
sibling: !0
|
|
1573
|
-
};
|
|
1574
|
-
case s:
|
|
1575
|
-
return {
|
|
1576
|
-
offset: 1,
|
|
1577
|
-
sibling: !0
|
|
1578
|
-
};
|
|
1579
|
-
case u:
|
|
1580
|
-
return {
|
|
1581
|
-
offset: -1,
|
|
1582
|
-
sibling: !1
|
|
1583
|
-
};
|
|
1584
|
-
case l:
|
|
1585
|
-
return {
|
|
1586
|
-
offset: 1,
|
|
1587
|
-
sibling: !1
|
|
1588
|
-
};
|
|
1589
|
-
default:
|
|
1590
|
-
return null;
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
function zi(e) {
|
|
1594
|
-
for (var n = e; n; ) {
|
|
1595
|
-
if (n.getAttribute("data-menu-list"))
|
|
1596
|
-
return n;
|
|
1597
|
-
n = n.parentElement;
|
|
1598
|
-
}
|
|
1599
|
-
return null;
|
|
1600
|
-
}
|
|
1601
|
-
function Vi(e, n) {
|
|
1602
|
-
for (var t = e || document.activeElement; t; ) {
|
|
1603
|
-
if (n.has(t))
|
|
1604
|
-
return t;
|
|
1605
|
-
t = t.parentElement;
|
|
1606
|
-
}
|
|
1607
|
-
return null;
|
|
1608
|
-
}
|
|
1609
|
-
function mr(e, n) {
|
|
1610
|
-
var t = Ai(e, !0);
|
|
1611
|
-
return t.filter(function(r) {
|
|
1612
|
-
return n.has(r);
|
|
1613
|
-
});
|
|
1614
|
-
}
|
|
1615
|
-
function Dr(e, n, t) {
|
|
1616
|
-
var r = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 1;
|
|
1617
|
-
if (!e)
|
|
1618
|
-
return null;
|
|
1619
|
-
var i = mr(e, n), o = i.length, s = i.findIndex(function(l) {
|
|
1620
|
-
return t === l;
|
|
1621
|
-
});
|
|
1622
|
-
return r < 0 ? s === -1 ? s = o - 1 : s -= 1 : r > 0 && (s += 1), s = (s + o) % o, i[s];
|
|
1623
|
-
}
|
|
1624
|
-
var or = function(n, t) {
|
|
1625
|
-
var r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map();
|
|
1626
|
-
return n.forEach(function(s) {
|
|
1627
|
-
var l = document.querySelector("[data-menu-id='".concat(sa(t, s), "']"));
|
|
1628
|
-
l && (r.add(l), o.set(l, s), i.set(s, l));
|
|
1629
|
-
}), {
|
|
1630
|
-
elements: r,
|
|
1631
|
-
key2element: i,
|
|
1632
|
-
element2key: o
|
|
1633
|
-
};
|
|
1634
|
-
};
|
|
1635
|
-
function Wi(e, n, t, r, i, o, s, l, u, c) {
|
|
1636
|
-
var b = a.useRef(), f = a.useRef();
|
|
1637
|
-
f.current = n;
|
|
1638
|
-
var d = function() {
|
|
1639
|
-
Ht.cancel(b.current);
|
|
1640
|
-
};
|
|
1641
|
-
return a.useEffect(function() {
|
|
1642
|
-
return function() {
|
|
1643
|
-
d();
|
|
1644
|
-
};
|
|
1645
|
-
}, []), function(m) {
|
|
1646
|
-
var h = m.which;
|
|
1647
|
-
if ([].concat(xr, [On, va, bn, pn]).includes(h)) {
|
|
1648
|
-
var E = o(), g = or(E, r), M = g, S = M.elements, y = M.key2element, w = M.element2key, C = y.get(n), v = Vi(C, S), N = w.get(v), O = $i(e, s(N, !0).length === 1, t, h);
|
|
1649
|
-
if (!O && h !== bn && h !== pn)
|
|
1650
|
-
return;
|
|
1651
|
-
(xr.includes(h) || [bn, pn].includes(h)) && m.preventDefault();
|
|
1652
|
-
var D = function(Q) {
|
|
1653
|
-
if (Q) {
|
|
1654
|
-
var V = Q, A = Q.querySelector("a");
|
|
1655
|
-
A != null && A.getAttribute("href") && (V = A);
|
|
1656
|
-
var x = w.get(Q);
|
|
1657
|
-
l(x), d(), b.current = Ht(function() {
|
|
1658
|
-
f.current === x && V.focus();
|
|
1659
|
-
});
|
|
1660
|
-
}
|
|
1661
|
-
};
|
|
1662
|
-
if ([bn, pn].includes(h) || O.sibling || !v) {
|
|
1663
|
-
var B;
|
|
1664
|
-
!v || e === "inline" ? B = i.current : B = zi(v);
|
|
1665
|
-
var $, z = mr(B, S);
|
|
1666
|
-
h === bn ? $ = z[0] : h === pn ? $ = z[z.length - 1] : $ = Dr(B, S, v, O.offset), D($);
|
|
1667
|
-
} else if (O.inlineTrigger)
|
|
1668
|
-
u(N);
|
|
1669
|
-
else if (O.offset > 0)
|
|
1670
|
-
u(N, !0), d(), b.current = Ht(function() {
|
|
1671
|
-
g = or(E, r);
|
|
1672
|
-
var q = v.getAttribute("aria-controls"), Q = document.getElementById(q), V = Dr(Q, g.elements);
|
|
1673
|
-
D(V);
|
|
1674
|
-
}, 5);
|
|
1675
|
-
else if (O.offset < 0) {
|
|
1676
|
-
var L = s(N, !0), j = L[L.length - 2], Z = y.get(j);
|
|
1677
|
-
u(j, !1), D(Z);
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
c == null || c(m);
|
|
1681
|
-
};
|
|
1682
|
-
}
|
|
1683
|
-
function Fi(e) {
|
|
1684
|
-
Promise.resolve().then(e);
|
|
1685
|
-
}
|
|
1686
|
-
var hr = "__RC_UTIL_PATH_SPLIT__", kr = function(n) {
|
|
1687
|
-
return n.join(hr);
|
|
1688
|
-
}, Hi = function(n) {
|
|
1689
|
-
return n.split(hr);
|
|
1690
|
-
}, sr = "rc-menu-more";
|
|
1691
|
-
function Bi() {
|
|
1692
|
-
var e = a.useState({}), n = k(e, 2), t = n[1], r = xn(/* @__PURE__ */ new Map()), i = xn(/* @__PURE__ */ new Map()), o = a.useState([]), s = k(o, 2), l = s[0], u = s[1], c = xn(0), b = xn(!1), f = function() {
|
|
1693
|
-
b.current || t({});
|
|
1694
|
-
}, d = Tt(function(y, w) {
|
|
1695
|
-
process.env.NODE_ENV !== "production" && un(!r.current.has(y), "Duplicated key '".concat(y, "' used in Menu by path [").concat(w.join(" > "), "]"));
|
|
1696
|
-
var C = kr(w);
|
|
1697
|
-
i.current.set(C, y), r.current.set(y, C), c.current += 1;
|
|
1698
|
-
var v = c.current;
|
|
1699
|
-
Fi(function() {
|
|
1700
|
-
v === c.current && f();
|
|
1701
|
-
});
|
|
1702
|
-
}, []), m = Tt(function(y, w) {
|
|
1703
|
-
var C = kr(w);
|
|
1704
|
-
i.current.delete(C), r.current.delete(y);
|
|
1705
|
-
}, []), h = Tt(function(y) {
|
|
1706
|
-
u(y);
|
|
1707
|
-
}, []), E = Tt(function(y, w) {
|
|
1708
|
-
var C = r.current.get(y) || "", v = Hi(C);
|
|
1709
|
-
return w && l.includes(v[0]) && v.unshift(sr), v;
|
|
1710
|
-
}, [l]), g = Tt(function(y, w) {
|
|
1711
|
-
return y.filter(function(C) {
|
|
1712
|
-
return C !== void 0;
|
|
1713
|
-
}).some(function(C) {
|
|
1714
|
-
var v = E(C, !0);
|
|
1715
|
-
return v.includes(w);
|
|
1716
|
-
});
|
|
1717
|
-
}, [E]), M = function() {
|
|
1718
|
-
var w = Rt(r.current.keys());
|
|
1719
|
-
return l.length && w.push(sr), w;
|
|
1720
|
-
}, S = Tt(function(y) {
|
|
1721
|
-
var w = "".concat(r.current.get(y)).concat(hr), C = /* @__PURE__ */ new Set();
|
|
1722
|
-
return Rt(i.current.keys()).forEach(function(v) {
|
|
1723
|
-
v.startsWith(w) && C.add(i.current.get(v));
|
|
1724
|
-
}), C;
|
|
1725
|
-
}, []);
|
|
1726
|
-
return a.useEffect(function() {
|
|
1727
|
-
return function() {
|
|
1728
|
-
b.current = !0;
|
|
1729
|
-
};
|
|
1730
|
-
}, []), {
|
|
1731
|
-
// Register
|
|
1732
|
-
registerPath: d,
|
|
1733
|
-
unregisterPath: m,
|
|
1734
|
-
refreshOverflowKeys: h,
|
|
1735
|
-
// Util
|
|
1736
|
-
isSubPathKey: g,
|
|
1737
|
-
getKeyPath: E,
|
|
1738
|
-
getKeys: M,
|
|
1739
|
-
getSubPathKeys: S
|
|
1740
|
-
};
|
|
1741
|
-
}
|
|
1742
|
-
function Cn(e) {
|
|
1743
|
-
var n = a.useRef(e);
|
|
1744
|
-
n.current = e;
|
|
1745
|
-
var t = a.useCallback(function() {
|
|
1746
|
-
for (var r, i = arguments.length, o = new Array(i), s = 0; s < i; s++)
|
|
1747
|
-
o[s] = arguments[s];
|
|
1748
|
-
return (r = n.current) === null || r === void 0 ? void 0 : r.call.apply(r, [n].concat(o));
|
|
1749
|
-
}, []);
|
|
1750
|
-
return e ? t : void 0;
|
|
1751
|
-
}
|
|
1752
|
-
var Ui = Math.random().toFixed(5).toString().slice(2), Or = 0;
|
|
1753
|
-
function ji(e) {
|
|
1754
|
-
var n = Dn(e, {
|
|
1755
|
-
value: e
|
|
1756
|
-
}), t = k(n, 2), r = t[0], i = t[1];
|
|
1757
|
-
return a.useEffect(function() {
|
|
1758
|
-
Or += 1;
|
|
1759
|
-
var o = process.env.NODE_ENV === "test" ? "test" : "".concat(Ui, "-").concat(Or);
|
|
1760
|
-
i("rc-menu-uuid-".concat(o));
|
|
1761
|
-
}, []), r;
|
|
1762
|
-
}
|
|
1763
|
-
function da(e, n, t, r) {
|
|
1764
|
-
var i = a.useContext(ot), o = i.activeKey, s = i.onActive, l = i.onInactive, u = {
|
|
1765
|
-
active: o === e
|
|
1766
|
-
};
|
|
1767
|
-
return n || (u.onMouseEnter = function(c) {
|
|
1768
|
-
t == null || t({
|
|
1769
|
-
key: e,
|
|
1770
|
-
domEvent: c
|
|
1771
|
-
}), s(e);
|
|
1772
|
-
}, u.onMouseLeave = function(c) {
|
|
1773
|
-
r == null || r({
|
|
1774
|
-
key: e,
|
|
1775
|
-
domEvent: c
|
|
1776
|
-
}), l(e);
|
|
1777
|
-
}), u;
|
|
1778
|
-
}
|
|
1779
|
-
function ma(e) {
|
|
1780
|
-
var n = a.useContext(ot), t = n.mode, r = n.rtl, i = n.inlineIndent;
|
|
1781
|
-
if (t !== "inline")
|
|
1782
|
-
return null;
|
|
1783
|
-
var o = e;
|
|
1784
|
-
return r ? {
|
|
1785
|
-
paddingRight: o * i
|
|
1786
|
-
} : {
|
|
1787
|
-
paddingLeft: o * i
|
|
1788
|
-
};
|
|
1789
|
-
}
|
|
1790
|
-
function ha(e) {
|
|
1791
|
-
var n = e.icon, t = e.props, r = e.children, i;
|
|
1792
|
-
return n === null || n === !1 ? null : (typeof n == "function" ? i = /* @__PURE__ */ a.createElement(n, T({}, t)) : typeof n != "boolean" && (i = n), i || r || null);
|
|
1793
|
-
}
|
|
1794
|
-
var qi = ["item"];
|
|
1795
|
-
function An(e) {
|
|
1796
|
-
var n = e.item, t = De(e, qi);
|
|
1797
|
-
return Object.defineProperty(t, "item", {
|
|
1798
|
-
get: function() {
|
|
1799
|
-
return un(!1, "`info.item` is deprecated since we will move to function component that not provides React Node instance in future."), n;
|
|
1800
|
-
}
|
|
1801
|
-
}), t;
|
|
1802
|
-
}
|
|
1803
|
-
var Gi = ["title", "attribute", "elementRef"], Ji = ["style", "className", "eventKey", "warnKey", "disabled", "itemIcon", "children", "role", "onMouseEnter", "onMouseLeave", "onClick", "onKeyDown", "onFocus"], Zi = ["active"], Qi = /* @__PURE__ */ function(e) {
|
|
1804
|
-
Tr(t, e);
|
|
1805
|
-
var n = Lr(t);
|
|
1806
|
-
function t() {
|
|
1807
|
-
return Ar(this, t), n.apply(this, arguments);
|
|
1808
|
-
}
|
|
1809
|
-
return $r(t, [{
|
|
1810
|
-
key: "render",
|
|
1811
|
-
value: function() {
|
|
1812
|
-
var i = this.props, o = i.title, s = i.attribute, l = i.elementRef, u = De(i, Gi), c = vr(u, ["eventKey", "popupClassName", "popupOffset", "onTitleClick"]);
|
|
1813
|
-
return un(!s, "`attribute` of Menu.Item is deprecated. Please pass attribute directly."), /* @__PURE__ */ a.createElement(Mt.Item, ae({}, s, {
|
|
1814
|
-
title: typeof o == "string" ? o : void 0
|
|
1815
|
-
}, c, {
|
|
1816
|
-
ref: l
|
|
1817
|
-
}));
|
|
1818
|
-
}
|
|
1819
|
-
}]), t;
|
|
1820
|
-
}(a.Component), Yi = /* @__PURE__ */ a.forwardRef(function(e, n) {
|
|
1821
|
-
var t = e.style, r = e.className, i = e.eventKey, o = e.warnKey, s = e.disabled, l = e.itemIcon, u = e.children, c = e.role, b = e.onMouseEnter, f = e.onMouseLeave, d = e.onClick, m = e.onKeyDown, h = e.onFocus, E = De(e, Ji), g = la(i), M = a.useContext(ot), S = M.prefixCls, y = M.onItemClick, w = M.disabled, C = M.overflowDisabled, v = M.itemIcon, N = M.selectedKeys, O = M.onActive, D = a.useContext(dr), B = D._internalRenderMenuItem, $ = "".concat(S, "-item"), z = a.useRef(), L = a.useRef(), j = w || s, Z = ur(n, L), q = Sn(i);
|
|
1822
|
-
process.env.NODE_ENV !== "production" && o && un(!1, "MenuItem should not leave undefined `key`.");
|
|
1823
|
-
var Q = function(te) {
|
|
1824
|
-
return {
|
|
1825
|
-
key: i,
|
|
1826
|
-
// Note: For legacy code is reversed which not like other antd component
|
|
1827
|
-
keyPath: Rt(q).reverse(),
|
|
1828
|
-
item: z.current,
|
|
1829
|
-
domEvent: te
|
|
1830
|
-
};
|
|
1831
|
-
}, V = l || v, A = da(i, j, b, f), x = A.active, Me = De(A, Zi), ue = N.includes(i), G = ma(q.length), K = function(te) {
|
|
1832
|
-
if (!j) {
|
|
1833
|
-
var pe = Q(te);
|
|
1834
|
-
d == null || d(An(pe)), y(pe);
|
|
1835
|
-
}
|
|
1836
|
-
}, W = function(te) {
|
|
1837
|
-
if (m == null || m(te), te.which === st.ENTER) {
|
|
1838
|
-
var pe = Q(te);
|
|
1839
|
-
d == null || d(An(pe)), y(pe);
|
|
1840
|
-
}
|
|
1841
|
-
}, ie = function(te) {
|
|
1842
|
-
O(i), h == null || h(te);
|
|
1843
|
-
}, be = {};
|
|
1844
|
-
e.role === "option" && (be["aria-selected"] = ue);
|
|
1845
|
-
var F = /* @__PURE__ */ a.createElement(Qi, ae({
|
|
1846
|
-
ref: z,
|
|
1847
|
-
elementRef: Z,
|
|
1848
|
-
role: c === null ? "none" : c || "menuitem",
|
|
1849
|
-
tabIndex: s ? null : -1,
|
|
1850
|
-
"data-menu-id": C && g ? null : g
|
|
1851
|
-
}, vr(E, ["extra"]), Me, be, {
|
|
1852
|
-
component: "li",
|
|
1853
|
-
"aria-disabled": s,
|
|
1854
|
-
style: T(T({}, G), t),
|
|
1855
|
-
className: ke($, he(he(he({}, "".concat($, "-active"), x), "".concat($, "-selected"), ue), "".concat($, "-disabled"), j), r),
|
|
1856
|
-
onClick: K,
|
|
1857
|
-
onKeyDown: W,
|
|
1858
|
-
onFocus: ie
|
|
1859
|
-
}), u, /* @__PURE__ */ a.createElement(ha, {
|
|
1860
|
-
props: T(T({}, e), {}, {
|
|
1861
|
-
isSelected: ue
|
|
1862
|
-
}),
|
|
1863
|
-
icon: V
|
|
1864
|
-
}));
|
|
1865
|
-
return B && (F = B(F, e, {
|
|
1866
|
-
selected: ue
|
|
1867
|
-
})), F;
|
|
1868
|
-
});
|
|
1869
|
-
function Xi(e, n) {
|
|
1870
|
-
var t = e.eventKey, r = Wn(), i = Sn(t);
|
|
1871
|
-
return a.useEffect(function() {
|
|
1872
|
-
if (r)
|
|
1873
|
-
return r.registerPath(t, i), function() {
|
|
1874
|
-
r.unregisterPath(t, i);
|
|
1875
|
-
};
|
|
1876
|
-
}, [i]), r ? null : /* @__PURE__ */ a.createElement(Yi, ae({}, e, {
|
|
1877
|
-
ref: n
|
|
1878
|
-
}));
|
|
1879
|
-
}
|
|
1880
|
-
const gr = /* @__PURE__ */ a.forwardRef(Xi);
|
|
1881
|
-
var eo = ["className", "children"], to = function(n, t) {
|
|
1882
|
-
var r = n.className, i = n.children, o = De(n, eo), s = a.useContext(ot), l = s.prefixCls, u = s.mode, c = s.rtl;
|
|
1883
|
-
return /* @__PURE__ */ a.createElement("ul", ae({
|
|
1884
|
-
className: ke(l, c && "".concat(l, "-rtl"), "".concat(l, "-sub"), "".concat(l, "-").concat(u === "inline" ? "inline" : "vertical"), r),
|
|
1885
|
-
role: "menu"
|
|
1886
|
-
}, o, {
|
|
1887
|
-
"data-menu-list": !0,
|
|
1888
|
-
ref: t
|
|
1889
|
-
}), i);
|
|
1890
|
-
}, yr = /* @__PURE__ */ a.forwardRef(to);
|
|
1891
|
-
yr.displayName = "SubMenuList";
|
|
1892
|
-
function br(e, n) {
|
|
1893
|
-
return Vr(e).map(function(t, r) {
|
|
1894
|
-
if (/* @__PURE__ */ a.isValidElement(t)) {
|
|
1895
|
-
var i, o, s = t.key, l = (i = (o = t.props) === null || o === void 0 ? void 0 : o.eventKey) !== null && i !== void 0 ? i : s, u = l == null;
|
|
1896
|
-
u && (l = "tmp_key-".concat([].concat(Rt(n), [r]).join("-")));
|
|
1897
|
-
var c = {
|
|
1898
|
-
key: l,
|
|
1899
|
-
eventKey: l
|
|
1900
|
-
};
|
|
1901
|
-
return process.env.NODE_ENV !== "production" && u && (c.warnKey = !0), /* @__PURE__ */ a.cloneElement(t, c);
|
|
1902
|
-
}
|
|
1903
|
-
return t;
|
|
1904
|
-
});
|
|
1905
|
-
}
|
|
1906
|
-
var ze = {
|
|
1907
|
-
adjustX: 1,
|
|
1908
|
-
adjustY: 1
|
|
1909
|
-
}, no = {
|
|
1910
|
-
topLeft: {
|
|
1911
|
-
points: ["bl", "tl"],
|
|
1912
|
-
overflow: ze
|
|
1913
|
-
},
|
|
1914
|
-
topRight: {
|
|
1915
|
-
points: ["br", "tr"],
|
|
1916
|
-
overflow: ze
|
|
1917
|
-
},
|
|
1918
|
-
bottomLeft: {
|
|
1919
|
-
points: ["tl", "bl"],
|
|
1920
|
-
overflow: ze
|
|
1921
|
-
},
|
|
1922
|
-
bottomRight: {
|
|
1923
|
-
points: ["tr", "br"],
|
|
1924
|
-
overflow: ze
|
|
1925
|
-
},
|
|
1926
|
-
leftTop: {
|
|
1927
|
-
points: ["tr", "tl"],
|
|
1928
|
-
overflow: ze
|
|
1929
|
-
},
|
|
1930
|
-
leftBottom: {
|
|
1931
|
-
points: ["br", "bl"],
|
|
1932
|
-
overflow: ze
|
|
1933
|
-
},
|
|
1934
|
-
rightTop: {
|
|
1935
|
-
points: ["tl", "tr"],
|
|
1936
|
-
overflow: ze
|
|
1937
|
-
},
|
|
1938
|
-
rightBottom: {
|
|
1939
|
-
points: ["bl", "br"],
|
|
1940
|
-
overflow: ze
|
|
1941
|
-
}
|
|
1942
|
-
}, ro = {
|
|
1943
|
-
topLeft: {
|
|
1944
|
-
points: ["bl", "tl"],
|
|
1945
|
-
overflow: ze
|
|
1946
|
-
},
|
|
1947
|
-
topRight: {
|
|
1948
|
-
points: ["br", "tr"],
|
|
1949
|
-
overflow: ze
|
|
1950
|
-
},
|
|
1951
|
-
bottomLeft: {
|
|
1952
|
-
points: ["tl", "bl"],
|
|
1953
|
-
overflow: ze
|
|
1954
|
-
},
|
|
1955
|
-
bottomRight: {
|
|
1956
|
-
points: ["tr", "br"],
|
|
1957
|
-
overflow: ze
|
|
1958
|
-
},
|
|
1959
|
-
rightTop: {
|
|
1960
|
-
points: ["tr", "tl"],
|
|
1961
|
-
overflow: ze
|
|
1962
|
-
},
|
|
1963
|
-
rightBottom: {
|
|
1964
|
-
points: ["br", "bl"],
|
|
1965
|
-
overflow: ze
|
|
1966
|
-
},
|
|
1967
|
-
leftTop: {
|
|
1968
|
-
points: ["tl", "tr"],
|
|
1969
|
-
overflow: ze
|
|
1970
|
-
},
|
|
1971
|
-
leftBottom: {
|
|
1972
|
-
points: ["bl", "br"],
|
|
1973
|
-
overflow: ze
|
|
1974
|
-
}
|
|
1975
|
-
};
|
|
1976
|
-
function ga(e, n, t) {
|
|
1977
|
-
if (n)
|
|
1978
|
-
return n;
|
|
1979
|
-
if (t)
|
|
1980
|
-
return t[e] || t.other;
|
|
1981
|
-
}
|
|
1982
|
-
var ao = {
|
|
1983
|
-
horizontal: "bottomLeft",
|
|
1984
|
-
vertical: "rightTop",
|
|
1985
|
-
"vertical-left": "rightTop",
|
|
1986
|
-
"vertical-right": "leftTop"
|
|
1987
|
-
};
|
|
1988
|
-
function io(e) {
|
|
1989
|
-
var n = e.prefixCls, t = e.visible, r = e.children, i = e.popup, o = e.popupStyle, s = e.popupClassName, l = e.popupOffset, u = e.disabled, c = e.mode, b = e.onVisibleChange, f = a.useContext(ot), d = f.getPopupContainer, m = f.rtl, h = f.subMenuOpenDelay, E = f.subMenuCloseDelay, g = f.builtinPlacements, M = f.triggerSubMenuAction, S = f.forceSubMenuRender, y = f.rootClassName, w = f.motion, C = f.defaultMotions, v = a.useState(!1), N = k(v, 2), O = N[0], D = N[1], B = m ? T(T({}, ro), g) : T(T({}, no), g), $ = ao[c], z = ga(c, w, C), L = a.useRef(z);
|
|
1990
|
-
c !== "inline" && (L.current = z);
|
|
1991
|
-
var j = T(T({}, L.current), {}, {
|
|
1992
|
-
leavedClassName: "".concat(n, "-hidden"),
|
|
1993
|
-
removeOnLeave: !1,
|
|
1994
|
-
motionAppear: !0
|
|
1995
|
-
}), Z = a.useRef();
|
|
1996
|
-
return a.useEffect(function() {
|
|
1997
|
-
return Z.current = Ht(function() {
|
|
1998
|
-
D(t);
|
|
1999
|
-
}), function() {
|
|
2000
|
-
Ht.cancel(Z.current);
|
|
2001
|
-
};
|
|
2002
|
-
}, [t]), /* @__PURE__ */ a.createElement(ia, {
|
|
2003
|
-
prefixCls: n,
|
|
2004
|
-
popupClassName: ke("".concat(n, "-popup"), he({}, "".concat(n, "-rtl"), m), s, y),
|
|
2005
|
-
stretch: c === "horizontal" ? "minWidth" : null,
|
|
2006
|
-
getPopupContainer: d,
|
|
2007
|
-
builtinPlacements: B,
|
|
2008
|
-
popupPlacement: $,
|
|
2009
|
-
popupVisible: O,
|
|
2010
|
-
popup: i,
|
|
2011
|
-
popupStyle: o,
|
|
2012
|
-
popupAlign: l && {
|
|
2013
|
-
offset: l
|
|
2014
|
-
},
|
|
2015
|
-
action: u ? [] : [M],
|
|
2016
|
-
mouseEnterDelay: h,
|
|
2017
|
-
mouseLeaveDelay: E,
|
|
2018
|
-
onPopupVisibleChange: b,
|
|
2019
|
-
forceRender: S,
|
|
2020
|
-
popupMotion: j,
|
|
2021
|
-
fresh: !0
|
|
2022
|
-
}, r);
|
|
2023
|
-
}
|
|
2024
|
-
function oo(e) {
|
|
2025
|
-
var n = e.id, t = e.open, r = e.keyPath, i = e.children, o = "inline", s = a.useContext(ot), l = s.prefixCls, u = s.forceSubMenuRender, c = s.motion, b = s.defaultMotions, f = s.mode, d = a.useRef(!1);
|
|
2026
|
-
d.current = f === o;
|
|
2027
|
-
var m = a.useState(!d.current), h = k(m, 2), E = h[0], g = h[1], M = d.current ? t : !1;
|
|
2028
|
-
a.useEffect(function() {
|
|
2029
|
-
d.current && g(!1);
|
|
2030
|
-
}, [f]);
|
|
2031
|
-
var S = T({}, ga(o, c, b));
|
|
2032
|
-
r.length > 1 && (S.motionAppear = !1);
|
|
2033
|
-
var y = S.onVisibleChanged;
|
|
2034
|
-
return S.onVisibleChanged = function(w) {
|
|
2035
|
-
return !d.current && !w && g(!0), y == null ? void 0 : y(w);
|
|
2036
|
-
}, E ? null : /* @__PURE__ */ a.createElement(Rn, {
|
|
2037
|
-
mode: o,
|
|
2038
|
-
locked: !d.current
|
|
2039
|
-
}, /* @__PURE__ */ a.createElement(cr, ae({
|
|
2040
|
-
visible: M
|
|
2041
|
-
}, S, {
|
|
2042
|
-
forceRender: u,
|
|
2043
|
-
removeOnLeave: !1,
|
|
2044
|
-
leavedClassName: "".concat(l, "-hidden")
|
|
2045
|
-
}), function(w) {
|
|
2046
|
-
var C = w.className, v = w.style;
|
|
2047
|
-
return /* @__PURE__ */ a.createElement(yr, {
|
|
2048
|
-
id: n,
|
|
2049
|
-
className: C,
|
|
2050
|
-
style: v
|
|
2051
|
-
}, i);
|
|
2052
|
-
}));
|
|
2053
|
-
}
|
|
2054
|
-
var so = ["style", "className", "title", "eventKey", "warnKey", "disabled", "internalPopupClose", "children", "itemIcon", "expandIcon", "popupClassName", "popupOffset", "popupStyle", "onClick", "onMouseEnter", "onMouseLeave", "onTitleClick", "onTitleMouseEnter", "onTitleMouseLeave"], lo = ["active"], uo = /* @__PURE__ */ a.forwardRef(function(e, n) {
|
|
2055
|
-
var t = e.style, r = e.className, i = e.title, o = e.eventKey, s = e.warnKey, l = e.disabled, u = e.internalPopupClose, c = e.children, b = e.itemIcon, f = e.expandIcon, d = e.popupClassName, m = e.popupOffset, h = e.popupStyle, E = e.onClick, g = e.onMouseEnter, M = e.onMouseLeave, S = e.onTitleClick, y = e.onTitleMouseEnter, w = e.onTitleMouseLeave, C = De(e, so), v = la(o), N = a.useContext(ot), O = N.prefixCls, D = N.mode, B = N.openKeys, $ = N.disabled, z = N.overflowDisabled, L = N.activeKey, j = N.selectedKeys, Z = N.itemIcon, q = N.expandIcon, Q = N.onItemClick, V = N.onOpenChange, A = N.onActive, x = a.useContext(dr), Me = x._internalRenderSubMenuItem, ue = a.useContext(fa), G = ue.isSubPathKey, K = Sn(), W = "".concat(O, "-submenu"), ie = $ || l, be = a.useRef(), F = a.useRef();
|
|
2056
|
-
process.env.NODE_ENV !== "production" && s && un(!1, "SubMenu should not leave undefined `key`.");
|
|
2057
|
-
var Y = b ?? Z, te = f ?? q, pe = B.includes(o), oe = !z && pe, _e = G(j, o), Re = da(o, ie, y, w), se = Re.active, He = De(Re, lo), Be = a.useState(!1), ce = k(Be, 2), Ie = ce[0], Ve = ce[1], de = function(re) {
|
|
2058
|
-
ie || Ve(re);
|
|
2059
|
-
}, ht = function(re) {
|
|
2060
|
-
de(!0), g == null || g({
|
|
2061
|
-
key: o,
|
|
2062
|
-
domEvent: re
|
|
2063
|
-
});
|
|
2064
|
-
}, H = function(re) {
|
|
2065
|
-
de(!1), M == null || M({
|
|
2066
|
-
key: o,
|
|
2067
|
-
domEvent: re
|
|
2068
|
-
});
|
|
2069
|
-
}, Ge = a.useMemo(function() {
|
|
2070
|
-
return se || (D !== "inline" ? Ie || G([L], o) : !1);
|
|
2071
|
-
}, [D, se, L, Ie, o, G]), Ce = ma(K.length), J = function(re) {
|
|
2072
|
-
ie || (S == null || S({
|
|
2073
|
-
key: o,
|
|
2074
|
-
domEvent: re
|
|
2075
|
-
}), D === "inline" && V(o, !pe));
|
|
2076
|
-
}, We = Cn(function(ne) {
|
|
2077
|
-
E == null || E(An(ne)), Q(ne);
|
|
2078
|
-
}), Te = function(re) {
|
|
2079
|
-
D !== "inline" && V(o, re);
|
|
2080
|
-
}, Le = function() {
|
|
2081
|
-
A(o);
|
|
2082
|
-
}, Je = v && "".concat(v, "-popup"), Ae = a.useMemo(function() {
|
|
2083
|
-
return /* @__PURE__ */ a.createElement(ha, {
|
|
2084
|
-
icon: D !== "horizontal" ? te : void 0,
|
|
2085
|
-
props: T(T({}, e), {}, {
|
|
2086
|
-
isOpen: oe,
|
|
2087
|
-
// [Legacy] Not sure why need this mark
|
|
2088
|
-
isSubMenu: !0
|
|
2089
|
-
})
|
|
2090
|
-
}, /* @__PURE__ */ a.createElement("i", {
|
|
2091
|
-
className: "".concat(W, "-arrow")
|
|
2092
|
-
}));
|
|
2093
|
-
}, [D, te, e, oe, W]), we = /* @__PURE__ */ a.createElement("div", ae({
|
|
2094
|
-
role: "menuitem",
|
|
2095
|
-
style: Ce,
|
|
2096
|
-
className: "".concat(W, "-title"),
|
|
2097
|
-
tabIndex: ie ? null : -1,
|
|
2098
|
-
ref: be,
|
|
2099
|
-
title: typeof i == "string" ? i : null,
|
|
2100
|
-
"data-menu-id": z && v ? null : v,
|
|
2101
|
-
"aria-expanded": oe,
|
|
2102
|
-
"aria-haspopup": !0,
|
|
2103
|
-
"aria-controls": Je,
|
|
2104
|
-
"aria-disabled": ie,
|
|
2105
|
-
onClick: J,
|
|
2106
|
-
onFocus: Le
|
|
2107
|
-
}, He), i, Ae), fe = a.useRef(D);
|
|
2108
|
-
if (D !== "inline" && K.length > 1 ? fe.current = "vertical" : fe.current = D, !z) {
|
|
2109
|
-
var Ee = fe.current;
|
|
2110
|
-
we = /* @__PURE__ */ a.createElement(io, {
|
|
2111
|
-
mode: Ee,
|
|
2112
|
-
prefixCls: W,
|
|
2113
|
-
visible: !u && oe && D !== "inline",
|
|
2114
|
-
popupClassName: d,
|
|
2115
|
-
popupOffset: m,
|
|
2116
|
-
popupStyle: h,
|
|
2117
|
-
popup: /* @__PURE__ */ a.createElement(
|
|
2118
|
-
Rn,
|
|
2119
|
-
{
|
|
2120
|
-
mode: Ee === "horizontal" ? "vertical" : Ee
|
|
2121
|
-
},
|
|
2122
|
-
/* @__PURE__ */ a.createElement(yr, {
|
|
2123
|
-
id: Je,
|
|
2124
|
-
ref: F
|
|
2125
|
-
}, c)
|
|
2126
|
-
),
|
|
2127
|
-
disabled: ie,
|
|
2128
|
-
onVisibleChange: Te
|
|
2129
|
-
}, we);
|
|
2130
|
-
}
|
|
2131
|
-
var Ze = /* @__PURE__ */ a.createElement(Mt.Item, ae({
|
|
2132
|
-
ref: n,
|
|
2133
|
-
role: "none"
|
|
2134
|
-
}, C, {
|
|
2135
|
-
component: "li",
|
|
2136
|
-
style: t,
|
|
2137
|
-
className: ke(W, "".concat(W, "-").concat(D), r, he(he(he(he({}, "".concat(W, "-open"), oe), "".concat(W, "-active"), Ge), "".concat(W, "-selected"), _e), "".concat(W, "-disabled"), ie)),
|
|
2138
|
-
onMouseEnter: ht,
|
|
2139
|
-
onMouseLeave: H
|
|
2140
|
-
}), we, !z && /* @__PURE__ */ a.createElement(oo, {
|
|
2141
|
-
id: Je,
|
|
2142
|
-
open: oe,
|
|
2143
|
-
keyPath: K
|
|
2144
|
-
}, c));
|
|
2145
|
-
return Me && (Ze = Me(Ze, e, {
|
|
2146
|
-
selected: _e,
|
|
2147
|
-
active: Ge,
|
|
2148
|
-
open: oe,
|
|
2149
|
-
disabled: ie
|
|
2150
|
-
})), /* @__PURE__ */ a.createElement(Rn, {
|
|
2151
|
-
onItemClick: We,
|
|
2152
|
-
mode: D === "horizontal" ? "vertical" : D,
|
|
2153
|
-
itemIcon: Y,
|
|
2154
|
-
expandIcon: te
|
|
2155
|
-
}, Ze);
|
|
2156
|
-
}), Fn = /* @__PURE__ */ a.forwardRef(function(e, n) {
|
|
2157
|
-
var t = e.eventKey, r = e.children, i = Sn(t), o = br(r, i), s = Wn();
|
|
2158
|
-
a.useEffect(function() {
|
|
2159
|
-
if (s)
|
|
2160
|
-
return s.registerPath(t, i), function() {
|
|
2161
|
-
s.unregisterPath(t, i);
|
|
2162
|
-
};
|
|
2163
|
-
}, [i]);
|
|
2164
|
-
var l;
|
|
2165
|
-
return s ? l = o : l = /* @__PURE__ */ a.createElement(uo, ae({
|
|
2166
|
-
ref: n
|
|
2167
|
-
}, e), o), /* @__PURE__ */ a.createElement(ca.Provider, {
|
|
2168
|
-
value: i
|
|
2169
|
-
}, l);
|
|
2170
|
-
});
|
|
2171
|
-
process.env.NODE_ENV !== "production" && (Fn.displayName = "SubMenu");
|
|
2172
|
-
function ya(e) {
|
|
2173
|
-
var n = e.className, t = e.style, r = a.useContext(ot), i = r.prefixCls, o = Wn();
|
|
2174
|
-
return o ? null : /* @__PURE__ */ a.createElement("li", {
|
|
2175
|
-
role: "separator",
|
|
2176
|
-
className: ke("".concat(i, "-item-divider"), n),
|
|
2177
|
-
style: t
|
|
2178
|
-
});
|
|
2179
|
-
}
|
|
2180
|
-
var co = ["className", "title", "eventKey", "children"], fo = /* @__PURE__ */ a.forwardRef(function(e, n) {
|
|
2181
|
-
var t = e.className, r = e.title;
|
|
2182
|
-
e.eventKey;
|
|
2183
|
-
var i = e.children, o = De(e, co), s = a.useContext(ot), l = s.prefixCls, u = "".concat(l, "-item-group");
|
|
2184
|
-
return /* @__PURE__ */ a.createElement("li", ae({
|
|
2185
|
-
ref: n,
|
|
2186
|
-
role: "presentation"
|
|
2187
|
-
}, o, {
|
|
2188
|
-
onClick: function(b) {
|
|
2189
|
-
return b.stopPropagation();
|
|
2190
|
-
},
|
|
2191
|
-
className: ke(u, t)
|
|
2192
|
-
}), /* @__PURE__ */ a.createElement("div", {
|
|
2193
|
-
role: "presentation",
|
|
2194
|
-
className: "".concat(u, "-title"),
|
|
2195
|
-
title: typeof r == "string" ? r : void 0
|
|
2196
|
-
}, r), /* @__PURE__ */ a.createElement("ul", {
|
|
2197
|
-
role: "group",
|
|
2198
|
-
className: "".concat(u, "-list")
|
|
2199
|
-
}, i));
|
|
2200
|
-
}), pr = /* @__PURE__ */ a.forwardRef(function(e, n) {
|
|
2201
|
-
var t = e.eventKey, r = e.children, i = Sn(t), o = br(r, i), s = Wn();
|
|
2202
|
-
return s ? o : /* @__PURE__ */ a.createElement(fo, ae({
|
|
2203
|
-
ref: n
|
|
2204
|
-
}, vr(e, ["warnKey"])), o);
|
|
2205
|
-
});
|
|
2206
|
-
process.env.NODE_ENV !== "production" && (pr.displayName = "MenuItemGroup");
|
|
2207
|
-
var vo = ["label", "children", "key", "type", "extra"];
|
|
2208
|
-
function lr(e, n, t) {
|
|
2209
|
-
var r = n.item, i = n.group, o = n.submenu, s = n.divider;
|
|
2210
|
-
return (e || []).map(function(l, u) {
|
|
2211
|
-
if (l && zr(l) === "object") {
|
|
2212
|
-
var c = l, b = c.label, f = c.children, d = c.key, m = c.type, h = c.extra, E = De(c, vo), g = d ?? "tmp-".concat(u);
|
|
2213
|
-
return f || m === "group" ? m === "group" ? /* @__PURE__ */ a.createElement(i, ae({
|
|
2214
|
-
key: g
|
|
2215
|
-
}, E, {
|
|
2216
|
-
title: b
|
|
2217
|
-
}), lr(f, n, t)) : /* @__PURE__ */ a.createElement(o, ae({
|
|
2218
|
-
key: g
|
|
2219
|
-
}, E, {
|
|
2220
|
-
title: b
|
|
2221
|
-
}), lr(f, n, t)) : m === "divider" ? /* @__PURE__ */ a.createElement(s, ae({
|
|
2222
|
-
key: g
|
|
2223
|
-
}, E)) : /* @__PURE__ */ a.createElement(r, ae({
|
|
2224
|
-
key: g
|
|
2225
|
-
}, E, {
|
|
2226
|
-
extra: h
|
|
2227
|
-
}), b, (!!h || h === 0) && /* @__PURE__ */ a.createElement("span", {
|
|
2228
|
-
className: "".concat(t, "-item-extra")
|
|
2229
|
-
}, h));
|
|
2230
|
-
}
|
|
2231
|
-
return null;
|
|
2232
|
-
}).filter(function(l) {
|
|
2233
|
-
return l;
|
|
2234
|
-
});
|
|
2235
|
-
}
|
|
2236
|
-
function Kr(e, n, t, r, i) {
|
|
2237
|
-
var o = e, s = T({
|
|
2238
|
-
divider: ya,
|
|
2239
|
-
item: gr,
|
|
2240
|
-
group: pr,
|
|
2241
|
-
submenu: Fn
|
|
2242
|
-
}, r);
|
|
2243
|
-
return n && (o = lr(n, s, i)), br(o, t);
|
|
2244
|
-
}
|
|
2245
|
-
var mo = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items", "children", "direction", "id", "mode", "inlineCollapsed", "disabled", "disabledOverflow", "subMenuOpenDelay", "subMenuCloseDelay", "forceSubMenuRender", "defaultOpenKeys", "openKeys", "activeKey", "defaultActiveFirst", "selectable", "multiple", "defaultSelectedKeys", "selectedKeys", "onSelect", "onDeselect", "inlineIndent", "motion", "defaultMotions", "triggerSubMenuAction", "builtinPlacements", "itemIcon", "expandIcon", "overflowedIndicator", "overflowedIndicatorPopupClassName", "getPopupContainer", "onClick", "onOpenChange", "onKeyDown", "openAnimation", "openTransitionName", "_internalRenderMenuItem", "_internalRenderSubMenuItem", "_internalComponents"], Ft = [], ho = /* @__PURE__ */ a.forwardRef(function(e, n) {
|
|
2246
|
-
var t, r = e, i = r.prefixCls, o = i === void 0 ? "rc-menu" : i, s = r.rootClassName, l = r.style, u = r.className, c = r.tabIndex, b = c === void 0 ? 0 : c, f = r.items, d = r.children, m = r.direction, h = r.id, E = r.mode, g = E === void 0 ? "vertical" : E, M = r.inlineCollapsed, S = r.disabled, y = r.disabledOverflow, w = r.subMenuOpenDelay, C = w === void 0 ? 0.1 : w, v = r.subMenuCloseDelay, N = v === void 0 ? 0.1 : v, O = r.forceSubMenuRender, D = r.defaultOpenKeys, B = r.openKeys, $ = r.activeKey, z = r.defaultActiveFirst, L = r.selectable, j = L === void 0 ? !0 : L, Z = r.multiple, q = Z === void 0 ? !1 : Z, Q = r.defaultSelectedKeys, V = r.selectedKeys, A = r.onSelect, x = r.onDeselect, Me = r.inlineIndent, ue = Me === void 0 ? 24 : Me, G = r.motion, K = r.defaultMotions, W = r.triggerSubMenuAction, ie = W === void 0 ? "hover" : W, be = r.builtinPlacements, F = r.itemIcon, Y = r.expandIcon, te = r.overflowedIndicator, pe = te === void 0 ? "..." : te, oe = r.overflowedIndicatorPopupClassName, _e = r.getPopupContainer, Re = r.onClick, se = r.onOpenChange, He = r.onKeyDown, Be = r.openAnimation, ce = r.openTransitionName, Ie = r._internalRenderMenuItem, Ve = r._internalRenderSubMenuItem, de = r._internalComponents, ht = De(r, mo), H = a.useMemo(function() {
|
|
2247
|
-
return [Kr(d, f, Ft, de, o), Kr(d, f, Ft, {}, o)];
|
|
2248
|
-
}, [d, f, de]), Ge = k(H, 2), Ce = Ge[0], J = Ge[1], We = a.useState(!1), Te = k(We, 2), Le = Te[0], Je = Te[1], Ae = a.useRef(), we = ji(h), fe = m === "rtl";
|
|
2249
|
-
process.env.NODE_ENV !== "production" && un(!Be && !ce, "`openAnimation` and `openTransitionName` is removed. Please use `motion` or `defaultMotion` instead.");
|
|
2250
|
-
var Ee = Dn(D, {
|
|
2251
|
-
value: B,
|
|
2252
|
-
postState: function(U) {
|
|
2253
|
-
return U || Ft;
|
|
2254
|
-
}
|
|
2255
|
-
}), Ze = k(Ee, 2), ne = Ze[0], re = Ze[1], $e = function(U) {
|
|
2256
|
-
var ee = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
2257
|
-
function Ke() {
|
|
2258
|
-
re(U), se == null || se(U);
|
|
2259
|
-
}
|
|
2260
|
-
ee ? Br.flushSync(Ke) : Ke();
|
|
2261
|
-
}, Et = a.useState(ne), lt = k(Et, 2), rt = lt[0], At = lt[1], Oe = a.useRef(!1), Pe = a.useMemo(function() {
|
|
2262
|
-
return (g === "inline" || g === "vertical") && M ? ["vertical", M] : [g, !1];
|
|
2263
|
-
}, [g, M]), ut = k(Pe, 2), me = ut[0], P = ut[1], R = me === "inline", I = a.useState(me), le = k(I, 2), ge = le[0], $t = le[1], Ue = a.useState(P), zt = k(Ue, 2), Vt = zt[0], ct = zt[1];
|
|
2264
|
-
a.useEffect(function() {
|
|
2265
|
-
$t(me), ct(P), Oe.current && (R ? re(rt) : $e(Ft));
|
|
2266
|
-
}, [me, P]);
|
|
2267
|
-
var Bt = a.useState(0), Ut = k(Bt, 2), ft = Ut[0], St = Ut[1], gt = ft >= Ce.length - 1 || ge !== "horizontal" || y;
|
|
2268
|
-
a.useEffect(function() {
|
|
2269
|
-
R && At(ne);
|
|
2270
|
-
}, [ne]), a.useEffect(function() {
|
|
2271
|
-
return Oe.current = !0, function() {
|
|
2272
|
-
Oe.current = !1;
|
|
2273
|
-
};
|
|
2274
|
-
}, []);
|
|
2275
|
-
var Fe = Bi(), vt = Fe.registerPath, Ye = Fe.unregisterPath, Pt = Fe.refreshOverflowKeys, dt = Fe.isSubPathKey, jt = Fe.getKeyPath, Se = Fe.getKeys, qt = Fe.getSubPathKeys, fn = a.useMemo(function() {
|
|
2276
|
-
return {
|
|
2277
|
-
registerPath: vt,
|
|
2278
|
-
unregisterPath: Ye
|
|
2279
|
-
};
|
|
2280
|
-
}, [vt, Ye]), yt = a.useMemo(function() {
|
|
2281
|
-
return {
|
|
2282
|
-
isSubPathKey: dt
|
|
2283
|
-
};
|
|
2284
|
-
}, [dt]);
|
|
2285
|
-
a.useEffect(function() {
|
|
2286
|
-
Pt(gt ? Ft : Ce.slice(ft + 1).map(function(X) {
|
|
2287
|
-
return X.key;
|
|
2288
|
-
}));
|
|
2289
|
-
}, [ft, gt]);
|
|
2290
|
-
var Gt = Dn($ || z && ((t = Ce[0]) === null || t === void 0 ? void 0 : t.key), {
|
|
2291
|
-
value: $
|
|
2292
|
-
}), Jt = k(Gt, 2), mt = Jt[0], Nt = Jt[1], bt = Cn(function(X) {
|
|
2293
|
-
Nt(X);
|
|
2294
|
-
}), Zt = Cn(function() {
|
|
2295
|
-
Nt(void 0);
|
|
2296
|
-
});
|
|
2297
|
-
Ea(n, function() {
|
|
2298
|
-
return {
|
|
2299
|
-
list: Ae.current,
|
|
2300
|
-
focus: function(U) {
|
|
2301
|
-
var ee, Ke = Se(), xe = or(Ke, we), xt = xe.elements, Wt = xe.key2element, Xt = xe.element2key, en = mr(Ae.current, xt), tn = mt ?? (en[0] ? Xt.get(en[0]) : (ee = Ce.find(function(mn) {
|
|
2302
|
-
return !mn.props.disabled;
|
|
2303
|
-
})) === null || ee === void 0 ? void 0 : ee.key), at = Wt.get(tn);
|
|
2304
|
-
if (tn && at) {
|
|
2305
|
-
var je;
|
|
2306
|
-
at == null || (je = at.focus) === null || je === void 0 || je.call(at, U);
|
|
2307
|
-
}
|
|
2308
|
-
}
|
|
2309
|
-
};
|
|
2310
|
-
});
|
|
2311
|
-
var _t = Dn(Q || [], {
|
|
2312
|
-
value: V,
|
|
2313
|
-
// Legacy convert key to array
|
|
2314
|
-
postState: function(U) {
|
|
2315
|
-
return Array.isArray(U) ? U : U == null ? Ft : [U];
|
|
2316
|
-
}
|
|
2317
|
-
}), Xe = k(_t, 2), pt = Xe[0], Qt = Xe[1], et = function(U) {
|
|
2318
|
-
if (j) {
|
|
2319
|
-
var ee = U.key, Ke = pt.includes(ee), xe;
|
|
2320
|
-
q ? Ke ? xe = pt.filter(function(Wt) {
|
|
2321
|
-
return Wt !== ee;
|
|
2322
|
-
}) : xe = [].concat(Rt(pt), [ee]) : xe = [ee], Qt(xe);
|
|
2323
|
-
var xt = T(T({}, U), {}, {
|
|
2324
|
-
selectedKeys: xe
|
|
2325
|
-
});
|
|
2326
|
-
Ke ? x == null || x(xt) : A == null || A(xt);
|
|
2327
|
-
}
|
|
2328
|
-
!q && ne.length && ge !== "inline" && $e(Ft);
|
|
2329
|
-
}, Qe = Cn(function(X) {
|
|
2330
|
-
Re == null || Re(An(X)), et(X);
|
|
2331
|
-
}), Ct = Cn(function(X, U) {
|
|
2332
|
-
var ee = ne.filter(function(xe) {
|
|
2333
|
-
return xe !== X;
|
|
2334
|
-
});
|
|
2335
|
-
if (U)
|
|
2336
|
-
ee.push(X);
|
|
2337
|
-
else if (ge !== "inline") {
|
|
2338
|
-
var Ke = qt(X);
|
|
2339
|
-
ee = ee.filter(function(xe) {
|
|
2340
|
-
return !Ke.has(xe);
|
|
2341
|
-
});
|
|
2342
|
-
}
|
|
2343
|
-
Hr(ne, ee, !0) || $e(ee, !0);
|
|
2344
|
-
}), It = function(U, ee) {
|
|
2345
|
-
var Ke = ee ?? !ne.includes(U);
|
|
2346
|
-
Ct(U, Ke);
|
|
2347
|
-
}, tt = Wi(ge, mt, fe, we, Ae, Se, jt, Nt, It, He);
|
|
2348
|
-
a.useEffect(function() {
|
|
2349
|
-
Je(!0);
|
|
2350
|
-
}, []);
|
|
2351
|
-
var vn = a.useMemo(function() {
|
|
2352
|
-
return {
|
|
2353
|
-
_internalRenderMenuItem: Ie,
|
|
2354
|
-
_internalRenderSubMenuItem: Ve
|
|
2355
|
-
};
|
|
2356
|
-
}, [Ie, Ve]), Yt = ge !== "horizontal" || y ? Ce : (
|
|
2357
|
-
// Need wrap for overflow dropdown that do not response for open
|
|
2358
|
-
Ce.map(function(X, U) {
|
|
2359
|
-
return (
|
|
2360
|
-
// Always wrap provider to avoid sub node re-mount
|
|
2361
|
-
/* @__PURE__ */ a.createElement(Rn, {
|
|
2362
|
-
key: X.key,
|
|
2363
|
-
overflowDisabled: U > ft
|
|
2364
|
-
}, X)
|
|
2365
|
-
);
|
|
2366
|
-
})
|
|
2367
|
-
), dn = /* @__PURE__ */ a.createElement(Mt, ae({
|
|
2368
|
-
id: h,
|
|
2369
|
-
ref: Ae,
|
|
2370
|
-
prefixCls: "".concat(o, "-overflow"),
|
|
2371
|
-
component: "ul",
|
|
2372
|
-
itemComponent: gr,
|
|
2373
|
-
className: ke(o, "".concat(o, "-root"), "".concat(o, "-").concat(ge), u, he(he({}, "".concat(o, "-inline-collapsed"), Vt), "".concat(o, "-rtl"), fe), s),
|
|
2374
|
-
dir: m,
|
|
2375
|
-
style: l,
|
|
2376
|
-
role: "menu",
|
|
2377
|
-
tabIndex: b,
|
|
2378
|
-
data: Yt,
|
|
2379
|
-
renderRawItem: function(U) {
|
|
2380
|
-
return U;
|
|
2381
|
-
},
|
|
2382
|
-
renderRawRest: function(U) {
|
|
2383
|
-
var ee = U.length, Ke = ee ? Ce.slice(-ee) : null;
|
|
2384
|
-
return /* @__PURE__ */ a.createElement(Fn, {
|
|
2385
|
-
eventKey: sr,
|
|
2386
|
-
title: pe,
|
|
2387
|
-
disabled: gt,
|
|
2388
|
-
internalPopupClose: ee === 0,
|
|
2389
|
-
popupClassName: oe
|
|
2390
|
-
}, Ke);
|
|
2391
|
-
},
|
|
2392
|
-
maxCount: ge !== "horizontal" || y ? Mt.INVALIDATE : Mt.RESPONSIVE,
|
|
2393
|
-
ssr: "full",
|
|
2394
|
-
"data-menu-list": !0,
|
|
2395
|
-
onVisibleChange: function(U) {
|
|
2396
|
-
St(U);
|
|
2397
|
-
},
|
|
2398
|
-
onKeyDown: tt
|
|
2399
|
-
}, ht));
|
|
2400
|
-
return /* @__PURE__ */ a.createElement(dr.Provider, {
|
|
2401
|
-
value: vn
|
|
2402
|
-
}, /* @__PURE__ */ a.createElement(oa.Provider, {
|
|
2403
|
-
value: we
|
|
2404
|
-
}, /* @__PURE__ */ a.createElement(Rn, {
|
|
2405
|
-
prefixCls: o,
|
|
2406
|
-
rootClassName: s,
|
|
2407
|
-
mode: ge,
|
|
2408
|
-
openKeys: ne,
|
|
2409
|
-
rtl: fe,
|
|
2410
|
-
disabled: S,
|
|
2411
|
-
motion: Le ? G : null,
|
|
2412
|
-
defaultMotions: Le ? K : null,
|
|
2413
|
-
activeKey: mt,
|
|
2414
|
-
onActive: bt,
|
|
2415
|
-
onInactive: Zt,
|
|
2416
|
-
selectedKeys: pt,
|
|
2417
|
-
inlineIndent: ue,
|
|
2418
|
-
subMenuOpenDelay: C,
|
|
2419
|
-
subMenuCloseDelay: N,
|
|
2420
|
-
forceSubMenuRender: O,
|
|
2421
|
-
builtinPlacements: be,
|
|
2422
|
-
triggerSubMenuAction: ie,
|
|
2423
|
-
getPopupContainer: _e,
|
|
2424
|
-
itemIcon: F,
|
|
2425
|
-
expandIcon: Y,
|
|
2426
|
-
onItemClick: Qe,
|
|
2427
|
-
onOpenChange: Ct
|
|
2428
|
-
}, /* @__PURE__ */ a.createElement(fa.Provider, {
|
|
2429
|
-
value: yt
|
|
2430
|
-
}, dn), /* @__PURE__ */ a.createElement("div", {
|
|
2431
|
-
style: {
|
|
2432
|
-
display: "none"
|
|
2433
|
-
},
|
|
2434
|
-
"aria-hidden": !0
|
|
2435
|
-
}, /* @__PURE__ */ a.createElement(ua.Provider, {
|
|
2436
|
-
value: fn
|
|
2437
|
-
}, J)))));
|
|
2438
|
-
}), Hn = ho;
|
|
2439
|
-
Hn.Item = gr;
|
|
2440
|
-
Hn.SubMenu = Fn;
|
|
2441
|
-
Hn.ItemGroup = pr;
|
|
2442
|
-
Hn.Divider = ya;
|
|
2443
|
-
var go = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z" } }] }, name: "ellipsis", theme: "outlined" }, yo = function(n, t) {
|
|
2444
|
-
return /* @__PURE__ */ a.createElement(Ma, ae({}, n, {
|
|
2445
|
-
ref: t,
|
|
2446
|
-
icon: go
|
|
2447
|
-
}));
|
|
2448
|
-
}, bo = /* @__PURE__ */ a.forwardRef(yo);
|
|
2449
|
-
process.env.NODE_ENV !== "production" && (bo.displayName = "EllipsisOutlined");
|
|
2450
|
-
export {
|
|
2451
|
-
Eo as D,
|
|
2452
|
-
Hn as E,
|
|
2453
|
-
gr as M,
|
|
2454
|
-
cn as R,
|
|
2455
|
-
Fn as S,
|
|
2456
|
-
ia as T,
|
|
2457
|
-
Ro as a,
|
|
2458
|
-
bo as b,
|
|
2459
|
-
ya as c,
|
|
2460
|
-
pr as d,
|
|
2461
|
-
Qa as e,
|
|
2462
|
-
Ya as f,
|
|
2463
|
-
Za as g,
|
|
2464
|
-
ii as i,
|
|
2465
|
-
Xa as s,
|
|
2466
|
-
Sn as u
|
|
2467
|
-
};
|