@midas-ds/components 10.1.0 → 10.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AccordionItem-DZT76sWu.js +320 -0
- package/AccordionItem-Z_c9MpAM.cjs +1 -0
- package/BadgeContainer-D3RtqcPF.js +37 -0
- package/BadgeContainer-DeUgqGqb.cjs +1 -0
- package/Breadcrumbs-CmZXtTiS.js +250 -0
- package/Breadcrumbs-Cx09jwZZ.cjs +1 -0
- package/Button-CbFRzRrF.js +38 -0
- package/Button-DnhqHU01.cjs +1 -0
- package/Button-ZOQy9Ivu.js +78 -0
- package/Button-iSiWjocA.cjs +1 -0
- package/Button.module-CMMhIrkn.js +14 -0
- package/Button.module-DO5s9hOk.cjs +1 -0
- package/ButtonGroup-DUqW5dzM.cjs +1 -0
- package/ButtonGroup-DvVvear6.js +22 -0
- package/CHANGELOG.md +81 -0
- package/Card-C0BFW3wJ.cjs +1 -0
- package/Card-CaKKKv9k.js +131 -0
- package/CharacterCounter-CPGdboVJ.js +22 -0
- package/CharacterCounter-CrY8QRuY.cjs +1 -0
- package/Checkbox-CvFsn_FL.js +380 -0
- package/Checkbox-DSxGAJX2.cjs +1 -0
- package/CheckboxGroup-Bk9DPq4I.cjs +1 -0
- package/CheckboxGroup-Dij9zKlF.js +54 -0
- package/Collection-C5ONNBqd.js +576 -0
- package/Collection-Csx3L9gh.cjs +1 -0
- package/ColorSchemeSwitch-CbAWIJCg.js +106 -0
- package/ColorSchemeSwitch-JRrCyYVv.cjs +16 -0
- package/ComboBox-BCaqPEIH.js +1375 -0
- package/ComboBox-gveQKHU3.cjs +1 -0
- package/DateField-CAQlzuDD.js +46 -0
- package/DateField-deVVFwKA.cjs +1 -0
- package/DateInputDivider-DnUxETEC.cjs +1 -0
- package/DateInputDivider-Dx8n1Lxp.js +2908 -0
- package/DateRangePicker-BmBvwqo6.js +881 -0
- package/DateRangePicker-BzfitoK0.cjs +6 -0
- package/Dialog-Bd5hK360.cjs +1 -0
- package/Dialog-Bxx8cBEq.js +208 -0
- package/Dialog-CYxThuMl.js +1609 -0
- package/Dialog-CwTEAujZ.cjs +1 -0
- package/DragAndDrop-CSwmPhxC.js +60 -0
- package/DragAndDrop-HvycSrKY.cjs +1 -0
- package/Dropdown-CaGon9OR.cjs +6 -0
- package/Dropdown-nkjzsVYX.js +84 -0
- package/FieldError-BZw8UzBk.cjs +1 -0
- package/FieldError-CZikNDxX.js +28 -0
- package/FieldError-DqdfJ3fs.cjs +1 -0
- package/FieldError-Dv3bBEjh.js +23 -0
- package/FileUpload-DYRZ0M9F.cjs +2 -0
- package/FileUpload-ULwcYDxs.js +2372 -0
- package/FocusScope-DwIqdYpQ.js +625 -0
- package/FocusScope-NaPbvuuS.cjs +1 -0
- package/Form-BuOomA4T.cjs +1 -0
- package/Form-CXcEMuBf.js +5 -0
- package/Grid--OhtgCo6.js +27 -0
- package/Grid-DVQtOcu9.cjs +1 -0
- package/GridItem-DlbSdRmB.js +246 -0
- package/GridItem-XgHmZWXY.cjs +1 -0
- package/Group-CeSsSQVC.js +44 -0
- package/Group-CgiqQHH1.cjs +1 -0
- package/Heading-BY5-QN4S.js +46 -0
- package/Heading-DoJAtYZf.cjs +1 -0
- package/Hidden-B5ir3Lei.js +34 -0
- package/Hidden-BxRZGdEW.cjs +1 -0
- package/InfoBanner-BS-dAfzO.cjs +1 -0
- package/InfoBanner-CVIBFSWx.js +82 -0
- package/Input-D8Ku_FQz.js +41 -0
- package/Input-DKSAYvsw.cjs +1 -0
- package/Label-C9ivwkAd.js +21 -0
- package/Label-CUV21CAv.cjs +1 -0
- package/Label-DkDOsmUF.js +16 -0
- package/Label-IMWAyoKb.cjs +1 -0
- package/Layout-BWeHHnqU.cjs +16 -0
- package/Layout-CCt_2L1k.js +468 -0
- package/Link-B-nus-FT.js +71 -0
- package/Link-DsnCtNeI.cjs +6 -0
- package/Link-SHMbeyIP.cjs +1 -0
- package/Link-uFowN4qv.js +59 -0
- package/LinkButton-CuBilDML.js +69 -0
- package/LinkButton-CymMrcGL.cjs +6 -0
- package/ListBox-CDOsQChA.cjs +1 -0
- package/ListBox-DOi_y_Lt.js +530 -0
- package/ListBoxButton-CFeNhJhr.cjs +1 -0
- package/ListBoxButton-O6zN3P4W.js +15 -0
- package/ListBoxSection-C1aLKL9p.js +1058 -0
- package/ListBoxSection-DGCP6xpf.cjs +1 -0
- package/ListKeyboardDelegate-BqMETvPv.cjs +1 -0
- package/ListKeyboardDelegate-DNOzQ8nc.js +158 -0
- package/LiveAnnouncer-B6177m92.js +51 -0
- package/LiveAnnouncer-CwEWPU8b.cjs +1 -0
- package/LocalizedStringFormatter-C0C54hjf.cjs +1 -0
- package/LocalizedStringFormatter-D-4Qyql0.js +77 -0
- package/Logo-BIrOEINM.js +133 -0
- package/Logo-DT2_2O43.cjs +1 -0
- package/NumberFormatter-DewVDY5w.cjs +1 -0
- package/NumberFormatter-DgOUVrge.js +119 -0
- package/OverlayArrow-D75k-EMl.cjs +1 -0
- package/OverlayArrow-DorA4Rbr.js +506 -0
- package/PressResponder-C06O3Z5P.cjs +1 -0
- package/PressResponder-CVEg5kND.js +33 -0
- package/ProgressBar-Bkw9zavs.cjs +1 -0
- package/ProgressBar-CEX2WNoW.js +77 -0
- package/ProgressBar-Dqh3ftSP.cjs +1 -0
- package/ProgressBar-gmAzSsrz.js +53 -0
- package/RSPContexts-BW2SEIqe.js +11 -0
- package/RSPContexts-D8hmBfGm.cjs +1 -0
- package/Radio-CDKrvQe4.cjs +1 -0
- package/Radio-_ukSkxPT.js +311 -0
- package/RangeCalendar-cbCKBPZv.cjs +11 -0
- package/RangeCalendar-uXwoBL-O.js +1685 -0
- package/SearchField-6yBGiojX.cjs +6 -0
- package/SearchField-DYl2uo7o.js +362 -0
- package/Select-CpHjd1tp.cjs +1 -0
- package/Select-PvCqY7Lp.js +646 -0
- package/SelectionManager-6H88Cv6B.js +1033 -0
- package/SelectionManager-C5NGBzvz.cjs +1 -0
- package/Separator-LYnFqh4L.js +60 -0
- package/Separator-nPra6kD-.cjs +1 -0
- package/Skeleton-BAwbfKBW.cjs +1 -0
- package/Skeleton-BePDRmrO.js +40 -0
- package/Spinner-D31SXm-U.js +41 -0
- package/Spinner-DAJtfxqJ.cjs +6 -0
- package/Table-B_N7wUmA.js +2451 -0
- package/Table-D9vNc_y-.cjs +16 -0
- package/Tabs-Ct6D83aR.js +404 -0
- package/Tabs-Dtcl2oK2.cjs +1 -0
- package/Tag-CVFkzg3s.cjs +1 -0
- package/Tag-g6HN-YCv.js +748 -0
- package/Text-3MNwRMpI.cjs +1 -0
- package/Text-B2K-BJKQ.cjs +1 -0
- package/Text-BN-g1iWi.js +32 -0
- package/Text-B_H68Tvq.js +15 -0
- package/TextArea-DSiQ578a.js +206 -0
- package/TextArea-cVyGBRbL.cjs +1 -0
- package/TextField-B70CL2qz.cjs +1 -0
- package/TextField-DBaRuNj7.js +119 -0
- package/TextField.module-BcpPBWnD.js +13 -0
- package/TextField.module-Dw5Rtn9y.cjs +1 -0
- package/Toast-CjpldAI8.js +988 -0
- package/Toast-DrkOGy4d.cjs +1 -0
- package/ToggleButtonGroup-BuU_6dYe.cjs +1 -0
- package/ToggleButtonGroup-Ceh9_yBM.js +210 -0
- package/Tooltip-BAIjaYax.js +283 -0
- package/Tooltip-CiWg4zIC.cjs +1 -0
- package/VisuallyHidden-CtXvK_Tw.cjs +1 -0
- package/VisuallyHidden-D-4z1VgU.js +40 -0
- package/accordion/index.cjs +1 -0
- package/accordion/index.js +5 -0
- package/arrow-right-Cw48o2oW.cjs +6 -0
- package/arrow-right-Dg8sttFO.js +14 -0
- package/assets/AccordionItem.css +1 -0
- package/assets/BadgeContainer.css +1 -0
- package/assets/Breadcrumbs.css +1 -0
- package/assets/Button.css +1 -0
- package/assets/ButtonGroup.css +1 -0
- package/assets/Card.css +1 -0
- package/assets/CharacterCounter.css +1 -0
- package/assets/Checkbox.css +1 -0
- package/assets/ColorSchemeSwitch.css +1 -0
- package/assets/ComboBox.css +1 -0
- package/assets/DateField.css +1 -0
- package/assets/DateInputDivider.css +1 -0
- package/assets/DateRangePicker.css +1 -0
- package/assets/Dialog.css +1 -0
- package/assets/Dropdown.css +1 -0
- package/assets/FieldError.css +1 -0
- package/assets/FileUpload.css +1 -0
- package/assets/GridItem.css +1 -0
- package/assets/Heading.css +1 -0
- package/assets/InfoBanner.css +1 -0
- package/assets/Label.css +1 -0
- package/assets/Layout.css +1 -0
- package/assets/Link.css +1 -0
- package/assets/LinkButton.css +1 -0
- package/assets/ListBoxSection.css +1 -0
- package/assets/Logo.css +1 -0
- package/assets/ProgressBar.css +1 -0
- package/assets/Radio.css +1 -0
- package/assets/RangeCalendar.css +1 -0
- package/assets/SearchField.css +1 -0
- package/assets/Select.css +1 -0
- package/assets/Skeleton.css +1 -0
- package/assets/Spinner.css +1 -0
- package/assets/Table.css +1 -0
- package/assets/Tabs.css +1 -0
- package/assets/Tag.css +1 -0
- package/assets/Text.css +1 -0
- package/assets/TextField.css +1 -0
- package/assets/Toast.css +1 -0
- package/assets/ToggleButtonGroup.css +1 -0
- package/assets/Tooltip.css +1 -0
- package/badge/index.cjs +1 -0
- package/badge/index.js +5 -0
- package/breadcrumbs/index.cjs +1 -0
- package/breadcrumbs/index.js +4 -0
- package/button/index.cjs +1 -0
- package/button/index.js +6 -0
- package/calendar/CalendarHeader.d.ts +2 -1
- package/calendar/index.cjs +1 -0
- package/calendar/index.js +5 -0
- package/card/Card.d.ts +3 -0
- package/card/index.cjs +1 -0
- package/card/index.js +10 -0
- package/character-counter/index.cjs +1 -0
- package/character-counter/index.js +4 -0
- package/check-CLF6Yxza.js +11 -0
- package/check-Dw9c62O4.cjs +6 -0
- package/checkbox/index.cjs +1 -0
- package/checkbox/index.js +6 -0
- package/chevron-down-C2E7aZ3N.cjs +6 -0
- package/chevron-down-Cd1bkzXT.js +13 -0
- package/clsx-C11secjj.cjs +1 -0
- package/clsx-OuTLNxxd.js +16 -0
- package/color-scheme-switch/index.cjs +1 -0
- package/color-scheme-switch/index.js +4 -0
- package/combobox/ComboBox.d.ts +9 -5
- package/combobox/index.cjs +1 -0
- package/combobox/index.d.ts +1 -1
- package/combobox/index.js +7 -0
- package/combobox/types.d.ts +6 -0
- package/combobox/utils.d.ts +3 -10
- package/common/types.d.ts +2 -0
- package/context-B8cn10po.js +80 -0
- package/context-DjwhtgxQ.cjs +1 -0
- package/createLucideIcon-DAY4oS-S.cjs +21 -0
- package/createLucideIcon-DeWljiyi.js +79 -0
- package/date-field/index.cjs +1 -0
- package/date-field/index.js +8 -0
- package/date-picker/index.cjs +1 -0
- package/date-picker/index.js +5 -0
- package/dropdown/index.cjs +1 -0
- package/dropdown/index.js +5 -0
- package/field-error/FieldError.d.ts +4 -1
- package/field-error/index.cjs +1 -0
- package/field-error/index.js +4 -0
- package/file-upload/index.cjs +1 -0
- package/file-upload/index.js +4 -0
- package/filterDOMProps-BS2lrgFA.cjs +1 -0
- package/filterDOMProps-D6KHYVBX.js +24 -0
- package/focusSafely-Bqfo_DH7.cjs +1 -0
- package/focusSafely-C48ucRUz.js +56 -0
- package/getScrollParent-DuKmPmUa.cjs +1 -0
- package/getScrollParent-Ru2U2LlM.js +9 -0
- package/grid/Grid.d.ts +15 -4
- package/grid/GridItem.d.ts +31 -2
- package/grid/index.cjs +1 -0
- package/grid/index.d.ts +2 -2
- package/grid/index.js +8 -0
- package/heading/index.cjs +1 -0
- package/heading/index.js +4 -0
- package/index-BSMrH_Du.js +120 -0
- package/index-D97L3EBk.cjs +17 -0
- package/index.cjs +1 -164
- package/index.d.ts +1 -1
- package/index.js +127 -30044
- package/inertValue-B7loUihk.js +8 -0
- package/inertValue-BWmZ1afe.cjs +1 -0
- package/info-DkzVqB8I.js +38 -0
- package/info-DlzSeKbc.cjs +16 -0
- package/info-banner/index.cjs +1 -0
- package/info-banner/index.js +4 -0
- package/label/index.cjs +1 -0
- package/label/index.js +4 -0
- package/layout/index.cjs +1 -0
- package/layout/index.js +8 -0
- package/link/Link.d.ts +4 -1
- package/link/index.cjs +1 -0
- package/link/index.js +6 -0
- package/link-button/LinkButton.d.ts +24 -1
- package/link-button/index.cjs +1 -0
- package/link-button/index.js +6 -0
- package/list-box/ListBox.d.ts +4 -0
- package/list-box/ListBoxButton.d.ts +2 -0
- package/list-box/ListBoxItem.d.ts +3 -0
- package/list-box/ListBoxPopover.d.ts +3 -0
- package/list-box/ListBoxSection.d.ts +8 -0
- package/list-box/index.cjs +1 -0
- package/list-box/index.d.ts +6 -0
- package/list-box/index.js +9 -0
- package/list-box/types.d.ts +23 -0
- package/logo/index.cjs +1 -0
- package/logo/index.js +4 -0
- package/modal/index.cjs +1 -0
- package/modal/index.js +6 -0
- package/number-BE8InLgI.js +6 -0
- package/number-E0x3H9cL.cjs +1 -0
- package/package.json +4 -4
- package/progress-bar/index.cjs +1 -0
- package/progress-bar/index.js +4 -0
- package/radio/index.cjs +1 -0
- package/radio/index.js +5 -0
- package/scrollIntoView-ClEACHUk.js +57 -0
- package/scrollIntoView-DRSoJp89.cjs +1 -0
- package/search-field/index.cjs +1 -0
- package/search-field/index.js +4 -0
- package/select/HiddenMultiSelect.d.ts +5 -4
- package/select/MultiSelectValueTag.d.ts +11 -0
- package/select/Select.d.ts +2 -77
- package/select/SelectFieldError.d.ts +8 -0
- package/select/SelectListBox.d.ts +4 -3
- package/select/SelectTrigger.d.ts +10 -0
- package/select/index.cjs +1 -0
- package/select/index.d.ts +1 -0
- package/select/index.js +4 -0
- package/select/types.d.ts +188 -0
- package/select/useMultiSelect.d.ts +4 -21
- package/select/useMultiSelectListState.d.ts +3 -15
- package/select/useMultiSelectState.d.ts +3 -19
- package/skeleton/Skeleton.d.ts +5 -0
- package/skeleton/index.cjs +1 -0
- package/skeleton/index.js +4 -0
- package/spinner/index.cjs +1 -0
- package/spinner/index.js +4 -0
- package/square-arrow-out-up-right-BCAO2eJs.cjs +6 -0
- package/square-arrow-out-up-right-BkyqV2PN.js +15 -0
- package/table/Table.d.ts +7 -1
- package/table/index.cjs +1 -0
- package/table/index.js +9 -0
- package/tabs/index.cjs +1 -0
- package/tabs/index.js +4 -0
- package/tag/index.cjs +1 -0
- package/tag/index.js +5 -0
- package/text/index.cjs +1 -0
- package/text/index.js +4 -0
- package/textfield/index.cjs +1 -0
- package/textfield/index.js +7 -0
- package/theme/index.cjs +1 -0
- package/theme/index.d.ts +4 -0
- package/{theme.js → theme/index.js} +2 -2
- package/theme/tokens.d.ts +10 -0
- package/toast/index.cjs +1 -0
- package/toast/index.js +9 -0
- package/toggle-button/index.cjs +1 -0
- package/toggle-button/index.js +5 -0
- package/tokens-p6pg1Cea.cjs +1 -0
- package/{tokens-C0U7hdoO.js → tokens-xp-7KMK7.js} +18 -8
- package/tooltip/index.cjs +1 -0
- package/tooltip/index.js +5 -0
- package/triangle-alert-C0lvfCYH.cjs +6 -0
- package/triangle-alert-wxyxspAl.js +21 -0
- package/useButton-B1Fa-6qE.cjs +1 -0
- package/useButton-C-Lq7CNY.js +47 -0
- package/useCollator-C_ozeWLo.cjs +1 -0
- package/useCollator-CgZcHC8N.js +11 -0
- package/useControlledState-D0L6S_5r.cjs +1 -0
- package/useControlledState-u436Wbp1.js +30 -0
- package/useDateFormatter-C53Uxdli.js +1571 -0
- package/useDateFormatter-g2maMTGH.cjs +1 -0
- package/useDescription-CVKhFa3c.js +32 -0
- package/useDescription-DmQYSEES.cjs +1 -0
- package/useEvent-CjkbBniY.cjs +1 -0
- package/useEvent-Cyd2ZL0c.js +21 -0
- package/useField-B1RU0GKs.cjs +1 -0
- package/useField-BPMAlIbU.js +35 -0
- package/useFilter-ChIbnALW.js +35 -0
- package/useFilter-CtIwF2qW.cjs +1 -0
- package/useFocusRing-BDGH3lpn.js +82 -0
- package/useFocusRing-CbImDrwF.cjs +1 -0
- package/useFocusable-CaedRTpB.js +74 -0
- package/useFocusable-CuPQ7Cm5.cjs +1 -0
- package/useFormValidation-ClximP89.cjs +1 -0
- package/useFormValidation-R8hQIjWP.js +215 -0
- package/useHasTabbableChild-DgphNvnk.cjs +1 -0
- package/useHasTabbableChild-DsD9AJwE.js +34 -0
- package/useHighlightSelectionDescription-BizKjvPU.cjs +1 -0
- package/useHighlightSelectionDescription-DFfcgbUj.js +567 -0
- package/useHover-_mv5J4_q.cjs +1 -0
- package/useHover-qRAon4nS.js +490 -0
- package/useLabel-DDdAJ1JO.js +23 -0
- package/useLabel-m_S5xkHy.cjs +1 -0
- package/useLabels-BLOfc6Y-.cjs +1 -0
- package/useLabels-BZjoZA1Z.js +17 -0
- package/useListState-Ca2-uZMO.cjs +1 -0
- package/useListState-DFQ9d-uE.js +132 -0
- package/useLocalizedStringFormatter-D07YB2e1.js +22 -0
- package/useLocalizedStringFormatter-u9SJaOwk.cjs +1 -0
- package/useObserveElement-BdI4zgd7.js +27 -0
- package/useObserveElement-BzEr5D32.cjs +1 -0
- package/usePress-BFa6cT9o.cjs +7 -0
- package/usePress-CUJ3pMOw.js +542 -0
- package/useSingleSelectListState-C-nB8cug.js +34 -0
- package/useSingleSelectListState-MGNxUTum.cjs +1 -0
- package/useTextField-5OZQPyOW.js +86 -0
- package/useTextField-CtUDWsUl.cjs +1 -0
- package/useToggleState-Bz5rAf4C.js +18 -0
- package/useToggleState-DoIkSQdj.cjs +1 -0
- package/useUpdateEffect-CCDx8D4X.js +13 -0
- package/useUpdateEffect-sk3kiVGz.cjs +1 -0
- package/utils/test.d.ts +1 -1
- package/utils-BNtZbAib.cjs +1 -0
- package/utils-HNTsIwux.js +308 -0
- package/x-CvxiAZTW.cjs +6 -0
- package/x-JK7i-TQC.js +14 -0
- package/flex/Flex.d.ts +0 -17
- package/flex/FlexItem.d.ts +0 -15
- package/flex/index.d.ts +0 -2
- package/index.css +0 -1
- package/select/SelectPopover.d.ts +0 -10
- package/theme.cjs +0 -1
- package/tokens-COoF1t17.cjs +0 -1
- /package/{global.css → assets/global.css} +0 -0
- /package/{select → list-box}/SectionedListLayout.d.ts +0 -0
|
@@ -0,0 +1,576 @@
|
|
|
1
|
+
import { a as H } from "./Hidden-B5ir3Lei.js";
|
|
2
|
+
import { createPortal as z } from "react-dom";
|
|
3
|
+
import { a as K } from "./useFocusable-CaedRTpB.js";
|
|
4
|
+
import u, { useMemo as C, cloneElement as I, forwardRef as N, useContext as y, createContext as v, useCallback as m, useState as q, useRef as B, isValidElement as U } from "react";
|
|
5
|
+
import { $ as L, l as M } from "./utils-HNTsIwux.js";
|
|
6
|
+
import { s as F } from "./index-BSMrH_Du.js";
|
|
7
|
+
class b {
|
|
8
|
+
get childNodes() {
|
|
9
|
+
throw new Error("childNodes is not supported");
|
|
10
|
+
}
|
|
11
|
+
clone() {
|
|
12
|
+
let e = new b(this.type, this.key);
|
|
13
|
+
return e.value = this.value, e.level = this.level, e.hasChildNodes = this.hasChildNodes, e.rendered = this.rendered, e.textValue = this.textValue, e["aria-label"] = this["aria-label"], e.index = this.index, e.parentKey = this.parentKey, e.prevKey = this.prevKey, e.nextKey = this.nextKey, e.firstChildKey = this.firstChildKey, e.lastChildKey = this.lastChildKey, e.props = this.props, e.render = this.render, e.colSpan = this.colSpan, e.colIndex = this.colIndex, e;
|
|
14
|
+
}
|
|
15
|
+
constructor(e, t) {
|
|
16
|
+
this.value = null, this.level = 0, this.hasChildNodes = !1, this.rendered = null, this.textValue = "", this["aria-label"] = void 0, this.index = 0, this.parentKey = null, this.prevKey = null, this.nextKey = null, this.firstChildKey = null, this.lastChildKey = null, this.props = {}, this.colSpan = null, this.colIndex = null, this.type = e, this.key = t;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
class S {
|
|
20
|
+
get size() {
|
|
21
|
+
return this.keyMap.size;
|
|
22
|
+
}
|
|
23
|
+
getKeys() {
|
|
24
|
+
return this.keyMap.keys();
|
|
25
|
+
}
|
|
26
|
+
*[Symbol.iterator]() {
|
|
27
|
+
let e = this.firstKey != null ? this.keyMap.get(this.firstKey) : void 0;
|
|
28
|
+
for (; e; )
|
|
29
|
+
yield e, e = e.nextKey != null ? this.keyMap.get(e.nextKey) : void 0;
|
|
30
|
+
}
|
|
31
|
+
getChildren(e) {
|
|
32
|
+
let t = this.keyMap;
|
|
33
|
+
return {
|
|
34
|
+
*[Symbol.iterator]() {
|
|
35
|
+
let n = t.get(e), l = (n == null ? void 0 : n.firstChildKey) != null ? t.get(n.firstChildKey) : null;
|
|
36
|
+
for (; l; )
|
|
37
|
+
yield l, l = l.nextKey != null ? t.get(l.nextKey) : void 0;
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
getKeyBefore(e) {
|
|
42
|
+
let t = this.keyMap.get(e);
|
|
43
|
+
if (!t) return null;
|
|
44
|
+
if (t.prevKey != null) {
|
|
45
|
+
for (t = this.keyMap.get(t.prevKey); t && t.type !== "item" && t.lastChildKey != null; ) t = this.keyMap.get(t.lastChildKey);
|
|
46
|
+
var n;
|
|
47
|
+
return (n = t == null ? void 0 : t.key) !== null && n !== void 0 ? n : null;
|
|
48
|
+
}
|
|
49
|
+
return t.parentKey;
|
|
50
|
+
}
|
|
51
|
+
getKeyAfter(e) {
|
|
52
|
+
let t = this.keyMap.get(e);
|
|
53
|
+
if (!t) return null;
|
|
54
|
+
if (t.type !== "item" && t.firstChildKey != null) return t.firstChildKey;
|
|
55
|
+
for (; t; ) {
|
|
56
|
+
if (t.nextKey != null) return t.nextKey;
|
|
57
|
+
if (t.parentKey != null) t = this.keyMap.get(t.parentKey);
|
|
58
|
+
else return null;
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
getFirstKey() {
|
|
63
|
+
return this.firstKey;
|
|
64
|
+
}
|
|
65
|
+
getLastKey() {
|
|
66
|
+
let e = this.lastKey != null ? this.keyMap.get(this.lastKey) : null;
|
|
67
|
+
for (; (e == null ? void 0 : e.lastChildKey) != null; ) e = this.keyMap.get(e.lastChildKey);
|
|
68
|
+
var t;
|
|
69
|
+
return (t = e == null ? void 0 : e.key) !== null && t !== void 0 ? t : null;
|
|
70
|
+
}
|
|
71
|
+
getItem(e) {
|
|
72
|
+
var t;
|
|
73
|
+
return (t = this.keyMap.get(e)) !== null && t !== void 0 ? t : null;
|
|
74
|
+
}
|
|
75
|
+
at() {
|
|
76
|
+
throw new Error("Not implemented");
|
|
77
|
+
}
|
|
78
|
+
clone() {
|
|
79
|
+
let e = this.constructor, t = new e();
|
|
80
|
+
return t.keyMap = new Map(this.keyMap), t.firstKey = this.firstKey, t.lastKey = this.lastKey, t;
|
|
81
|
+
}
|
|
82
|
+
addNode(e) {
|
|
83
|
+
if (this.frozen) throw new Error("Cannot add a node to a frozen collection");
|
|
84
|
+
this.keyMap.set(e.key, e);
|
|
85
|
+
}
|
|
86
|
+
removeNode(e) {
|
|
87
|
+
if (this.frozen) throw new Error("Cannot remove a node to a frozen collection");
|
|
88
|
+
this.keyMap.delete(e);
|
|
89
|
+
}
|
|
90
|
+
commit(e, t, n = !1) {
|
|
91
|
+
if (this.frozen) throw new Error("Cannot commit a frozen collection");
|
|
92
|
+
this.firstKey = e, this.lastKey = t, this.frozen = !n;
|
|
93
|
+
}
|
|
94
|
+
// TODO: this is pretty specific to menu, will need to check if it is generic enough
|
|
95
|
+
// Will need to handle varying levels I assume but will revisit after I get searchable menu working for base menu
|
|
96
|
+
// TODO: an alternative is to simply walk the collection and add all item nodes that match the filter and any sections/separators we encounter
|
|
97
|
+
// to an array, then walk that new array and fix all the next/Prev keys while adding them to the new collection
|
|
98
|
+
UNSTABLE_filter(e) {
|
|
99
|
+
let t = new S(), n = null;
|
|
100
|
+
for (let l of this)
|
|
101
|
+
if (l.type === "section" && l.hasChildNodes) {
|
|
102
|
+
let i = l.clone(), o = null;
|
|
103
|
+
for (let d of this.getChildren(l.key)) if (k(d, e, this, t)) {
|
|
104
|
+
let s = d.clone();
|
|
105
|
+
o == null && (i.firstChildKey = s.key), t.firstKey == null && (t.firstKey = i.key), o && o.parentKey === s.parentKey ? (o.nextKey = s.key, s.prevKey = o.key) : s.prevKey = null, s.nextKey = null, t.addNode(s), o = s;
|
|
106
|
+
}
|
|
107
|
+
o && (o.type !== "header" ? (i.lastChildKey = o.key, n == null ? i.prevKey = null : (n.type === "section" || n.type === "separator") && (n.nextKey = i.key, i.prevKey = n.key), i.nextKey = null, n = i, t.addNode(i)) : (t.firstKey === i.key && (t.firstKey = null), t.removeNode(o.key)));
|
|
108
|
+
} else if (l.type === "separator") {
|
|
109
|
+
let i = l.clone();
|
|
110
|
+
i.nextKey = null, (n == null ? void 0 : n.type) === "section" && (n.nextKey = i.key, i.prevKey = n.key, n = i, t.addNode(i));
|
|
111
|
+
} else {
|
|
112
|
+
let i = l.clone();
|
|
113
|
+
k(i, e, this, t) && (t.firstKey == null && (t.firstKey = i.key), n != null && n.type !== "section" && n.type !== "separator" && n.parentKey === i.parentKey ? (n.nextKey = i.key, i.prevKey = n.key) : i.prevKey = null, i.nextKey = null, t.addNode(i), n = i);
|
|
114
|
+
}
|
|
115
|
+
if ((n == null ? void 0 : n.type) === "separator" && n.nextKey === null) {
|
|
116
|
+
let l;
|
|
117
|
+
n.prevKey != null && (l = t.getItem(n.prevKey), l.nextKey = null), t.removeNode(n.key), n = l;
|
|
118
|
+
}
|
|
119
|
+
return t.lastKey = (n == null ? void 0 : n.key) || null, t;
|
|
120
|
+
}
|
|
121
|
+
constructor() {
|
|
122
|
+
this.keyMap = /* @__PURE__ */ new Map(), this.firstKey = null, this.lastKey = null, this.frozen = !1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
function k(r, e, t, n) {
|
|
126
|
+
if (r.type === "subdialogtrigger" || r.type === "submenutrigger") {
|
|
127
|
+
let l = [
|
|
128
|
+
...t.getChildren(r.key)
|
|
129
|
+
][0];
|
|
130
|
+
if (l && e(l.textValue)) {
|
|
131
|
+
let i = l.clone();
|
|
132
|
+
return n.addNode(i), !0;
|
|
133
|
+
} else return !1;
|
|
134
|
+
} else return r.type === "header" ? !0 : e(r.textValue);
|
|
135
|
+
}
|
|
136
|
+
class D {
|
|
137
|
+
*[Symbol.iterator]() {
|
|
138
|
+
let e = this.firstChild;
|
|
139
|
+
for (; e; )
|
|
140
|
+
yield e, e = e.nextSibling;
|
|
141
|
+
}
|
|
142
|
+
get firstChild() {
|
|
143
|
+
return this._firstChild;
|
|
144
|
+
}
|
|
145
|
+
set firstChild(e) {
|
|
146
|
+
this._firstChild = e, this.ownerDocument.markDirty(this);
|
|
147
|
+
}
|
|
148
|
+
get lastChild() {
|
|
149
|
+
return this._lastChild;
|
|
150
|
+
}
|
|
151
|
+
set lastChild(e) {
|
|
152
|
+
this._lastChild = e, this.ownerDocument.markDirty(this);
|
|
153
|
+
}
|
|
154
|
+
get previousSibling() {
|
|
155
|
+
return this._previousSibling;
|
|
156
|
+
}
|
|
157
|
+
set previousSibling(e) {
|
|
158
|
+
this._previousSibling = e, this.ownerDocument.markDirty(this);
|
|
159
|
+
}
|
|
160
|
+
get nextSibling() {
|
|
161
|
+
return this._nextSibling;
|
|
162
|
+
}
|
|
163
|
+
set nextSibling(e) {
|
|
164
|
+
this._nextSibling = e, this.ownerDocument.markDirty(this);
|
|
165
|
+
}
|
|
166
|
+
get parentNode() {
|
|
167
|
+
return this._parentNode;
|
|
168
|
+
}
|
|
169
|
+
set parentNode(e) {
|
|
170
|
+
this._parentNode = e, this.ownerDocument.markDirty(this);
|
|
171
|
+
}
|
|
172
|
+
get isConnected() {
|
|
173
|
+
var e;
|
|
174
|
+
return ((e = this.parentNode) === null || e === void 0 ? void 0 : e.isConnected) || !1;
|
|
175
|
+
}
|
|
176
|
+
invalidateChildIndices(e) {
|
|
177
|
+
(this._minInvalidChildIndex == null || !this._minInvalidChildIndex.isConnected || e.index < this._minInvalidChildIndex.index) && (this._minInvalidChildIndex = e, this.ownerDocument.markDirty(this));
|
|
178
|
+
}
|
|
179
|
+
updateChildIndices() {
|
|
180
|
+
let e = this._minInvalidChildIndex;
|
|
181
|
+
for (; e; )
|
|
182
|
+
e.index = e.previousSibling ? e.previousSibling.index + 1 : 0, e = e.nextSibling;
|
|
183
|
+
this._minInvalidChildIndex = null;
|
|
184
|
+
}
|
|
185
|
+
appendChild(e) {
|
|
186
|
+
e.parentNode && e.parentNode.removeChild(e), this.firstChild == null && (this.firstChild = e), this.lastChild ? (this.lastChild.nextSibling = e, e.index = this.lastChild.index + 1, e.previousSibling = this.lastChild) : (e.previousSibling = null, e.index = 0), e.parentNode = this, e.nextSibling = null, this.lastChild = e, this.ownerDocument.markDirty(this), this.isConnected && this.ownerDocument.queueUpdate();
|
|
187
|
+
}
|
|
188
|
+
insertBefore(e, t) {
|
|
189
|
+
if (t == null) return this.appendChild(e);
|
|
190
|
+
e.parentNode && e.parentNode.removeChild(e), e.nextSibling = t, e.previousSibling = t.previousSibling, e.index = t.index - 1, this.firstChild === t ? this.firstChild = e : t.previousSibling && (t.previousSibling.nextSibling = e), t.previousSibling = e, e.parentNode = t.parentNode, this.invalidateChildIndices(e), this.isConnected && this.ownerDocument.queueUpdate();
|
|
191
|
+
}
|
|
192
|
+
removeChild(e) {
|
|
193
|
+
e.parentNode !== this || !this.ownerDocument.isMounted || (this._minInvalidChildIndex === e && (this._minInvalidChildIndex = null), e.nextSibling && (this.invalidateChildIndices(e.nextSibling), e.nextSibling.previousSibling = e.previousSibling), e.previousSibling && (e.previousSibling.nextSibling = e.nextSibling), this.firstChild === e && (this.firstChild = e.nextSibling), this.lastChild === e && (this.lastChild = e.previousSibling), e.parentNode = null, e.nextSibling = null, e.previousSibling = null, e.index = 0, this.ownerDocument.markDirty(e), this.isConnected && this.ownerDocument.queueUpdate());
|
|
194
|
+
}
|
|
195
|
+
addEventListener() {
|
|
196
|
+
}
|
|
197
|
+
removeEventListener() {
|
|
198
|
+
}
|
|
199
|
+
get previousVisibleSibling() {
|
|
200
|
+
let e = this.previousSibling;
|
|
201
|
+
for (; e && e.isHidden; ) e = e.previousSibling;
|
|
202
|
+
return e;
|
|
203
|
+
}
|
|
204
|
+
get nextVisibleSibling() {
|
|
205
|
+
let e = this.nextSibling;
|
|
206
|
+
for (; e && e.isHidden; ) e = e.nextSibling;
|
|
207
|
+
return e;
|
|
208
|
+
}
|
|
209
|
+
get firstVisibleChild() {
|
|
210
|
+
let e = this.firstChild;
|
|
211
|
+
for (; e && e.isHidden; ) e = e.nextSibling;
|
|
212
|
+
return e;
|
|
213
|
+
}
|
|
214
|
+
get lastVisibleChild() {
|
|
215
|
+
let e = this.lastChild;
|
|
216
|
+
for (; e && e.isHidden; ) e = e.previousSibling;
|
|
217
|
+
return e;
|
|
218
|
+
}
|
|
219
|
+
constructor(e) {
|
|
220
|
+
this._firstChild = null, this._lastChild = null, this._previousSibling = null, this._nextSibling = null, this._parentNode = null, this._minInvalidChildIndex = null, this.ownerDocument = e;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
class p extends D {
|
|
224
|
+
get index() {
|
|
225
|
+
return this._index;
|
|
226
|
+
}
|
|
227
|
+
set index(e) {
|
|
228
|
+
this._index = e, this.ownerDocument.markDirty(this);
|
|
229
|
+
}
|
|
230
|
+
get level() {
|
|
231
|
+
return this.parentNode instanceof p ? this.parentNode.level + (this.node.type === "item" ? 1 : 0) : 0;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Lazily gets a mutable instance of a Node. If the node has already
|
|
235
|
+
* been cloned during this update cycle, it just returns the existing one.
|
|
236
|
+
*/
|
|
237
|
+
getMutableNode() {
|
|
238
|
+
return this.isMutated || (this.node = this.node.clone(), this.isMutated = !0), this.ownerDocument.markDirty(this), this.node;
|
|
239
|
+
}
|
|
240
|
+
updateNode() {
|
|
241
|
+
var e, t, n;
|
|
242
|
+
let l = this.nextVisibleSibling, i = this.getMutableNode();
|
|
243
|
+
i.index = this.index, i.level = this.level, i.parentKey = this.parentNode instanceof p ? this.parentNode.node.key : null;
|
|
244
|
+
var o;
|
|
245
|
+
i.prevKey = (o = (e = this.previousVisibleSibling) === null || e === void 0 ? void 0 : e.node.key) !== null && o !== void 0 ? o : null;
|
|
246
|
+
var d;
|
|
247
|
+
i.nextKey = (d = l == null ? void 0 : l.node.key) !== null && d !== void 0 ? d : null, i.hasChildNodes = !!this.firstChild;
|
|
248
|
+
var s;
|
|
249
|
+
i.firstChildKey = (s = (t = this.firstVisibleChild) === null || t === void 0 ? void 0 : t.node.key) !== null && s !== void 0 ? s : null;
|
|
250
|
+
var a;
|
|
251
|
+
if (i.lastChildKey = (a = (n = this.lastVisibleChild) === null || n === void 0 ? void 0 : n.node.key) !== null && a !== void 0 ? a : null, (i.colSpan != null || i.colIndex != null) && l) {
|
|
252
|
+
var c, h;
|
|
253
|
+
let f = ((c = i.colIndex) !== null && c !== void 0 ? c : i.index) + ((h = i.colSpan) !== null && h !== void 0 ? h : 1);
|
|
254
|
+
if (f !== l.node.colIndex) {
|
|
255
|
+
let A = l.getMutableNode();
|
|
256
|
+
A.colIndex = f;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
setProps(e, t, n, l) {
|
|
261
|
+
let i = this.getMutableNode(), { value: o, textValue: d, id: s, ...a } = e;
|
|
262
|
+
if (a.ref = t, i.props = a, i.rendered = n, i.render = l, i.value = o, i.textValue = d || (typeof a.children == "string" ? a.children : "") || e["aria-label"] || "", s != null && s !== i.key) {
|
|
263
|
+
if (this.hasSetProps) throw new Error("Cannot change the id of an item");
|
|
264
|
+
i.key = s;
|
|
265
|
+
}
|
|
266
|
+
a.colSpan != null && (i.colSpan = a.colSpan), this.hasSetProps = !0, this.isConnected && this.ownerDocument.queueUpdate();
|
|
267
|
+
}
|
|
268
|
+
get style() {
|
|
269
|
+
let e = this;
|
|
270
|
+
return {
|
|
271
|
+
get display() {
|
|
272
|
+
return e.isHidden ? "none" : "";
|
|
273
|
+
},
|
|
274
|
+
set display(t) {
|
|
275
|
+
let n = t === "none";
|
|
276
|
+
if (e.isHidden !== n) {
|
|
277
|
+
var l, i;
|
|
278
|
+
(((l = e.parentNode) === null || l === void 0 ? void 0 : l.firstVisibleChild) === e || ((i = e.parentNode) === null || i === void 0 ? void 0 : i.lastVisibleChild) === e) && e.ownerDocument.markDirty(e.parentNode);
|
|
279
|
+
let o = e.previousVisibleSibling, d = e.nextVisibleSibling;
|
|
280
|
+
o && e.ownerDocument.markDirty(o), d && e.ownerDocument.markDirty(d), e.isHidden = n, e.ownerDocument.markDirty(e);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
hasAttribute() {
|
|
286
|
+
}
|
|
287
|
+
setAttribute() {
|
|
288
|
+
}
|
|
289
|
+
setAttributeNS() {
|
|
290
|
+
}
|
|
291
|
+
removeAttribute() {
|
|
292
|
+
}
|
|
293
|
+
constructor(e, t) {
|
|
294
|
+
super(t), this.nodeType = 8, this.isMutated = !0, this._index = 0, this.hasSetProps = !1, this.isHidden = !1, this.node = new b(e, `react-aria-${++t.nodeId}`);
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
class W extends D {
|
|
298
|
+
get isConnected() {
|
|
299
|
+
return this.isMounted;
|
|
300
|
+
}
|
|
301
|
+
createElement(e) {
|
|
302
|
+
return new p(e, this);
|
|
303
|
+
}
|
|
304
|
+
getMutableCollection() {
|
|
305
|
+
return this.nextCollection || (this.nextCollection = this.collection.clone()), this.nextCollection;
|
|
306
|
+
}
|
|
307
|
+
markDirty(e) {
|
|
308
|
+
this.dirtyNodes.add(e);
|
|
309
|
+
}
|
|
310
|
+
addNode(e) {
|
|
311
|
+
if (e.isHidden) return;
|
|
312
|
+
let t = this.getMutableCollection();
|
|
313
|
+
if (!t.getItem(e.node.key)) for (let n of e) this.addNode(n);
|
|
314
|
+
t.addNode(e.node);
|
|
315
|
+
}
|
|
316
|
+
removeNode(e) {
|
|
317
|
+
for (let n of e) this.removeNode(n);
|
|
318
|
+
this.getMutableCollection().removeNode(e.node.key);
|
|
319
|
+
}
|
|
320
|
+
/** Finalizes the collection update, updating all nodes and freezing the collection. */
|
|
321
|
+
getCollection() {
|
|
322
|
+
return this.inSubscription ? this.collection.clone() : (this.queuedRender = !1, this.updateCollection(), this.collection);
|
|
323
|
+
}
|
|
324
|
+
updateCollection() {
|
|
325
|
+
for (let i of this.dirtyNodes) i instanceof p && (!i.isConnected || i.isHidden) ? this.removeNode(i) : i.updateChildIndices();
|
|
326
|
+
for (let i of this.dirtyNodes) i instanceof p && (i.isConnected && !i.isHidden && (i.updateNode(), this.addNode(i)), i.isMutated = !1);
|
|
327
|
+
if (this.dirtyNodes.clear(), this.nextCollection) {
|
|
328
|
+
var e, t, n, l;
|
|
329
|
+
this.nextCollection.commit((n = (e = this.firstVisibleChild) === null || e === void 0 ? void 0 : e.node.key) !== null && n !== void 0 ? n : null, (l = (t = this.lastVisibleChild) === null || t === void 0 ? void 0 : t.node.key) !== null && l !== void 0 ? l : null, this.isSSR), this.isSSR || (this.collection = this.nextCollection, this.nextCollection = null);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
queueUpdate() {
|
|
333
|
+
if (!(this.dirtyNodes.size === 0 || this.queuedRender)) {
|
|
334
|
+
this.queuedRender = !0, this.inSubscription = !0;
|
|
335
|
+
for (let e of this.subscriptions) e();
|
|
336
|
+
this.inSubscription = !1;
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
subscribe(e) {
|
|
340
|
+
return this.subscriptions.add(e), () => this.subscriptions.delete(e);
|
|
341
|
+
}
|
|
342
|
+
resetAfterSSR() {
|
|
343
|
+
this.isSSR && (this.isSSR = !1, this.firstChild = null, this.lastChild = null, this.nodeId = 0);
|
|
344
|
+
}
|
|
345
|
+
constructor(e) {
|
|
346
|
+
super(null), this.nodeType = 11, this.ownerDocument = this, this.dirtyNodes = /* @__PURE__ */ new Set(), this.isSSR = !1, this.nodeId = 0, this.nodesByProps = /* @__PURE__ */ new WeakMap(), this.isMounted = !0, this.nextCollection = null, this.subscriptions = /* @__PURE__ */ new Set(), this.queuedRender = !1, this.inSubscription = !1, this.collection = e, this.nextCollection = e;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
function E(r) {
|
|
350
|
+
let { children: e, items: t, idScope: n, addIdAndValue: l, dependencies: i = [] } = r, o = C(() => /* @__PURE__ */ new WeakMap(), i);
|
|
351
|
+
return C(() => {
|
|
352
|
+
if (t && typeof e == "function") {
|
|
353
|
+
let a = [];
|
|
354
|
+
for (let c of t) {
|
|
355
|
+
let h = o.get(c);
|
|
356
|
+
if (!h) {
|
|
357
|
+
h = e(c);
|
|
358
|
+
var d, s;
|
|
359
|
+
let f = (s = (d = h.props.id) !== null && d !== void 0 ? d : c.key) !== null && s !== void 0 ? s : c.id;
|
|
360
|
+
if (f == null) throw new Error("Could not determine key for item");
|
|
361
|
+
n && (f = n + ":" + f), h = I(h, l ? {
|
|
362
|
+
key: f,
|
|
363
|
+
id: f,
|
|
364
|
+
value: c
|
|
365
|
+
} : {
|
|
366
|
+
key: f
|
|
367
|
+
}), o.set(c, h);
|
|
368
|
+
}
|
|
369
|
+
a.push(h);
|
|
370
|
+
}
|
|
371
|
+
return a;
|
|
372
|
+
} else if (typeof e != "function") return e;
|
|
373
|
+
}, [
|
|
374
|
+
e,
|
|
375
|
+
t,
|
|
376
|
+
o,
|
|
377
|
+
n,
|
|
378
|
+
l
|
|
379
|
+
]);
|
|
380
|
+
}
|
|
381
|
+
const R = /* @__PURE__ */ v(!1), x = /* @__PURE__ */ v(null);
|
|
382
|
+
function ne(r) {
|
|
383
|
+
if (y(x))
|
|
384
|
+
return r.content;
|
|
385
|
+
let { collection: t, document: n } = G(r.createCollection);
|
|
386
|
+
return /* @__PURE__ */ u.createElement(u.Fragment, null, /* @__PURE__ */ u.createElement(H, null, /* @__PURE__ */ u.createElement(x.Provider, {
|
|
387
|
+
value: n
|
|
388
|
+
}, r.content)), /* @__PURE__ */ u.createElement(_, {
|
|
389
|
+
render: r.children,
|
|
390
|
+
collection: t
|
|
391
|
+
}));
|
|
392
|
+
}
|
|
393
|
+
function _({ collection: r, render: e }) {
|
|
394
|
+
return e(r);
|
|
395
|
+
}
|
|
396
|
+
function T(r, e, t) {
|
|
397
|
+
let n = M(), l = B(n);
|
|
398
|
+
l.current = n;
|
|
399
|
+
let i = m(() => l.current ? t() : e(), [
|
|
400
|
+
e,
|
|
401
|
+
t
|
|
402
|
+
]);
|
|
403
|
+
return F.useSyncExternalStore(r, i);
|
|
404
|
+
}
|
|
405
|
+
const j = typeof u.useSyncExternalStore == "function" ? u.useSyncExternalStore : T;
|
|
406
|
+
function G(r) {
|
|
407
|
+
let [e] = q(() => new W((r == null ? void 0 : r()) || new S())), t = m((o) => e.subscribe(o), [
|
|
408
|
+
e
|
|
409
|
+
]), n = m(() => {
|
|
410
|
+
let o = e.getCollection();
|
|
411
|
+
return e.isSSR && e.resetAfterSSR(), o;
|
|
412
|
+
}, [
|
|
413
|
+
e
|
|
414
|
+
]), l = m(() => (e.isSSR = !0, e.getCollection()), [
|
|
415
|
+
e
|
|
416
|
+
]), i = j(t, n, l);
|
|
417
|
+
return L(() => (e.isMounted = !0, () => {
|
|
418
|
+
e.isMounted = !1;
|
|
419
|
+
}), [
|
|
420
|
+
e
|
|
421
|
+
]), {
|
|
422
|
+
collection: i,
|
|
423
|
+
document: e
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
const g = /* @__PURE__ */ v(null);
|
|
427
|
+
function V(r, e, t, n, l, i) {
|
|
428
|
+
let o = m((s) => {
|
|
429
|
+
s == null || s.setProps(e, t, n, i);
|
|
430
|
+
}, [
|
|
431
|
+
e,
|
|
432
|
+
t,
|
|
433
|
+
n,
|
|
434
|
+
i
|
|
435
|
+
]), d = y(g);
|
|
436
|
+
if (d) {
|
|
437
|
+
let s = d.ownerDocument.nodesByProps.get(e);
|
|
438
|
+
return s || (s = d.ownerDocument.createElement(r), s.setProps(e, t, n, i), d.appendChild(s), d.ownerDocument.updateCollection(), d.ownerDocument.nodesByProps.set(e, s)), l ? /* @__PURE__ */ u.createElement(g.Provider, {
|
|
439
|
+
value: s
|
|
440
|
+
}, l) : null;
|
|
441
|
+
}
|
|
442
|
+
return /* @__PURE__ */ u.createElement(r, {
|
|
443
|
+
ref: o
|
|
444
|
+
}, l);
|
|
445
|
+
}
|
|
446
|
+
function le(r, e) {
|
|
447
|
+
let t = ({ node: l }) => e(l.props, l.props.ref, l), n = N((l, i) => {
|
|
448
|
+
let o = y(K);
|
|
449
|
+
if (!y(R)) {
|
|
450
|
+
if (e.length >= 3) throw new Error(e.name + " cannot be rendered outside a collection.");
|
|
451
|
+
return e(l, i);
|
|
452
|
+
}
|
|
453
|
+
return V(r, l, i, "children" in l ? l.children : null, null, (s) => (
|
|
454
|
+
// Forward FocusableContext to real DOM tree so tooltips work.
|
|
455
|
+
/* @__PURE__ */ u.createElement(K.Provider, {
|
|
456
|
+
value: o
|
|
457
|
+
}, /* @__PURE__ */ u.createElement(t, {
|
|
458
|
+
node: s
|
|
459
|
+
}))
|
|
460
|
+
));
|
|
461
|
+
});
|
|
462
|
+
return n.displayName = e.name, n;
|
|
463
|
+
}
|
|
464
|
+
function re(r, e, t = P) {
|
|
465
|
+
let n = ({ node: i }) => e(i.props, i.props.ref, i), l = N((i, o) => {
|
|
466
|
+
let d = t(i);
|
|
467
|
+
var s;
|
|
468
|
+
return (s = V(r, i, o, null, d, (a) => /* @__PURE__ */ u.createElement(n, {
|
|
469
|
+
node: a
|
|
470
|
+
}))) !== null && s !== void 0 ? s : /* @__PURE__ */ u.createElement(u.Fragment, null);
|
|
471
|
+
});
|
|
472
|
+
return l.displayName = e.name, l;
|
|
473
|
+
}
|
|
474
|
+
function P(r) {
|
|
475
|
+
return E({
|
|
476
|
+
...r,
|
|
477
|
+
addIdAndValue: !0
|
|
478
|
+
});
|
|
479
|
+
}
|
|
480
|
+
const $ = /* @__PURE__ */ v(null);
|
|
481
|
+
function se(r) {
|
|
482
|
+
let e = y($), t = ((e == null ? void 0 : e.dependencies) || []).concat(r.dependencies), n = r.idScope || (e == null ? void 0 : e.idScope), l = P({
|
|
483
|
+
...r,
|
|
484
|
+
idScope: n,
|
|
485
|
+
dependencies: t
|
|
486
|
+
});
|
|
487
|
+
return y(x) && (l = /* @__PURE__ */ u.createElement(J, null, l)), e = C(() => ({
|
|
488
|
+
dependencies: t,
|
|
489
|
+
idScope: n
|
|
490
|
+
}), [
|
|
491
|
+
n,
|
|
492
|
+
...t
|
|
493
|
+
]), /* @__PURE__ */ u.createElement($.Provider, {
|
|
494
|
+
value: e
|
|
495
|
+
}, l);
|
|
496
|
+
}
|
|
497
|
+
function J({ children: r }) {
|
|
498
|
+
let e = y(x), t = C(() => /* @__PURE__ */ u.createElement(x.Provider, {
|
|
499
|
+
value: null
|
|
500
|
+
}, /* @__PURE__ */ u.createElement(R.Provider, {
|
|
501
|
+
value: !0
|
|
502
|
+
}, r)), [
|
|
503
|
+
r
|
|
504
|
+
]);
|
|
505
|
+
return M() ? /* @__PURE__ */ u.createElement(g.Provider, {
|
|
506
|
+
value: e
|
|
507
|
+
}, t) : /* @__PURE__ */ z(t, e);
|
|
508
|
+
}
|
|
509
|
+
const oe = /* @__PURE__ */ v(null), O = {
|
|
510
|
+
CollectionRoot({ collection: r, renderDropIndicator: e }) {
|
|
511
|
+
return w(r, null, e);
|
|
512
|
+
},
|
|
513
|
+
CollectionBranch({ collection: r, parent: e, renderDropIndicator: t }) {
|
|
514
|
+
return w(r, e, t);
|
|
515
|
+
}
|
|
516
|
+
};
|
|
517
|
+
function w(r, e, t) {
|
|
518
|
+
return E({
|
|
519
|
+
items: e ? r.getChildren(e.key) : r,
|
|
520
|
+
dependencies: [
|
|
521
|
+
t
|
|
522
|
+
],
|
|
523
|
+
children(n) {
|
|
524
|
+
let l = n.render(n);
|
|
525
|
+
return !t || n.type !== "item" ? l : /* @__PURE__ */ u.createElement(u.Fragment, null, t({
|
|
526
|
+
type: "item",
|
|
527
|
+
key: n.key,
|
|
528
|
+
dropPosition: "before"
|
|
529
|
+
}), l, Q(r, n, t));
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
function Q(r, e, t) {
|
|
534
|
+
let n = e.key, l = r.getKeyAfter(n), i = l != null ? r.getItem(l) : null;
|
|
535
|
+
for (; i != null && i.type !== "item"; )
|
|
536
|
+
l = r.getKeyAfter(i.key), i = l != null ? r.getItem(l) : null;
|
|
537
|
+
let o = e.nextKey != null ? r.getItem(e.nextKey) : null;
|
|
538
|
+
for (; o != null && o.type !== "item"; ) o = o.nextKey != null ? r.getItem(o.nextKey) : null;
|
|
539
|
+
let d = [];
|
|
540
|
+
if (o == null) {
|
|
541
|
+
let s = e;
|
|
542
|
+
for (; s && (!i || s.parentKey !== i.parentKey && i.level < s.level); ) {
|
|
543
|
+
let a = t({
|
|
544
|
+
type: "item",
|
|
545
|
+
key: s.key,
|
|
546
|
+
dropPosition: "after"
|
|
547
|
+
});
|
|
548
|
+
/* @__PURE__ */ U(a) && d.push(/* @__PURE__ */ I(a, {
|
|
549
|
+
key: `${s.key}-after`
|
|
550
|
+
})), s = s.parentKey != null ? r.getItem(s.parentKey) : null;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
return d;
|
|
554
|
+
}
|
|
555
|
+
const de = /* @__PURE__ */ v(O);
|
|
556
|
+
function ue(r) {
|
|
557
|
+
return C(() => r != null ? /* @__PURE__ */ new Set([
|
|
558
|
+
r
|
|
559
|
+
]) : null, [
|
|
560
|
+
r
|
|
561
|
+
]);
|
|
562
|
+
}
|
|
563
|
+
export {
|
|
564
|
+
le as $,
|
|
565
|
+
re as a,
|
|
566
|
+
ne as b,
|
|
567
|
+
se as c,
|
|
568
|
+
de as d,
|
|
569
|
+
oe as e,
|
|
570
|
+
O as f,
|
|
571
|
+
ue as g,
|
|
572
|
+
Q as h,
|
|
573
|
+
E as i,
|
|
574
|
+
S as j,
|
|
575
|
+
b as k
|
|
576
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const R=require("./Hidden-BxRZGdEW.cjs"),V=require("react-dom"),$=require("./useFocusable-CuPQ7Cm5.cjs"),s=require("react"),C=require("./utils-BNtZbAib.cjs"),P=require("./index-D97L3EBk.cjs");class v{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new v(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}constructor(e,t){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=e,this.key=t}}class x{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),l=(n==null?void 0:n.firstChildKey)!=null?t.get(n.firstChildKey):null;for(;l;)yield l,l=l.nextKey!=null?t.get(l.nextKey):void 0}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!=="item"&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);var n;return(n=t==null?void 0:t.key)!==null&&n!==void 0?n:null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!=="item"&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var t;return(t=e==null?void 0:e.key)!==null&&t!==void 0?t:null}getItem(e){var t;return(t=this.keyMap.get(e))!==null&&t!==void 0?t:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=t,this.frozen=!n}UNSTABLE_filter(e){let t=new x,n=null;for(let l of this)if(l.type==="section"&&l.hasChildNodes){let i=l.clone(),d=null;for(let u of this.getChildren(l.key))if(g(u,e,this,t)){let o=u.clone();d==null&&(i.firstChildKey=o.key),t.firstKey==null&&(t.firstKey=i.key),d&&d.parentKey===o.parentKey?(d.nextKey=o.key,o.prevKey=d.key):o.prevKey=null,o.nextKey=null,t.addNode(o),d=o}d&&(d.type!=="header"?(i.lastChildKey=d.key,n==null?i.prevKey=null:(n.type==="section"||n.type==="separator")&&(n.nextKey=i.key,i.prevKey=n.key),i.nextKey=null,n=i,t.addNode(i)):(t.firstKey===i.key&&(t.firstKey=null),t.removeNode(d.key)))}else if(l.type==="separator"){let i=l.clone();i.nextKey=null,(n==null?void 0:n.type)==="section"&&(n.nextKey=i.key,i.prevKey=n.key,n=i,t.addNode(i))}else{let i=l.clone();g(i,e,this,t)&&(t.firstKey==null&&(t.firstKey=i.key),n!=null&&n.type!=="section"&&n.type!=="separator"&&n.parentKey===i.parentKey?(n.nextKey=i.key,i.prevKey=n.key):i.prevKey=null,i.nextKey=null,t.addNode(i),n=i)}if((n==null?void 0:n.type)==="separator"&&n.nextKey===null){let l;n.prevKey!=null&&(l=t.getItem(n.prevKey),l.nextKey=null),t.removeNode(n.key),n=l}return t.lastKey=(n==null?void 0:n.key)||null,t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function g(r,e,t,n){if(r.type==="subdialogtrigger"||r.type==="submenutrigger"){let l=[...t.getChildren(r.key)][0];if(l&&e(l.textValue)){let i=l.clone();return n.addNode(i),!0}else return!1}else return r.type==="header"?!0:e(r.textValue)}class k{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class y extends k{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof y?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,t,n;let l=this.nextVisibleSibling,i=this.getMutableNode();i.index=this.index,i.level=this.level,i.parentKey=this.parentNode instanceof y?this.parentNode.node.key:null;var d;i.prevKey=(d=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&d!==void 0?d:null;var u;i.nextKey=(u=l==null?void 0:l.node.key)!==null&&u!==void 0?u:null,i.hasChildNodes=!!this.firstChild;var o;i.firstChildKey=(o=(t=this.firstVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&o!==void 0?o:null;var a;if(i.lastChildKey=(a=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&a!==void 0?a:null,(i.colSpan!=null||i.colIndex!=null)&&l){var c,h;let f=((c=i.colIndex)!==null&&c!==void 0?c:i.index)+((h=i.colSpan)!==null&&h!==void 0?h:1);if(f!==l.node.colIndex){let E=l.getMutableNode();E.colIndex=f}}}setProps(e,t,n,l){let i=this.getMutableNode(),{value:d,textValue:u,id:o,...a}=e;if(a.ref=t,i.props=a,i.rendered=n,i.render=l,i.value=d,i.textValue=u||(typeof a.children=="string"?a.children:"")||e["aria-label"]||"",o!=null&&o!==i.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");i.key=o}a.colSpan!=null&&(i.colSpan=a.colSpan),this.hasSetProps=!0,this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(t){let n=t==="none";if(e.isHidden!==n){var l,i;(((l=e.parentNode)===null||l===void 0?void 0:l.firstVisibleChild)===e||((i=e.parentNode)===null||i===void 0?void 0:i.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let d=e.previousVisibleSibling,u=e.nextVisibleSibling;d&&e.ownerDocument.markDirty(d),u&&e.ownerDocument.markDirty(u),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new v(e,`react-aria-${++t.nodeId}`)}}class q extends k{get isConnected(){return this.isMounted}createElement(e){return new y(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let n of e)this.addNode(n);t.addNode(e.node)}removeNode(e){for(let n of e)this.removeNode(n);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let i of this.dirtyNodes)i instanceof y&&(!i.isConnected||i.isHidden)?this.removeNode(i):i.updateChildIndices();for(let i of this.dirtyNodes)i instanceof y&&(i.isConnected&&!i.isHidden&&(i.updateNode(),this.addNode(i)),i.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,t,n,l;this.nextCollection.commit((n=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&n!==void 0?n:null,(l=(t=this.lastVisibleChild)===null||t===void 0?void 0:t.node.key)!==null&&l!==void 0?l:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function m(r){let{children:e,items:t,idScope:n,addIdAndValue:l,dependencies:i=[]}=r,d=s.useMemo(()=>new WeakMap,i);return s.useMemo(()=>{if(t&&typeof e=="function"){let a=[];for(let c of t){let h=d.get(c);if(!h){h=e(c);var u,o;let f=(o=(u=h.props.id)!==null&&u!==void 0?u:c.key)!==null&&o!==void 0?o:c.id;if(f==null)throw new Error("Could not determine key for item");n&&(f=n+":"+f),h=s.cloneElement(h,l?{key:f,id:f,value:c}:{key:f}),d.set(c,h)}a.push(h)}return a}else if(typeof e!="function")return e},[e,t,d,n,l])}const w=s.createContext(!1),p=s.createContext(null);function A(r){if(s.useContext(p))return r.content;let{collection:t,document:n}=U(r.createCollection);return s.createElement(s.Fragment,null,s.createElement(R.$f39a9eba43920ace$export$8dc98ba7eadeaa56,null,s.createElement(p.Provider,{value:n},r.content)),s.createElement(H,{render:r.children,collection:t}))}function H({collection:r,render:e}){return e(r)}function z(r,e,t){let n=C.$b5e257d569688ac6$export$535bd6ca7f90a273(),l=s.useRef(n);l.current=n;let i=s.useCallback(()=>l.current?t():e(),[e,t]);return P.shimExports.useSyncExternalStore(r,i)}const B=typeof s.useSyncExternalStore=="function"?s.useSyncExternalStore:z;function U(r){let[e]=s.useState(()=>new q((r==null?void 0:r())||new x)),t=s.useCallback(d=>e.subscribe(d),[e]),n=s.useCallback(()=>{let d=e.getCollection();return e.isSSR&&e.resetAfterSSR(),d},[e]),l=s.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),i=B(t,n,l);return C.$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:i,document:e}}const b=s.createContext(null);function I(r,e,t,n,l,i){let d=s.useCallback(o=>{o==null||o.setProps(e,t,n,i)},[e,t,n,i]),u=s.useContext(b);if(u){let o=u.ownerDocument.nodesByProps.get(e);return o||(o=u.ownerDocument.createElement(r),o.setProps(e,t,n,i),u.appendChild(o),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,o)),l?s.createElement(b.Provider,{value:o},l):null}return s.createElement(r,{ref:d},l)}function F(r,e){let t=({node:l})=>e(l.props,l.props.ref,l),n=s.forwardRef((l,i)=>{let d=s.useContext($.$f645667febf57a63$export$f9762fab77588ecb);if(!s.useContext(w)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,i)}return I(r,l,i,"children"in l?l.children:null,null,o=>s.createElement($.$f645667febf57a63$export$f9762fab77588ecb.Provider,{value:d},s.createElement(t,{node:o})))});return n.displayName=e.name,n}function L(r,e,t=N){let n=({node:i})=>e(i.props,i.props.ref,i),l=s.forwardRef((i,d)=>{let u=t(i);var o;return(o=I(r,i,d,null,u,a=>s.createElement(n,{node:a})))!==null&&o!==void 0?o:s.createElement(s.Fragment,null)});return l.displayName=e.name,l}function N(r){return m({...r,addIdAndValue:!0})}const S=s.createContext(null);function W(r){let e=s.useContext(S),t=((e==null?void 0:e.dependencies)||[]).concat(r.dependencies),n=r.idScope||(e==null?void 0:e.idScope),l=N({...r,idScope:n,dependencies:t});return s.useContext(p)&&(l=s.createElement(T,null,l)),e=s.useMemo(()=>({dependencies:t,idScope:n}),[n,...t]),s.createElement(S.Provider,{value:e},l)}function T({children:r}){let e=s.useContext(p),t=s.useMemo(()=>s.createElement(p.Provider,{value:null},s.createElement(w.Provider,{value:!0},r)),[r]);return C.$b5e257d569688ac6$export$535bd6ca7f90a273()?s.createElement(b.Provider,{value:e},t):V.createPortal(t,e)}const O=s.createContext(null),M={CollectionRoot({collection:r,renderDropIndicator:e}){return K(r,null,e)},CollectionBranch({collection:r,parent:e,renderDropIndicator:t}){return K(r,e,t)}};function K(r,e,t){return m({items:e?r.getChildren(e.key):r,dependencies:[t],children(n){let l=n.render(n);return!t||n.type!=="item"?l:s.createElement(s.Fragment,null,t({type:"item",key:n.key,dropPosition:"before"}),l,D(r,n,t))}})}function D(r,e,t){let n=e.key,l=r.getKeyAfter(n),i=l!=null?r.getItem(l):null;for(;i!=null&&i.type!=="item";)l=r.getKeyAfter(i.key),i=l!=null?r.getItem(l):null;let d=e.nextKey!=null?r.getItem(e.nextKey):null;for(;d!=null&&d.type!=="item";)d=d.nextKey!=null?r.getItem(d.nextKey):null;let u=[];if(d==null){let o=e;for(;o&&(!i||o.parentKey!==i.parentKey&&i.level<o.level);){let a=t({type:"item",key:o.key,dropPosition:"after"});s.isValidElement(a)&&u.push(s.cloneElement(a,{key:`${o.key}-after`})),o=o.parentKey!=null?r.getItem(o.parentKey):null}}return u}const _=s.createContext(M);function G(r){return s.useMemo(()=>r!=null?new Set([r]):null,[r])}exports.$23b9f4fcf0fe224b$export$408d25a4e12db025=x;exports.$23b9f4fcf0fe224b$export$d68d59712b04d9d1=v;exports.$7135fc7d473fd974$export$2dbbd341daed716d=D;exports.$7135fc7d473fd974$export$4feb769f8ddf26c5=_;exports.$7135fc7d473fd974$export$90e00781bc59d8f9=G;exports.$7135fc7d473fd974$export$a164736487e3f0ae=M;exports.$7135fc7d473fd974$export$d40e14dec8b060a8=O;exports.$e1995378a142960e$export$18af5c7a9e9b3664=F;exports.$e1995378a142960e$export$bf788dd355e3a401=A;exports.$e1995378a142960e$export$e953bb1cd0f19726=L;exports.$e1995378a142960e$export$fb8073518f34e6ec=W;exports.$e948873055cbafe4$export$727c8fc270210f13=m;
|