@preply/ds-docs 10.0.0 → 11.0.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/dist/assets/{00.LayoutFlex.stories-DB9Y25qw.js → 00.LayoutFlex.stories-lllooXjc.js} +1 -1
- package/dist/assets/{00.applications-C7qyvM1y.js → 00.applications-ApRgtzMF.js} +1 -1
- package/dist/assets/{00.favicons.guide-BmYhSQZH.js → 00.favicons.guide-4ivqvu_K.js} +1 -1
- package/dist/assets/{00.token-explorer-zaz4V88E.js → 00.token-explorer-DCBSOdHJ.js} +6 -6
- package/dist/assets/{00.using-responsive-props-DKW-uWVH.js → 00.using-responsive-props-BhAkr9Gn.js} +1 -1
- package/dist/assets/{01.semantic-tokens-Qf9qY_Sk.js → 01.semantic-tokens-BBQKcQ5o.js} +1 -1
- package/dist/assets/{01.using-shorthand-props-BedWZyE3.js → 01.using-shorthand-props-SxccG8oR.js} +1 -1
- package/dist/assets/{10.Combinations.stories-DL8TmNJ4.js → 10.Combinations.stories-D3XySbv3.js} +1 -1
- package/dist/assets/{10.fonts.guide-DWCtIfPx.js → 10.fonts.guide-p4vZ2TE8.js} +1 -1
- package/dist/assets/{10.ssr-FDyVDtdm.js → 10.ssr-BLS5aGYV.js} +1 -1
- package/dist/assets/11.fonts.explorer-BMm1rcuE.js +2 -0
- package/dist/assets/{11.ssr.app-router-C5TwsO2T.js → 11.ssr.app-router-B_LdKMuw.js} +1 -1
- package/dist/assets/{20.libraries-Cnl2_NKK.js → 20.libraries-Uutk1t-k.js} +1 -1
- package/dist/assets/{2025-q4-ds-cleanup-Bpa9AZ8j.js → 2025-q4-ds-cleanup-D2AonoQX.js} +1 -1
- package/dist/assets/30.icons.explorer-D63Br7GU.js +72 -0
- package/dist/assets/{30.storybook-C9GpdY6w.js → 30.storybook-B_OtmSNE.js} +1 -1
- package/dist/assets/{40.illustrations.explorer-BRtj5sFB.js → 40.illustrations.explorer-Pi9iaQwM.js} +1 -1
- package/dist/assets/{90.advanced-hNSc64rO.js → 90.advanced-tEkbHxcl.js} +1 -1
- package/dist/assets/{Accordion-CedlUpYk.js → Accordion-2avWtqXz.js} +4 -4
- package/dist/assets/{Accordion.stories-K6mzrdt8.js → Accordion.stories-CLwah67K.js} +1 -1
- package/dist/assets/{Accordion.tests.stories-B6lTbT6X.js → Accordion.tests.stories-CFH7p1Jq.js} +1 -1
- package/dist/assets/{AlertBanner.primitives.stories-CX03Ob-5.js → AlertBanner.primitives.stories-DpA-of6O.js} +1 -1
- package/dist/assets/{AlertBanner.stories-Cla7i7qF.js → AlertBanner.stories-B7xxyCn2.js} +2 -2
- package/dist/assets/{AlertBannerAction-CW-WBC-Q.js → AlertBannerAction-D14MnnIA.js} +33 -33
- package/dist/assets/AlertDialog-B5rRXSxb.js +4 -0
- package/dist/assets/AlertDialog.stories-BKT7nitb.js +232 -0
- package/dist/assets/{Avatar-Dlo9b83e.js → Avatar-Die_4zu0.js} +1 -1
- package/dist/assets/{Avatar.stories-B27rtxK8.js → Avatar.stories-DJHK0lEC.js} +1 -1
- package/dist/assets/{AvatarWithStatus.stories-DBeEaQQL.js → AvatarWithStatus.stories-E9QQr3Dr.js} +1 -1
- package/dist/assets/{Badge-CEZW6Ww4.js → Badge-BSDHZ3bI.js} +2 -2
- package/dist/assets/{Badge.stories-ioY8q4d7.js → Badge.stories-6FOVA96I.js} +1 -1
- package/dist/assets/{Box.stories-udfSjNu1.js → Box.stories-DAVs5Qmd.js} +1 -1
- package/dist/assets/{BubbleCounter.stories-D2G7jKKI.js → BubbleCounter.stories-DHv_hrNV.js} +1 -1
- package/dist/assets/{Button-DS2bg8PO.js → Button-C0Um_QuO.js} +2 -2
- package/dist/assets/{Button.stories-VD5Bx8BA.js → Button.stories-CTSwUwYJ.js} +1 -1
- package/dist/assets/{ButtonBase-CPJxprWJ.js → ButtonBase-DGinnt2u.js} +1 -1
- package/dist/assets/{ButtonBase-sV1YoG7h.js → ButtonBase-HkSfLFbE.js} +1 -1
- package/dist/assets/{CalloutBanner.stories-Cda3BZCl.js → CalloutBanner.stories-C62ApsKt.js} +19 -19
- package/dist/assets/{Checkbox-Cmmcg7FL.js → Checkbox-U8uzIr-e.js} +3 -3
- package/dist/assets/{Checkbox.stories-B0kQw-sr.js → Checkbox.stories-ClI-ZBnj.js} +1 -1
- package/dist/assets/{Checkbox.tests.stories-DDyVlpZg.js → Checkbox.tests.stories-CrLxNZ2d.js} +1 -1
- package/dist/assets/{Chips.stories-DcxW_jqF.js → Chips.stories-BMxD1fH1.js} +1 -1
- package/dist/assets/{Color-ASIRERSW-9q9Af87o.js → Color-ASIRERSW-BsR8auWQ.js} +1 -1
- package/dist/assets/ComposingDialogs.stories-DwVqal9K.js +111 -0
- package/dist/assets/{ComposingPopovers.stories-Co69SyGH.js → ComposingPopovers.stories-DtmTbsU_.js} +1 -1
- package/dist/assets/CountryFlag-D40CtNEa.js +49 -0
- package/dist/assets/{CountryFlag.stories-o-8kmOZA.js → CountryFlag.stories-hf40f81N.js} +1 -1
- package/dist/assets/{CountryFlag.test.stories-CKkoBStk.js → CountryFlag.test.stories-Bde0Okud.js} +1 -1
- package/dist/assets/{Dialog-DaLOtRn0.js → Dialog-CJQmu6iz.js} +1 -1
- package/dist/assets/{Dialog.primitives.stories-CDU4GhAO.js → Dialog.primitives.stories-BRGfipHO.js} +2 -2
- package/dist/assets/{Dialog.stories-N8LTxdNu.js → Dialog.stories-D4tyIGD0.js} +27 -22
- package/dist/assets/Dialog.test.stories-xCqInD69.js +146 -0
- package/dist/assets/{DialogActions-_9FMsJ9P.js → DialogActions-GLMqsJfB.js} +30 -30
- package/dist/assets/{DialogCloseButton-CDDeMFIL.js → DialogCloseButton-D5YliaRd.js} +47 -55
- package/dist/assets/{DismissibleChips-X4A9KOxs.js → DismissibleChips-YCE2ttV-.js} +1 -1
- package/dist/assets/{DismissibleChips.stories-DbnvLIw0.js → DismissibleChips.stories-Cx3sJ6UG.js} +1 -1
- package/dist/assets/{Divider-WS0wDfQZ.js → Divider-j3vJV734.js} +1 -1
- package/dist/assets/{Divider.stories-BO1cg142.js → Divider.stories-CK-PipZt.js} +1 -1
- package/dist/assets/{DocsRenderer-GHJI37HO-CzsXSkAO.js → DocsRenderer-GHJI37HO-WuLZQEsz.js} +2 -2
- package/dist/assets/{DropdownMenu-CB6xg9YD.js → DropdownMenu-CgNvtJ2F.js} +409 -409
- package/dist/assets/{DropdownMenu.stories-E-6mIs-U.js → DropdownMenu.stories-DpmKDI1Q.js} +82 -56
- package/dist/assets/{FieldButton-CYcQXg37.js → FieldButton-DpHF49o_.js} +1 -1
- package/dist/assets/{FieldButton.stories-UNjMUuGT.js → FieldButton.stories-C7v9WweE.js} +1 -1
- package/dist/assets/{FormControl-DgD7Nr_L.js → FormControl-Zqf1cIwP.js} +1 -1
- package/dist/assets/{FormControl.stories-DlqjswdS.js → FormControl.stories-D4xKaMaA.js} +1 -1
- package/dist/assets/{Heading-BPJGe0Bg.js → Heading-Cj8Si45g.js} +1 -1
- package/dist/assets/{Heading.stories-B9_Jr0z3.js → Heading.stories-BG_kLNJz.js} +1 -1
- package/dist/assets/{Icon-kphbe0CE.js → Icon-CC0yjdx9.js} +2 -2
- package/dist/assets/{Icon-RSC-BcGoz5Ez.js → Icon-RSC-Cl0H44C3.js} +1 -1
- package/dist/assets/{Icon.stories-CKAjKBCa.js → Icon.stories-DAIYY4Bp.js} +1 -1
- package/dist/assets/IconButton-BpjNyYgD.js +8 -0
- package/dist/assets/IconTile-CAnlU9ss.js +1 -0
- package/dist/assets/IconTile-DDvHA75S.css +1 -0
- package/dist/assets/IconTile.stories-DnUYn3Id.js +88 -0
- package/dist/assets/{Input-Cp2OkxN8.js → Input-DuW1_5SG.js} +16 -16
- package/dist/assets/{InputContainer-BlXlJbfJ.js → InputContainer-Cmdo_xyq.js} +1 -1
- package/dist/assets/{IntegrationWithReactHookForm.stories-BstJWvGF.js → IntegrationWithReactHookForm.stories-9EImL3zR.js} +1 -1
- package/dist/assets/{IntlFormattedCurrency.stories-CXBsKa8I.js → IntlFormattedCurrency.stories-j1D4xFto.js} +9 -9
- package/dist/assets/{IntlFormattedDateTime.stories-m5rFuyxv.js → IntlFormattedDateTime.stories-BCwbTrw1.js} +7 -7
- package/dist/assets/{LayoutFlex-Drgj-jqd.js → LayoutFlex-CTH6ELdm.js} +1 -1
- package/dist/assets/{LayoutFlex-p_p7LCCd.js → LayoutFlex-DXRMJ9FH.js} +1 -1
- package/dist/assets/{LayoutFlexItem-DrxhQlf5.js → LayoutFlexItem-lmgCv4Y9.js} +1 -1
- package/dist/assets/{LayoutGrid-DZv08iKe.js → LayoutGrid-CUGRXgEO.js} +1 -1
- package/dist/assets/{LayoutGrid-eROIp1sZ.js → LayoutGrid-SAztDD7Z.js} +1 -1
- package/dist/assets/{LayoutGrid.stories-DAnbCvD6.js → LayoutGrid.stories-2dbzhVi7.js} +1 -1
- package/dist/assets/{LayoutGridItem-DiU_IdjQ.js → LayoutGridItem-UTn4G6JO.js} +1 -1
- package/dist/assets/{Link-BHV5DCu-.js → Link-BAFCJR3T.js} +1 -1
- package/dist/assets/{Link.stories-CFRsbzfM.js → Link.stories-6gHkl5xC.js} +1 -1
- package/dist/assets/{Loader.stories-bvaq9oGD.js → Loader.stories-CG-Eo8vg.js} +1 -1
- package/dist/assets/{MultiSelectChips-CVg9kaKd.js → MultiSelectChips-CBnEtn4N.js} +2 -2
- package/dist/assets/{MultiSelectChips.stories-DOiIDnhX.js → MultiSelectChips.stories-Ch4FxGM2.js} +1 -1
- package/dist/assets/{NativeSelectField.stories-DojmcjvT.js → NativeSelectField.stories-Pj5dm9hL.js} +21 -21
- package/dist/assets/NumberField-klmIiQAi.js +6 -0
- package/dist/assets/{NumberField.stories-BEVJXeBn.js → NumberField.stories-D740jISy.js} +1 -1
- package/dist/assets/{ObserveIntersection-MtxhRIzU.js → ObserveIntersection-Dx2gD1CU.js} +2 -2
- package/dist/assets/{ObserveIntersection.stories-0f-z6V25.js → ObserveIntersection.stories-JJPEw5oG.js} +1 -1
- package/dist/assets/{OnboardingTooltip-DdKwzkB-.js → OnboardingTooltip-DzQhJzWc.js} +1 -1
- package/dist/assets/OnboardingTooltip-X4QjsIe6.css +1 -0
- package/dist/assets/{OnboardingTooltip.stories-DV2yAiRE.js → OnboardingTooltip.stories-BDgRgbzO.js} +1 -1
- package/dist/assets/{OnboardingTooltip.tests.stories-32a4fLzf.js → OnboardingTooltip.tests.stories-DrqovP8T.js} +1 -1
- package/dist/assets/{OnboardingTour-m4V6QT-X.js → OnboardingTour-B5gEod5H.js} +1 -1
- package/dist/assets/OnboardingTour-DoEbirUE.css +1 -0
- package/dist/assets/{OnboardingTour.stories-dLZBYgbr.js → OnboardingTour.stories-BzHBS52z.js} +2 -2
- package/dist/assets/{OnboardingTour.tests.stories-BnPXyzmi.js → OnboardingTour.tests.stories-CHMykq2a.js} +1 -1
- package/dist/assets/PasswordField-BjqiXySY.js +6 -0
- package/dist/assets/{PasswordField.stories-BxnBBn2_.js → PasswordField.stories-YCTP14pU.js} +1 -1
- package/dist/assets/{PreplyLogo.stories-BuK8vK1R.js → PreplyLogo.stories-lPBmn_E2.js} +1 -1
- package/dist/assets/{ProgressBar.stories-CwpXa86g.js → ProgressBar.stories-DqvDJEeF.js} +1 -1
- package/dist/assets/{ProgressSteps-DCVAFT7X.js → ProgressSteps-Dce_SjLt.js} +1 -1
- package/dist/assets/{ProgressSteps.stories--reXlzAk.js → ProgressSteps.stories-BMDqz7-Z.js} +1 -1
- package/dist/assets/{PromoDialog-BPWEGGGS.js → PromoDialog-DdnXVfH8.js} +2 -2
- package/dist/assets/{RangeSlider-BKIG-XfV.js → RangeSlider-MZqvjtBp.js} +1 -1
- package/dist/assets/{RangeSlider.stories-Dr7UfAUm.js → RangeSlider.stories-BS4-l1u4.js} +1 -1
- package/dist/assets/{Rating.stories-Cmpcr64W.js → Rating.stories-wHsrBw3w.js} +1 -1
- package/dist/assets/{RatingInput.stories-DWxrhIwu.js → RatingInput.stories-BKAXF4Qv.js} +2 -2
- package/dist/assets/{SelectField-BRicVVj7.js → SelectField-DU60q2LU.js} +13 -13
- package/dist/assets/{SelectField.stories-D6sJHBcs.js → SelectField.stories-BKCyFPQa.js} +2 -2
- package/dist/assets/{ShowOnIntersection.stories-DT94aTYJ.js → ShowOnIntersection.stories-BdO_3n9P.js} +1 -1
- package/dist/assets/{SingleSelectChips-B1d9MkC-.js → SingleSelectChips-CDtny-H7.js} +2 -2
- package/dist/assets/{SingleSelectChips.stories-QdsPQJO8.js → SingleSelectChips.stories-CTAvW0Y9.js} +1 -1
- package/dist/assets/{Slider-CVM0huNa.js → Slider-B8ndK7PX.js} +1 -1
- package/dist/assets/{Slider.stories-UCLuhto1.js → Slider.stories-CBV0fePJ.js} +1 -1
- package/dist/assets/{Spinner-BG27lVzS.js → Spinner-8-RB4YZR.js} +1 -1
- package/dist/assets/{Stars-St7ZRTZK.js → Stars-BSTkfC0i.js} +1 -1
- package/dist/assets/{Steps-CBqiqb-6.js → Steps-DUeCVcxV.js} +1 -1
- package/dist/assets/{Steps.stories-DOWMlpTM.js → Steps.stories-DqOo6fKy.js} +1 -1
- package/dist/assets/{Switch-DJROHOKs.js → Switch-Dyoj_Z1P.js} +1 -1
- package/dist/assets/{Switch.stories-C9cCCv8l.js → Switch.stories-CDVDjU2B.js} +1 -1
- package/dist/assets/{Text-FXv4P3JX.js → Text-DJTKRzSb.js} +1 -1
- package/dist/assets/{Text-C8DrHLQF.js → Text-DvShrljd.js} +1 -1
- package/dist/assets/{Text.stories-Cmn2Kn0h.js → Text.stories-DRuLuJwb.js} +1 -1
- package/dist/assets/TextField-BSJgR_zK.js +6 -0
- package/dist/assets/{TextField.stories-Bly_tLuN.js → TextField.stories-rtu-asgN.js} +1 -1
- package/dist/assets/{TextHighlighted.stories-CdIzDMMS.js → TextHighlighted.stories-Bc0bMLCv.js} +1 -1
- package/dist/assets/{TextInline.stories-NWWAzVY1.js → TextInline.stories-DKWvwjg6.js} +1 -1
- package/dist/assets/{TextareaField-DDEIieQg.js → TextareaField-DUqOyVK5.js} +21 -21
- package/dist/assets/{TextareaField.stories-CyuOlu4z.js → TextareaField.stories-CiRYJL_j.js} +1 -1
- package/dist/assets/{Toast.stories-BFWVkg8-.js → Toast.stories-S5qFLRPf.js} +1 -1
- package/dist/assets/{TokyoUIAttach-Bj2xsZ5E.js → TokyoUIAttach-BsMlsNHQ.js} +1 -1
- package/dist/assets/{TokyoUIAvailability7LateNight-CyPCBR0g.js → TokyoUIAvailability7LateNight-BUCnoHXS.js} +1 -1
- package/dist/assets/{TokyoUICheck-Cg3ZJnmD.js → TokyoUICheck-DQLX_x10.js} +1 -1
- package/dist/assets/{TokyoUICheckmark-CPDgq6wU.js → TokyoUICheckmark-BHJrELn_.js} +1 -1
- package/dist/assets/{TokyoUIChevronDown-CqAWFBEe.js → TokyoUIChevronDown-DiBNbDdz.js} +1 -1
- package/dist/assets/{TokyoUIChevronRight-UHMBQAxX.js → TokyoUIChevronRight-DRhJYmWB.js} +1 -1
- package/dist/assets/{TokyoUIClose-DoJfpCh8.js → TokyoUIClose-BfMyMrDa.js} +1 -1
- package/dist/assets/{TokyoUIEmojiFrowning-Bztw_WuD.js → TokyoUIEmojiFrowning-DkxcBN-M.js} +1 -1
- package/dist/assets/{TokyoUIErrorWarning-CE6C7y8g.js → TokyoUIErrorWarning-GuwQvo24.js} +1 -1
- package/dist/assets/{TokyoUIExerciseClosedGapsJumble-OGZLJcQZ.js → TokyoUIExerciseClosedGapsJumble-C8roFqfh.js} +1 -1
- package/dist/assets/{TokyoUIEye-BRl8T4Ci.js → TokyoUIEye-oyrTN--k.js} +1 -1
- package/dist/assets/{TokyoUIFav-w08HsdRu.js → TokyoUIFav-C-stY9U_.js} +1 -1
- package/dist/assets/{TokyoUIInfo-BoGHBgEW.js → TokyoUIInfo-BSNbI4Gr.js} +1 -1
- package/dist/assets/{TokyoUILanguage-Bd98PINi.js → TokyoUILanguage-BcrymOo9.js} +1 -1
- package/dist/assets/{TokyoUILibraryExplore-C-3tnEbW.js → TokyoUILibraryExplore-DvvKpWd6.js} +1 -1
- package/dist/assets/{TokyoUILock-d81cInRU.js → TokyoUILock-B22xkFQW.js} +1 -1
- package/dist/assets/{TokyoUIMessages-0is9ybHR.js → TokyoUIMessages-hZLnK87p.js} +1 -1
- package/dist/assets/{TokyoUIMinus-DPJ4shry.js → TokyoUIMinus-C6TctZRw.js} +1 -1
- package/dist/assets/{TokyoUINotebook-DLrYm4si.js → TokyoUINotebook-mwleX-o1.js} +1 -1
- package/dist/assets/TokyoUINotesWithPad-CG0gLTYm.js +1 -0
- package/dist/assets/{TokyoUIPhone-bFlwEn-_.js → TokyoUIPhone-CFykqUer.js} +1 -1
- package/dist/assets/{TokyoUISettings-DhHyIlWv.js → TokyoUISettings-BbgnUEy1.js} +1 -1
- package/dist/assets/{TokyoUISparkle-B1jtDvOV.js → TokyoUISparkle-DPOw7W2T.js} +1 -1
- package/dist/assets/{TokyoUIStarFilled-Cj894376.js → TokyoUIStarFilled-CF0iG37X.js} +1 -1
- package/dist/assets/{TokyoUITag-fMAL09F9.js → TokyoUITag-B1Xueyd7.js} +1 -1
- package/dist/assets/{TokyoUIUpload-DM2TbvbX.js → TokyoUIUpload-CrasJ02A.js} +1 -1
- package/dist/assets/{TokyoUIUser-Ba7_NA45.js → TokyoUIUser-XhPCF9-5.js} +1 -1
- package/dist/assets/{Tooltip-DDtzGgNm.js → Tooltip-BiqKWYpo.js} +1 -1
- package/dist/assets/{Tooltip.stories-j1bsH2PP.js → Tooltip.stories-DCB24NyS.js} +1 -1
- package/dist/assets/{Tooltip.tests.stories-DFas0O9K.js → Tooltip.tests.stories-B3iLlPPq.js} +1 -1
- package/dist/assets/{VisuallyHidden-GZBFKPVs.js → VisuallyHidden-fvo3PSUE.js} +1 -1
- package/dist/assets/{WithTooltip-IO6J4KBT-2Wz16aqd.js → WithTooltip-IO6J4KBT-BUV9ELqr.js} +1 -1
- package/dist/assets/{align-self-D0ug8REo.js → align-self-BYi8giLn.js} +1 -1
- package/dist/assets/{axe-BcoLkzU-.js → axe-BG-rWtCi.js} +1 -1
- package/dist/assets/{breakpoints-CIy8w3Dv.js → breakpoints-CBpJ5xgl.js} +1 -1
- package/dist/assets/{breakpoints-BDFtAvFy.js → breakpoints-Cu9uEe0J.js} +1 -1
- package/dist/assets/{breakpoints-BBwYud6y.js → breakpoints-CuJuvIR9.js} +1 -1
- package/dist/assets/{changelog-DIkUnuOo.js → changelog-BoskfpJ8.js} +24 -1
- package/dist/assets/{client-oIdhQPH3.js → client-BN2KdiJY.js} +1 -1
- package/dist/assets/{constants-Cwb-3GQ_.js → constants-DDJ2G0OO.js} +47 -47
- package/dist/assets/createRequiredContext-B3Arn9-D.js +241 -0
- package/dist/assets/fonts-explorer.stories-CeMUwBuQ.js +130 -0
- package/dist/assets/{formatter-QJ4M4OGQ-D2xZe9AO.js → formatter-QJ4M4OGQ-B2Vljo6_.js} +1 -1
- package/dist/assets/getTokenVar-CVkrm5Qs.js +1 -0
- package/dist/assets/{getTokenVar-B7BEyIpS.js → getTokenVar-DmUJH1GU.js} +1 -1
- package/dist/assets/{gradientBorders-B12ps1Or.js → gradientBorders-Q_ip9Ojv.js} +1 -1
- package/dist/assets/{hover-5BxL9d9v.js → hover-C8NhPbjk.js} +1 -1
- package/dist/assets/{hover-CG8OgvC5.js → hover-C9fsErpn.js} +1 -1
- package/dist/assets/{hover-gsGL4vVH.js → hover-D55mJaWK.js} +1 -1
- package/dist/assets/{iframe-DjYTJz7A.js → iframe-B_74HtSc.js} +12 -12
- package/dist/assets/{index-DHDwwoCu.js → index-BJaBvJhB.js} +1 -1
- package/dist/assets/{index-BII7aPfQ.js → index-BW8FBNWq.js} +1 -1
- package/dist/assets/{index-C_O4jEc0.js → index-Cnv20V_M.js} +1 -1
- package/dist/assets/{index-CUvrBGJo.js → index-DIqvfT2b.js} +1 -1
- package/dist/assets/{index-cpi3YaXo.js → index-DWFFXgf1.js} +1 -1
- package/dist/assets/{index-DOwxXd3L.js → index-W3BB_3go.js} +1 -1
- package/dist/assets/{intro-BXKxOrdm.js → intro-DOuARa_Y.js} +1 -1
- package/dist/assets/{layout-relative-DQF7VcUK.js → layout-relative-B9CiYPwj.js} +1 -1
- package/dist/assets/{layout-relative.module-1z75aSwo-CsvB7_pT.js → layout-relative.module-1z75aSwo-Dcy7i8oK.js} +1 -1
- package/dist/assets/{layout-relative.module-BM7yIsEb.js → layout-relative.module-BIZVul8q.js} +1 -1
- package/dist/assets/{mcp-X-VhpP6n.js → mcp-D2eIYE7x.js} +1 -1
- package/dist/assets/{message-DiUVdAQd.js → message-DJT5rp5J.js} +1 -1
- package/dist/assets/{migrating-from-less-8Nm2XYdW.js → migrating-from-less-CxT_5hNC.js} +1 -1
- package/dist/assets/{playground.stories-B4hfD_Uq.js → playground.stories-DqwdOX0P.js} +1 -1
- package/dist/assets/{react-18-B4n119qZ.js → react-18-DoE4ZK8O.js} +1 -1
- package/dist/assets/{render-icon-DlE4AZJV.js → render-icon-DSbVIpCz.js} +1 -1
- package/dist/assets/{render-icon-DZ6hllTG.js → render-icon-MT6RlyNs.js} +1 -1
- package/dist/assets/{shared-strings-ZccoNgto.js → shared-strings-ThL9KyH0.js} +1 -1
- package/dist/assets/store-B0wM9Zg8.js +9 -0
- package/dist/assets/{styled-components.browser.esm-3T8u8x7l.js → styled-components.browser.esm-BHxIJD2_.js} +1 -1
- package/dist/assets/{styled-components.browser.esm-DegKtid9.js → styled-components.browser.esm-rrOBirU4.js} +1 -1
- package/dist/assets/{syntaxhighlighter-IQDEPFLK-B-ddKj4v.js → syntaxhighlighter-IQDEPFLK-BakL6JIW.js} +1 -1
- package/dist/assets/{text-accent-C5-m5mrW.js → text-accent-BQ9POoE5.js} +1 -1
- package/dist/assets/{text-centered-D70wah8Y.js → text-centered-BEaaxMgl.js} +1 -1
- package/dist/assets/{text-centered-CqZrbSb_.js → text-centered-CYnBFi3a.js} +1 -1
- package/dist/assets/{tokens-ChCvx9cz.js → tokens-BEyO2LY-.js} +1 -1
- package/dist/assets/{tokens-BXEYWkXR.js → tokens-Cg01svK-.js} +1 -1
- package/dist/assets/{tokens-CBFYFIpi.js → tokens-CmSwgWJ8.js} +1 -1
- package/dist/assets/{tokens-Cp4gIGSO.js → tokens-im-qJUCZ.js} +1 -1
- package/dist/assets/{useControllableState-DQg81cp5.js → useControllableState-BB4EHwEp.js} +1 -1
- package/dist/assets/useHostname-CbpnzdHv.js +1 -0
- package/dist/assets/{useMergeRefs-jFGYKOXz.js → useMergeRefs-CFhXCqbA.js} +1 -1
- package/dist/assets/{useMergeRefs-CL5DIjXV.js → useMergeRefs-Caz9hOck.js} +1 -1
- package/dist/assets/{useOpenInteractionType-B976GY1b.js → useOpenInteractionType-D3sASQWj.js} +3 -3
- package/dist/assets/{usePortalElement-B3bWjUcx.js → usePortalElement-Cbyb850w.js} +1 -1
- package/dist/assets/{useStableCallback-662ysKf2.js → useStableCallback-D5P5kDx5.js} +1 -1
- package/dist/assets/{useToken-CJ7hsZh9.js → useToken-OSVftwxQ.js} +1 -1
- package/dist/assets/{welcome-bR5y4uLm.js → welcome-QqBTVkpV.js} +1 -1
- package/dist/assets/{zeroheight-D-Xst36e.js → zeroheight-BXMq4jvo.js} +1 -1
- package/dist/iframe.html +1 -1
- package/dist/index.json +1 -1
- package/dist/preview-stats.json +10562 -10490
- package/dist/project.json +1 -1
- package/package.json +5 -5
- package/pages/30.guides/70.assets/constants/icon-imports.ts +2 -0
- package/dist/assets/11.fonts.explorer-Bh_GOQIH.js +0 -2
- package/dist/assets/30.icons.explorer-BBtz-vBk.js +0 -72
- package/dist/assets/AlertDialog.stories-BKmaZZoo.js +0 -243
- package/dist/assets/CountryFlag-BKEpYyWK.js +0 -49
- package/dist/assets/Dialog.test.stories-tViVBTuF.js +0 -127
- package/dist/assets/IconButton-D4lbFOKH.js +0 -8
- package/dist/assets/IconTile-CanD5Ibh.css +0 -1
- package/dist/assets/IconTile.stories-BlATLdyV.js +0 -88
- package/dist/assets/NumberField-FWK2ErPL.js +0 -6
- package/dist/assets/OnboardingTooltip-CsmroJZe.css +0 -1
- package/dist/assets/OnboardingTour-D0hvRI8H.css +0 -1
- package/dist/assets/PasswordField-Bp2beBoD.js +0 -6
- package/dist/assets/TextField--Ctd_eHi.js +0 -6
- package/dist/assets/TokyoUINotesWithPad-D6VO7CbF.js +0 -1
- package/dist/assets/createRequiredContext-5BPDYgIa.js +0 -241
- package/dist/assets/fonts-explorer.stories-Bp_9af2z.js +0 -130
- package/dist/assets/getTokenVar-B8jDl0Ui.js +0 -1
- package/dist/assets/useHostname-By9vNKnQ.js +0 -1
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import{r as a,j as m,aJ as hs,q as Ht,R as vs,g as ft,z as xc,D as yc,I as bs,K as xs}from"./iframe-B_74HtSc.js";import{d as wc,u as Rc}from"./index-DIqvfT2b.js";import{w as Ge}from"./componentNames-hc9KR2nX.js";import{M as No}from"./message-DJT5rp5J.js";import{d as Be,f as Cc}from"./styled-components.browser.esm-rrOBirU4.js";import{f as ot}from"./filterAttributesPassedByRadixUIAtRuntime-Bye2JkZ0.js";import{I as ct,F as Ec,a as Sc,b as Mc,c as Ic,d as kc,e as Oc,f as Pc}from"./TokyoUIExerciseClosedGapsJumble-C8roFqfh.js";import{B as Tc,H as vo}from"./ButtonBase-DGinnt2u.js";import{T as Xe}from"./Text-DJTKRzSb.js";import{g as pe}from"./getTokenVar-CVkrm5Qs.js";import{c as Mt,r as ys,s as Oe,m as jc}from"./tokens-im-qJUCZ.js";import{F as _c}from"./TokyoUIChevronRight-DRhJYmWB.js";import{F as Ac}from"./TokyoUICheck-DQLX_x10.js";import{B as Dc}from"./breakpoints-BfMlrtxE.js";import{r as Nc}from"./render-icon-DSbVIpCz.js";const ws=a.createContext(void 0);function Pt(e){const t=a.useContext(ws);if(e===!1&&t===void 0)throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");return t}const Rr={};function at(e,t){const n=a.useRef(Rr);return n.current===Rr&&(n.current=e(t)),n}function Rs(){}const Cr=Object.freeze([]),je=Object.freeze({});function tt(e,t,n,o){const r=at(Cs).current;return Fc(r,e,t,n,o)&&Es(r,[e,t,n,o]),r.callback}function Lc(e){const t=at(Cs).current;return Bc(t,e)&&Es(t,e),t.callback}function Cs(){return{callback:null,cleanup:null,refs:[]}}function Fc(e,t,n,o,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==o||e.refs[3]!==r}function Bc(e,t){return e.refs.length!==t.length||e.refs.some((n,o)=>n!==t[o])}function Es(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const o=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const i=s(n);typeof i=="function"&&(o[r]=i);break}case"object":{s.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const s=t[r];if(s!=null)switch(typeof s){case"function":{const i=o[r];typeof i=="function"?i():s(null);break}case"object":{s.current=null;break}}}}}}}const $c=parseInt(a.version,10);function Ss(e){return $c>=e}function Ms(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Vc(e,t){const n={};for(const o in e){const r=e[o];if(t!=null&&t.hasOwnProperty(o)){const s=t[o](r);s!=null&&Object.assign(n,s);continue}r===!0?n[`data-${o.toLowerCase()}`]="":r&&(n[`data-${o.toLowerCase()}`]=r.toString())}return n}function Uc(e,t){return typeof e=="function"?e(t):e}const rn={};function Gt(e,t,n,o,r){let s={...Lo(e,rn)};return t&&(s=Un(s,t)),n&&(s=Un(s,n)),o&&(s=Un(s,o)),s}function Wc(e){if(e.length===0)return rn;if(e.length===1)return Lo(e[0],rn);let t={...Lo(e[0],rn)};for(let n=1;n<e.length;n+=1)t=Un(t,e[n]);return t}function Un(e,t){return Is(t)?t(e):zc(e,t)}function zc(e,t){if(!t)return e;for(const n in t){const o=t[n];switch(n){case"style":{e[n]=Ms(e.style,o);break}case"className":{e[n]=ks(e.className,o);break}default:Hc(n,o)?e[n]=Gc(e[n],o):e[n]=o}}return e}function Hc(e,t){const n=e.charCodeAt(0),o=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&o===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function Is(e){return typeof e=="function"}function Lo(e,t){return Is(e)?e(t):e??rn}function Gc(e,t){return t?e?n=>{if(Kc(n)){const r=n;Fo(r);const s=t(r);return r.baseUIHandlerPrevented||e==null||e(r),s}const o=t(n);return e==null||e(n),o}:t:e}function Fo(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ks(e,t){return t?e?t+" "+e:t:e}function Kc(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function ve(e,t,n={}){var o;const r=t.render,s=qc(t,n);if(n.enabled===!1)return null;const i=(o=n.state)!=null?o:je;return Yc(e,r,s,i)}function qc(e,t={}){var n;const{className:o,render:r}=e,{state:s=je,ref:i,props:c,stateAttributesMapping:l,enabled:u=!0}=t,d=u?Uc(o,s):void 0,f=u?Vc(s,l):je,g=u&&(n=Ms(f,Array.isArray(c)?Wc(c):c))!=null?n:je;return typeof document<"u"&&(u?Array.isArray(i)?g.ref=Lc([g.ref,Er(r),...i]):g.ref=tt(g.ref,Er(r),i):tt(null,null)),u?(d!==void 0&&(g.className=ks(g.className,d)),g):je}function Yc(e,t,n,o){if(t){if(typeof t=="function")return t(n,o);const r=Gt(n,t.props);return r.ref=n.ref,a.cloneElement(t,r)}if(e&&typeof e=="string")return Xc(e,n);throw new Error("Base UI: Render element or function are not defined.")}function Xc(e,t){return e==="button"?m.jsx("button",{type:"button",...t}):e==="img"?m.jsx("img",{alt:"",...t}):a.createElement(e,t)}function Er(e){return e&&typeof e!="function"?Ss(19)?e.props.ref:e.ref:null}ve.__docgenInfo={description:"",methods:[],displayName:"useRenderElement"};const bo=hs[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Zc=bo&&bo!==a.useLayoutEffect?bo:e=>e();function J(e){const t=at(Qc).current;return t.next=e,Zc(t.effect),t.trampoline}function Qc(){const e={next:void 0,callback:Jc,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Jc(){}const ea=()=>{},oe=typeof document<"u"?a.useLayoutEffect:ea;function ue(e,t,n){let o=!1,r=!1;const s=je;return{reason:e,event:t??new Event("base-ui"),cancel(){o=!0},allowPropagation(){r=!0},get isCanceled(){return o},get isPropagationAllowed(){return r},...s}}function ro(){return typeof window<"u"}function bt(e){return Xo(e)?(e.nodeName||"").toLowerCase():"#document"}function Ce(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(Xo(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Xo(e){return ro()?e instanceof Node||e instanceof Ce(e).Node:!1}function fe(e){return ro()?e instanceof Element||e instanceof Ce(e).Element:!1}function he(e){return ro()?e instanceof HTMLElement||e instanceof Ce(e).HTMLElement:!1}function Bo(e){return!ro()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ce(e).ShadowRoot}const ta=new Set(["inline","contents"]);function dn(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=Ke(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!ta.has(r)}const na=new Set(["table","td","th"]);function oa(e){return na.has(bt(e))}const ra=[":popover-open",":modal"];function so(e){return ra.some(t=>{try{return e.matches(t)}catch{return!1}})}const sa=["transform","translate","scale","rotate","perspective"],ia=["transform","translate","scale","rotate","perspective","filter"],ca=["paint","layout","strict","content"];function Zo(e){const t=io(),n=fe(e)?Ke(e):e;return sa.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ia.some(o=>(n.willChange||"").includes(o))||ca.some(o=>(n.contain||"").includes(o))}function aa(e){let t=nt(e);for(;he(t)&&!Je(t);){if(Zo(t))return t;if(so(t))return null;t=nt(t)}return null}function io(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const la=new Set(["html","body","#document"]);function Je(e){return la.has(bt(e))}function Ke(e){return Ce(e).getComputedStyle(e)}function co(e){return fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function nt(e){if(bt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bo(e)&&e.host||rt(e);return Bo(t)?t.host:t}function Os(e){const t=nt(e);return Je(t)?e.ownerDocument?e.ownerDocument.body:e.body:he(t)&&dn(t)?t:Os(t)}function gt(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Os(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=Ce(r);if(s){const c=$o(i);return t.concat(i,i.visualViewport||[],dn(r)?r:[],c&&n?gt(c):[])}return t.concat(r,gt(r,[],n))}function $o(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const ua=a.createContext(void 0);function Ps(e=!1){const t=a.useContext(ua);if(t===void 0&&!e)throw new Error("Base UI: CompositeRootContext is missing. Composite parts must be placed within <Composite.Root>.");return t}function fa(e){const{focusableWhenDisabled:t,disabled:n,composite:o=!1,tabIndex:r=0,isNativeButton:s}=e,i=o&&t!==!1,c=o&&t===!1;return{props:a.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return o||(u.tabIndex=r,!s&&n&&(u.tabIndex=t?r:-1)),(s&&(t||i)||!s&&n)&&(u["aria-disabled"]=n),s&&(!t||c)&&(u.disabled=n),u},[o,n,t,i,c,s,r])}}function Qo(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:o=0,native:r=!0}=e,s=a.useRef(null),i=Ps(!0)!==void 0,c=J(()=>{const g=s.current;return!!((g==null?void 0:g.tagName)==="A"&&(g!=null&&g.href))}),{props:l}=fa({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:o,isNativeButton:r}),u=a.useCallback(()=>{const g=s.current;da(g)&&i&&t&&l.disabled===void 0&&g.disabled&&(g.disabled=!1)},[t,l.disabled,i]);oe(u,[u]);const d=a.useCallback((g={})=>{const{onClick:p,onMouseDown:x,onKeyUp:b,onKeyDown:h,onPointerDown:v,...y}=g;return Gt({type:r?"button":void 0,onClick(w){if(t){w.preventDefault();return}p==null||p(w)},onMouseDown(w){t||x==null||x(w)},onKeyDown(w){if(t||(Fo(w),h==null||h(w)),w.baseUIHandlerPrevented)return;const E=w.target===w.currentTarget&&!r&&!c()&&!t,S=w.key==="Enter",k=w.key===" ";E&&((k||S)&&w.preventDefault(),S&&(p==null||p(w)))},onKeyUp(w){t||(Fo(w),b==null||b(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!r&&!t&&w.key===" "&&(p==null||p(w))},onPointerDown(w){if(t){w.preventDefault();return}v==null||v(w)}},r?void 0:{role:"button"},l,y)},[t,l,r,c]),f=J(g=>{s.current=g,u()});return{getButtonProps:d,buttonRef:f}}function da(e){return he(e)&&e.tagName==="BUTTON"}const pa={...hs};let Sr=0;function ma(e,t="mui"){const[n,o]=a.useState(e),r=e||n;return a.useEffect(()=>{n==null&&(Sr+=1,o(`${t}-${Sr}`))},[n,t]),r}const Mr=pa.useId;function Kt(e,t){if(Mr!==void 0){const n=Mr();return e??(t?`${t}-${n}`:n)}return ma(e,t)}var ga=Object.defineProperty,ha=(e,t,n)=>t in e?ga(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Re=(e,t,n)=>ha(e,typeof t!="symbol"?t+"":t,n);const va=500,ba=500,xa={style:{transition:"none"}},ya="data-base-ui-click-trigger",wa={fallbackAxisSide:"none"},Ra=[];function Ts(e){a.useEffect(e,Ra)}const jn=null;class Ca{constructor(){Re(this,"callbacks",[]),Re(this,"callbacksCount",0),Re(this,"nextId",1),Re(this,"startId",1),Re(this,"isScheduled",!1),Re(this,"tick",t=>{var n;this.isScheduled=!1;const o=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let s=0;s<o.length;s+=1)(n=o[s])==null||n.call(o,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const _n=new Ca;class Ze{constructor(){Re(this,"currentId",jn),Re(this,"cancel",()=>{this.currentId!==jn&&(_n.cancel(this.currentId),this.currentId=jn)}),Re(this,"disposeEffect",()=>this.cancel)}static create(){return new Ze}static request(t){return _n.request(t)}static cancel(t){return _n.cancel(t)}request(t){this.cancel(),this.currentId=_n.request(()=>{this.currentId=jn,t()})}}function Jo(){const e=at(Ze.create).current;return Ts(e.disposeEffect),e}function Ea(e,t=!1){const n=Jo();return J((o,r=null)=>{if(n.cancel(),e==null)return;let s;if("current"in e){if(e.current==null)return;s=e.current}else s=e;typeof s.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?o():n.request(()=>{function i(){s&&Promise.allSettled(s.getAnimations().map(c=>c.finished)).then(()=>{r!=null&&r.aborted||Ht.flushSync(o)})}t?n.request(i):i()})})}function ao(e,t=!1,n=!1){const[o,r]=a.useState(e&&t?"idle":void 0),[s,i]=a.useState(e);return e&&!s&&(i(!0),r("starting")),!e&&s&&o!=="ending"&&!n&&r("ending"),!e&&!s&&o==="ending"&&r(void 0),oe(()=>{if(!e&&s&&o!=="ending"&&n){const c=Ze.request(()=>{r("ending")});return()=>{Ze.cancel(c)}}},[e,s,o,n]),oe(()=>{if(!e||t)return;const c=Ze.request(()=>{Ht.flushSync(()=>{r(void 0)})});return()=>{Ze.cancel(c)}},[t,e]),oe(()=>{if(!e||!t)return;e&&s&&o!=="idle"&&r("starting");const c=Ze.request(()=>{r("idle")});return()=>{Ze.cancel(c)}},[t,e,s,r,o]),a.useMemo(()=>({mounted:s,setMounted:i,transitionStatus:o}),[s,o])}let Hn=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Sa={[Hn.startingStyle]:""},Ma={[Hn.endingStyle]:""},pn={transitionStatus(e){return e==="starting"?Sa:e==="ending"?Ma:null}},qt=typeof navigator<"u",xo=Oa(),js=Ta(),_s=Pa(),As=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),Ia=xo.platform==="MacIntel"&&xo.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(xo.platform),Ds=qt&&/apple/i.test(navigator.vendor),Vo=qt&&/android/i.test(js)||/android/i.test(_s),ka=qt&&js.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Ns=_s.includes("jsdom/");function Oa(){var e,t;if(!qt)return{platform:"",maxTouchPoints:-1};const n=navigator.userAgentData;return n!=null&&n.platform?{platform:n.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:(e=navigator.platform)!=null?e:"",maxTouchPoints:(t=navigator.maxTouchPoints)!=null?t:-1}}function Pa(){if(!qt)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Ta(){var e;if(!qt)return"";const t=navigator.userAgentData;return t!=null&&t.platform?t.platform:(e=navigator.platform)!=null?e:""}const Uo="data-base-ui-focusable",Ls="active",Fs="selected",ja="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ht="ArrowLeft",vt="ArrowRight",er="ArrowUp",mn="ArrowDown";function Qe(e){var t;let n=e.activeElement;for(;((t=n==null?void 0:n.shadowRoot)==null?void 0:t.activeElement)!=null;)n=n.shadowRoot.activeElement;return n}function ge(e,t){var n;if(!e||!t)return!1;const o=(n=t.getRootNode)==null?void 0:n.call(t);if(e.contains(t))return!0;if(o&&Bo(o)){let r=t;for(;r;){if(e===r)return!0;r=r.parentNode||r.host}}return!1}function ze(e){return"composedPath"in e?e.composedPath()[0]:e.target}function it(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function _a(e){return e.matches("html,body")}function xe(e){return(e==null?void 0:e.ownerDocument)||document}function tr(e){return he(e)&&e.matches(ja)}function Wo(e){return e?e.getAttribute("role")==="combobox"&&tr(e):!1}function Aa(e){if(!e||Ns)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function Gn(e){return e?e.hasAttribute(Uo)?e:e.querySelector(`[${Uo}]`)||e:null}function It(e,t,n=!0){return e.filter(r=>{var s;return r.parentId===t&&(!n||((s=r.context)==null?void 0:s.open))}).flatMap(r=>[r,...It(e,r.id,n)])}function Ir(e,t){var n;let o=[],r=(n=e.find(s=>s.id===t))==null?void 0:n.parentId;for(;r;){const s=e.find(i=>i.id===r);r=s==null?void 0:s.parentId,s&&(o=o.concat(s))}return o}function Me(e){e.preventDefault(),e.stopPropagation()}function Da(e){return"nativeEvent"in e}function Bs(e){return e.mozInputSource===0&&e.isTrusted?!0:Vo&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function $s(e){return Ns?!1:!Vo&&e.width===0&&e.height===0||Vo&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function un(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}/*!
|
|
2
|
+
* tabbable 6.2.0
|
|
3
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
+
*/var Na=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],Kn=Na.join(","),Vs=typeof Element>"u",Vt=Vs?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,qn=!Vs&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Yn=function e(t,n){var o;n===void 0&&(n=!0);var r=t==null||(o=t.getAttribute)===null||o===void 0?void 0:o.call(t,"inert"),s=r===""||r==="true",i=s||n&&t&&e(t.parentNode);return i},La=function(t){var n,o=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return o===""||o==="true"},Us=function(t,n,o){if(Yn(t))return[];var r=Array.prototype.slice.apply(t.querySelectorAll(Kn));return n&&Vt.call(t,Kn)&&r.unshift(t),r=r.filter(o),r},Ws=function e(t,n,o){for(var r=[],s=Array.from(t);s.length;){var i=s.shift();if(!Yn(i,!1))if(i.tagName==="SLOT"){var c=i.assignedElements(),l=c.length?c:i.children,u=e(l,!0,o);o.flatten?r.push.apply(r,u):r.push({scopeParent:i,candidates:u})}else{var d=Vt.call(i,Kn);d&&o.filter(i)&&(n||!t.includes(i))&&r.push(i);var f=i.shadowRoot||typeof o.getShadowRoot=="function"&&o.getShadowRoot(i),g=!Yn(f,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(i));if(f&&g){var p=e(f===!0?i.children:f.children,!0,o);o.flatten?r.push.apply(r,p):r.push({scopeParent:i,candidates:p})}else s.unshift.apply(s,i.children)}}return r},zs=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},Hs=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||La(t))&&!zs(t)?0:t.tabIndex},Fa=function(t,n){var o=Hs(t);return o<0&&n&&!zs(t)?0:o},Ba=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},Gs=function(t){return t.tagName==="INPUT"},$a=function(t){return Gs(t)&&t.type==="hidden"},Va=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(o){return o.tagName==="SUMMARY"});return n},Ua=function(t,n){for(var o=0;o<t.length;o++)if(t[o].checked&&t[o].form===n)return t[o]},Wa=function(t){if(!t.name)return!0;var n=t.form||qn(t),o=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=o(window.CSS.escape(t.name));else try{r=o(t.name)}catch(i){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",i.message),!1}var s=Ua(r,t.form);return!s||s===t},za=function(t){return Gs(t)&&t.type==="radio"},Ha=function(t){return za(t)&&!Wa(t)},Ga=function(t){var n,o=t&&qn(t),r=(n=o)===null||n===void 0?void 0:n.host,s=!1;if(o&&o!==t){var i,c,l;for(s=!!((i=r)!==null&&i!==void 0&&(c=i.ownerDocument)!==null&&c!==void 0&&c.contains(r)||t!=null&&(l=t.ownerDocument)!==null&&l!==void 0&&l.contains(t));!s&&r;){var u,d,f;o=qn(r),r=(u=o)===null||u===void 0?void 0:u.host,s=!!((d=r)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(r))}}return s},kr=function(t){var n=t.getBoundingClientRect(),o=n.width,r=n.height;return o===0&&r===0},Ka=function(t,n){var o=n.displayCheck,r=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var s=Vt.call(t,"details>summary:first-of-type"),i=s?t.parentElement:t;if(Vt.call(i,"details:not([open]) *"))return!0;if(!o||o==="full"||o==="legacy-full"){if(typeof r=="function"){for(var c=t;t;){var l=t.parentElement,u=qn(t);if(l&&!l.shadowRoot&&r(l)===!0)return kr(t);t.assignedSlot?t=t.assignedSlot:!l&&u!==t.ownerDocument?t=u.host:t=l}t=c}if(Ga(t))return!t.getClientRects().length;if(o!=="legacy-full")return!0}else if(o==="non-zero-area")return kr(t);return!1},qa=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var o=0;o<n.children.length;o++){var r=n.children.item(o);if(r.tagName==="LEGEND")return Vt.call(n,"fieldset[disabled] *")?!0:!r.contains(t)}return!0}n=n.parentElement}return!1},zo=function(t,n){return!(n.disabled||Yn(n)||$a(n)||Ka(n,t)||Va(n)||qa(n))},Ho=function(t,n){return!(Ha(n)||Hs(n)<0||!zo(t,n))},Ya=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},Xa=function e(t){var n=[],o=[];return t.forEach(function(r,s){var i=!!r.scopeParent,c=i?r.scopeParent:r,l=Fa(c,i),u=i?e(r.candidates):c;l===0?i?n.push.apply(n,u):n.push(c):o.push({documentOrder:s,tabIndex:l,item:r,isScope:i,content:u})}),o.sort(Ba).reduce(function(r,s){return s.isScope?r.push.apply(r,s.content):r.push(s.content),r},[]).concat(n)},lo=function(t,n){n=n||{};var o;return n.getShadowRoot?o=Ws([t],n.includeContainer,{filter:Ho.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:Ya}):o=Us(t,n.includeContainer,Ho.bind(null,n)),Xa(o)},Za=function(t,n){n=n||{};var o;return n.getShadowRoot?o=Ws([t],n.includeContainer,{filter:zo.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):o=Us(t,n.includeContainer,zo.bind(null,n)),o},Ks=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Vt.call(t,Kn)===!1?!1:Ho(n,t)};const gn=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function qs(e,t){const n=lo(e,gn()),o=n.length;if(o===0)return;const r=Qe(xe(e)),s=n.indexOf(r),i=s===-1?t===1?0:o-1:s+t;return n[i]}function Ys(e){return qs(xe(e).body,1)||e}function Xs(e){return qs(xe(e).body,-1)||e}function sn(e,t){const n=t||e.currentTarget,o=e.relatedTarget;return!o||!ge(n,o)}function Qa(e){lo(e,gn()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function Or(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const o=n.dataset.tabindex;delete n.dataset.tabindex,o?n.setAttribute("tabindex",o):n.removeAttribute("tabindex")})}const Zs="ArrowUp",Qs="ArrowDown",Js="ArrowLeft",ei="ArrowRight",ti="Home",ni="End",Ja=new Set([Js,ei]),el=new Set([Zs,Qs]),tl=new Set([...Ja,...el]);[...tl];const oi=new Set([Zs,Qs,Js,ei,ti,ni]);function ye(e){const t=at(nl,e).current;return t.next=e,oe(t.effect),t}function nl(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Yt(e){const{enabled:t=!0,open:n,ref:o,onComplete:r}=e,s=ye(n),i=J(r),c=Ea(o,n);a.useEffect(()=>{t&&c(()=>{n===s.current&&i()})},[t,n,i,c,s])}let St=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Hn.startingStyle]="startingStyle",e[e.endingStyle=Hn.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e})({}),Go=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const ol={[Go.popupOpen]:""},rl={[Go.popupOpen]:"",[Go.pressed]:""},sl={[St.open]:""},il={[St.closed]:""},cl={[St.anchorHidden]:""},al={open(e){return e?ol:null}},Pr={open(e){return e?rl:null}},hn={open(e){return e?sl:il},anchorHidden(e){return e?cl:null}};function ri(e){return Ss(19)?e:e?"true":void 0}const tn=0;class kt{constructor(){Re(this,"currentId",tn),Re(this,"clear",()=>{this.currentId!==tn&&(clearTimeout(this.currentId),this.currentId=tn)}),Re(this,"disposeEffect",()=>this.clear)}static create(){return new kt}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=tn,n()},t)}isStarted(){return this.currentId!==tn}}function Le(){const e=at(kt.create).current;return Ts(e.disposeEffect),e}function si(){const e=new Map;return{emit(t,n){var o;(o=e.get(t))==null||o.forEach(r=>r(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var o;(o=e.get(t))==null||o.delete(n)}}}const ii=a.createContext(null),ci=a.createContext(null),xt=()=>{var e;return((e=a.useContext(ii))==null?void 0:e.id)||null},$e=()=>a.useContext(ci);function ll(e){const t=Kt(),n=$e(),r=xt();return oe(()=>{if(!t)return;const s={id:t,parentId:r};return n==null||n.addNode(s),()=>{n==null||n.removeNode(s)}},[n,t,r]),t}function ul(e){const{children:t,id:n}=e,o=xt();return m.jsx(ii.Provider,{value:a.useMemo(()=>({id:n,parentId:o}),[n,o]),children:t})}function fl(e){const{children:t}=e,n=a.useRef([]),o=a.useCallback(i=>{n.current=[...n.current,i]},[]),r=a.useCallback(i=>{n.current=n.current.filter(c=>c!==i)},[]),[s]=a.useState(()=>si());return m.jsx(ci.Provider,{value:a.useMemo(()=>({nodesRef:n,addNode:o,removeNode:r,events:s}),[o,r,s]),children:t})}function Ut(e){return`data-base-ui-${e}`}const nr={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1};function lt(e){return(e==null?void 0:e.ownerDocument)||document}const Xn=a.forwardRef(function(t,n){const[o,r]=a.useState();oe(()=>{Ds&&r("button")},[]);const s={tabIndex:0,role:o};return m.jsx("span",{...t,ref:n,style:nr,"aria-hidden":o?void 0:!0,...s,"data-base-ui-focus-guard":""})});let Tr=0;function Wn(e,t={}){const{preventScroll:n=!1,cancelPrevious:o=!0,sync:r=!1}=t;o&&cancelAnimationFrame(Tr);const s=()=>e==null?void 0:e.focus({preventScroll:n});r?s():Tr=requestAnimationFrame(s)}const Bt={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function jr(e){return e==="inert"?Bt.inert:e==="aria-hidden"?Bt["aria-hidden"]:Bt.none}let An=new WeakSet,Dn={},yo=0;const ai=e=>e&&(e.host||ai(e.parentNode)),dl=(e,t)=>t.map(n=>{if(e.contains(n))return n;const o=ai(n);return e.contains(o)?o:null}).filter(n=>n!=null);function pl(e,t,n,o){const r="data-base-ui-inert",s=o?"inert":n?"aria-hidden":null,i=dl(t,e),c=new Set,l=new Set(i),u=[];Dn[r]||(Dn[r]=new WeakMap);const d=Dn[r];i.forEach(f),g(t),c.clear();function f(p){!p||c.has(p)||(c.add(p),p.parentNode&&f(p.parentNode))}function g(p){!p||l.has(p)||[].forEach.call(p.children,x=>{if(bt(x)!=="script")if(c.has(x))g(x);else{const b=s?x.getAttribute(s):null,h=b!==null&&b!=="false",v=jr(s),y=(v.get(x)||0)+1,R=(d.get(x)||0)+1;v.set(x,y),d.set(x,R),u.push(x),y===1&&h&&An.add(x),R===1&&x.setAttribute(r,""),!h&&s&&x.setAttribute(s,s==="inert"?"":"true")}})}return yo+=1,()=>{u.forEach(p=>{const x=jr(s),h=(x.get(p)||0)-1,v=(d.get(p)||0)-1;x.set(p,h),d.set(p,v),h||(!An.has(p)&&s&&p.removeAttribute(s),An.delete(p)),v||p.removeAttribute(r)}),yo-=1,yo||(Bt.inert=new WeakMap,Bt["aria-hidden"]=new WeakMap,Bt.none=new WeakMap,An=new WeakSet,Dn={})}}function ml(e,t=!1,n=!1){const o=xe(e[0]).body;return pl(e.concat(Array.from(o.querySelectorAll("[aria-live]"))),o,t,n)}const li=a.createContext(null),ui=()=>a.useContext(li),_r=Ut("portal");function gl(e={}){const{id:t,root:n}=e,o=Kt(),r=ui(),[s,i]=a.useState(null),c=a.useRef(null);return oe(()=>()=>{s==null||s.remove(),queueMicrotask(()=>{c.current=null})},[s]),oe(()=>{if(!o||c.current)return;const l=t?document.getElementById(t):null;if(!l)return;const u=document.createElement("div");u.id=o,u.setAttribute(_r,""),l.appendChild(u),c.current=u,i(u)},[t,o]),oe(()=>{if(n===null||!o||c.current)return;let l=n||(r==null?void 0:r.portalNode);l&&!Xo(l)&&(l=l.current),l=l||document.body;let u=null;t&&(u=document.createElement("div"),u.id=t,l.appendChild(u));const d=document.createElement("div");d.id=o,d.setAttribute(_r,""),l=u||l,l.appendChild(d),c.current=d,i(d)},[t,n,o,r]),s}function fi(e){const{children:t,id:n,root:o,preserveTabOrder:r=!0}=e,s=gl({id:n,root:o}),[i,c]=a.useState(null),l=a.useRef(null),u=a.useRef(null),d=a.useRef(null),f=a.useRef(null),g=i==null?void 0:i.modal,p=i==null?void 0:i.open,x=!!i&&!i.modal&&i.open&&r&&!!(o||s);return a.useEffect(()=>{if(!s||!r||g)return;function b(h){s&&sn(h)&&(h.type==="focusin"?Or:Qa)(s)}return s.addEventListener("focusin",b,!0),s.addEventListener("focusout",b,!0),()=>{s.removeEventListener("focusin",b,!0),s.removeEventListener("focusout",b,!0)}},[s,r,g]),a.useEffect(()=>{s&&(p||Or(s))},[p,s]),m.jsxs(li.Provider,{value:a.useMemo(()=>({preserveTabOrder:r,beforeOutsideRef:l,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:f,portalNode:s,setFocusManagerState:c}),[r,s]),children:[x&&s&&m.jsx(Xn,{"data-type":"outside",ref:l,onFocus:b=>{var h;if(sn(b,s))(h=d.current)==null||h.focus();else{const v=i?i.domReference:null,y=Xs(v);y==null||y.focus()}}}),x&&s&&m.jsx("span",{"aria-owns":s.id,style:nr}),s&&Ht.createPortal(t,s),x&&s&&m.jsx(Xn,{"data-type":"outside",ref:u,onFocus:b=>{var h;if(sn(b,s))(h=f.current)==null||h.focus();else{const v=i?i.domReference:null,y=Ys(v);y==null||y.focus(),i!=null&&i.closeOnFocusOut&&(i==null||i.onOpenChange(!1,ue("focus-out",b.nativeEvent)))}}})]})}function hl(e,t){const n=Ce(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const Ar=20;let mt=[];function or(){mt=mt.filter(e=>e.isConnected)}function vl(e){or(),e&&bt(e)!=="body"&&(mt.push(e),mt.length>Ar&&(mt=mt.slice(-Ar)))}function wo(){return or(),mt[mt.length-1]}function bl(e){if(!e)return null;const t=gn();return Ks(e,t)?e:lo(e,t)[0]||e}function Dr(e,t){var n;if(!t.current.includes("floating")&&!((n=e.getAttribute("role"))!=null&&n.includes("dialog")))return;const o=gn(),s=Za(e,o).filter(c=>{const l=c.getAttribute("data-tabindex")||"";return Ks(c,o)||c.hasAttribute("data-tabindex")&&!l.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||s.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function di(e){const{context:t,children:n,disabled:o=!1,order:r=["content"],initialFocus:s=!0,returnFocus:i=!0,restoreFocus:c=!1,modal:l=!0,closeOnFocusOut:u=!0,openInteractionType:d="",getInsideElements:f=()=>[]}=e,{open:g,onOpenChange:p,events:x,dataRef:b,elements:{domReference:h,floating:v}}=t,y=J(()=>{var H;return(H=b.current.floatingContext)==null?void 0:H.nodeId}),R=J(f),w=s===!1,E=Wo(h)&&w,S=ye(r),k=ye(s),D=ye(i),U=ye(d),O=$e(),_=ui(),N=a.useRef(null),I=a.useRef(null),W=a.useRef(!1),$=a.useRef(!1),T=a.useRef(-1),A=a.useRef(""),j=a.useRef(""),M=Le(),q=Le(),ce=Jo(),X=_!=null,L=Gn(v),re=J((H=L)=>H?lo(H,gn()):[]),se=J(H=>{const Y=re(H);return S.current.map(()=>Y).filter(Boolean).flat()});a.useEffect(()=>{if(o||!l)return;function H(z){z.key==="Tab"&&ge(L,Qe(xe(L)))&&re().length===0&&!E&&Me(z)}const Y=xe(L);return Y.addEventListener("keydown",H),()=>{Y.removeEventListener("keydown",H)}},[o,h,L,l,S,E,re,se]),a.useEffect(()=>{if(o||!v)return;function H(Y){const z=ze(Y),ne=re().indexOf(z);ne!==-1&&(T.current=ne)}return v.addEventListener("focusin",H),()=>{v.removeEventListener("focusin",H)}},[o,v,re]),a.useEffect(()=>{if(o||!g)return;const H=xe(L);function Y(te){j.current=te.pointerType||"keyboard"}function z(){j.current="keyboard"}return H.addEventListener("pointerdown",Y,!0),H.addEventListener("keydown",z,!0),()=>{H.removeEventListener("pointerdown",Y,!0),H.removeEventListener("keydown",z,!0)}},[o,v,h,L,g]),a.useEffect(()=>{if(o||!u)return;function H(){$.current=!0,q.start(0,()=>{$.current=!1})}function Y(te){const ne=te.relatedTarget,ee=te.currentTarget,P=ze(te);queueMicrotask(()=>{const G=y(),F=!(ge(h,ne)||ge(v,ne)||ge(ne,v)||ge(_==null?void 0:_.portalNode,ne)||ne!=null&&ne.hasAttribute(Ut("focus-guard"))||O&&(It(O.nodesRef.current,G).find(Q=>{var ae,ie;return ge((ae=Q.context)==null?void 0:ae.elements.floating,ne)||ge((ie=Q.context)==null?void 0:ie.elements.domReference,ne)})||Ir(O.nodesRef.current,G).find(Q=>{var ae,ie,me;return[(ae=Q.context)==null?void 0:ae.elements.floating,Gn((ie=Q.context)==null?void 0:ie.elements.floating)].includes(ne)||((me=Q.context)==null?void 0:me.elements.domReference)===ne})));if(ee===h&&L&&Dr(L,S),c&&ee!==h&&!(P!=null&&P.isConnected)&&Qe(xe(L))===xe(L).body){if(he(L)&&(L.focus(),c==="popup")){ce.request(()=>{L.focus()});return}const Q=T.current,ae=re(),ie=ae[Q]||ae[ae.length-1]||L;he(ie)&&ie.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(E||!l)&&ne&&F&&(E||ne!==wo())&&(W.current=!0,p(!1,ue("focus-out",te)))})}function z(){b.current.insideReactTree=!0,M.start(0,()=>{b.current.insideReactTree=!1})}if(v&&he(h))return h.addEventListener("focusout",Y),h.addEventListener("pointerdown",H),v.addEventListener("focusout",Y),_&&v.addEventListener("focusout",z,!0),()=>{h.removeEventListener("focusout",Y),h.removeEventListener("pointerdown",H),v.removeEventListener("focusout",Y),_&&v.removeEventListener("focusout",z,!0)}},[o,h,v,L,l,O,_,p,u,c,re,E,y,S,b,M,q,ce]);const C=a.useRef(null),B=a.useRef(null),Z=tt(C,_==null?void 0:_.beforeInsideRef),K=tt(B,_==null?void 0:_.afterInsideRef);a.useEffect(()=>{var H,Y,z;if(o||!v||!g)return;const te=Array.from(((H=_==null?void 0:_.portalNode)==null?void 0:H.querySelectorAll(`[${Ut("portal")}]`))||[]),ee=(z=(Y=(O?Ir(O.nodesRef.current,y()):[]).find(F=>{var Q;return Wo(((Q=F.context)==null?void 0:Q.elements.domReference)||null)}))==null?void 0:Y.context)==null?void 0:z.elements.domReference,P=[v,ee,...te,...R(),N.current,I.current,C.current,B.current,_==null?void 0:_.beforeOutsideRef.current,_==null?void 0:_.afterOutsideRef.current,E?h:null].filter(F=>F!=null),G=ml(P,l||E);return()=>{G()}},[g,o,h,v,l,S,_,E,O,y,R]),oe(()=>{if(o||!he(L))return;const H=xe(L),Y=Qe(H);queueMicrotask(()=>{const z=se(L),te=k.current,ne=typeof te=="function"?te(U.current||""):te;if(ne===void 0||ne===!1)return;let ee;ne===!0||ne===null?ee=z[0]||L:"current"in ne?ee=ne.current:ee=ne,ee=ee||z[0]||L,!ge(L,Y)&&g&&Wn(ee,{preventScroll:ee===L})})},[o,g,L,w,se,k,U]),oe(()=>{if(o||!L)return;const H=xe(L),Y=Qe(H);vl(Y);function z(ee){if(ee.open||(A.current=hl(ee.nativeEvent,j.current)),ee.reason==="trigger-hover"&&ee.nativeEvent.type==="mouseleave"&&(W.current=!0),ee.reason==="outside-press")if(ee.nested)W.current=!1;else if(Bs(ee.nativeEvent)||$s(ee.nativeEvent))W.current=!1;else{let P=!1;document.createElement("div").focus({get preventScroll(){return P=!0,!1}}),P?W.current=!1:W.current=!0}}x.on("openchange",z);const te=H.createElement("span");te.setAttribute("tabindex","-1"),te.setAttribute("aria-hidden","true"),Object.assign(te.style,nr),X&&h&&h.insertAdjacentElement("afterend",te);function ne(){const ee=D.current;let P=typeof ee=="function"?ee(A.current):ee;if(P===void 0||P===!1)return null;if(P===null&&(P=!0),typeof P=="boolean"){const F=h||wo();return F&&F.isConnected?F:te}const G=h||wo()||te;return"current"in P?P.current||G:P||G}return()=>{x.off("openchange",z);const ee=Qe(H),P=ge(v,ee)||O&&It(O.nodesRef.current,y(),!1).some(F=>{var Q;return ge((Q=F.context)==null?void 0:Q.elements.floating,ee)}),G=ne();queueMicrotask(()=>{const F=bl(G),Q=typeof D.current!="boolean";D.current&&!W.current&&he(F)&&(!(!Q&&F!==ee&&ee!==H.body)||P)&&F.focus({preventScroll:!0}),te.remove()})}},[o,v,L,D,b,x,O,X,h,y]),a.useEffect(()=>{queueMicrotask(()=>{W.current=!1})},[o]),a.useEffect(()=>{if(o||!g)return;function H(z){const te=ze(z);te!=null&&te.closest(`[${ya}]`)&&($.current=!0)}const Y=xe(L);return Y.addEventListener("pointerdown",H,!0),()=>{Y.removeEventListener("pointerdown",H,!0)}},[o,g,L]),oe(()=>{if(!o&&_)return _.setFocusManagerState({modal:l,closeOnFocusOut:u,open:g,onOpenChange:p,domReference:h}),()=>{_.setFocusManagerState(null)}},[o,_,l,g,p,u,h]),oe(()=>{if(!(o||!L))return Dr(L,S),()=>{queueMicrotask(or)}},[o,L,S]);const V=!o&&(l?!E:!0)&&(X||l);return m.jsxs(a.Fragment,{children:[V&&m.jsx(Xn,{"data-type":"inside",ref:Z,onFocus:H=>{var Y;if(l){const z=se();Wn(z[z.length-1])}else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(W.current=!1,sn(H,_.portalNode)){const z=Ys(h);z==null||z.focus()}else(Y=_.beforeOutsideRef.current)==null||Y.focus()}}),n,V&&m.jsx(Xn,{"data-type":"inside",ref:K,onFocus:H=>{var Y;if(l)Wn(se()[0]);else if(_!=null&&_.preserveTabOrder&&_.portalNode)if(u&&(W.current=!0),sn(H,_.portalNode)){const z=Xs(h);z==null||z.focus()}else(Y=_.afterOutsideRef.current)==null||Y.focus()}})]})}function pi(e,t={}){const{open:n,onOpenChange:o,dataRef:r}=e,{enabled:s=!0,event:i="click",toggle:c=!0,ignoreMouse:l=!1,stickIfOpen:u=!0,touchOpenDelay:d=0}=t,f=a.useRef(void 0),g=Jo(),p=Le(),x=a.useMemo(()=>({onPointerDown(b){f.current=b.pointerType},onMouseDown(b){const h=f.current,v=b.nativeEvent;if(b.button!==0||i==="click"||un(h,!0)&&l)return;const y=r.current.openEvent,R=y==null?void 0:y.type,w=!(n&&c&&(!(y&&u)||R==="click"||R==="mousedown"));if(tr(v.target)){const E=ue("trigger-press",v);w&&h==="touch"&&d>0?p.start(d,()=>{o(!0,E)}):o(w,E);return}g.request(()=>{const E=ue("trigger-press",v);w&&h==="touch"&&d>0?p.start(d,()=>{o(!0,E)}):o(w,E)})},onClick(b){if(i==="mousedown-only")return;const h=f.current;if(i==="mousedown"&&h){f.current=void 0;return}if(un(h,!0)&&l)return;const v=r.current.openEvent,y=v==null?void 0:v.type,R=!(n&&c&&(!(v&&u)||y==="click"||y==="mousedown"||y==="keydown"||y==="keyup")),w=ue("trigger-press",b.nativeEvent);R&&h==="touch"&&d>0?p.start(d,()=>{o(!0,w)}):o(R,w)},onKeyDown(){f.current=void 0}}),[r,i,l,o,n,u,c,g,p,d]);return a.useMemo(()=>s?{reference:x}:je,[s,x])}const xl={intentional:"onClick",sloppy:"onPointerDown"};function Nr(e){var t,n;return{escapeKey:typeof e=="boolean"?e:(t=e==null?void 0:e.escapeKey)!=null?t:!1,outsidePress:typeof e=="boolean"?e:(n=e==null?void 0:e.outsidePress)!=null?n:!0}}function mi(e,t={}){const{open:n,onOpenChange:o,elements:r,dataRef:s}=e,{enabled:i=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:u="sloppy",referencePress:d=!1,referencePressEvent:f="sloppy",ancestorScroll:g=!1,bubbles:p,capture:x}=t,b=$e(),h=J(typeof l=="function"?l:()=>!1),v=typeof l=="function"?h:l,y=a.useRef(!1),{escapeKey:R,outsidePress:w}=Nr(p),{escapeKey:E,outsidePress:S}=Nr(x),k=a.useRef(null),D=Le(),U=Le(),O=a.useRef(!1),_=a.useRef(""),N=J(C=>{_.current=C.pointerType}),I=J(()=>{const C=_.current,B=C==="pen"||!C?"mouse":C,Z=typeof u=="function"?u():u;return typeof Z=="string"?Z:Z[B]}),W=J(C=>{var B;if(!n||!i||!c||C.key!=="Escape"||O.current)return;const Z=(B=s.current.floatingContext)==null?void 0:B.nodeId,K=b?It(b.nodesRef.current,Z):[];if(!R&&K.length>0){let Y=!0;if(K.forEach(z=>{var te;(te=z.context)!=null&&te.open&&!z.context.dataRef.current.__escapeKeyBubbles&&(Y=!1)}),!Y)return}const V=Da(C)?C.nativeEvent:C,H=ue("escape-key",V);o(!1,H),!R&&!H.isPropagationAllowed&&C.stopPropagation()}),$=J(C=>{const B=I();return B==="intentional"&&C.type!=="click"||B==="sloppy"&&C.type==="click"}),T=J(C=>{var B;const Z=()=>{var K;W(C),(K=ze(C))==null||K.removeEventListener("keydown",Z)};(B=ze(C))==null||B.addEventListener("keydown",Z)}),A=J((C,B=!1)=>{var Z;if($(C))return;const K=s.current.insideReactTree;if(s.current.insideReactTree=!1,I()==="intentional"&&B||K||typeof v=="function"&&!v(C))return;const V=ze(C),H=`[${Ut("inert")}]`,Y=xe(r.floating).querySelectorAll(H);let z=fe(V)?V:null;for(;z&&!Je(z);){const P=nt(z);if(Je(P)||!fe(P))break;z=P}if(Y.length&&fe(V)&&!_a(V)&&!ge(V,r.floating)&&Array.from(Y).every(P=>!ge(z,P)))return;if(he(V)){const P=Je(V),G=Ke(V),F=/auto|scroll/,Q=P||F.test(G.overflowX),ae=P||F.test(G.overflowY),ie=Q&&V.clientWidth>0&&V.scrollWidth>V.clientWidth,me=ae&&V.clientHeight>0&&V.scrollHeight>V.clientHeight,Ae=G.direction==="rtl",Ve=me&&(Ae?C.offsetX<=V.offsetWidth-V.clientWidth:C.offsetX>V.clientWidth),we=ie&&C.offsetY>V.clientHeight;if(Ve||we)return}const te=(Z=s.current.floatingContext)==null?void 0:Z.nodeId,ne=b&&It(b.nodesRef.current,te).some(P=>{var G;return it(C,(G=P.context)==null?void 0:G.elements.floating)});if(it(C,r.floating)||it(C,r.domReference)||ne)return;const ee=b?It(b.nodesRef.current,te):[];if(ee.length>0){let P=!0;if(ee.forEach(G=>{var F;(F=G.context)!=null&&F.open&&!G.context.dataRef.current.__outsidePressBubbles&&(P=!1)}),!P)return}o(!1,ue("outside-press",C))}),j=J(C=>{if(!(I()!=="sloppy"||!n||!i||it(C,r.floating)||it(C,r.domReference))){if(C.pointerType==="touch"){k.current={startTime:Date.now(),startX:C.clientX,startY:C.clientY,dismissOnPointerUp:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{k.current&&(k.current.dismissOnPointerUp=!1,k.current.dismissOnMouseDown=!1)});return}A(C)}}),M=J(C=>{var B;const Z=y.current;if(y.current=!1,$(C)||(D.clear(),C.type==="mousedown"&&k.current&&!k.current.dismissOnMouseDown))return;const K=()=>{var V;C.type==="pointerdown"?j(C):A(C,Z),(V=ze(C))==null||V.removeEventListener(C.type,K)};(B=ze(C))==null||B.addEventListener(C.type,K)}),q=J(C=>{if(I()!=="sloppy"||C.pointerType!=="touch"||!k.current||it(C,r.floating)||it(C,r.domReference))return;const B=Math.abs(C.clientX-k.current.startX),Z=Math.abs(C.clientY-k.current.startY),K=Math.sqrt(B*B+Z*Z);K>5&&(k.current.dismissOnPointerUp=!0),K>10&&(A(C),D.clear(),k.current=null)}),ce=J(C=>{I()!=="sloppy"||C.pointerType!=="touch"||!k.current||it(C,r.floating)||it(C,r.domReference)||(k.current.dismissOnPointerUp&&A(C),D.clear(),k.current=null)});a.useEffect(()=>{if(!n||!i)return;s.current.__escapeKeyBubbles=R,s.current.__outsidePressBubbles=w;const C=new kt;function B(Y){o(!1,ue("none",Y))}function Z(){C.clear(),O.current=!0}function K(){C.start(io()?5:0,()=>{O.current=!1})}const V=xe(r.floating);V.addEventListener("pointerdown",N,!0),c&&(V.addEventListener("keydown",E?T:W,E),V.addEventListener("compositionstart",Z),V.addEventListener("compositionend",K)),v&&(V.addEventListener("click",S?M:A,S),V.addEventListener("pointerdown",S?M:A,S),V.addEventListener("pointermove",q,S),V.addEventListener("pointerup",ce,S),V.addEventListener("mousedown",M,S));let H=[];return g&&(fe(r.domReference)&&(H=gt(r.domReference)),fe(r.floating)&&(H=H.concat(gt(r.floating))),!fe(r.reference)&&r.reference&&r.reference.contextElement&&(H=H.concat(gt(r.reference.contextElement)))),H=H.filter(Y=>{var z;return Y!==((z=V.defaultView)==null?void 0:z.visualViewport)}),H.forEach(Y=>{Y.addEventListener("scroll",B,{passive:!0})}),()=>{V.removeEventListener("pointerdown",N,!0),c&&(V.removeEventListener("keydown",E?T:W,E),V.removeEventListener("compositionstart",Z),V.removeEventListener("compositionend",K)),v&&(V.removeEventListener("click",S?M:A,S),V.removeEventListener("pointerdown",S?M:A,S),V.removeEventListener("pointermove",q,S),V.removeEventListener("pointerup",ce,S),V.removeEventListener("mousedown",M,S)),H.forEach(Y=>{Y.removeEventListener("scroll",B)}),C.clear()}},[s,r,c,v,n,o,g,i,R,w,W,E,T,A,S,M,j,q,ce,N]),a.useEffect(()=>{s.current.insideReactTree=!1},[s,v]);const X=a.useMemo(()=>({onKeyDown:W,...d&&{[xl[f]]:C=>{o(!1,ue("trigger-press",C.nativeEvent))},...f!=="intentional"&&{onClick(C){o(!1,ue("trigger-press",C.nativeEvent))}}}}),[W,o,d,f]),L=J(C=>{const B=ze(C.nativeEvent);!ge(r.floating,B)||C.button!==0||(y.current=!0)}),re=J(()=>{s.current.insideReactTree=!0,U.start(0,()=>{s.current.insideReactTree=!1})}),se=a.useMemo(()=>({onKeyDown:W,onMouseDown:L,onMouseUp:L,onPointerDownCapture:re,onMouseDownCapture:re,onClickCapture:re,onMouseUpCapture:re}),[W,L,re]);return a.useMemo(()=>i?{reference:X,floating:se}:{},[i,X,se])}function rr(e){const{open:t=!1,onOpenChange:n,elements:o}=e,r=Kt(),s=a.useRef({}),[i]=a.useState(()=>si()),c=xt()!=null,[l,u]=a.useState(o.reference),d=J((p,x)=>{if(s.current.openEvent=p?x.event:void 0,!e.noEmit){const b={open:p,reason:x.reason,nativeEvent:x.event,nested:c};i.emit("openchange",b)}n==null||n(p,x)}),f=a.useMemo(()=>({setPositionReference:u}),[]),g=a.useMemo(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return a.useMemo(()=>({dataRef:s,open:t,onOpenChange:d,elements:g,events:i,floatingId:r,refs:f}),[t,d,g,i,r,f])}function yl(){return{open:!1,onOpenChange:()=>{},dataRef:{current:{}},elements:{floating:null,reference:null,domReference:null},events:{on:()=>{},off:()=>{},emit:()=>{}},floatingId:"",refs:{setPositionReference:()=>{}}}}function gi(e=[]){const t=e.map(c=>c==null?void 0:c.reference),n=e.map(c=>c==null?void 0:c.floating),o=e.map(c=>c==null?void 0:c.item),r=a.useCallback(c=>Ro(c,e,"reference"),t),s=a.useCallback(c=>Ro(c,e,"floating"),n),i=a.useCallback(c=>Ro(c,e,"item"),o);return a.useMemo(()=>({getReferenceProps:r,getFloatingProps:s,getItemProps:i}),[r,s,i])}function Ro(e,t,n){var o;const r=new Map,s=n==="item",i={};n==="floating"&&(i.tabIndex=-1,i[Uo]="");for(const c in e)s&&e&&(c===Ls||c===Fs)||(i[c]=e[c]);for(let c=0;c<t.length;c+=1){let l;const u=(o=t[c])==null?void 0:o[n];typeof u=="function"?l=e?u(e):null:l=u,l&&Lr(i,l,s,r)}return Lr(i,e,s,r),i}function Lr(e,t,n,o){var r;for(const s in t){const i=t[s];n&&(s===Ls||s===Fs)||(s.startsWith("on")?(o.has(s)||o.set(s,[]),typeof i=="function"&&((r=o.get(s))==null||r.push(i),e[s]=(...c)=>{var l;return(l=o.get(s))==null?void 0:l.map(u=>u(...c)).find(u=>u!==void 0)})):e[s]=i)}}const wl=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function hi(e,t={}){var n,o;const{open:r,elements:s,floatingId:i}=e,{enabled:c=!0,role:l="dialog"}=t,u=Kt(),d=((n=s.domReference)==null?void 0:n.id)||u,f=a.useMemo(()=>{var y;return((y=Gn(s.floating))==null?void 0:y.id)||i},[s.floating,i]),g=(o=wl.get(l))!=null?o:l,x=xt()!=null,b=a.useMemo(()=>g==="tooltip"||l==="label"?{[`aria-${l==="label"?"labelledby":"describedby"}`]:r?f:void 0}:{"aria-expanded":r?"true":"false","aria-haspopup":g==="alertdialog"?"dialog":g,"aria-controls":r?f:void 0,...g==="listbox"&&{role:"combobox"},...g==="menu"&&{id:d},...g==="menu"&&x&&{role:"menuitem"},...l==="select"&&{"aria-autocomplete":"none"},...l==="combobox"&&{"aria-autocomplete":"list"}},[g,f,x,r,d,l]),h=a.useMemo(()=>{const y={id:f,...g&&{role:g}};return g==="tooltip"||l==="label"?y:{...y,...g==="menu"&&{"aria-labelledby":d}}},[g,f,d,l]),v=a.useCallback(({active:y,selected:R})=>{const w={role:"option",...y&&{id:`${f}-fui-option`}};switch(l){case"select":case"combobox":return{...w,"aria-selected":R}}return{}},[f,l]);return a.useMemo(()=>c?{reference:b,floating:h,item:v}:{},[c,b,h,v])}const sr=a.forwardRef(function(t,n){const{cutout:o,...r}=t;let s;if(o){const i=o==null?void 0:o.getBoundingClientRect();s=`polygon(
|
|
5
|
+
0% 0%,
|
|
6
|
+
100% 0%,
|
|
7
|
+
100% 100%,
|
|
8
|
+
0% 100%,
|
|
9
|
+
0% 0%,
|
|
10
|
+
${i.left}px ${i.top}px,
|
|
11
|
+
${i.left}px ${i.bottom}px,
|
|
12
|
+
${i.right}px ${i.bottom}px,
|
|
13
|
+
${i.right}px ${i.top}px,
|
|
14
|
+
${i.left}px ${i.top}px
|
|
15
|
+
)`}return m.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:s}})});let Fr={},Br={},$r="";function Rl(e){if(typeof document>"u")return!1;const t=lt(e);return Ce(t).innerWidth-t.documentElement.clientWidth>0}function Cl(e){const n=lt(e).documentElement,o=n.style.overflow;return n.style.overflow="hidden",()=>{n.style.overflow=o}}function El(e){var t,n;const o=lt(e),r=o.documentElement,s=o.body,i=Ce(r);let c=0,l=0;const u=Ze.create();if(As&&((n=(t=i.visualViewport)==null?void 0:t.scale)!=null?n:1)!==1)return()=>{};function d(){var p;const x=i.getComputedStyle(r),b=i.getComputedStyle(s);c=r.scrollTop,l=r.scrollLeft,Fr={scrollbarGutter:r.style.scrollbarGutter,overflowY:r.style.overflowY,overflowX:r.style.overflowX},$r=r.style.scrollBehavior,Br={position:s.style.position,height:s.style.height,width:s.style.width,boxSizing:s.style.boxSizing,overflowY:s.style.overflowY,overflowX:s.style.overflowX,scrollBehavior:s.style.scrollBehavior};const h=typeof CSS<"u"&&((p=CSS.supports)==null?void 0:p.call(CSS,"scrollbar-gutter","stable")),v=r.scrollHeight>r.clientHeight,y=r.scrollWidth>r.clientWidth,R=x.overflowY==="scroll"||b.overflowY==="scroll",w=x.overflowX==="scroll"||b.overflowX==="scroll",E=Math.max(0,i.innerWidth-r.clientWidth),S=Math.max(0,i.innerHeight-r.clientHeight),k=parseFloat(b.marginTop)+parseFloat(b.marginBottom),D=parseFloat(b.marginLeft)+parseFloat(b.marginRight);Object.assign(r.style,{scrollbarGutter:"stable",overflowY:!h&&(v||R)?"scroll":"hidden",overflowX:!h&&(y||w)?"scroll":"hidden"}),Object.assign(s.style,{position:"relative",height:k||S?`calc(100dvh - ${k+S}px)`:"100dvh",width:D||E?`calc(100vw - ${D+E}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),s.scrollTop=c,s.scrollLeft=l,r.setAttribute("data-base-ui-scroll-locked",""),r.style.scrollBehavior="unset"}function f(){Object.assign(r.style,Fr),Object.assign(s.style,Br),r.scrollTop=c,r.scrollLeft=l,r.removeAttribute("data-base-ui-scroll-locked"),r.style.scrollBehavior=$r}function g(){f(),u.request(d)}return d(),i.addEventListener("resize",g),()=>{u.cancel(),f(),i.removeEventListener("resize",g)}}class Sl{constructor(){Re(this,"lockCount",0),Re(this,"restore",null),Re(this,"timeoutLock",kt.create()),Re(this,"timeoutUnlock",kt.create()),Re(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)}),Re(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const o=lt(t).documentElement,r=Ce(o).getComputedStyle(o).overflowY;if(r==="hidden"||r==="clip"){this.restore=Rs;return}const s=Ia||!Rl(t);this.restore=s?Cl(t):El(t)}}const Ml=new Sl;function vi(e){const{enabled:t=!0,mounted:n,open:o,referenceElement:r=null}=e;oe(()=>{if(t&&As&&n&&!o){const s=lt(r),i=s.body.style.userSelect,c=s.body.style.webkitUserSelect;return s.body.style.userSelect="none",s.body.style.webkitUserSelect="none",()=>{s.body.style.userSelect=i,s.body.style.webkitUserSelect=c}}},[t,n,o,r]),oe(()=>{if(t)return Ml.acquire(r)},[t,r])}function Il(e){const t=a.useRef(""),n=a.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:a.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r&&e(r,r.pointerType),e(r,t.current),t.current=""},[e]),onPointerDown:n}}function bi(e){const[t,n]=a.useState(null),o=J((c,l)=>{e||n(l)}),r=J(()=>{n(null)}),{onClick:s,onPointerDown:i}=Il(o);return a.useMemo(()=>({openMethod:t,reset:r,triggerProps:{onClick:s,onPointerDown:i}}),[t,r,s,i])}sr.__docgenInfo={description:"",methods:[],displayName:"InternalBackdrop"};function kl(e){const{open:t,setOpen:n,disabled:o,nativeButton:r}=e,s=J(u=>{t&&n(!1,ue("close-press",u.nativeEvent))}),{getButtonProps:i,buttonRef:c}=Qo({disabled:o,native:r});return{getRootProps:u=>Gt({onClick:s},u,i),ref:c}}var Ol=Object.defineProperty,Pl=(e,t,n)=>t in e?Ol(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Zn=(e,t,n)=>Pl(e,typeof t!="symbol"?t+"":t,n);function Tl(e){const{store:t,parentContext:n}=e,o=t.useState("open"),r=t.useState("dismissible"),s=t.useState("modal"),i=t.useState("triggerElement"),c=t.useState("popupElement"),{mounted:l,setMounted:u,transitionStatus:d}=ao(o),{openMethod:f,triggerProps:g,reset:p}=bi(o),x=J(()=>{var U,O;u(!1),(O=(U=t.context).openChangeComplete)==null||O.call(U,!1),p()});Yt({enabled:!e.actionsRef,open:o,ref:t.context.popupRef,onComplete(){o||x()}}),a.useImperativeHandle(e.actionsRef,()=>({unmount:x}),[x]);const b=rr({elements:{reference:i,floating:c},open:o,onOpenChange:t.setOpen,noEmit:!0}),[h,v]=a.useState(0),y=h===0,R=hi(b),w=pi(b),E=mi(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:s==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(U){if(U.button!==0)return!1;const O=ze(U);if(y&&r){const _=O;return s&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===_||t.context.backdropRef.current===_:!0}return!1},escapeKey:y});vi({enabled:o&&s===!0,mounted:l,open:o,referenceElement:c});const{getReferenceProps:S,getFloatingProps:k}=gi([R,w,E]);t.useContextCallback("nestedDialogOpen",U=>{v(U+1)}),t.useContextCallback("nestedDialogClose",()=>{v(0)}),a.useEffect(()=>(n!=null&&n.nestedDialogOpen&&o&&n.nestedDialogOpen(h),n!=null&&n.nestedDialogClose&&!o&&n.nestedDialogClose(),()=>{n!=null&&n.nestedDialogClose&&o&&n.nestedDialogClose()}),[o,n,h]);const D=a.useMemo(()=>S(g),[S,g]);t.useSyncedValues({openMethod:f,mounted:l,transitionStatus:d,triggerProps:D,popupProps:k(),floatingRootContext:b,nestedOpenDialogCount:h})}var Qn=Symbol("NOT_FOUND");function jl(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function _l(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Al(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${n}]`)}}var Vr=e=>Array.isArray(e)?e:[e];function Dl(e){const t=Array.isArray(e[0])?e[0]:e;return Al(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Nl(e,t){const n=[],{length:o}=e;for(let r=0;r<o;r++)n.push(e[r].apply(null,t));return n}function Ll(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Qn},put(n,o){t={key:n,value:o}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Fl(e,t){let n=[];function o(c){const l=n.findIndex(u=>t(c,u.key));if(l>-1){const u=n[l];return l>0&&(n.splice(l,1),n.unshift(u)),u.value}return Qn}function r(c,l){o(c)===Qn&&(n.unshift({key:c,value:l}),n.length>e&&n.pop())}function s(){return n}function i(){n=[]}return{get:o,put:r,getEntries:s,clear:i}}var Bl=(e,t)=>e===t;function $l(e){return function(n,o){if(n===null||o===null||n.length!==o.length)return!1;const{length:r}=n;for(let s=0;s<r;s++)if(!e(n[s],o[s]))return!1;return!0}}function Vl(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:o=Bl,maxSize:r=1,resultEqualityCheck:s}=n,i=$l(o);let c=0;const l=r<=1?Ll(i):Fl(r,i);function u(){let d=l.get(arguments);if(d===Qn){if(d=e.apply(null,arguments),c++,s){const g=l.getEntries().find(p=>s(p.value,d));g&&(d=g.value,c!==0&&c--)}l.put(arguments,d)}return d}return u.clearCache=()=>{l.clear(),u.resetResultsCount()},u.resultsCount=()=>c,u.resetResultsCount=()=>{c=0},u}var Ul=class{constructor(e){this.value=e}deref(){return this.value}},Wl=typeof WeakRef<"u"?WeakRef:Ul,zl=0,Ur=1;function Nn(){return{s:zl,v:void 0,o:null,p:null}}function xi(e,t={}){let n=Nn();const{resultEqualityCheck:o}=t;let r,s=0;function i(){var c,l;let u=n;const{length:d}=arguments;for(let p=0,x=d;p<x;p++){const b=arguments[p];if(typeof b=="function"||typeof b=="object"&&b!==null){let h=u.o;h===null&&(u.o=h=new WeakMap);const v=h.get(b);v===void 0?(u=Nn(),h.set(b,u)):u=v}else{let h=u.p;h===null&&(u.p=h=new Map);const v=h.get(b);v===void 0?(u=Nn(),h.set(b,u)):u=v}}const f=u;let g;if(u.s===Ur)g=u.v;else if(g=e.apply(null,arguments),s++,o){const p=(l=(c=r==null?void 0:r.deref)==null?void 0:c.call(r))!=null?l:r;p!=null&&o(p,g)&&(g=p,s!==0&&s--),r=typeof g=="object"&&g!==null||typeof g=="function"?new Wl(g):g}return f.s=Ur,f.v=g,g}return i.clearCache=()=>{n=Nn(),i.resetResultsCount()},i.resultsCount=()=>s,i.resetResultsCount=()=>{s=0},i}function yi(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...r)=>{let s=0,i=0,c,l={},u=r.pop();typeof u=="object"&&(l=u,u=r.pop()),jl(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);const d={...n,...l},{memoize:f,memoizeOptions:g=[],argsMemoize:p=xi,argsMemoizeOptions:x=[]}=d,b=Vr(g),h=Vr(x),v=Dl(r),y=f(function(){return s++,u.apply(null,arguments)},...b),R=p(function(){i++;const E=Nl(v,arguments);return c=y.apply(null,E),c},...h);return Object.assign(R,{resultFunc:u,memoizedResultFunc:y,dependencies:v,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>c,recomputations:()=>s,resetRecomputations:()=>{s=0},memoize:f,argsMemoize:p})};return Object.assign(o,{withTypes:()=>o}),o}var Hl=yi(xi),Gl=Object.assign((e,t=Hl)=>{_l(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),o=n.map(s=>e[s]);return t(o,(...s)=>s.reduce((i,c,l)=>(i[n[l]]=c,i),{}))},{withTypes:()=>Gl});yi({memoize:Vl,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const ke=(e,t,n,o,r,s,...i)=>{if(i.length>0)throw new Error("Unsupported number of selectors");let c;if(e)c=e;else throw new Error("Missing arguments");return c};var Co={exports:{}},Eo={},So={exports:{}},Mo={};/**
|
|
16
|
+
* @license React
|
|
17
|
+
* use-sync-external-store-shim.production.js
|
|
18
|
+
*
|
|
19
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
20
|
+
*
|
|
21
|
+
* This source code is licensed under the MIT license found in the
|
|
22
|
+
* LICENSE file in the root directory of this source tree.
|
|
23
|
+
*/var Wr;function Kl(){if(Wr)return Mo;Wr=1;var e=vs;function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var n=typeof Object.is=="function"?Object.is:t,o=e.useState,r=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function c(f,g){var p=g(),x=o({inst:{value:p,getSnapshot:g}}),b=x[0].inst,h=x[1];return s(function(){b.value=p,b.getSnapshot=g,l(b)&&h({inst:b})},[f,p,g]),r(function(){return l(b)&&h({inst:b}),f(function(){l(b)&&h({inst:b})})},[f]),i(p),p}function l(f){var g=f.getSnapshot;f=f.value;try{var p=g();return!n(f,p)}catch{return!0}}function u(f,g){return g()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:c;return Mo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,Mo}var zr;function ql(){return zr||(zr=1,So.exports=Kl()),So.exports}/**
|
|
24
|
+
* @license React
|
|
25
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
26
|
+
*
|
|
27
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
28
|
+
*
|
|
29
|
+
* This source code is licensed under the MIT license found in the
|
|
30
|
+
* LICENSE file in the root directory of this source tree.
|
|
31
|
+
*/var Hr;function Yl(){if(Hr)return Eo;Hr=1;var e=vs,t=ql();function n(u,d){return u===d&&(u!==0||1/u===1/d)||u!==u&&d!==d}var o=typeof Object.is=="function"?Object.is:n,r=t.useSyncExternalStore,s=e.useRef,i=e.useEffect,c=e.useMemo,l=e.useDebugValue;return Eo.useSyncExternalStoreWithSelector=function(u,d,f,g,p){var x=s(null);if(x.current===null){var b={hasValue:!1,value:null};x.current=b}else b=x.current;x=c(function(){function v(S){if(!y){if(y=!0,R=S,S=g(S),p!==void 0&&b.hasValue){var k=b.value;if(p(k,S))return w=k}return w=S}if(k=w,o(R,S))return k;var D=g(S);return p!==void 0&&p(k,D)?(R=S,k):(R=S,w=D)}var y=!1,R,w,E=f===void 0?null:f;return[function(){return v(d())},E===null?void 0:function(){return v(E())}]},[d,f,g,p]);var h=r(u,x[0],x[1]);return i(function(){b.hasValue=!0,b.value=h},[h]),l(h),h},Eo}var Gr;function Xl(){return Gr||(Gr=1,Co.exports=Yl()),Co.exports}var Zl=Xl();function Ql(e,t,n,o,r){const s=i=>t(i,n,o,r);return Zl.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,s)}class Jl{constructor(t){Zn(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)})),Zn(this,"getSnapshot",()=>this.state),this.state=t,this.listeners=new Set}update(t){this.state!==t&&(this.state=t,this.listeners.forEach(n=>n(t)))}apply(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.update({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.update({...this.state,[t]:n})}}class eu extends Jl{constructor(t,n={},o){super(t),Zn(this,"controlledValues",new Map),this.context=n,this.selectors=o}useSyncedValue(t,n){oe(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){oe(()=>(this.state[t]!==n&&this.set(t,n),()=>{this.set(t,void 0)}),[t,n])}useSyncedValues(t){oe(()=>{this.apply(t)},[t])}useControlledProp(t,n,o){const r=n!==void 0;this.controlledValues.has(t)||(this.controlledValues.set(t,r),!r&&!Object.is(this.state[t],o)&&super.update({...this.state,[t]:o})),oe(()=>{r&&!Object.is(this.state[t],n)&&super.update({...this.state,[t]:n})},[t,n,o,r])}set(t,n){this.controlledValues.get(t)!==!0&&super.set(t,n)}apply(t){const n={...t};for(const o in n)this.controlledValues.get(o)===!0&&delete n[o];super.apply(n)}update(t){const n={...t};for(const o in n)this.controlledValues.get(o)===!0&&delete n[o];super.update({...this.state,...n})}useState(t){if(!this.selectors)throw new Error("Base UI: selectors are required to call useState.");return Ql(this,this.selectors[t])}useContextCallback(t,n){const o=J(n??Rs);this.context[t]=o}getElementSetter(t){return a.useCallback(n=>{this.set(t,n)},[t])}}const tu={open:ke(e=>e.open),modal:ke(e=>e.modal),nested:ke(e=>e.nested),nestedOpenDialogCount:ke(e=>e.nestedOpenDialogCount),dismissible:ke(e=>e.dismissible),openMethod:ke(e=>e.openMethod),descriptionElementId:ke(e=>e.descriptionElementId),titleElementId:ke(e=>e.titleElementId),mounted:ke(e=>e.mounted),transitionStatus:ke(e=>e.transitionStatus),triggerProps:ke(e=>e.triggerProps),popupProps:ke(e=>e.popupProps),floatingRootContext:ke(e=>e.floatingRootContext),popupElement:ke(e=>e.popupElement),triggerElement:ke(e=>e.triggerElement)};class ir extends eu{constructor(){super(...arguments),Zn(this,"setOpen",(t,n)=>{var o,r,s;if((r=(o=this.context).openChange)==null||r.call(o,t,n),n.isCanceled)return;const i={open:t,nativeEvent:n.event,reason:n.reason,nested:this.state.nested};(s=this.state.floatingRootContext.events)==null||s.emit("openchange",i),this.set("open",t)})}static create(t){const n={popupRef:a.createRef(),backdropRef:a.createRef(),internalBackdropRef:a.createRef()};return new ir(t,n,tu)}}function Tt(e){return Kt(e,"base-ui")}const nu="badge__Aj95L",ou="label__F86ML",Kr={badge:nu,label:ou},ru=e=>{switch(e){case"xs":return"small";case"s":return"medium";case"m":return"large";default:return e}},Jn=a.forwardRef(function({type:t="neutral",size:n="medium",leadingSvgIcon:o,dataset:r,children:s,accent:i,inverted:c,hideLabel:l,...u},d){const f=ru(n),g={...r,size:f};i===void 0&&c===void 0?g.type=t:(g.accent=i||"unset",g.inverted=!!c);const p={...ot(u),ref:d,className:Kr.badge,...ft(g,{preplyDsComponent:Ge.Badge})};return m.jsxs("span",{...p,children:[!!o&&m.jsx(ct,{accent:"primary",size:n==="large"?"24":"16",svg:o}),m.jsx("span",{className:Kr.label,"data-hidden":l,children:s})]})});Jn.__docgenInfo={description:"",methods:[],displayName:"Badge",props:{type:{defaultValue:{value:'"neutral"',computed:!1},required:!1},size:{defaultValue:{value:'"medium"',computed:!1},required:!1}}};const su="cutout__1sEQk",iu={cutout:su},cu="IconButton__FZTVy",au={IconButton:cu},cr=a.forwardRef(function({variant:t=yc,size:n=xc,url:o,a11yLabel:r,svg:s,...i},c){const l=[au.IconButton,iu.cutout].join(" ");return m.jsx(Tc,{...i,ref:c,className:l,isIconButton:!0,variant:t,size:n,url:o,a11yLabel:r,preplyDsComponent:Ge.IconButton,children:Nc(s,{"aria-hidden":"true",focusable:"false"})})});cr.__docgenInfo={description:"",methods:[],displayName:"IconButton",props:{variant:{defaultValue:{value:"'primary'",computed:!1},required:!1},size:{defaultValue:{value:"'small'",computed:!1},required:!1}}};const lu=wc({remove:{id:"preply-ds.genericAriaLabels.remove",defaultMessage:[{type:0,value:"Remove"}]},close:{id:"preply-ds.genericAriaLabels.close",defaultMessage:[{type:0,value:"Close"}]},confirm:{id:"preply-ds.genericAriaLabels.confirm",defaultMessage:[{type:0,value:"Confirm"}]},cancel:{id:"preply-ds.genericAriaLabels.cancel",defaultMessage:[{type:0,value:"Cancel"}]}});function uu(e){const t=a.useRef(e);return a.useEffect(()=>{t.current=e},[e]),a.useCallback(((...o)=>{var r;return(r=t.current)==null?void 0:r.call(t,...o)}),[])}function fu({value:e,defaultValue:t,onValueChange:n}){const o=e!==void 0,[r,s]=a.useState(o?e:t);a.useEffect(()=>{o&&e!==r&&s(e)},[o,e,r]);const i=uu(n),c=a.useCallback(u=>{o||s(u),i(u)},[o,i]);return[o?e:r,c]}const du="visuallyHidden__u7xQ9",pu={visuallyHidden:du};function mu({as:e="span",children:t}){const n=e??"span";return m.jsx(n,{className:pu.visuallyHidden,children:t})}const gu="dialog__80F7X",hu="overlay__otkvG",vu="close__-TGOq",bu="title__tGVp1",xu="description__84a0F",yu="header__ADm9A",Wt={dialog:gu,overlay:hu,close:vu,title:bu,description:xu,header:yu},wu=a.forwardRef(function(t,n){const{render:o,className:r,id:s,...i}=t,{store:c}=Pt(),l=Tt(s);return c.useSyncedValueWithCleanup("titleElementId",l),ve("h2",t,{ref:n,props:[{id:l},i]})}),wi=a.forwardRef(function({children:t,className:n,dataset:o,...r},s){const i=[Wt.title,n].filter(Boolean).join(" "),c=ft(o);return m.jsx(wu,{ref:s,className:i,...c,...r,children:t})});wi.__docgenInfo={description:"",methods:[],displayName:"DialogTitle2"};const Ru=a.forwardRef(function(t,n){const{render:o,className:r,id:s,...i}=t,{store:c}=Pt(),l=Tt(s);return c.useSyncedValueWithCleanup("descriptionElementId",l),ve("p",t,{ref:n,props:[{id:l},i]})}),Ri=a.forwardRef(function({children:t,className:n,dataset:o,...r},s){if(!t)return null;const i=[Wt.description,n].filter(Boolean).join(" "),c=ft(o);return m.jsx(Ru,{ref:s,className:i,...c,...r,children:t})});Ri.__docgenInfo={description:"",methods:[],displayName:"DialogDescription2"};const Cu=a.forwardRef(function(t,n){const{render:o,className:r,disabled:s=!1,nativeButton:i=!0,...c}=t,{store:l}=Pt(),u=l.useState("open"),{getRootProps:d,ref:f}=kl({disabled:s,open:u,setOpen:l.setOpen,nativeButton:i}),g=a.useMemo(()=>({disabled:s}),[s]);return ve("button",t,{state:g,ref:[n,f],props:[c,d]})}),Eu=({title:e,titleId:t,...n},o)=>a.createElement("svg",{"data-preply-ds-component":"SvgTokyoUIIcon",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",ref:o,"aria-labelledby":t,...n},e?a.createElement("title",{id:t},e):null,a.createElement("path",{fillRule:"evenodd",d:"M7.044 5.63 5.63 7.044l4.95 4.95-4.95 4.95 1.414 1.414 4.95-4.95 4.95 4.95 1.414-1.414-4.95-4.95 4.95-4.95-1.414-1.414-4.95 4.95-4.95-4.95Z",clipRule:"evenodd"})),Su=a.forwardRef(Eu),Ci=a.forwardRef(function({children:t,className:n},o){const r=[Wt.close,n].filter(Boolean).join(" ");return m.jsx("div",{className:r,children:m.jsx(Cu,{ref:o,render:t??m.jsx(Ei,{})})})}),Ei=a.forwardRef(function(t,n){const{formatMessage:o}=Rc();return m.jsx(cr,{ref:n,size:"small",variant:"ghost",dataset:{testid:"dialog-close"},assistiveText:o(lu.close),svg:Su,...t})});Ci.__docgenInfo={description:"",methods:[],displayName:"DialogCloseButton"};Ei.__docgenInfo={description:"",methods:[],displayName:"DialogDefaultCloseButton"};var Ln=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Io,qr;function Mu(){if(qr)return Io;qr=1;var e="Expected a function",t=NaN,n="[object Symbol]",o=/^\s+|\s+$/g,r=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,i=/^0o[0-7]+$/i,c=parseInt,l=typeof Ln=="object"&&Ln&&Ln.Object===Object&&Ln,u=typeof self=="object"&&self&&self.Object===Object&&self,d=l||u||Function("return this")(),f=Object.prototype,g=f.toString,p=Math.max,x=Math.min,b=function(){return d.Date.now()};function h(E,S,k){var D,U,O,_,N,I,W=0,$=!1,T=!1,A=!0;if(typeof E!="function")throw new TypeError(e);S=w(S)||0,v(k)&&($=!!k.leading,T="maxWait"in k,O=T?p(w(k.maxWait)||0,S):O,A="trailing"in k?!!k.trailing:A);function j(B){var Z=D,K=U;return D=U=void 0,W=B,_=E.apply(K,Z),_}function M(B){return W=B,N=setTimeout(X,S),$?j(B):_}function q(B){var Z=B-I,K=B-W,V=S-Z;return T?x(V,O-K):V}function ce(B){var Z=B-I,K=B-W;return I===void 0||Z>=S||Z<0||T&&K>=O}function X(){var B=b();if(ce(B))return L(B);N=setTimeout(X,q(B))}function L(B){return N=void 0,A&&D?j(B):(D=U=void 0,_)}function re(){N!==void 0&&clearTimeout(N),W=0,D=I=U=N=void 0}function se(){return N===void 0?_:L(b())}function C(){var B=b(),Z=ce(B);if(D=arguments,U=this,I=B,Z){if(N===void 0)return M(I);if(T)return N=setTimeout(X,S),j(I)}return N===void 0&&(N=setTimeout(X,S)),_}return C.cancel=re,C.flush=se,C}function v(E){var S=typeof E;return!!E&&(S=="object"||S=="function")}function y(E){return!!E&&typeof E=="object"}function R(E){return typeof E=="symbol"||y(E)&&g.call(E)==n}function w(E){if(typeof E=="number")return E;if(R(E))return t;if(v(E)){var S=typeof E.valueOf=="function"?E.valueOf():E;E=v(S)?S+"":S}if(typeof E!="string")return E===0?E:+E;E=E.replace(o,"");var k=s.test(E);return k||i.test(E)?c(E.slice(2),k?2:8):r.test(E)?t:+E}return Io=h,Io}Mu();var Iu=typeof window<"u"?a.useLayoutEffect:a.useEffect,ku=typeof window>"u";function Ou(e,{defaultValue:t=!1,initializeWithValue:n=!0}={}){const o=c=>ku?t:window.matchMedia(c).matches,[r,s]=a.useState(()=>n?o(e):t);function i(){s(o(e))}return Iu(()=>{const c=window.matchMedia(e);return i(),c.addListener?c.addListener(i):c.addEventListener("change",i),()=>{c.removeListener?c.removeListener(i):c.removeEventListener("change",i)}},[e]),r}function Si(e){const t=Dc[e];return Ou(`(min-width: ${t}px)`)}function ar({controlled:e,default:t,name:n,state:o="value"}){const{current:r}=a.useRef(e!==void 0),[s,i]=a.useState(t),c=r?e:s,l=a.useCallback(u=>{r||i(u)},[]);return[c,l]}const Mi=a.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Pu(){return a.useContext(Mi)}function Tu(e){const{children:t,elementsRef:n,labelsRef:o,onMapChange:r}=e,s=a.useRef(0),i=at(_u).current,c=at(ju).current,[l,u]=a.useState(je),d=a.useRef(l),f=J((h,v)=>{c.set(h,v??null),d.current={},u(d.current)}),g=J(h=>{c.delete(h),d.current={},u(d.current)}),p=a.useMemo(()=>{const h=new Map;return Array.from(c.keys()).sort(Au).forEach((y,R)=>{var w;const E=(w=c.get(y))!=null?w:{};h.set(y,{...E,index:R})}),h},[c,l]);oe(()=>{if(typeof MutationObserver!="function"||p.size===0)return;const h=new MutationObserver(v=>{const y=new Set,R=w=>y.has(w)?y.delete(w):y.add(w);v.forEach(w=>{w.removedNodes.forEach(R),w.addedNodes.forEach(R)}),y.size===0&&(d.current={},u(d.current))});return p.forEach((v,y)=>{y.parentElement&&h.observe(y.parentElement,{childList:!0})}),()=>{h.disconnect()}},[p]),oe(()=>{d.current===l&&(n.current.length!==p.size&&(n.current.length=p.size),o&&o.current.length!==p.size&&(o.current.length=p.size),s.current=p.size),r==null||r(p)},[r,p,n,o,l]);const x=J(h=>(i.add(h),()=>{i.delete(h)}));oe(()=>{i.forEach(h=>h(p))},[i,p]);const b=a.useMemo(()=>({register:f,unregister:g,subscribeMapChange:x,elementsRef:n,labelsRef:o,nextIndexRef:s}),[f,g,x,n,o,s]);return m.jsx(Mi.Provider,{value:b,children:t})}function ju(){return new Map}function _u(){return new Set}function Au(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Du=a.createContext(void 0);function Ii(e=!0){var t;const n=a.useContext(Du);if(n===void 0&&!e)throw new Error("Base UI: DirectionContext is missing.");return(t=n==null?void 0:n.direction)!=null?t:"ltr"}let Nu=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function vn(e={}){const{label:t,metadata:n,textRef:o,indexGuessBehavior:r,index:s}=e,{register:i,unregister:c,subscribeMapChange:l,elementsRef:u,labelsRef:d,nextIndexRef:f}=Pu(),g=a.useRef(-1),[p,x]=a.useState(s??(r===Nu.GuessFromOrder?()=>{if(g.current===-1){const v=f.current;f.current+=1,g.current=v}return g.current}:-1)),b=a.useRef(null),h=a.useCallback(v=>{var y,R;if(b.current=v,p!==-1&&v!==null&&(u.current[p]=v,d)){const w=t!==void 0;d.current[p]=w?t:(R=(y=o==null?void 0:o.current)==null?void 0:y.textContent)!=null?R:v.textContent}},[p,u,d,t,o]);return oe(()=>{if(s!=null)return;const v=b.current;if(v)return i(v,n),()=>{c(v)}},[s,i,c,n]),oe(()=>{if(s==null)return l(v=>{var y;const R=b.current?(y=v.get(b.current))==null?void 0:y.index:null;R!=null&&x(R)})},[s,l,x]),a.useMemo(()=>({ref:h,index:p}),[p,h])}const Lu=["top","right","bottom","left"],zt=Math.min,Ne=Math.max,eo=Math.round,Ft=Math.floor,et=e=>({x:e,y:e}),Fu={left:"right",right:"left",bottom:"top",top:"bottom"},Bu={start:"end",end:"start"};function Ko(e,t,n){return Ne(e,zt(t,n))}function ut(e,t){return typeof e=="function"?e(t):e}function Fe(e){return e.split("-")[0]}function yt(e){return e.split("-")[1]}function lr(e){return e==="x"?"y":"x"}function ur(e){return e==="y"?"height":"width"}const $u=new Set(["top","bottom"]);function He(e){return $u.has(Fe(e))?"y":"x"}function fr(e){return lr(He(e))}function Vu(e,t,n){n===void 0&&(n=!1);const o=yt(e),r=fr(e),s=ur(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=to(i)),[i,to(i)]}function Uu(e){const t=to(e);return[qo(e),t,qo(t)]}function qo(e){return e.replace(/start|end/g,t=>Bu[t])}const Yr=["left","right"],Xr=["right","left"],Wu=["top","bottom"],zu=["bottom","top"];function Hu(e,t,n){switch(e){case"top":case"bottom":return n?t?Xr:Yr:t?Yr:Xr;case"left":case"right":return t?Wu:zu;default:return[]}}function Gu(e,t,n,o){const r=yt(e);let s=Hu(Fe(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(qo)))),s}function to(e){return e.replace(/left|right|bottom|top/g,t=>Fu[t])}function Ku(e){return{top:0,right:0,bottom:0,left:0,...e}}function ki(e){return typeof e!="number"?Ku(e):{top:e,right:e,bottom:e,left:e}}function no(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Fn(e,t,n){return Math.floor(e/t)!==n}function cn(e,t){return t<0||t>=e.current.length}function ko(e,t){return Se(e,{disabledIndices:t})}function Zr(e,t){return Se(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Se(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:o,amount:r=1}={}){let s=t;do s+=n?-r:r;while(s>=0&&s<=e.current.length-1&&an(e,s,o));return s}function qu(e,{event:t,orientation:n,loop:o,rtl:r,cols:s,disabledIndices:i,minIndex:c,maxIndex:l,prevIndex:u,stopEvent:d=!1}){let f=u;const g=[],p={};let x=!1;{let v=null,y=-1;e.current.forEach((R,w)=>{if(R==null)return;const E=R.closest('[role="row"]');E&&(x=!0),(E!==v||y===-1)&&(v=E,y+=1,g[y]=[]),g[y].push(w),p[w]=y})}const b=x&&g.length>0&&g.some(v=>v.length!==s);function h(v){if(!b||u===-1)return;const y=p[u];if(y==null)return;const R=g[y].indexOf(u);let w=v==="up"?y-1:y+1;o&&(w<0?w=g.length-1:w>=g.length&&(w=0));const E=new Set;for(;w>=0&&w<g.length&&!E.has(w);){E.add(w);const S=g[w];if(S.length===0){w=v==="up"?w-1:w+1;continue}const k=Math.min(R,S.length-1);for(let D=k;D>=0;D-=1){const U=S[D];if(!an(e,U,i))return U}w=v==="up"?w-1:w+1,o&&(w<0?w=g.length-1:w>=g.length&&(w=0))}}if(t.key===er){const v=h("up");if(v!==void 0)d&&Me(t),f=v;else{if(d&&Me(t),u===-1)f=l;else if(f=Se(e,{startingIndex:f,amount:s,decrement:!0,disabledIndices:i}),o&&(u-s<c||f<0)){const y=u%s,R=l%s,w=l-(R-y);R===y?f=l:f=R>y?w:w-s}cn(e,f)&&(f=u)}}if(t.key===mn){const v=h("down");v!==void 0?(d&&Me(t),f=v):(d&&Me(t),u===-1?f=c:(f=Se(e,{startingIndex:u,amount:s,disabledIndices:i}),o&&u+s>l&&(f=Se(e,{startingIndex:u%s-s,amount:s,disabledIndices:i}))),cn(e,f)&&(f=u))}if(n==="both"){const v=Ft(u/s);t.key===(r?ht:vt)&&(d&&Me(t),u%s!==s-1?(f=Se(e,{startingIndex:u,disabledIndices:i}),o&&Fn(f,s,v)&&(f=Se(e,{startingIndex:u-u%s-1,disabledIndices:i}))):o&&(f=Se(e,{startingIndex:u-u%s-1,disabledIndices:i})),Fn(f,s,v)&&(f=u)),t.key===(r?vt:ht)&&(d&&Me(t),u%s!==0?(f=Se(e,{startingIndex:u,decrement:!0,disabledIndices:i}),o&&Fn(f,s,v)&&(f=Se(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:i}))):o&&(f=Se(e,{startingIndex:u+(s-u%s),decrement:!0,disabledIndices:i})),Fn(f,s,v)&&(f=u));const y=Ft(l/s)===v;cn(e,f)&&(o&&y?f=t.key===(r?vt:ht)?l:Se(e,{startingIndex:u-u%s-1,disabledIndices:i}):f=u)}return f}function Yu(e,t,n){const o=[];let r=0;return e.forEach(({width:s,height:i},c)=>{let l=!1;for(n&&(r=0);!l;){const u=[];for(let d=0;d<s;d+=1)for(let f=0;f<i;f+=1)u.push(r+d+f*t);r%t+s<=t&&u.every(d=>o[d]==null)?(u.forEach(d=>{o[d]=c}),l=!0):r+=1}}),[...o]}function Xu(e,t,n,o,r){if(e===-1)return-1;const s=n.indexOf(e),i=t[e];switch(r){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*o:s;case"br":return n.lastIndexOf(e);default:return-1}}function Zu(e,t){return t.flatMap((n,o)=>e.includes(n)?[o]:[])}function an(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const o=e.current[t];return o==null||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"}const Qr=Ut("safe-polygon");function Oo(e,t,n){if(n&&!un(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const o=e();return typeof o=="number"?o:o==null?void 0:o[t]}return e==null?void 0:e[t]}function Po(e){return typeof e=="function"?e():e}function Qu(e,t={}){const{open:n,onOpenChange:o,dataRef:r,events:s,elements:i}=e,{enabled:c=!0,delay:l=0,handleClose:u=null,mouseOnly:d=!1,restMs:f=0,move:g=!0}=t,p=$e(),x=xt(),b=ye(u),h=ye(l),v=ye(n),y=ye(f),R=a.useRef(void 0),w=Le(),E=a.useRef(void 0),S=Le(),k=a.useRef(!0),D=a.useRef(!1),U=a.useRef(()=>{}),O=a.useRef(!1),_=J(()=>{var A;const j=(A=r.current.openEvent)==null?void 0:A.type;return(j==null?void 0:j.includes("mouse"))&&j!=="mousedown"});a.useEffect(()=>{if(!c)return;function A(j){j.open||(w.clear(),S.clear(),k.current=!0,O.current=!1)}return s.on("openchange",A),()=>{s.off("openchange",A)}},[c,s,w,S]),a.useEffect(()=>{if(!c||!b.current||!n)return;function A(M){_()&&o(!1,ue("trigger-hover",M))}const j=xe(i.floating).documentElement;return j.addEventListener("mouseleave",A),()=>{j.removeEventListener("mouseleave",A)}},[i.floating,n,o,c,b,_]);const N=a.useCallback((A,j=!0)=>{const M=Oo(h.current,"close",R.current);M&&!E.current?w.start(M,()=>o(!1,ue("trigger-hover",A))):j&&(w.clear(),o(!1,ue("trigger-hover",A)))},[h,o,w]),I=J(()=>{U.current(),E.current=void 0}),W=J(()=>{if(D.current){const A=xe(i.floating).body;A.style.pointerEvents="",A.removeAttribute(Qr),D.current=!1}}),$=J(()=>r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1);a.useEffect(()=>{if(!c)return;function A(X){if(w.clear(),k.current=!1,d&&!un(R.current)||Po(y.current)>0&&!Oo(h.current,"open"))return;const L=Oo(h.current,"open",R.current);L?w.start(L,()=>{v.current||o(!0,ue("trigger-hover",X))}):n||o(!0,ue("trigger-hover",X))}function j(X){if($()){W();return}U.current();const L=xe(i.floating);if(S.clear(),O.current=!1,b.current&&r.current.floatingContext){n||w.clear(),E.current=b.current({...r.current.floatingContext,tree:p,x:X.clientX,y:X.clientY,onClose(){W(),I(),$()||N(X,!0)}});const se=E.current;L.addEventListener("mousemove",se),U.current=()=>{L.removeEventListener("mousemove",se)};return}(R.current==="touch"?!ge(i.floating,X.relatedTarget):!0)&&N(X)}function M(X){var L;$()||r.current.floatingContext&&((L=b.current)==null||L.call(b,{...r.current.floatingContext,tree:p,x:X.clientX,y:X.clientY,onClose(){W(),I(),$()||N(X)}})(X))}function q(){w.clear()}function ce(X){$()||N(X,!1)}if(fe(i.domReference)){const X=i.domReference,L=i.floating;return n&&X.addEventListener("mouseleave",M),g&&X.addEventListener("mousemove",A,{once:!0}),X.addEventListener("mouseenter",A),X.addEventListener("mouseleave",j),L&&(L.addEventListener("mouseleave",M),L.addEventListener("mouseenter",q),L.addEventListener("mouseleave",ce)),()=>{n&&X.removeEventListener("mouseleave",M),g&&X.removeEventListener("mousemove",A),X.removeEventListener("mouseenter",A),X.removeEventListener("mouseleave",j),L&&(L.removeEventListener("mouseleave",M),L.removeEventListener("mouseenter",q),L.removeEventListener("mouseleave",ce))}}},[i,c,e,d,g,N,I,W,o,n,v,p,h,b,r,$,y,w,S]),oe(()=>{var A,j,M,q;if(c&&n&&(j=(A=b.current)==null?void 0:A.__options)!=null&&j.blockPointerEvents&&_()){D.current=!0;const ce=i.floating;if(fe(i.domReference)&&ce){const X=xe(i.floating).body;X.setAttribute(Qr,"");const L=i.domReference,re=(q=(M=p==null?void 0:p.nodesRef.current.find(se=>se.id===x))==null?void 0:M.context)==null?void 0:q.elements.floating;return re&&(re.style.pointerEvents=""),X.style.pointerEvents="none",L.style.pointerEvents="auto",ce.style.pointerEvents="auto",()=>{X.style.pointerEvents="",L.style.pointerEvents="",ce.style.pointerEvents=""}}}},[c,n,x,i,p,b,_]),oe(()=>{n||(R.current=void 0,O.current=!1,I(),W())},[n,I,W]),a.useEffect(()=>()=>{I(),w.clear(),S.clear()},[c,i.domReference,I,w,S]),a.useEffect(()=>W,[W]);const T=a.useMemo(()=>{function A(j){R.current=j.pointerType}return{onPointerDown:A,onPointerEnter:A,onMouseMove(j){const{nativeEvent:M}=j;function q(){!k.current&&!v.current&&o(!0,ue("trigger-hover",M))}d&&!un(R.current)||n||Po(y.current)===0||O.current&&j.movementX**2+j.movementY**2<2||(S.clear(),R.current==="touch"?q():(O.current=!0,S.start(Po(y.current),q)))}}},[d,o,n,v,y,S]);return a.useMemo(()=>c?{reference:T}:{},[c,T])}function Jr(e,t,n){let{reference:o,floating:r}=e;const s=He(t),i=fr(t),c=ur(i),l=Fe(t),u=s==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,g=o[c]/2-r[c]/2;let p;switch(l){case"top":p={x:d,y:o.y-r.height};break;case"bottom":p={x:d,y:o.y+o.height};break;case"right":p={x:o.x+o.width,y:f};break;case"left":p={x:o.x-r.width,y:f};break;default:p={x:o.x,y:o.y}}switch(yt(t)){case"start":p[i]-=g*(n&&u?-1:1);break;case"end":p[i]+=g*(n&&u?-1:1);break}return p}const Ju=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,c=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=Jr(u,o,l),g=o,p={},x=0;for(let b=0;b<c.length;b++){const{name:h,fn:v}=c[b],{x:y,y:R,data:w,reset:E}=await v({x:d,y:f,initialPlacement:o,placement:g,strategy:r,middlewareData:p,rects:u,platform:i,elements:{reference:e,floating:t}});d=y??d,f=R??f,p={...p,[h]:{...p[h],...w}},E&&x<=50&&(x++,typeof E=="object"&&(E.placement&&(g=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:r}):E.rects),{x:d,y:f}=Jr(u,g,l)),b=-1)}return{x:d,y:f,placement:g,strategy:r,middlewareData:p}};async function fn(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:i,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:g=!1,padding:p=0}=ut(t,e),x=ki(p),h=c[g?f==="floating"?"reference":"floating":f],v=no(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(h)))==null||n?h:h.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),y=f==="floating"?{x:o,y:r,width:i.floating.width,height:i.floating.height}:i.reference,R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),w=await(s.isElement==null?void 0:s.isElement(R))?await(s.getScale==null?void 0:s.getScale(R))||{x:1,y:1}:{x:1,y:1},E=no(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:y,offsetParent:R,strategy:l}):y);return{top:(v.top-E.top+x.top)/w.y,bottom:(E.bottom-v.bottom+x.bottom)/w.y,left:(v.left-E.left+x.left)/w.x,right:(E.right-v.right+x.right)/w.x}}const ef=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:i,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:g,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:b=!0,...h}=ut(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const v=Fe(r),y=He(c),R=Fe(c)===c,w=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=g||(R||!b?[to(c)]:Uu(c)),S=x!=="none";!g&&S&&E.push(...Gu(c,b,x,w));const k=[c,...E],D=await fn(t,h),U=[];let O=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&U.push(D[v]),f){const W=Vu(r,i,w);U.push(D[W[0]],D[W[1]])}if(O=[...O,{placement:r,overflows:U}],!U.every(W=>W<=0)){var _,N;const W=(((_=s.flip)==null?void 0:_.index)||0)+1,$=k[W];if($&&(!(f==="alignment"?y!==He($):!1)||O.every(j=>He(j.placement)===y?j.overflows[0]>0:!0)))return{data:{index:W,overflows:O},reset:{placement:$}};let T=(N=O.filter(A=>A.overflows[0]<=0).sort((A,j)=>A.overflows[1]-j.overflows[1])[0])==null?void 0:N.placement;if(!T)switch(p){case"bestFit":{var I;const A=(I=O.filter(j=>{if(S){const M=He(j.placement);return M===y||M==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(M=>M>0).reduce((M,q)=>M+q,0)]).sort((j,M)=>j[1]-M[1])[0])==null?void 0:I[0];A&&(T=A);break}case"initialPlacement":T=c;break}if(r!==T)return{reset:{placement:T}}}return{}}}};function es(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ts(e){return Lu.some(t=>e[t]>=0)}const tf=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=ut(e,t);switch(o){case"referenceHidden":{const s=await fn(t,{...r,elementContext:"reference"}),i=es(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ts(i)}}}case"escaped":{const s=await fn(t,{...r,altBoundary:!0}),i=es(s,n.floating);return{data:{escapedOffsets:i,escaped:ts(i)}}}default:return{}}}}},Oi=new Set(["left","top"]);async function nf(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=Fe(n),c=yt(n),l=He(n)==="y",u=Oi.has(i)?-1:1,d=s&&l?-1:1,f=ut(t,e);let{mainAxis:g,crossAxis:p,alignmentAxis:x}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof x=="number"&&(p=c==="end"?x*-1:x),l?{x:p*d,y:g*u}:{x:g*u,y:p*d}}const of=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:c}=t,l=await nf(t,e);return i===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},rf=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:c={fn:h=>{let{x:v,y}=h;return{x:v,y}}},...l}=ut(e,t),u={x:n,y:o},d=await fn(t,l),f=He(Fe(r)),g=lr(f);let p=u[g],x=u[f];if(s){const h=g==="y"?"top":"left",v=g==="y"?"bottom":"right",y=p+d[h],R=p-d[v];p=Ko(y,p,R)}if(i){const h=f==="y"?"top":"left",v=f==="y"?"bottom":"right",y=x+d[h],R=x-d[v];x=Ko(y,x,R)}const b=c.fn({...t,[g]:p,[f]:x});return{...b,data:{x:b.x-n,y:b.y-o,enabled:{[g]:s,[f]:i}}}}}},sf=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=ut(e,t),d={x:n,y:o},f=He(r),g=lr(f);let p=d[g],x=d[f];const b=ut(c,t),h=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const R=g==="y"?"height":"width",w=s.reference[g]-s.floating[R]+h.mainAxis,E=s.reference[g]+s.reference[R]-h.mainAxis;p<w?p=w:p>E&&(p=E)}if(u){var v,y;const R=g==="y"?"width":"height",w=Oi.has(Fe(r)),E=s.reference[f]-s.floating[R]+(w&&((v=i.offset)==null?void 0:v[f])||0)+(w?0:h.crossAxis),S=s.reference[f]+s.reference[R]+(w?0:((y=i.offset)==null?void 0:y[f])||0)-(w?h.crossAxis:0);x<E?x=E:x>S&&(x=S)}return{[g]:p,[f]:x}}}},cf=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:c}=t,{apply:l=()=>{},...u}=ut(e,t),d=await fn(t,u),f=Fe(r),g=yt(r),p=He(r)==="y",{width:x,height:b}=s.floating;let h,v;f==="top"||f==="bottom"?(h=f,v=g===(await(i.isRTL==null?void 0:i.isRTL(c.floating))?"start":"end")?"left":"right"):(v=f,h=g==="end"?"top":"bottom");const y=b-d.top-d.bottom,R=x-d.left-d.right,w=zt(b-d[h],y),E=zt(x-d[v],R),S=!t.middlewareData.shift;let k=w,D=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=R),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(k=y),S&&!g){const O=Ne(d.left,0),_=Ne(d.right,0),N=Ne(d.top,0),I=Ne(d.bottom,0);p?D=x-2*(O!==0||_!==0?O+_:Ne(d.left,d.right)):k=b-2*(N!==0||I!==0?N+I:Ne(d.top,d.bottom))}await l({...t,availableWidth:D,availableHeight:k});const U=await i.getDimensions(c.floating);return x!==U.width||b!==U.height?{reset:{rects:!0}}:{}}}};function Pi(e){const t=Ke(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=he(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,c=eo(n)!==s||eo(o)!==i;return c&&(n=s,o=i),{width:n,height:o,$:c}}function dr(e){return fe(e)?e:e.contextElement}function $t(e){const t=dr(e);if(!he(t))return et(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Pi(t);let i=(s?eo(n.width):n.width)/o,c=(s?eo(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!c||!Number.isFinite(c))&&(c=1),{x:i,y:c}}const af=et(0);function Ti(e){const t=Ce(e);return!io()||!t.visualViewport?af:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function lf(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ce(e)?!1:t}function Ot(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=dr(e);let i=et(1);t&&(o?fe(o)&&(i=$t(o)):i=$t(e));const c=lf(s,n,o)?Ti(s):et(0);let l=(r.left+c.x)/i.x,u=(r.top+c.y)/i.y,d=r.width/i.x,f=r.height/i.y;if(s){const g=Ce(s),p=o&&fe(o)?Ce(o):o;let x=g,b=$o(x);for(;b&&o&&p!==x;){const h=$t(b),v=b.getBoundingClientRect(),y=Ke(b),R=v.left+(b.clientLeft+parseFloat(y.paddingLeft))*h.x,w=v.top+(b.clientTop+parseFloat(y.paddingTop))*h.y;l*=h.x,u*=h.y,d*=h.x,f*=h.y,l+=R,u+=w,x=Ce(b),b=$o(x)}}return no({width:d,height:f,x:l,y:u})}function uo(e,t){const n=co(e).scrollLeft;return t?t.left+n:Ot(rt(e)).left+n}function ji(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-uo(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function uf(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=rt(o),c=t?so(t.floating):!1;if(o===i||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=et(1);const d=et(0),f=he(o);if((f||!f&&!s)&&((bt(o)!=="body"||dn(i))&&(l=co(o)),he(o))){const p=Ot(o);u=$t(o),d.x=p.x+o.clientLeft,d.y=p.y+o.clientTop}const g=i&&!f&&!s?ji(i,l):et(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+g.x,y:n.y*u.y-l.scrollTop*u.y+d.y+g.y}}function ff(e){return Array.from(e.getClientRects())}function df(e){const t=rt(e),n=co(e),o=e.ownerDocument.body,r=Ne(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=Ne(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+uo(e);const c=-n.scrollTop;return Ke(o).direction==="rtl"&&(i+=Ne(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:c}}const ns=25;function pf(e,t){const n=Ce(e),o=rt(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,c=0,l=0;if(r){s=r.width,i=r.height;const d=io();(!d||d&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const u=uo(o);if(u<=0){const d=o.ownerDocument,f=d.body,g=getComputedStyle(f),p=d.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,x=Math.abs(o.clientWidth-f.clientWidth-p);x<=ns&&(s-=x)}else u<=ns&&(s+=u);return{width:s,height:i,x:c,y:l}}const mf=new Set(["absolute","fixed"]);function gf(e,t){const n=Ot(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=he(e)?$t(e):et(1),i=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:i,height:c,x:l,y:u}}function os(e,t,n){let o;if(t==="viewport")o=pf(e,n);else if(t==="document")o=df(rt(e));else if(fe(t))o=gf(t,n);else{const r=Ti(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return no(o)}function _i(e,t){const n=nt(e);return n===t||!fe(n)||Je(n)?!1:Ke(n).position==="fixed"||_i(n,t)}function hf(e,t){const n=t.get(e);if(n)return n;let o=gt(e,[],!1).filter(c=>fe(c)&&bt(c)!=="body"),r=null;const s=Ke(e).position==="fixed";let i=s?nt(e):e;for(;fe(i)&&!Je(i);){const c=Ke(i),l=Zo(i);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&mf.has(r.position)||dn(i)&&!l&&_i(e,i))?o=o.filter(d=>d!==i):r=c,i=nt(i)}return t.set(e,o),o}function vf(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?so(t)?[]:hf(t,this._c):[].concat(n),o],c=i[0],l=i.reduce((u,d)=>{const f=os(t,d,r);return u.top=Ne(f.top,u.top),u.right=zt(f.right,u.right),u.bottom=zt(f.bottom,u.bottom),u.left=Ne(f.left,u.left),u},os(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function bf(e){const{width:t,height:n}=Pi(e);return{width:t,height:n}}function xf(e,t,n){const o=he(t),r=rt(t),s=n==="fixed",i=Ot(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=et(0);function u(){l.x=uo(r)}if(o||!o&&!s)if((bt(t)!=="body"||dn(r))&&(c=co(t)),o){const p=Ot(t,!0,s,t);l.x=p.x+t.clientLeft,l.y=p.y+t.clientTop}else r&&u();s&&!o&&r&&u();const d=r&&!o&&!s?ji(r,c):et(0),f=i.left+c.scrollLeft-l.x-d.x,g=i.top+c.scrollTop-l.y-d.y;return{x:f,y:g,width:i.width,height:i.height}}function To(e){return Ke(e).position==="static"}function rs(e,t){if(!he(e)||Ke(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return rt(e)===n&&(n=n.ownerDocument.body),n}function Ai(e,t){const n=Ce(e);if(so(e))return n;if(!he(e)){let r=nt(e);for(;r&&!Je(r);){if(fe(r)&&!To(r))return r;r=nt(r)}return n}let o=rs(e,t);for(;o&&oa(o)&&To(o);)o=rs(o,t);return o&&Je(o)&&To(o)&&!Zo(o)?n:o||aa(e)||n}const yf=async function(e){const t=this.getOffsetParent||Ai,n=this.getDimensions,o=await n(e.floating);return{reference:xf(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function wf(e){return Ke(e).direction==="rtl"}const Rf={convertOffsetParentRelativeRectToViewportRelativeRect:uf,getDocumentElement:rt,getClippingRect:vf,getOffsetParent:Ai,getElementRects:yf,getClientRects:ff,getDimensions:bf,getScale:$t,isElement:fe,isRTL:wf};function Di(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cf(e,t){let n=null,o;const r=rt(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function i(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:g,height:p}=u;if(c||t(),!g||!p)return;const x=Ft(f),b=Ft(r.clientWidth-(d+g)),h=Ft(r.clientHeight-(f+p)),v=Ft(d),R={rootMargin:-x+"px "+-b+"px "+-h+"px "+-v+"px",threshold:Ne(0,zt(1,l))||1};let w=!0;function E(S){const k=S[0].intersectionRatio;if(k!==l){if(!w)return i();k?i(!1,k):o=setTimeout(()=>{i(!1,1e-7)},1e3)}k===1&&!Di(u,e.getBoundingClientRect())&&i(),w=!1}try{n=new IntersectionObserver(E,{...R,root:r.ownerDocument})}catch{n=new IntersectionObserver(E,R)}n.observe(e)}return i(!0),s}function ss(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=dr(e),d=r||s?[...u?gt(u):[],...gt(t)]:[];d.forEach(v=>{r&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const f=u&&c?Cf(u,n):null;let g=-1,p=null;i&&(p=new ResizeObserver(v=>{let[y]=v;y&&y.target===u&&p&&(p.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var R;(R=p)==null||R.observe(t)})),n()}),u&&!l&&p.observe(u),p.observe(t));let x,b=l?Ot(e):null;l&&h();function h(){const v=Ot(e);b&&!Di(b,v)&&n(),b=v,x=requestAnimationFrame(h)}return n(),()=>{var v;d.forEach(y=>{r&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f==null||f(),(v=p)==null||v.disconnect(),p=null,l&&cancelAnimationFrame(x)}}const Ef=of,Sf=rf,Mf=ef,If=cf,kf=tf,Of=sf,Pf=(e,t,n)=>{const o=new Map,r={platform:Rf,...n},s={...r.platform,_c:o};return Ju(e,t,{...r,platform:s})};var Tf=typeof document<"u",jf=function(){},zn=Tf?a.useLayoutEffect:jf;function oo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!oo(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!oo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Ni(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function is(e,t){const n=Ni(e);return Math.round(t*n)/n}function jo(e){const t=a.useRef(e);return zn(()=>{t.current=e}),t}function _f(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=a.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[g,p]=a.useState(o);oo(g,o)||p(o);const[x,b]=a.useState(null),[h,v]=a.useState(null),y=a.useCallback(j=>{j!==S.current&&(S.current=j,b(j))},[]),R=a.useCallback(j=>{j!==k.current&&(k.current=j,v(j))},[]),w=s||x,E=i||h,S=a.useRef(null),k=a.useRef(null),D=a.useRef(d),U=l!=null,O=jo(l),_=jo(r),N=jo(u),I=a.useCallback(()=>{if(!S.current||!k.current)return;const j={placement:t,strategy:n,middleware:g};_.current&&(j.platform=_.current),Pf(S.current,k.current,j).then(M=>{const q={...M,isPositioned:N.current!==!1};W.current&&!oo(D.current,q)&&(D.current=q,Ht.flushSync(()=>{f(q)}))})},[g,t,n,_,N]);zn(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,f(j=>({...j,isPositioned:!1})))},[u]);const W=a.useRef(!1);zn(()=>(W.current=!0,()=>{W.current=!1}),[]),zn(()=>{if(w&&(S.current=w),E&&(k.current=E),w&&E){if(O.current)return O.current(w,E,I);I()}},[w,E,I,O,U]);const $=a.useMemo(()=>({reference:S,floating:k,setReference:y,setFloating:R}),[y,R]),T=a.useMemo(()=>({reference:w,floating:E}),[w,E]),A=a.useMemo(()=>{const j={position:n,left:0,top:0};if(!T.floating)return j;const M=is(T.floating,d.x),q=is(T.floating,d.y);return c?{...j,transform:"translate("+M+"px, "+q+"px)",...Ni(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:M,top:q}},[n,c,T.floating,d.x,d.y]);return a.useMemo(()=>({...d,update:I,refs:$,elements:T,floatingStyles:A}),[d,I,$,T,A])}const Af=(e,t)=>({...Ef(e),options:[e,t]}),Df=(e,t)=>({...Sf(e),options:[e,t]}),Nf=(e,t)=>({...Of(e),options:[e,t]}),Lf=(e,t)=>({...Mf(e),options:[e,t]}),Ff=(e,t)=>({...If(e),options:[e,t]}),Bf=(e,t)=>({...kf(e),options:[e,t]});function $f(e={}){const{nodeId:t}=e,n=rr({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,r=o.elements,[s,i]=a.useState(null),[c,l]=a.useState(null),d=(r==null?void 0:r.domReference)||s,f=a.useRef(null),g=$e();oe(()=>{d&&(f.current=d)},[d]);const p=_f({...e,elements:{...r,...c&&{reference:c}}}),x=a.useCallback(R=>{const w=fe(R)?{getBoundingClientRect:()=>R.getBoundingClientRect(),getClientRects:()=>R.getClientRects(),contextElement:R}:R;l(w),p.refs.setReference(w)},[p.refs]),b=a.useCallback(R=>{(fe(R)||R===null)&&(f.current=R,i(R)),(fe(p.refs.reference.current)||p.refs.reference.current===null||R!==null&&!fe(R))&&p.refs.setReference(R)},[p.refs]),h=a.useMemo(()=>({...p.refs,setReference:b,setPositionReference:x,domReference:f}),[p.refs,b,x]),v=a.useMemo(()=>({...p.elements,domReference:d}),[p.elements,d]),y=a.useMemo(()=>({...p,...o,refs:h,elements:v,nodeId:t}),[p,h,v,t,o]);return oe(()=>{o.dataRef.current.floatingContext=y;const R=g==null?void 0:g.nodesRef.current.find(w=>w.id===t);R&&(R.context=y)}),a.useMemo(()=>({...p,context:y,refs:h,elements:v}),[p,h,v,y])}const _o=ka&&Ds;function Vf(e,t={}){const{open:n,onOpenChange:o,events:r,dataRef:s,elements:i}=e,{enabled:c=!0,visibleOnly:l=!0}=t,u=a.useRef(!1),d=Le(),f=a.useRef(!0);a.useEffect(()=>{if(!c)return;const p=Ce(i.domReference);function x(){!n&&he(i.domReference)&&i.domReference===Qe(xe(i.domReference))&&(u.current=!0)}function b(){f.current=!0}function h(){f.current=!1}return p.addEventListener("blur",x),_o&&(p.addEventListener("keydown",b,!0),p.addEventListener("pointerdown",h,!0)),()=>{p.removeEventListener("blur",x),_o&&(p.removeEventListener("keydown",b,!0),p.removeEventListener("pointerdown",h,!0))}},[i.domReference,n,c]),a.useEffect(()=>{if(!c)return;function p(x){(x.reason==="trigger-press"||x.reason==="escape-key")&&(u.current=!0)}return r.on("openchange",p),()=>{r.off("openchange",p)}},[r,c]);const g=a.useMemo(()=>({onMouseLeave(){u.current=!1},onFocus(p){if(u.current)return;const x=ze(p.nativeEvent);if(l&&fe(x)){if(_o&&!p.relatedTarget){if(!f.current&&!tr(x))return}else if(!Aa(x))return}o(!0,ue("trigger-focus",p.nativeEvent))},onBlur(p){u.current=!1;const x=p.relatedTarget,b=p.nativeEvent,h=fe(x)&&x.hasAttribute(Ut("focus-guard"))&&x.getAttribute("data-type")==="outside";d.start(0,()=>{var v;const y=Qe(i.domReference?i.domReference.ownerDocument:document);!x&&y===i.domReference||ge((v=s.current.floatingContext)==null?void 0:v.refs.floating.current,y)||ge(i.domReference,y)||h||o(!1,ue("trigger-focus",b))})}}),[s,i.domReference,o,l,d]);return a.useMemo(()=>c?{reference:g}:{},[c,g])}const Uf="Escape";function fo(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Bn(e,t){return fo(t,e===er||e===mn,e===ht||e===vt)}function Ao(e,t,n){return fo(t,e===mn,n?e===ht:e===vt)||e==="Enter"||e===" "||e===""}function Wf(e,t,n){return fo(t,n?e===ht:e===vt,e===mn)}function zf(e,t,n,o){const r=n?e===vt:e===ht,s=e===er;return t==="both"||t==="horizontal"&&o&&o>1?e===Uf:fo(t,r,s)}function Hf(e,t){const{open:n,onOpenChange:o,elements:r}=e,{listRef:s,activeIndex:i,onNavigate:c=()=>{},enabled:l=!0,selectedIndex:u=null,allowEscape:d=!1,loop:f=!1,nested:g=!1,rtl:p=!1,virtual:x=!1,focusItemOnOpen:b="auto",focusItemOnHover:h=!0,openOnArrowKeyDown:v=!0,disabledIndices:y=void 0,orientation:R="vertical",parentOrientation:w,cols:E=1,scrollItemIntoView:S=!0,itemSizes:k,dense:D=!1,id:U}=t,O=Gn(r.floating),_=ye(O),N=xt(),I=$e();oe(()=>{e.dataRef.current.orientation=R},[e,R]);const W=Wo(r.domReference),$=a.useRef(b),T=a.useRef(u??-1),A=a.useRef(null),j=a.useRef(!0),M=J(P=>{c(T.current===-1?null:T.current,P)}),q=a.useRef(M),ce=a.useRef(!!r.floating),X=a.useRef(n),L=a.useRef(!1),re=a.useRef(!1),se=ye(y),C=ye(n),B=ye(S),Z=ye(u),K=J(()=>{function P(ae){x?I==null||I.events.emit("virtualfocus",ae):Wn(ae,{sync:L.current,preventScroll:!0})}const G=s.current[T.current],F=re.current;G&&P(G),(L.current?ae=>ae():requestAnimationFrame)(()=>{var ae;const ie=s.current[T.current]||G;if(!ie)return;G||P(ie);const me=B.current;me&&H&&(F||!j.current)&&((ae=ie.scrollIntoView)==null||ae.call(ie,typeof me=="boolean"?{block:"nearest",inline:"nearest"}:me))})});oe(()=>{l&&(n&&r.floating?$.current&&u!=null&&(re.current=!0,T.current=u,M()):ce.current&&(T.current=-1,q.current()))},[l,n,r.floating,u,M]),oe(()=>{if(l){if(!n){L.current=!1;return}if(r.floating)if(i==null){if(L.current=!1,Z.current!=null)return;if(ce.current&&(T.current=-1,K()),(!X.current||!ce.current)&&$.current&&(A.current!=null||$.current===!0&&A.current==null)){let P=0;const G=()=>{s.current[0]==null?(P<2&&(P?requestAnimationFrame:queueMicrotask)(G),P+=1):(T.current=A.current==null||Ao(A.current,R,p)||g?ko(s,se.current):Zr(s,se.current),A.current=null,M())};G()}}else cn(s,i)||(T.current=i,K(),re.current=!1)}},[l,n,r.floating,i,Z,g,s,R,p,M,K,se]),oe(()=>{var P,G;if(!l||r.floating||!I||x||!ce.current)return;const F=I.nodesRef.current,Q=(G=(P=F.find(me=>me.id===N))==null?void 0:P.context)==null?void 0:G.elements.floating,ae=Qe(xe(r.floating)),ie=F.some(me=>me.context&&ge(me.context.elements.floating,ae));Q&&!ie&&j.current&&Q.focus({preventScroll:!0})},[l,r.floating,I,N,x]),oe(()=>{q.current=M,X.current=n,ce.current=!!r.floating}),oe(()=>{n||(A.current=null,$.current=b)},[n,b]);const V=i!=null,H=a.useMemo(()=>{function P(F){if(!C.current)return;const Q=s.current.indexOf(F.currentTarget);Q!==-1&&T.current!==Q&&(T.current=Q,M(F))}return{onFocus(F){L.current=!0,P(F)},onClick:({currentTarget:F})=>F.focus({preventScroll:!0}),onMouseMove(F){L.current=!0,re.current=!1,h&&P(F)},onPointerLeave(F){var Q;if(!j.current||F.pointerType==="touch")return;L.current=!0;const ae=F.relatedTarget;!h||s.current.includes(ae)||(T.current=-1,M(F),x||(Q=_.current)==null||Q.focus({preventScroll:!0}))}}},[C,_,h,s,M,x]),Y=a.useCallback(()=>{var P,G,F;return w??((F=(G=(P=I==null?void 0:I.nodesRef.current.find(Q=>Q.id===N))==null?void 0:P.context)==null?void 0:G.dataRef)==null?void 0:F.current.orientation)},[N,I,w]),z=J(P=>{if(j.current=!1,L.current=!0,P.which===229||!C.current&&P.currentTarget===_.current)return;if(g&&zf(P.key,R,p,E)){Bn(P.key,Y())||Me(P),o(!1,ue("list-navigation",P.nativeEvent)),he(r.domReference)&&(x?I==null||I.events.emit("virtualfocus",r.domReference):r.domReference.focus());return}const G=T.current,F=ko(s,y),Q=Zr(s,y);if(W||(P.key==="Home"&&(Me(P),T.current=F,M(P)),P.key==="End"&&(Me(P),T.current=Q,M(P))),E>1){const ae=k||Array.from({length:s.current.length},()=>({width:1,height:1})),ie=Yu(ae,E,D),me=ie.findIndex(we=>we!=null&&!an(s,we,y)),Ae=ie.reduce((we,Pe,Ye)=>Pe!=null&&!an(s,Pe,y)?Ye:we,-1),Ve=ie[qu({current:ie.map(we=>we!=null?s.current[we]:null)},{event:P,orientation:R,loop:f,rtl:p,cols:E,disabledIndices:Zu([...(typeof y!="function"?y:null)||s.current.map((we,Pe)=>an(s,Pe,y)?Pe:void 0),void 0],ie),minIndex:me,maxIndex:Ae,prevIndex:Xu(T.current>Q?F:T.current,ae,ie,E,P.key===mn?"bl":P.key===(p?ht:vt)?"tr":"tl"),stopEvent:!0})];if(Ve!=null&&(T.current=Ve,M(P)),R==="both")return}if(Bn(P.key,R)){if(Me(P),n&&!x&&Qe(P.currentTarget.ownerDocument)===P.currentTarget){T.current=Ao(P.key,R,p)?F:Q,M(P);return}Ao(P.key,R,p)?f?G>=Q?d&&G!==s.current.length?T.current=-1:(L.current=!1,T.current=F):T.current=Se(s,{startingIndex:G,disabledIndices:y}):T.current=Math.min(Q,Se(s,{startingIndex:G,disabledIndices:y})):f?G<=F?d&&G!==-1?T.current=s.current.length:(L.current=!1,T.current=Q):T.current=Se(s,{startingIndex:G,decrement:!0,disabledIndices:y}):T.current=Math.max(F,Se(s,{startingIndex:G,decrement:!0,disabledIndices:y})),cn(s,T.current)&&(T.current=-1),M(P)}}),te=a.useMemo(()=>x&&n&&V&&{"aria-activedescendant":`${U}-${i}`},[x,n,V,U,i]),ne=a.useMemo(()=>({"aria-orientation":R==="both"?void 0:R,...W?{}:te,onKeyDown(P){if(P.key==="Tab"&&P.shiftKey&&n&&!x){Me(P),o(!1,ue("list-navigation",P.nativeEvent)),he(r.domReference)&&r.domReference.focus();return}z(P)},onPointerMove(){j.current=!0}}),[te,z,R,W,o,n,x,r.domReference]),ee=a.useMemo(()=>{function P(F){b==="auto"&&Bs(F.nativeEvent)&&($.current=!x)}function G(F){$.current=b,b==="auto"&&$s(F.nativeEvent)&&($.current=!0)}return{...te,onKeyDown(F){j.current=!1;const Q=F.key.startsWith("Arrow"),ae=Wf(F.key,Y(),p),ie=Bn(F.key,R),me=(g?ae:ie)||F.key==="Enter"||F.key.trim()==="";if(x&&n)return z(F);if(!(!n&&!v&&Q)){if(me){const Ae=Bn(F.key,Y());A.current=g&&Ae?null:F.key}if(g){ae&&(Me(F),n?(T.current=ko(s,se.current),M(F)):o(!0,ue("list-navigation",F.nativeEvent)));return}ie&&(u!=null&&(T.current=u),Me(F),!n&&v?o(!0,ue("list-navigation",F.nativeEvent)):z(F),n&&M(F))}},onFocus(F){n&&!x&&(T.current=-1,M(F))},onPointerDown:G,onPointerEnter:G,onMouseDown:P,onClick:P}},[te,z,se,b,s,g,M,o,n,v,R,Y,p,u,x]);return a.useMemo(()=>l?{reference:ee,floating:ne,item:H}:{},[l,ee,ne,H])}function Gf(e,t){var n;const{open:o,dataRef:r}=e,{listRef:s,activeIndex:i,onMatch:c,onTypingChange:l,enabled:u=!0,findMatch:d=null,resetMs:f=750,ignoreKeys:g=[],selectedIndex:p=null}=t,x=Le(),b=a.useRef(""),h=a.useRef((n=p??i)!=null?n:-1),v=a.useRef(null),y=J(c),R=J(l),w=ye(d),E=ye(g);oe(()=>{o&&(x.clear(),v.current=null,b.current="")},[o,x]),oe(()=>{var O;o&&b.current===""&&(h.current=(O=p??i)!=null?O:-1)},[o,p,i]);const S=J(O=>{O?r.current.typing||(r.current.typing=O,R(O)):r.current.typing&&(r.current.typing=O,R(O))}),k=J(O=>{function _(T,A,j){const M=w.current?w.current(A,j):A.find(q=>(q==null?void 0:q.toLocaleLowerCase().indexOf(j.toLocaleLowerCase()))===0);return M?T.indexOf(M):-1}const N=s.current;if(b.current.length>0&&b.current[0]!==" "&&(_(N,N,b.current)===-1?S(!1):O.key===" "&&Me(O)),N==null||E.current.includes(O.key)||O.key.length!==1||O.ctrlKey||O.metaKey||O.altKey)return;o&&O.key!==" "&&(Me(O),S(!0)),N.every(T=>{var A,j;return T?((A=T[0])==null?void 0:A.toLocaleLowerCase())!==((j=T[1])==null?void 0:j.toLocaleLowerCase()):!0})&&b.current===O.key&&(b.current="",h.current=v.current),b.current+=O.key,x.start(f,()=>{b.current="",h.current=v.current,S(!1)});const W=h.current,$=_(N,[...N.slice((W||0)+1),...N.slice(0,(W||0)+1)],b.current);$!==-1?(y($),v.current=$):O.key!==" "&&(b.current="",S(!1))}),D=a.useMemo(()=>({onKeyDown:k}),[k]),U=a.useMemo(()=>({onKeyDown:k,onKeyUp(O){O.key===" "&&S(!1)}}),[k,S]);return a.useMemo(()=>u?{reference:D,floating:U}:{},[u,D,U])}function cs(e,t){const[n,o]=e;let r=!1;const s=t.length;for(let i=0,c=s-1;i<s;c=i++){const[l,u]=t[i]||[0,0],[d,f]=t[c]||[0,0];u>=o!=f>=o&&n<=(d-l)*(o-u)/(f-u)+l&&(r=!r)}return r}function Kf(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function qf(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:o=!0}=e,r=new kt;let s=!1,i=null,c=null,l=typeof performance<"u"?performance.now():0;function u(f,g){const p=performance.now(),x=p-l;if(i===null||c===null||x===0)return i=f,c=g,l=p,null;const b=f-i,h=g-c,y=Math.sqrt(b*b+h*h)/x;return i=f,c=g,l=p,y}const d=({x:f,y:g,placement:p,elements:x,onClose:b,nodeId:h,tree:v})=>function(R){function w(){r.clear(),b()}if(r.clear(),!x.domReference||!x.floating||p==null||f==null||g==null)return;const{clientX:E,clientY:S}=R,k=[E,S],D=ze(R),U=R.type==="mouseleave",O=ge(x.floating,D),_=ge(x.domReference,D),N=x.domReference.getBoundingClientRect(),I=x.floating.getBoundingClientRect(),W=p.split("-")[0],$=f>I.right-I.width/2,T=g>I.bottom-I.height/2,A=Kf(k,N),j=I.width>N.width,M=I.height>N.height,q=(j?N:I).left,ce=(j?N:I).right,X=(M?N:I).top,L=(M?N:I).bottom;if(O&&(s=!0,!U))return;if(_&&(s=!1),_&&!U){s=!0;return}if(U&&fe(R.relatedTarget)&&ge(x.floating,R.relatedTarget)||v&&It(v.nodesRef.current,h).some(({context:C})=>C==null?void 0:C.open))return;if(W==="top"&&g>=N.bottom-1||W==="bottom"&&g<=N.top+1||W==="left"&&f>=N.right-1||W==="right"&&f<=N.left+1)return w();let re=[];switch(W){case"top":re=[[q,N.top+1],[q,I.bottom-1],[ce,I.bottom-1],[ce,N.top+1]];break;case"bottom":re=[[q,I.top+1],[q,N.bottom-1],[ce,N.bottom-1],[ce,I.top+1]];break;case"left":re=[[I.right-1,L],[I.right-1,X],[N.left+1,X],[N.left+1,L]];break;case"right":re=[[N.right-1,L],[N.right-1,X],[I.left+1,X],[I.left+1,L]];break}function se([C,B]){switch(W){case"top":{const Z=[j?C+t/2:$?C+t*4:C-t*4,B+t+1],K=[j?C-t/2:$?C+t*4:C-t*4,B+t+1],V=[[I.left,$||j?I.bottom-t:I.top],[I.right,$?j?I.bottom-t:I.top:I.bottom-t]];return[Z,K,...V]}case"bottom":{const Z=[j?C+t/2:$?C+t*4:C-t*4,B-t],K=[j?C-t/2:$?C+t*4:C-t*4,B-t],V=[[I.left,$||j?I.top+t:I.bottom],[I.right,$?j?I.top+t:I.bottom:I.top+t]];return[Z,K,...V]}case"left":{const Z=[C+t+1,M?B+t/2:T?B+t*4:B-t*4],K=[C+t+1,M?B-t/2:T?B+t*4:B-t*4];return[...[[T||M?I.right-t:I.left,I.top],[T?M?I.right-t:I.left:I.right-t,I.bottom]],Z,K]}case"right":{const Z=[C-t,M?B+t/2:T?B+t*4:B-t*4],K=[C-t,M?B-t/2:T?B+t*4:B-t*4],V=[[T||M?I.left+t:I.right,I.top],[T?M?I.left+t:I.right:I.left+t,I.bottom]];return[Z,K,...V]}default:return[]}}if(!cs([E,S],re)){if(s&&!A)return w();if(!U&&o){const C=u(R.clientX,R.clientY);if(C!==null&&C<.1)return w()}cs([E,S],se([f,g]))?!s&&o&&r.start(40,w):w()}};return d.__options={blockPointerEvents:n},d}const Yf=e=>({name:"arrow",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,rects:c,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:g=0,offsetParent:p="real"}=ut(e,t)||{};if(f==null)return{};const x=ki(g),b={x:r,y:s},h=fr(i),v=ur(h),y=await l.getDimensions(f),R=h==="y",w=R?"top":"left",E=R?"bottom":"right",S=R?"clientHeight":"clientWidth",k=c.reference[v]+c.reference[h]-b[h]-c.floating[v],D=b[h]-c.reference[h],U=p==="real"?await((n=l.getOffsetParent)==null?void 0:n.call(l,f)):u.floating;let O=u.floating[S]||c.floating[v];(!O||!await((o=l.isElement)==null?void 0:o.call(l,U)))&&(O=u.floating[S]||c.floating[v]);const _=k/2-D/2,N=O/2-y[v]/2-1,I=Math.min(x[w],N),W=Math.min(x[E],N),$=I,T=O-y[v]-W,A=O/2-y[v]/2+_,j=Ko($,A,T),M=!d.arrow&&yt(i)!=null&&A!==j&&c.reference[v]/2-(A<$?I:W)-y[v]/2<0,q=M?A<$?A-$:A-T:0;return{[h]:b[h]+q,data:{[h]:j,centerOffset:A-j-q,...M&&{alignmentOffset:q}},reset:M}}}),Xf=(e,t)=>({...Yf(e),options:[e,t]});function Li(e,t,n){const o=e==="inline-start"||e==="inline-end";return{top:"top",right:o?n?"inline-start":"inline-end":"right",bottom:"bottom",left:o?n?"inline-end":"inline-start":"left"}[t]}function as(e,t,n){const{rects:o,placement:r}=e;return{side:Li(t,Fe(r),n),align:yt(r)||"center",anchor:{width:o.reference.width,height:o.reference.height},positioner:{width:o.floating.width,height:o.floating.height}}}function Zf(e){var t,n;const{anchor:o,positionMethod:r="absolute",side:s="bottom",sideOffset:i=0,align:c="center",alignOffset:l=0,collisionBoundary:u,collisionPadding:d=5,sticky:f=!1,arrowPadding:g=5,trackAnchor:p=!0,keepMounted:x=!1,floatingRootContext:b,mounted:h,collisionAvoidance:v,shiftCrossAxis:y=!1,nodeId:R,adaptiveOrigin:w,lazyFlip:E=!1}=e,[S,k]=a.useState(null);!h&&S!==null&&k(null);const D=v.side||"flip",U=v.align||"flip",O=v.fallbackAxisSide||"end",_=typeof o=="function"?o:void 0,N=J(_),I=_?N:o,W=ye(o),T=Ii()==="rtl",A=S||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":T?"left":"right","inline-start":T?"right":"left"}[s],j=c==="center"?A:`${A}-${c}`;let M=d;const q=1,ce=s==="bottom"?q:0,X=s==="top"?q:0,L=s==="right"?q:0,re=s==="left"?q:0;typeof M=="number"?M={top:M+ce,right:M+re,bottom:M+X,left:M+L}:M&&(M={top:(M.top||0)+ce,right:(M.right||0)+re,bottom:(M.bottom||0)+X,left:(M.left||0)+L});const se={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:M},C=a.useRef(null),B=ye(i),Z=ye(l),H=[Af(de=>{const be=as(de,s,T),Ue=typeof B.current=="function"?B.current(be):B.current,Ee=typeof Z.current=="function"?Z.current(be):Z.current;return{mainAxis:Ue,crossAxis:Ee,alignmentAxis:Ee}},[typeof i!="function"?i:0,typeof l!="function"?l:0,T,s])],Y=U==="none"&&D!=="shift",z=!Y&&(f||y||D==="shift"),te=D==="none"?null:Lf({...se,padding:{top:M.top+q,right:M.right+q,bottom:M.bottom+q,left:M.left+q},mainAxis:!y&&D==="flip",crossAxis:U==="flip"?"alignment":!1,fallbackAxisSideDirection:O}),ne=Y?null:Df(de=>{const be=lt(de.elements.floating).documentElement;return{...se,rootBoundary:y?{x:0,y:0,width:be.clientWidth,height:be.clientHeight}:void 0,mainAxis:U!=="none",crossAxis:z,limiter:f||y?void 0:Nf(Ue=>{if(!C.current)return{};const{width:Ee,height:dt}=C.current.getBoundingClientRect(),qe=He(Fe(Ue.placement)),At=qe==="y"?Ee:dt,Rt=qe==="y"?M.left+M.right:M.top+M.bottom;return{offset:At/2+Rt/2}})}},[se,f,y,M,U]);D==="shift"||U==="shift"||c==="center"?H.push(ne,te):H.push(te,ne),H.push(Ff({...se,apply({elements:{floating:de},rects:{reference:be},availableWidth:Ue,availableHeight:Ee}){Object.entries({"--available-width":`${Ue}px`,"--available-height":`${Ee}px`,"--anchor-width":`${be.width}px`,"--anchor-height":`${be.height}px`}).forEach(([dt,qe])=>{de.style.setProperty(dt,qe)})}}),Xf(()=>({element:C.current||document.createElement("div"),padding:g,offsetParent:"floating"}),[g]),Bf(),{name:"transformOrigin",fn(de){var be,Ue,Ee;const{elements:dt,middlewareData:qe,placement:At,rects:Rt,y:In}=de,kn=Fe(At),On=He(kn),le=C.current,We=((be=qe.arrow)==null?void 0:be.x)||0,Ie=((Ue=qe.arrow)==null?void 0:Ue.y)||0,ho=(le==null?void 0:le.clientWidth)||0,pt=(le==null?void 0:le.clientHeight)||0,Dt=We+ho/2,Pn=Ie+pt/2,Tn=Math.abs(((Ee=qe.shift)==null?void 0:Ee.y)||0),Ct=Rt.reference.height/2,en=typeof i=="function"?i(as(de,s,T)):i,hc=Tn>en,vc={top:`${Dt}px calc(100% + ${en}px)`,bottom:`${Dt}px ${-en}px`,left:`calc(100% + ${en}px) ${Pn}px`,right:`${-en}px ${Pn}px`}[kn],bc=`${Dt}px ${Rt.reference.y+Ct-In}px`;return dt.floating.style.setProperty("--transform-origin",z&&On==="y"&&hc?bc:vc),{}}},w);let ee=b;!h&&b&&(ee={...b,elements:{reference:null,floating:null,domReference:null}});const P=a.useMemo(()=>({elementResize:p&&typeof ResizeObserver<"u",layoutShift:p&&typeof IntersectionObserver<"u"}),[p]),{refs:G,elements:F,x:Q,y:ae,middlewareData:ie,update:me,placement:Ae,context:Ve,isPositioned:we,floatingStyles:Pe}=$f({rootContext:ee,placement:j,middleware:H,strategy:r,whileElementsMounted:x?void 0:(...de)=>ss(...de,P),nodeId:R}),{sideX:Ye,sideY:De}=ie.adaptiveOrigin||{},Rn=a.useMemo(()=>w?{position:r,[Ye]:`${Q}px`,[De]:`${ae}px`}:Pe,[w,Ye,De,r,Q,ae,Pe]),_t=a.useRef(null);oe(()=>{if(!h)return;const de=W.current,be=typeof de=="function"?de():de,Ee=(ls(be)?be.current:be)||null||null;Ee!==_t.current&&(G.setPositionReference(Ee),_t.current=Ee)},[h,G,I,W]),a.useEffect(()=>{if(!h)return;const de=W.current;typeof de!="function"&&ls(de)&&de.current!==_t.current&&(G.setPositionReference(de.current),_t.current=de.current)},[h,G,I,W]),a.useEffect(()=>{if(x&&h&&F.domReference&&F.floating)return ss(F.domReference,F.floating,me,P)},[x,h,F,me,P]);const wt=Fe(Ae),Cn=Li(s,wt,T),En=yt(Ae)||"center",Sn=!!((t=ie.hide)!=null&&t.referenceHidden);oe(()=>{E&&h&&we&&k(wt)},[E,h,we,wt]);const Mn=a.useMemo(()=>{var de,be;return{position:"absolute",top:(de=ie.arrow)==null?void 0:de.y,left:(be=ie.arrow)==null?void 0:be.x}},[ie.arrow]),Jt=((n=ie.arrow)==null?void 0:n.centerOffset)!==0;return a.useMemo(()=>({positionerStyles:Rn,arrowStyles:Mn,arrowRef:C,arrowUncentered:Jt,side:Cn,align:En,physicalSide:wt,anchorHidden:Sn,refs:G,context:Ve,isPositioned:we,update:me}),[Rn,Mn,C,Jt,Cn,En,wt,Sn,G,Ve,we,me])}function ls(e){return e!=null&&"current"in e}const Qf=a.createContext(void 0);function po(e=!0){const t=a.useContext(Qf);if(t===void 0&&!e)throw new Error("Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.");return t}const Fi=a.createContext(void 0);function bn(e){const t=a.useContext(Fi);if(t===void 0&&!e)throw new Error("Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.");return t}const Bi=a.createContext(void 0);function st(e){const t=a.useContext(Bi);if(t===void 0&&!e)throw new Error("Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.");return t}const Jf={...hn,...pn},ed=a.forwardRef(function(t,n){const{className:o,render:r,...s}=t,{open:i,mounted:c,transitionStatus:l,lastOpenChangeReason:u}=st(),d=po(),f=a.useMemo(()=>({open:i,transitionStatus:l}),[i,l]);return ve("div",t,{ref:d!=null&&d.backdropRef?[n,d.backdropRef]:n,state:f,stateAttributesMapping:Jf,props:[{role:"presentation",hidden:!c,style:{pointerEvents:u==="trigger-hover"?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},s]})}),$i=a.createContext(void 0);function td(){const e=a.useContext($i);if(e===void 0)throw new Error("Base UI: MenuCheckboxItemContext is missing. MenuCheckboxItem parts must be placed within <Menu.CheckboxItem>.");return e}const pr={type:"regular-item"};function mo(e){const{closeOnClick:t,disabled:n=!1,highlighted:o,id:r,menuEvents:s,allowMouseUpTriggerRef:i,typingRef:c,nativeButton:l,itemMetadata:u,nodeId:d}=e,f=a.useRef(null),p=po(!0)!==void 0,{getButtonProps:x,buttonRef:b}=Qo({disabled:n,focusableWhenDisabled:!0,native:l}),h=a.useCallback(y=>Gt({id:r,role:"menuitem",tabIndex:o?0:-1,onMouseMove(R){d&&s.emit("itemhover",{nodeId:d,target:R.currentTarget})},onMouseEnter(){u.type==="submenu-trigger"&&u.setActive()},onKeyUp(R){R.key===" "&&c.current&&R.preventBaseUIHandler()},onClick(R){t&&s.emit("close",{domEvent:R,reason:"item-press"})},onMouseUp(R){f.current&&i.current&&(!p||R.button===2)&&u.type==="regular-item"&&f.current.click()}},y,x),[r,o,x,c,t,s,i,p,u,d]),v=tt(f,b);return a.useMemo(()=>({getItemProps:h,itemRef:v}),[h,v])}let us=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.disabled="data-disabled",e.highlighted="data-highlighted",e})({});const go={checked(e){return e?{[us.checked]:""}:{[us.unchecked]:""}},...pn},nd=a.memo(a.forwardRef(function(t,n){const{checked:o,defaultChecked:r,onCheckedChange:s,className:i,closeOnClick:c,disabled:l=!1,highlighted:u,id:d,menuEvents:f,itemProps:g,render:p,allowMouseUpTriggerRef:x,typingRef:b,nativeButton:h,nodeId:v,...y}=t,[R,w]=ar({controlled:o,default:r??!1,name:"MenuCheckboxItem",state:"checked"}),{getItemProps:E,itemRef:S}=mo({closeOnClick:c,disabled:l,highlighted:u,id:d,menuEvents:f,allowMouseUpTriggerRef:x,typingRef:b,nativeButton:h,nodeId:v,itemMetadata:pr}),k=a.useMemo(()=>({disabled:l,highlighted:u,checked:R}),[l,u,R]),D=ve("div",t,{state:k,stateAttributesMapping:go,props:[g,{role:"menuitemcheckbox","aria-checked":R,onClick(U){const O=ue("item-press",U.nativeEvent);s==null||s(!R,O),!O.isCanceled&&w(_=>!_)}},y,E],ref:[S,n]});return m.jsx($i.Provider,{value:k,children:D})})),od=a.forwardRef(function(t,n){const{id:o,label:r,closeOnClick:s=!1,nativeButton:i=!1,...c}=t,l=a.useRef(null),u=vn({label:r}),d=tt(n,u.ref,l),{itemProps:f,activeIndex:g,allowMouseUpTriggerRef:p,typingRef:x}=st(),b=bn(!0),h=Tt(o),v=u.index===g,{events:y}=$e();return m.jsx(nd,{...c,id:h,ref:d,highlighted:v,menuEvents:y,itemProps:f,allowMouseUpTriggerRef:p,typingRef:x,closeOnClick:s,nativeButton:i,nodeId:b==null?void 0:b.floatingContext.nodeId})}),rd=a.forwardRef(function(t,n){const{render:o,className:r,keepMounted:s=!1,...i}=t,c=td(),l=a.useRef(null),{transitionStatus:u,setMounted:d}=ao(c.checked);Yt({open:c.checked,ref:l,onComplete(){c.checked||d(!1)}});const f=a.useMemo(()=>({checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:u}),[c.checked,c.disabled,c.highlighted,u]);return ve("span",t,{state:f,ref:[n,l],stateAttributesMapping:go,props:{"aria-hidden":!0,...i},enabled:s||c.checked})}),Vi=a.createContext(void 0);function sd(){const e=a.useContext(Vi);if(e===void 0)throw new Error("Base UI: MenuGroupRootContext is missing. Menu group parts must be used within <Menu.Group>.");return e}const id=a.forwardRef(function(t,n){const{render:o,className:r,...s}=t,[i,c]=a.useState(void 0),l=a.useMemo(()=>({setLabelId:c}),[c]),u=ve("div",t,{ref:n,props:{role:"group","aria-labelledby":i,...s}});return m.jsx(Vi.Provider,{value:l,children:u})}),cd=a.forwardRef(function(t,n){const{className:o,render:r,id:s,...i}=t,c=Tt(s),{setLabelId:l}=sd();return oe(()=>(l(c),()=>{l(void 0)}),[l,c]),ve("div",t,{ref:n,props:{id:c,role:"presentation",...i}})}),ad=a.memo(a.forwardRef(function(t,n){const{className:o,closeOnClick:r=!0,disabled:s=!1,highlighted:i,id:c,menuEvents:l,itemProps:u,render:d,allowMouseUpTriggerRef:f,typingRef:g,nativeButton:p,nodeId:x,...b}=t,{getItemProps:h,itemRef:v}=mo({closeOnClick:r,disabled:s,highlighted:i,id:c,menuEvents:l,allowMouseUpTriggerRef:f,typingRef:g,nativeButton:p,nodeId:x,itemMetadata:pr}),y=a.useMemo(()=>({disabled:s,highlighted:i}),[s,i]);return ve("div",t,{state:y,ref:[v,n],props:[u,b,h]})})),ld=a.forwardRef(function(t,n){const{id:o,label:r,nativeButton:s=!1,...i}=t,c=a.useRef(null),l=vn({label:r}),u=tt(n,l.ref,c),{itemProps:d,activeIndex:f,allowMouseUpTriggerRef:g,typingRef:p}=st(),x=bn(!0),b=Tt(o),h=l.index===f,{events:v}=$e();return m.jsx(ad,{...i,id:b,ref:u,highlighted:h,menuEvents:v,itemProps:d,allowMouseUpTriggerRef:g,typingRef:p,nativeButton:s,nodeId:x==null?void 0:x.floatingContext.nodeId})}),ud=a.createContext(void 0);function fd(e){return a.useContext(ud)}const dd={...hn,...pn},pd=a.forwardRef(function(t,n){const{render:o,className:r,finalFocus:s,...i}=t,{open:c,setOpen:l,popupRef:u,transitionStatus:d,popupProps:f,mounted:g,instantType:p,triggerElement:x,onOpenChangeComplete:b,parent:h,lastOpenChangeReason:v,rootId:y}=st(),{side:R,align:w,floatingContext:E}=bn(),S=fd()!=null;Yt({open:c,ref:u,onComplete(){c&&(b==null||b(!0))}});const{events:k}=$e();a.useEffect(()=>{function _(N){l(!1,ue(N.reason,N.domEvent))}return k.on("close",_),()=>{k.off("close",_)}},[k,l]);const D=a.useMemo(()=>({transitionStatus:d,side:R,align:w,open:c,nested:h.type==="menu",instant:p}),[d,R,w,c,h.type,p]),U=ve("div",t,{state:D,ref:[n,u],stateAttributesMapping:dd,props:[f,{onKeyDown(_){S&&oi.has(_.key)&&_.stopPropagation()}},d==="starting"?xa:je,i,{"data-rootownerid":y}]});let O=h.type===void 0||h.type==="context-menu";return(x||h.type==="menubar"&&v!=="outside-press")&&(O=!0),m.jsx(di,{context:E,modal:!1,disabled:!g,returnFocus:s===void 0?O:s,initialFocus:h.type!=="menu",restoreFocus:!0,children:U})}),Ui=a.createContext(void 0);function md(){const e=a.useContext(Ui);if(e===void 0)throw new Error("Base UI: <Menu.Portal> is missing.");return e}function gd(e){const{children:t,keepMounted:n=!1,container:o}=e,{mounted:r}=st();return r||n?m.jsx(Ui.Provider,{value:n,children:m.jsx(fi,{root:o,children:t})}):null}const hd=a.forwardRef(function(t,n){var o,r,s,i;const{anchor:c,positionMethod:l="absolute",className:u,render:d,side:f,align:g,sideOffset:p=0,alignOffset:x=0,collisionBoundary:b="clipping-ancestors",collisionPadding:h=5,arrowPadding:v=5,sticky:y=!1,trackAnchor:R=!0,collisionAvoidance:w=wa,...E}=t,{open:S,setOpen:k,floatingRootContext:D,setPositionerElement:U,itemDomElements:O,itemLabels:_,mounted:N,modal:I,lastOpenChangeReason:W,parent:$,setHoverEnabled:T,triggerElement:A}=st(),j=md(),M=ll(),q=xt(),ce=po(!0);let X=c,L=p,re=x,se=g;$.type==="context-menu"&&(X=(r=(o=$.context)==null?void 0:o.anchor)!=null?r:c,se=se??"start",!f&&se!=="center"&&(re=(s=t.alignOffset)!=null?s:2,L=(i=t.sideOffset)!=null?i:-5));let C=f,B=se;$.type==="menu"?(C=C??"inline-end",B=B??"start"):$.type==="menubar"&&(C=C??"bottom",B=B??"start");const Z=$.type==="context-menu",K=Zf({anchor:X,floatingRootContext:D,positionMethod:ce?"fixed":l,mounted:N,side:C,sideOffset:L,align:B,alignOffset:re,arrowPadding:Z?0:v,collisionBoundary:b,collisionPadding:h,sticky:y,nodeId:M,keepMounted:j,trackAnchor:R,collisionAvoidance:w,shiftCrossAxis:Z}),{events:V}=$e(),H=a.useMemo(()=>{const P={};return S||(P.pointerEvents="none"),{role:"presentation",hidden:!N,style:{...K.positionerStyles,...P}}},[S,N,K.positionerStyles]);a.useEffect(()=>{function P(G){G.open?(G.parentNodeId===M&&T(!1),G.nodeId!==M&&G.parentNodeId===q&&k(!1,ue("sibling-open"))):G.parentNodeId===M&&G.reason!=="sibling-open"&&T(!0)}return V.on("menuopenchange",P),()=>{V.off("menuopenchange",P)}},[V,M,q,k,T]),a.useEffect(()=>{if(q==null)return;function P(G){var F;if(G.open||G.nodeId!==q)return;const Q=(F=G.reason)!=null?F:"sibling-open";k(!1,ue(Q))}return V.on("menuopenchange",P),()=>{V.off("menuopenchange",P)}},[V,q,k]),a.useEffect(()=>{function P(G){!S||G.nodeId!==q||A&&G.target&&A!==G.target&&k(!1,ue("sibling-open"))}return V.on("itemhover",P),()=>{V.off("itemhover",P)}},[V,q,A,S,k]),a.useEffect(()=>{const P={open:S,nodeId:M,parentNodeId:q,reason:W};V.emit("menuopenchange",P)},[V,S,M,q,W]);const Y=a.useMemo(()=>({open:S,side:K.side,align:K.align,anchorHidden:K.anchorHidden,nested:$.type==="menu"}),[S,K.side,K.align,K.anchorHidden,$.type]),z=a.useMemo(()=>({side:K.side,align:K.align,arrowRef:K.arrowRef,arrowUncentered:K.arrowUncentered,arrowStyles:K.arrowStyles,floatingContext:K.context}),[K.side,K.align,K.arrowRef,K.arrowUncentered,K.arrowStyles,K.context]),te=ve("div",t,{state:Y,stateAttributesMapping:hn,ref:[n,U],props:{...H,...E}}),ne=N&&$.type!=="menu"&&($.type!=="menubar"&&I&&W!=="trigger-hover"||$.type==="menubar"&&$.context.modal);let ee=null;return $.type==="menubar"?ee=$.context.contentElement:$.type===void 0&&(ee=A),m.jsxs(Fi.Provider,{value:z,children:[ne&&m.jsx(sr,{ref:$.type==="context-menu"||$.type==="nested-context-menu"?$.context.internalBackdropRef:null,inert:ri(!S),cutout:ee}),m.jsx(ul,{id:M,children:m.jsx(Tu,{elementsRef:O,labelsRef:_,children:te})})]})}),Wi=a.createContext(void 0);function vd(){const e=a.useContext(Wi);if(e===void 0)throw new Error("Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.");return e}const bd=a.memo(a.forwardRef(function(t,n){const{render:o,className:r,value:s,defaultValue:i,onValueChange:c,disabled:l=!1,...u}=t,[d,f]=ar({controlled:s,default:i,name:"MenuRadioGroup"}),g=J(c),p=J((v,y)=>{g==null||g(v,y),!y.isCanceled&&f(v)}),x=a.useMemo(()=>({disabled:l}),[l]),b=ve("div",t,{state:x,ref:n,props:{role:"group","aria-disabled":l||void 0,...u}}),h=a.useMemo(()=>({value:d,setValue:p,disabled:l}),[d,p,l]);return m.jsx(Wi.Provider,{value:h,children:b})})),zi=a.createContext(void 0);function xd(){const e=a.useContext(zi);if(e===void 0)throw new Error("Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.");return e}const yd=a.memo(a.forwardRef(function(t,n){const{checked:o,setChecked:r,className:s,closeOnClick:i,disabled:c=!1,highlighted:l,id:u,menuEvents:d,itemProps:f,render:g,allowMouseUpTriggerRef:p,typingRef:x,nativeButton:b,nodeId:h,...v}=t,{getItemProps:y,itemRef:R}=mo({closeOnClick:i,disabled:c,highlighted:l,id:u,menuEvents:d,allowMouseUpTriggerRef:p,typingRef:x,nativeButton:b,itemMetadata:pr,nodeId:h}),w=a.useMemo(()=>({disabled:c,highlighted:l,checked:o}),[c,l,o]);return ve("div",t,{state:w,stateAttributesMapping:go,ref:[R,n],props:[f,{role:"menuitemradio","aria-checked":o,onClick(E){r(ue("item-press",E.nativeEvent))}},v,y]})})),wd=a.forwardRef(function(t,n){const{id:o,value:r,label:s,disabled:i=!1,closeOnClick:c=!1,nativeButton:l=!1,...u}=t,d=a.useRef(null),f=vn({label:s}),g=tt(n,f.ref,d),{itemProps:p,activeIndex:x,allowMouseUpTriggerRef:b,typingRef:h}=st(),v=bn(!0),y=Tt(o),R=f.index===x,{events:w}=$e(),{value:E,setValue:S,disabled:k}=vd(),D=k||i,U=E===r,O=a.useCallback(N=>{S(r,N)},[S,r]),_=a.useMemo(()=>({checked:U,highlighted:R,disabled:D}),[U,R,D]);return m.jsx(zi.Provider,{value:_,children:m.jsx(yd,{...u,id:y,ref:g,disabled:D,highlighted:R,menuEvents:w,itemProps:p,allowMouseUpTriggerRef:b,checked:E===r,setChecked:O,typingRef:h,closeOnClick:c,nativeButton:l,nodeId:v==null?void 0:v.floatingContext.nodeId})})}),mr=a.forwardRef(function(t,n){const{render:o,className:r,keepMounted:s=!1,...i}=t,c=xd(),l=a.useRef(null),{transitionStatus:u,setMounted:d}=ao(c.checked);Yt({open:c.checked,ref:l,onComplete(){c.checked||d(!1)}});const f=a.useMemo(()=>({checked:c.checked,disabled:c.disabled,highlighted:c.highlighted,transitionStatus:u}),[c.checked,c.disabled,c.highlighted,u]);return ve("span",t,{state:f,stateAttributesMapping:go,ref:[n,l],props:{"aria-hidden":!0,...i},enabled:s||c.checked})}),Rd=a.createContext(null);function Cd(e){return a.useContext(Rd)}const Hi=a.createContext(!1);function Ed(){return a.useContext(Hi)}function Sd(e){const{enabled:t=!0,mouseDownAction:n,open:o}=e,r=a.useRef(!1);return a.useMemo(()=>t?{onMouseDown:s=>{(n==="open"&&!o||n==="close"&&o)&&(r.current=!0,lt(s.currentTarget).addEventListener("click",()=>{r.current=!1},{once:!0}))},onClick:s=>{r.current&&(r.current=!1,s.preventBaseUIHandler())}}:je,[t,n,o])}const Md=[],Id={current:!1},Gi=function(t){const{children:n,open:o,onOpenChange:r,onOpenChangeComplete:s,defaultOpen:i=!1,disabled:c=!1,modal:l,loop:u=!0,orientation:d="vertical",actionsRef:f,openOnHover:g,delay:p=100,closeDelay:x=0,closeParentOnEsc:b=!0}=t,[h,v]=a.useState(null),[y,R]=a.useState(null),[w,E]=a.useState(),[S,k]=a.useState(!0),[D,U]=a.useState(null),[O,_]=a.useState(null),[N,I]=a.useState(!0),[W,$]=a.useState(!1),T=a.useRef(null),A=a.useRef(null),j=a.useRef(null),M=a.useRef([]),q=a.useRef([]),ce=Le(),X=po(!0),L=Ed(),re=xt()!=null;let se,C;{const le=st(!0),We=Cd();L&&le?C={type:"menu",context:le}:We?C={type:"menubar",context:We}:X&&!le?C={type:"context-menu",context:X}:C={type:void 0}}let B=Kt();C.type!==void 0&&(B=C.context.rootId);const Z=(C.type===void 0||C.type==="context-menu")&&(l??!0),K=c||C.type==="menubar"&&C.context.disabled||!1,V=C.type==="menu"?C.context.allowMouseEnter:W,H=C.type==="menu"?C.context.setAllowMouseEnter:$,Y=g??(C.type==="menu"||C.type==="menubar"&&C.context.hasSubmenuOpen),[z,te]=ar({controlled:o,default:i,name:"MenuRoot",state:"open"}),ne=a.useRef(C.type!=="context-menu"),ee=Le();a.useEffect(()=>{if(z||(T.current=null),C.type==="context-menu"){if(!z){ee.clear(),ne.current=!1;return}ee.start(500,()=>{ne.current=!0})}},[ee,z,C.type]);const P=a.useCallback(le=>{j.current=le,R(le)},[]),{mounted:G,setMounted:F,transitionStatus:Q}=ao(z),{openMethod:ae,triggerProps:ie,reset:me}=bi(z);vi({enabled:z&&Z&&O!=="trigger-hover"&&ae!=="touch",mounted:G,open:z,referenceElement:y}),!z&&!S&&k(!0);const Ae=J(()=>{F(!1),I(!0),H(!1),s==null||s(!1),me()});Yt({enabled:!f,open:z,ref:A,onComplete(){z||Ae()}});const Ve=a.useRef(!0),we=Le(),Pe=J((le,We)=>{const Ie=We.reason;if(z===le||(r==null||r(le,We),We.isCanceled))return;const ho={open:le,nativeEvent:We.event,reason:We.reason,nested:re};se==null||se.emit("openchange",ho);const pt=We.event;if(le===!1&&(pt==null?void 0:pt.type)==="click"&&pt.pointerType==="touch"&&!Ve.current)return;if(!le&&D!==null){const Ct=M.current[D];queueMicrotask(()=>{Ct==null||Ct.setAttribute("tabindex","-1")})}le&&Ie==="trigger-focus"?(Ve.current=!1,we.start(300,()=>{Ve.current=!0})):(Ve.current=!0,we.clear());const Dt=(Ie==="trigger-press"||Ie==="item-press")&&pt.detail===0&&(pt==null?void 0:pt.isTrusted),Pn=!le&&(Ie==="escape-key"||Ie==null);function Tn(){var Ct;te(le),_(Ie??null),T.current=(Ct=We.event)!=null?Ct:null}Ie==="trigger-hover"?(I(!0),ce.start(ba,()=>{I(!1)}),Ht.flushSync(Tn)):Tn(),C.type==="menubar"&&(Ie==="trigger-focus"||Ie==="focus-out"||Ie==="trigger-hover"||Ie==="list-navigation"||Ie==="sibling-open")?E("group"):E(Dt||Pn?Dt?"click":"dismiss":void 0)});a.useImperativeHandle(f,()=>({unmount:Ae}),[Ae]);let Ye;C.type==="context-menu"&&(Ye=C.context),a.useImperativeHandle(Ye==null?void 0:Ye.positionerRef,()=>y,[y]),a.useImperativeHandle(Ye==null?void 0:Ye.actionsRef,()=>({setOpen:Pe}),[Pe]),a.useEffect(()=>{z||ce.clear()},[ce,z]);const De=rr({elements:{reference:h,floating:y},open:z,onOpenChange:Pe});se=De.events;const Rn=Qu(De,{enabled:S&&Y&&!K&&C.type!=="context-menu"&&(C.type!=="menubar"||C.context.hasSubmenuOpen&&!z),handleClose:qf({blockPointerEvents:!0}),mouseOnly:!0,move:C.type==="menu",restMs:C.type===void 0||C.type==="menu"&&V?p:void 0,delay:C.type==="menu"?{open:V?p:10**10,close:x}:{close:x}}),_t=Vf(De,{enabled:!K&&!z&&C.type==="menubar"&&C.context.hasSubmenuOpen&&!X}),wt=pi(De,{enabled:!K&&C.type!=="context-menu",event:z&&C.type==="menubar"?"click":"mousedown",toggle:!Y||C.type!=="menu",ignoreMouse:Y&&C.type==="menu",stickIfOpen:C.type===void 0?N:!1}),Cn=mi(De,{enabled:!K,bubbles:b&&C.type==="menu",outsidePress(){var le;return C.type!=="context-menu"||((le=T.current)==null?void 0:le.type)==="contextmenu"?!0:ne.current}}),En=hi(De,{role:"menu"}),Sn=Ii(),Mn=Hf(De,{enabled:!K,listRef:M,activeIndex:D,nested:C.type!==void 0,loop:u,orientation:d,parentOrientation:C.type==="menubar"?C.context.orientation:void 0,rtl:Sn==="rtl",disabledIndices:Md,onNavigate:U,openOnArrowKeyDown:C.type!=="context-menu"}),Jt=a.useRef(!1),de=a.useCallback(le=>{Jt.current=le},[]),be=Gf(De,{listRef:q,activeIndex:D,resetMs:va,onMatch:le=>{z&&le!==D&&U(le)},onTypingChange:de}),{getReferenceProps:Ue,getFloatingProps:Ee,getItemProps:dt}=gi([Rn,wt,Cn,_t,En,Mn,be]),qe=Sd({open:z,enabled:C.type==="menubar",mouseDownAction:"open"}),At=a.useMemo(()=>{const le=Gt(Ue(),{onMouseEnter(){k(!0)},onMouseMove(){H(!0)}},ie,qe);return delete le.role,le},[Ue,qe,H,ie]),Rt=a.useMemo(()=>Ee({onMouseEnter(){(!Y||C.type==="menu")&&k(!1)},onMouseMove(){H(!0)},onClick(){Y&&k(!1)}}),[Ee,Y,C.type,H]),In=a.useMemo(()=>dt(),[dt]),kn=a.useMemo(()=>({activeIndex:D,setActiveIndex:U,allowMouseUpTriggerRef:C.type?C.context.allowMouseUpTriggerRef:Id,floatingRootContext:De,itemProps:In,popupProps:Rt,triggerProps:At,itemDomElements:M,itemLabels:q,mounted:G,open:z,popupRef:A,positionerRef:j,setOpen:Pe,setPositionerElement:P,triggerElement:h,setTriggerElement:v,transitionStatus:Q,lastOpenChangeReason:O,instantType:w,onOpenChangeComplete:s,setHoverEnabled:k,typingRef:Jt,modal:Z,disabled:K,parent:C,rootId:B,allowMouseEnter:V,setAllowMouseEnter:H}),[D,De,In,Rt,At,M,q,G,z,j,Pe,Q,h,P,O,w,s,Z,K,C,B,V,H]),On=m.jsx(Bi.Provider,{value:kn,children:n});return C.type===void 0||C.type==="context-menu"?m.jsx(fl,{children:On}):On};function kd(e){const{closeParentOnEsc:t=!1}=e;return m.jsx(Hi.Provider,{value:!0,children:m.jsx(Gi,{closeParentOnEsc:t,...e})})}function Od(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),o=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||o.content!=="none"))return t;const s=parseFloat(n.width)||0,i=parseFloat(n.height)||0,c=parseFloat(o.width)||0,l=parseFloat(o.height)||0,u=Math.max(t.width,s,c),d=Math.max(t.height,i,l),f=u-t.width,g=d-t.height;return{left:t.left-f/2,right:t.right+f/2,top:t.top-g/2,bottom:t.bottom+g/2}}function Pd(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:o}=Ps(),{ref:r,index:s}=vn(e),i=n===s,c=a.useRef(null),l=tt(r,c);return{compositeProps:a.useMemo(()=>({tabIndex:i?0:-1,onFocus(){o(s)},onMouseMove(){const d=c.current;if(!t||!d)return;const f=d.hasAttribute("disabled")||d.ariaDisabled==="true";!i&&!f&&d.focus()}}),[i,o,s,t]),compositeRef:l,index:s}}function Td(e){const{render:t,className:n,state:o=je,props:r=Cr,refs:s=Cr,metadata:i,stateAttributesMapping:c,tag:l="div",...u}=e,{compositeProps:d,compositeRef:f}=Pd({metadata:i});return ve(l,e,{state:o,ref:[...s,f],props:[d,...r,u],stateAttributesMapping:c})}function Ki(e){var t;if(he(e)&&e.hasAttribute("data-rootownerid"))return(t=e.getAttribute("data-rootownerid"))!=null?t:void 0;if(!Je(e))return Ki(nt(e))}const $n=2,jd=a.forwardRef(function(t,n){const{render:o,className:r,disabled:s=!1,nativeButton:i=!0,...c}=t,{triggerProps:l,disabled:u,setTriggerElement:d,open:f,allowMouseUpTriggerRef:g,positionerRef:p,parent:x,lastOpenChangeReason:b,rootId:h}=st(),v=s||u,y=a.useRef(null),R=Le(),{getButtonProps:w,buttonRef:E}=Qo({disabled:v,native:i}),S=tt(E,d),{events:k}=$e();a.useEffect(()=>{!f&&x.type===void 0&&(g.current=!1)},[g,f,x.type]);const D=J($=>{if(!y.current)return;R.clear(),g.current=!1;const T=$.target;if(ge(y.current,T)||ge(p.current,T)||T===y.current||T!=null&&Ki(T)===h)return;const A=Od(y.current);$.clientX>=A.left-$n&&$.clientX<=A.right+$n&&$.clientY>=A.top-$n&&$.clientY<=A.bottom+$n||k.emit("close",{domEvent:$,reason:"cancel-open"})});a.useEffect(()=>{f&&b==="trigger-hover"&<(y.current).addEventListener("mouseup",D,{once:!0})},[f,D,b]);const U=x.type==="menubar",O=a.useCallback($=>Gt(U?{role:"menuitem"}:{},{"aria-haspopup":"menu",ref:S,onMouseDown:T=>{if(f)return;R.start(200,()=>{g.current=!0}),lt(T.currentTarget).addEventListener("mouseup",D,{once:!0})}},$,w),[w,S,f,g,R,D,U]),_=a.useMemo(()=>({disabled:v,open:f}),[v,f]),N=[y,n,E],I=[l,c,O],W=ve("button",t,{enabled:!U,stateAttributesMapping:Pr,state:_,ref:N,props:I});return U?m.jsx(Td,{tag:"button",render:o,className:r,state:_,refs:N,props:I,stateAttributesMapping:Pr}):W}),_d=a.forwardRef(function(t,n){const{render:o,className:r,label:s,id:i,nativeButton:c=!1,...l}=t,u=Tt(i),{triggerProps:d,parent:f,setTriggerElement:g,open:p,typingRef:x,disabled:b,allowMouseUpTriggerRef:h}=st(),v=bn();if(f.type!=="menu")throw new Error("Base UI: <Menu.SubmenuTrigger> must be placed in <Menu.SubmenuRoot>.");const y=f.context,{activeIndex:R,itemProps:w,setActiveIndex:E}=y,S=vn(),k=R===S.index,{events:D}=$e(),U=a.useMemo(()=>({type:"submenu-trigger",setActive:()=>E(S.index),allowMouseEnterEnabled:y.allowMouseEnter}),[E,S.index,y.allowMouseEnter]),{getItemProps:O,itemRef:_}=mo({closeOnClick:!1,disabled:b,highlighted:k,id:u,menuEvents:D,allowMouseUpTriggerRef:h,typingRef:x,nativeButton:c,itemMetadata:U,nodeId:v==null?void 0:v.floatingContext.nodeId}),N=a.useMemo(()=>({disabled:b,highlighted:k,open:p}),[b,k,p]);return ve("div",t,{state:N,ref:[n,S.ref,_,g],stateAttributesMapping:al,props:[d,w,l,O,{tabIndex:p||k?0:-1,onBlur(){k&&E(null)}}]})});function Ad(e){var t;return ve((t=e.defaultTagName)!=null?t:"div",e,e)}const Dd="positioner__eWf4l",Nd="fixedPositioner__ASeFt",Ld="popup__UucRm",Fd="backdrop__bBmVf",Bd="item__5a484",$d="itemLabel__z75Xr",Vd="itemDescription__oxy7a",Ud="itemValue__VOv0R",Wd="itemLeadingElements__5ARFl",zd="itemTrailingElements__rx0FW",Hd="group__-plPv",Gd="groupLabel__OisFc",Kd="radioGroup__cjmci",qd="checkboxItemIndicator__6wmLt",_e={positioner:Dd,fixedPositioner:Nd,popup:Ld,backdrop:Fd,item:Bd,itemLabel:$d,itemDescription:Vd,itemValue:Ud,itemLeadingElements:Wd,itemTrailingElements:zd,group:Hd,groupLabel:Gd,radioGroup:Kd,checkboxItemIndicator:qd},Yd=Gi,qi=a.forwardRef(function({children:t,...n},o){return m.jsx(jd,{render:t,ref:o,...n})});function gr(e){const t=bs();return m.jsx(gd,{container:t,...e})}const hr=a.createContext(!1);function vr(e){const t=a.useContext(hr);return m.jsx(ed,{className:_e.backdrop,"data-backdrop":t?"submenu":"root",...e})}const Xd=a.forwardRef(function(t,n){return m.jsx("div",{ref:n,className:_e.fixedPositioner,...t,style:void 0})});function br(e){const t=!Si("medium-s"),n=a.useContext(hr);return m.jsx(hd,{render:t?m.jsx(Xd,{}):m.jsx("div",{className:_e.positioner}),collisionAvoidance:{side:"shift",align:"shift"},collisionPadding:24,sideOffset:n?12:void 0,...e})}function xr({dataset:e,preplyDsComponent:t,...n}){return m.jsx(pd,{className:_e.popup,tabIndex:0,...ft(e,{preplyDsComponent:t}),...n})}const Yi=a.createContext(""),jt=a.forwardRef(function({dataset:t,render:n,...o},r){const s=a.useId(),i=Ad({render:n,ref:r,defaultTagName:"div",props:{className:_e.item,"aria-describedby":s,...ft(t),...o}});return m.jsx(Yi.Provider,{value:s,children:i})});function Zd({children:e,...t}){return m.jsx(ld,{render:e,...t})}function Xt(e){return m.jsx("div",{className:_e.itemLeadingElements,...e})}function xn(e){return m.jsx("div",{className:_e.itemTrailingElements,...e})}function Zt(e){return m.jsx("span",{className:_e.itemLabel,...e})}function Qt(e){const t=a.useContext(Yi);return m.jsx("span",{className:_e.itemDescription,id:t,"aria-hidden":!0,...e})}const Xi=a.forwardRef(function(t,n){return m.jsx("span",{className:_e.itemValue,...t,ref:n})});function Zi(e){return m.jsx(ct,{svg:_c,size:"16",accent:"tertiary",...e})}const Qi=a.forwardRef(function({dataset:t,...n},o){return m.jsx(id,{className:_e.group,...ft(t),ref:o,...n})});function Qd(e){return m.jsx(cd,{className:_e.groupLabel,...e})}function Ji(e){const t=!Si("medium-s");return m.jsx(hr.Provider,{value:!0,children:m.jsx(kd,{openOnHover:!t,...e})})}function ec({children:e,...t}){return m.jsx(_d,{render:e,...t})}const yr=a.forwardRef(function(t,n){return m.jsx(bd,{className:_e.radioGroup,ref:n,...t})});function tc({children:e,...t}){return m.jsx(wd,{render:e,...t})}function nc(e){return m.jsx(mr,{render:m.jsx(ct,{svg:Ac,size:"24"}),...e})}function Jd({children:e,...t}){return m.jsx(od,{render:e,...t})}function ep(e){return m.jsx(rd,{className:_e.checkboxItemIndicator,keepMounted:!0,...e})}Qi.__docgenInfo={description:"",methods:[],displayName:"Group"};mr.__docgenInfo={description:"",methods:[],displayName:"MenuRadioItemIndicator"};qi.__docgenInfo={description:"",methods:[],displayName:"Trigger"};jt.__docgenInfo={description:"",methods:[],displayName:"ItemContainer"};yr.__docgenInfo={description:"",methods:[],displayName:"RadioGroup"};Xi.__docgenInfo={description:"",methods:[],displayName:"ItemValue"};const oc=a.createContext(null),rc=a.createContext(()=>{}),sc=a.createContext(()=>{});function tp({children:e,open:t,onOpenChange:n,defaultOpen:o,...r}){const[s,i]=a.useState(null),[c,l]=fu({value:t,onValueChange:n,defaultValue:o});return m.jsx(oc.Provider,{value:s,children:m.jsx(rc.Provider,{value:i,children:m.jsx(sc.Provider,{value:l,children:m.jsx(Ji,{...r,open:!!c,onOpenChange:l,children:e})})})})}const np=ec;function op(e){const t=a.useContext(rc);return m.jsx(Xi,{...e,ref:t})}const rp=yr;function sp({value:e,children:t,onClick:n,...o}){const r=a.useContext(sc),s=i=>{n==null||n(i),r(!1)};return m.jsx(tc,{value:e,onClick:s,...o,children:t})}function ip({children:e}){return m.jsxs(m.Fragment,{children:[e,m.jsx(mr,{render:(t,{checked:n})=>m.jsxs(cp,{active:n,children:[m.jsx(mu,{children:m.jsx(No,{id:"preply-ds.dropdown-menu.select-option-label-text",defaultMessage:[{type:0,value:"Selected:"}]})})," ",e]})})]})}function cp({children:e,active:t}){const n=a.useContext(oc);return!t||!n?null:Ht.createPortal(e,n)}const ic=a.forwardRef(function({children:t,trigger:n,defaultOpen:o,dataset:r,keepMounted:s,open:i,onOpenChange:c,side:l,align:u,...d},f){return m.jsxs(Yd,{defaultOpen:o,open:i,onOpenChange:c,children:[m.jsx(qi,{...ot(d),ref:f,children:n}),m.jsxs(gr,{keepMounted:s,children:[m.jsx(vr,{}),m.jsx(br,{sideOffset:4,side:l,align:u,children:m.jsx(xr,{dataset:r,preplyDsComponent:Ge.DropdownMenu,children:t})})]})]})}),Et=a.forwardRef(function({label:t,description:n,leadingElement:o,disabled:r,dataset:s,onClick:i,as:c,...l},u){return m.jsx(Zd,{disabled:r,onClick:i,children:m.jsxs(jt,{...ot(l),dataset:s,ref:u,render:c,children:[m.jsx(Xt,{children:o}),m.jsx(Zt,{children:t}),m.jsx(Qt,{children:n})]})})}),Yo=a.forwardRef(function({children:t,label:n,description:o,leadingElement:r,dataset:s,triggerDataset:i,keepMounted:c,disabled:l,defaultOpen:u,open:d,onOpenChange:f,side:g,align:p,...x},b){return m.jsxs(Ji,{disabled:l,defaultOpen:u,open:d,onOpenChange:f,children:[m.jsx(ec,{children:m.jsxs(jt,{...ot(x),dataset:i,ref:b,children:[m.jsx(Xt,{children:r}),m.jsx(Zt,{children:n}),m.jsx(Qt,{children:o}),m.jsx(xn,{children:m.jsx(Zi,{})})]})}),m.jsxs(gr,{keepMounted:c,children:[m.jsx(vr,{}),m.jsx(br,{side:g,align:p,children:m.jsx(xr,{dataset:s,preplyDsComponent:Ge.DropdownMenu,children:t})})]})]})}),ap=a.forwardRef(function({label:t,children:n,dataset:o,...r},s){return m.jsxs(Qi,{...ot(r),dataset:o,ref:s,children:[m.jsx(Qd,{children:t}),n]})}),lp=a.forwardRef(function({defaultValue:t,value:n,onValueChange:o,disabled:r,children:s,items:i,...c},l){const u=i?i.map(({value:d,...f})=>m.jsx(cc,{value:d,...f},d)):s;return m.jsx(yr,{defaultValue:t,value:n,onValueChange:d=>o==null?void 0:o(d),disabled:r,ref:l,...ot(c),children:u})}),cc=a.forwardRef(function({value:t,disabled:n,onClick:o,dataset:r,leadingElement:s,label:i,description:c,...l},u){return m.jsx(tc,{value:t,disabled:n,onClick:o,children:m.jsxs(jt,{dataset:r,ref:u,...ot(l),children:[m.jsx(Xt,{children:s}),m.jsx(Zt,{children:i}),m.jsx(Qt,{children:c}),m.jsx(xn,{children:m.jsx(nc,{})})]})})}),ac=a.forwardRef(function({label:t,description:n,leadingElement:o,dataset:r,disabled:s,defaultChecked:i,checked:c,onCheckedChange:l,...u},d){return m.jsx(Jd,{defaultChecked:i,checked:c,onCheckedChange:l,disabled:s,children:m.jsxs(jt,{dataset:r,ref:d,...ot(u),children:[m.jsx(Xt,{children:o}),m.jsx(Zt,{children:t}),m.jsx(Qt,{children:n}),m.jsx(xn,{children:m.jsx(ep,{})})]})})}),ln=a.forwardRef(function({label:t,description:n,leadingElement:o,dataset:r,disabled:s,value:i,onClick:c,...l},u){return m.jsx(sp,{value:i,disabled:s,onClick:c,children:m.jsxs(jt,{dataset:r,ref:u,...ot(l),children:[m.jsx(Xt,{children:o}),m.jsx(Zt,{children:m.jsx(ip,{children:t})}),m.jsx(Qt,{children:n}),m.jsx(xn,{children:m.jsx(nc,{})})]})})}),lc=a.forwardRef(function({label:t,description:n,leadingElement:o,dataset:r,triggerDataset:s,value:i,defaultValue:c,onValueChange:l,disabled:u,children:d,items:f,open:g,defaultOpen:p,onOpenChange:x,side:b,align:h,...v},y){const R=f?f.map(({value:w,...E})=>m.jsx(ln,{value:w,...E},w)):d;return m.jsxs(tp,{disabled:u,open:g,defaultOpen:p,onOpenChange:x,children:[m.jsx(np,{children:m.jsxs(jt,{dataset:s,ref:y,...ot(v),children:[m.jsx(Xt,{children:o}),m.jsx(Zt,{children:t}),m.jsx(Qt,{children:n}),m.jsxs(xn,{children:[m.jsx(op,{}),m.jsx(Zi,{})]})]})}),m.jsxs(gr,{keepMounted:!0,children:[m.jsx(vr,{}),m.jsx(br,{sideOffset:12,side:b,align:h,children:m.jsx(xr,{dataset:r,preplyDsComponent:Ge.DropdownMenu,children:m.jsx(rp,{value:i,defaultValue:c,onValueChange:l,disabled:u,children:R})})})]})]})});ic.__docgenInfo={description:"",methods:[],displayName:"DropdownMenu"};ac.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuCheckboxItem"};ap.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuGroup"};Et.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuItem"};lp.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuRadioGroup"};cc.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuRadioItem"};lc.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuSelect"};ln.__docgenInfo={description:"",methods:[],displayName:"DropdownMenuSelectOption"};Yo.__docgenInfo={description:"",methods:[],displayName:"DropdownSubmenu"};const up="container__dtKps",fp="label__S0tQE",dp="required__GVzWg",pp="description__h6Gw1",mp="error__MGvA2",Nt={container:up,label:fp,required:dp,description:pp,error:mp};function gp({id:e,error:t,description:n,hasError:o}){const r={};return o&&(r["aria-invalid"]=!0),t&&(r["aria-invalid"]=!0,r["aria-errormessage"]=`${e}-error`),n&&(r["aria-describedby"]=`${e}-description`),r}const hp=({id:e,label:t,hideLabel:n,description:o,error:r,hasError:s,children:i,required:c,dataset:l,onClick:u,preplyDsComponent:d=Ge.FormControl,useLegacyRequiredLabel:f=!1})=>{const g=a.useId(),p=e||g,x=gp({id:p,error:r,description:o,hasError:s}),b=ft(l,{preplyDsComponent:d});return m.jsxs("div",{className:Nt.container,...b,onClick:u,children:[m.jsxs("label",{htmlFor:p,className:Nt.label,"data-hidden":n||!t,"data-testid":"label",children:[t,!!f&&c&&m.jsxs("span",{"aria-hidden":!0,className:Nt.required,children:[" • ",m.jsx(No,{id:"preply-ds.fieldLabel.required",defaultMessage:[{type:0,value:"Required"}]})]}),!f&&!c&&m.jsxs("span",{"aria-hidden":!0,className:Nt.required,children:[" • ",m.jsx(No,{id:"preply-ds.fieldLabel.optional",defaultMessage:[{type:0,value:"Optional"}]})]})]}),m.jsx(xs,{id:p,required:c,...x,children:i}),r?m.jsx("p",{className:Nt.error,role:"alert",id:`${p}-error`,"data-testid":"error",children:r}):o?m.jsx("p",{className:Nt.description,id:`${p}-description`,"data-testid":"description",children:o}):null]})},vp="container__B-gQ9",bp="input__WZN7y",xp="icon__6Xfum",yp="trailingIcon__Bgnv4",wp="button__auAU0",nn={container:vp,input:bp,icon:xp,trailingIcon:yp,button:wp};function Rp({button:e,icon:t,trailingIcon:n,children:o}){return m.jsxs("div",{className:nn.container,children:[!!t&&m.jsx("span",{className:nn.icon,children:t}),o,!!n&&m.jsx("span",{className:nn.trailingIcon,children:n}),!!e&&m.jsx("span",{className:nn.button,children:e})]})}const uc=a.forwardRef(function({button:t,icon:n,dataset:o,onChange:r,onValueChange:s,...i},c){const l=ft(o),u=d=>{r==null||r(d),s==null||s(d.target.value)};return m.jsx(Rp,{button:t,icon:n,children:m.jsx("input",{...l,...i,ref:c,onChange:u,className:nn.input})})});uc.__docgenInfo={description:"",methods:[],displayName:"Input"};const fc=a.forwardRef(function({id:t,label:n,description:o,error:r,required:s,type:i="text",inputDataset:c,dataset:l,hideLabel:u,onClick:d,hasError:f,useLegacyRequiredLabel:g,className:p,style:x,...b},h){return m.jsx(hp,{id:t,label:n,description:o,error:r,hasError:f,required:s,dataset:l,hideLabel:u,onClick:d,useLegacyRequiredLabel:g,preplyDsComponent:Ge.TextField,children:m.jsx(uc,{...b,type:i,ref:h,dataset:c})})});fc.__docgenInfo={description:"",methods:[],displayName:"TextField",props:{type:{defaultValue:{value:'"text"',computed:!1},required:!1}}};const Cp={...hn,...pn},Ep=a.forwardRef(function(t,n){const{render:o,className:r,forceRender:s=!1,...i}=t,{store:c}=Pt(),l=c.useState("open"),u=c.useState("nested"),d=c.useState("mounted"),f=c.useState("transitionStatus"),g=a.useMemo(()=>({open:l,transitionStatus:f}),[l,f]);return ve("div",t,{state:g,ref:[c.context.backdropRef,n],stateAttributesMapping:Cp,props:[{role:"presentation",hidden:!d,style:{userSelect:"none",WebkitUserSelect:"none"}},i],enabled:s||!u})});let Sp=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),Mp=(function(e){return e[e.open=St.open]="open",e[e.closed=St.closed]="closed",e[e.startingStyle=St.startingStyle]="startingStyle",e[e.endingStyle=St.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const dc=a.createContext(void 0);function Ip(){const e=a.useContext(dc);if(e===void 0)throw new Error("Base UI: <Dialog.Portal> is missing.");return e}const kp={...hn,...pn,nestedDialogOpen(e){return e?{[Mp.nestedDialogOpen]:""}:null}},Op=a.forwardRef(function(t,n){const{className:o,finalFocus:r,initialFocus:s,render:i,...c}=t,{store:l}=Pt(),u=l.useState("descriptionElementId"),d=l.useState("dismissible"),f=l.useState("floatingRootContext"),g=l.useState("popupProps"),p=l.useState("modal"),x=l.useState("mounted"),b=l.useState("nested"),h=l.useState("nestedOpenDialogCount"),v=l.useState("open"),y=l.useState("openMethod"),R=l.useState("titleElementId"),w=l.useState("transitionStatus");Ip(),Yt({open:v,ref:l.context.popupRef,onComplete(){var O,_;v&&((_=(O=l.context).openChangeComplete)==null||_.call(O,!0))}});const E=J(O=>O==="touch"?l.context.popupRef.current:!0),S=s===void 0?E:s,k=h>0,D=a.useMemo(()=>({open:v,nested:b,transitionStatus:w,nestedDialogOpen:k}),[v,b,w,k]),U=ve("div",t,{state:D,props:[g,{"aria-labelledby":R??void 0,"aria-describedby":u??void 0,role:"dialog",tabIndex:-1,hidden:!x,onKeyDown(O){oi.has(O.key)&&O.stopPropagation()},style:{[Sp.nestedDialogs]:h}},c],ref:[n,l.context.popupRef,l.getElementSetter("popupElement")],stateAttributesMapping:kp});return m.jsxs(a.Fragment,{children:[x&&p===!0&&m.jsx(sr,{ref:l.context.internalBackdropRef,inert:ri(!v)}),m.jsx(di,{context:f,openInteractionType:y,disabled:!x,closeOnFocusOut:d,initialFocus:S,returnFocus:r,modal:p!==!1,restoreFocus:"popup",children:U})]})});function Pp(e){const{children:t,keepMounted:n=!1,container:o}=e,{store:r}=Pt();return r.useState("mounted")||n?m.jsx(dc.Provider,{value:n,children:m.jsx(fi,{root:o,children:t})}):null}const Tp={open:!1,dismissible:!0,nested:!1,popupElement:null,triggerElement:null,modal:!0,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,mounted:!1,transitionStatus:"idle",nestedOpenDialogCount:0,triggerProps:je,popupProps:je,floatingRootContext:yl()},jp=function(t){const{children:n,open:o,defaultOpen:r=!1,onOpenChange:s,onOpenChangeComplete:i,dismissible:c=!0,modal:l=!0,actionsRef:u}=t,d=Pt(!0),f=!!d,g=at(ir.create,Tp).current;g.useControlledProp("open",o,r),g.useSyncedValues({dismissible:c,nested:f,modal:l}),g.useContextCallback("openChange",s),g.useContextCallback("openChangeComplete",i),Tl({store:g,actionsRef:u,parentContext:d==null?void 0:d.store.context});const p=a.useMemo(()=>({store:g}),[g]);return m.jsx(ws.Provider,{value:p,children:n})},_p=({children:e,open:t,onOpen:n,onClose:o,overlay:r=!0,size:s="md",mobileFullHeight:i=!1,className:c,dataset:l,...u})=>{const d=bs(),f=Ap(t),g=a.useCallback(b=>{b?n==null||n():o==null||o()},[o,n]),p=[Wt.dialog,c].filter(Boolean).join(" "),x=ft(l,{preplyDsComponent:Ge.DialogRoot});return m.jsx(jp,{open:t,onOpenChange:g,children:m.jsxs(Pp,{container:d,children:[r&&m.jsx(Ep,{className:Wt.overlay,forceRender:!0,"data-testid":"dialog-overlay","data-preply-ds-component":Ge.DialogOverlay}),m.jsx(Op,{ref:f,className:p,...Dp(s),"data-mobile-full-height":i?"":void 0,...x,...u,children:e})]})})};function Ap(e){const[t,n]=a.useState(null),o=a.useCallback(r=>n(r),[]);return a.useEffect(()=>{if(!e||!t)return;const r=async()=>{const i=t.getAnimations().map(l=>l.finished);await Promise.allSettled(i);const{y:c}=t.getBoundingClientRect();t.toggleAttribute("data-no-border-radius",c===0)};r(),window.addEventListener("resize",r);const s=new ResizeObserver(r);return s.observe(t),()=>{window.removeEventListener("resize",r),s.disconnect()}},[e,t]),o}function Dp(e){if(typeof e=="string")return{"data-size":e};const t={};return typeof e._=="string"&&(t["data-size"]=e._),typeof e["narrow-l"]=="string"&&(t["data-size-narrow-l"]=e["narrow-l"]),typeof e["medium-s"]=="string"&&(t["data-size-medium-s"]=e["medium-s"]),typeof e["medium-l"]=="string"&&(t["data-size-medium-l"]=e["medium-l"]),typeof e["wide-s"]=="string"&&(t["data-size-wide-s"]=e["wide-s"]),typeof e["wide-l"]=="string"&&(t["data-size-wide-l"]=e["wide-l"]),t}const Np=({open:e,title:t,description:n,leadingElement:o,children:r,size:s="md",hideHeader:i,onClose:c,mobileFullHeight:l,dataset:u})=>m.jsxs(_p,{open:e,onClose:c,size:s,mobileFullHeight:l,dataset:u,"data-preply-ds-component":Ge.Dialog,children:[m.jsx(Ci,{}),m.jsxs("header",{className:Wt.header,"data-preply-ds-component":Ge.DialogHeader,children:[o,!i&&m.jsxs("hgroup",{children:[m.jsx(wi,{children:t}),m.jsx(Ri,{children:n})]})]}),r]}),Lp="Divider__kU514",fs={Divider:Lp,"size-small":"size-small__OdB2p","size-large":"size-large__4iJ0a"},ds=({size:e="small"})=>m.jsx("hr",{className:`${fs.Divider} ${fs[`size-${e}`]}`,"data-preply-ds-component":Ge.Divider}),yn=[{code:"en",name:"English",text:"The quick brown fox jumps over the lazy dog"},{code:"it",name:"Italian",text:"Cantami o Diva del pelide Achille l'ira funesta"},{code:"id",name:"Indonesian",text:"Muharjo seorang xenofobia universal yang takut pada warga jazirah, contohnya Qatar"},{code:"nl",name:"Dutch",text:"Pa's wijze lynx bezag vroom het fikse aquaduct"},{code:"es",name:"Spanish",text:"Benjamín pidió una bebida de kiwi y fresa. Noé, sin vergüenza, la más exquisita champaña del menú"},{name:"Français",code:"fr",text:"Les naïfs ægithales hâtifs pondant à Noël où il gèle sont sûrs d'être déçus en voyant leurs drôles d'œufs abîmés"},{code:"de",name:"German",text:"Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich"},{code:"pt",name:"Portuguese",text:"Vejo galã sexy pôr quinze kiwis à força em baú achatado"},{code:"pl",name:"Polish",text:"Stróż pchnął kość w quiz gędźb vel fax myjń"},{code:"tr",name:"Turkish",text:"Pijamalı hasta yağız şoföre çabucak güvendi"},{code:"ro",name:"Romanian",text:"Încă vând gem, whisky bej și tequila roz, preț fix"},{code:"sv",name:"Swedish",text:"Flygande bäckasiner söka hwila på mjuka tuvor"},{code:"cs",name:"Czech",text:"Příliš žluťoučký kůň úpěl ďábelské ódy"},{code:"uk",name:"Ukrainian",text:"Єхидна, ґава, їжак ще й шиплячі плазуни бігцем форсують Янцзи"},{code:"ru",name:"Russian",text:"Съешь же ещё этих мягких французских булок да выпей чаю"},{name:"Arabic",code:"ar",text:"نص حكيم له سر قاطع وذو شأن عظيم مكتوب على ثوب أخضر ومغلف بجلد أزرق"},{code:"th",name:"Thai",text:"นายสังฆภัณฑ์ เฮงพิทักษ์ฝั่ง ผู้เฒ่าซึ่งมีอาชีพเป็นฅนขายฃวด ถูกตำรวจปฏิบัติการจับฟ้องศาล ฐานลักนาฬิกาคุณหญิงฉัตรชฎา ฌานสมาธิ"},{code:"zh",name:"Chinese",text:"你好,世界!"},{code:"ja",name:"Japanese",text:"こんにちは、世界!"},{name:"Korean",code:"ko",text:"안녕하세요, 세계!"}],pc=yn.find(e=>e.code==="en"),wr={text:"",textTransform:"normal",visible:yn.map(e=>e.code),expanded:[]};function Fp(e,t){const n=structuredClone(e);switch(t.type){case"set-text":return n.text=t.text,n;case"set-text-transform":return n.textTransform=t.textTransform,n;case"toggle-visibility":return n.visible.includes(t.lang)?n.visible=n.visible.filter(o=>o!==t.lang):n.visible.push(t.lang),n;case"toggle-expand":return n.expanded.includes(t.lang)?n.expanded=n.expanded.filter(o=>o!==t.lang):n.expanded.push(t.lang),n;case"expand-all":return n.expanded=yn.map(o=>o.code),n;case"collapse-all":return n.expanded=[],n;case"reset":return wr;default:return e}}const mc=a.createContext(wr),gc=a.createContext(()=>{});function Bp({children:e}){const[t,n]=a.useReducer(Fp,wr);return m.jsx(mc.Provider,{value:t,children:m.jsx(gc.Provider,{value:n,children:e})})}function wn(){const e=a.useContext(mc),t=a.useContext(gc);return[e,t]}const $p=Be.div`
|
|
32
|
+
border: 2px solid ${pe(Mt.border.tertiary)};
|
|
33
|
+
border-radius: ${pe(ys[8])};
|
|
34
|
+
padding: ${pe(Oe[16])};
|
|
35
|
+
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
gap: ${pe(Oe[16])};
|
|
39
|
+
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
background-color: ${pe(Mt.background.primary)};
|
|
42
|
+
transition: background-color ${pe(jc.components.interaction)};
|
|
43
|
+
&:hover {
|
|
44
|
+
background-color: ${pe(Mt.background.secondary)};
|
|
45
|
+
}
|
|
46
|
+
`,Vp=Be.div`
|
|
47
|
+
display: flex;
|
|
48
|
+
gap: ${pe(Oe[4])};
|
|
49
|
+
`,Up=Be.div`
|
|
50
|
+
display: grid;
|
|
51
|
+
grid-template-columns: auto 1fr;
|
|
52
|
+
gap: ${pe(Oe[8])};
|
|
53
|
+
align-items: center;
|
|
54
|
+
|
|
55
|
+
&[data-transform='uppercase'] *[data-value] {
|
|
56
|
+
text-transform: uppercase;
|
|
57
|
+
}
|
|
58
|
+
&[data-transform='lowercase'] *[data-value] {
|
|
59
|
+
text-transform: lowercase;
|
|
60
|
+
}
|
|
61
|
+
`;function Lt({variant:e,data:t,showWhenCollapsed:n=!1}){const[o]=wn(),{code:r}=t,s=o.expanded.includes(r),i=o.text||t.text,c=r!=="en"&&!o.text;return!s&&!n?null:c&&s?m.jsxs(m.Fragment,{children:[m.jsx(Xe,{variant:"caption-regular",accent:"secondary",children:e}),m.jsx(vo,{tag:"div",variant:e,dataset:{value:!0},children:i}),m.jsx(Xe,{variant:"caption-regular",accent:"secondary",children:e}),m.jsx(vo,{tag:"div",variant:e,dataset:{value:!0},children:pc.text})]}):m.jsxs(m.Fragment,{children:[m.jsx(Xe,{variant:"caption-regular",accent:"secondary",children:e}),m.jsx(vo,{tag:"div",variant:e,dataset:{value:!0},children:i})]})}function Te({variant:e,data:t,showWhenCollapsed:n=!1}){const[o]=wn(),{code:r}=t,s=o.expanded.includes(r),i=o.text||t.text,c=r!=="en"&&!o.text;return!s&&!n?null:c&&s?m.jsxs(m.Fragment,{children:[m.jsx(Xe,{variant:"caption-regular",accent:"secondary",children:e}),m.jsx(Xe,{variant:e,dataset:{value:!0},children:i}),m.jsx(Xe,{variant:"caption-regular",accent:"secondary",children:e}),m.jsx(Xe,{variant:e,dataset:{value:!0},children:pc.text})]}):m.jsxs(m.Fragment,{children:[m.jsx(Xe,{variant:"caption-regular",accent:"secondary",children:e}),m.jsx(Xe,{variant:e,dataset:{value:!0},children:i})]})}function Wp({data:e}){const[t,n]=wn(),{code:o,name:r}=e;return t.visible.includes(o)?m.jsxs($p,{lang:o,onClick:()=>{var s;((s=window.getSelection())==null?void 0:s.type)!=="Range"&&n({type:"toggle-expand",lang:o})},children:[m.jsxs(Vp,{children:[m.jsx(Jn,{size:"small",children:r}),m.jsx(Jn,{size:"small",children:o})]}),m.jsxs(Up,{"data-transform":t.textTransform,children:[m.jsx(Lt,{variant:"massive",data:e}),m.jsx(Lt,{variant:"huge",data:e}),m.jsx(Lt,{variant:"extraLarge",data:e}),m.jsx(Lt,{variant:"large",data:e,showWhenCollapsed:!0}),m.jsx(Lt,{variant:"medium",data:e}),m.jsx(Lt,{variant:"small",data:e}),m.jsx(Te,{variant:"caption-regular",data:e}),m.jsx(Te,{variant:"caption-semibold",data:e}),m.jsx(Te,{variant:"small-regular",data:e}),m.jsx(Te,{variant:"small-regular-italic",data:e}),m.jsx(Te,{variant:"small-semibold",data:e}),m.jsx(Te,{variant:"small-semibold-italic",data:e}),m.jsx(Te,{variant:"default-regular",data:e,showWhenCollapsed:!0}),m.jsx(Te,{variant:"default-regular-italic",data:e}),m.jsx(Te,{variant:"default-semibold",data:e}),m.jsx(Te,{variant:"default-semibold-italic",data:e}),m.jsx(Te,{variant:"large-regular",data:e}),m.jsx(Te,{variant:"large-regular-italic",data:e}),m.jsx(Te,{variant:"large-semibold",data:e}),m.jsx(Te,{variant:"large-semibold-italic",data:e})]})]}):null}const zp={Platform:"'Platform', 'Platform-fallback', 'Platform-fallback-android', 'Noto Sans', 'NotoSans-fallback', 'NotoSans-fallback-android', sans-serif",Figtree:"'Figtree', 'Figtree-fallback', 'Figtree-fallback-android', 'Noto Sans', 'NotoSans-fallback', 'NotoSans-fallback-android', sans-serif","Noto Sans":"'Noto Sans', 'NotoSans-fallback', 'NotoSans-fallback-android', sans-serif"},Hp=[{name:"Basic Latin",start:32,end:127},{name:"Latin-1 Supplement",start:160,end:255},{name:"Latin Extended-A",start:256,end:383},{name:"Latin Extended-B",start:384,end:591},{name:"Spacing Modifier Letters",start:688,end:767},{name:"Cyrillic",start:1024,end:1279},{name:"Arabic",start:1536,end:1791},{name:"Thai",start:3584,end:3711},{name:"Latin Extended Additional",start:7680,end:7935},{name:"General Punctuation",start:8192,end:8303},{name:"Currency Symbols",start:8352,end:8399}];function Gp(e){const t=[];for(let n=e.start;n<=e.end;n++){const o=String.fromCodePoint(n);n<32||n>=127&&n<160||t.push({char:o,codePoint:n})}return t}function Vn(e){return`U+${e.toString(16).toUpperCase().padStart(4,"0")}`}const Kp=Hp.map(e=>({...e,characters:Gp(e)})),qp=Be.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
gap: ${pe(Oe[24])};
|
|
65
|
+
max-height: 60vh;
|
|
66
|
+
overflow-y: auto;
|
|
67
|
+
`,Yp=Be.div`
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
gap: ${pe(Oe[8])};
|
|
71
|
+
`,Xp=Be.div`
|
|
72
|
+
display: flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
gap: ${pe(Oe[8])};
|
|
75
|
+
position: sticky;
|
|
76
|
+
top: 0;
|
|
77
|
+
background: ${pe(Mt.background.primary)};
|
|
78
|
+
padding: ${pe(Oe[8])} 0;
|
|
79
|
+
`,Zp=Be.div`
|
|
80
|
+
display: grid;
|
|
81
|
+
grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
|
|
82
|
+
gap: ${pe(Oe[4])};
|
|
83
|
+
`,Qp=Be.div`
|
|
84
|
+
display: flex;
|
|
85
|
+
flex-direction: column;
|
|
86
|
+
align-items: center;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
gap: ${pe(Oe[4])};
|
|
89
|
+
padding: ${pe(Oe[8])};
|
|
90
|
+
border: 1px solid ${pe(Mt.border.tertiary)};
|
|
91
|
+
border-radius: ${pe(ys[4])};
|
|
92
|
+
`,Jp=Be.span`
|
|
93
|
+
font-family: ${e=>zp[e.$fontFamily]} !important;
|
|
94
|
+
font-size: 20px;
|
|
95
|
+
min-height: 24px;
|
|
96
|
+
`,em=Be.span`
|
|
97
|
+
font-size: 9px;
|
|
98
|
+
color: ${pe(Mt.text.tertiary)};
|
|
99
|
+
font-family: monospace;
|
|
100
|
+
`;function Do({fontFamily:e,children:t}){const[n,o]=a.useState(!1);return m.jsxs(m.Fragment,{children:[m.jsx(xs,{onClick:()=>o(!0),children:t}),m.jsx(Np,{open:n,onClose:()=>o(!1),title:`Unicode Table - ${e}`,description:"",size:"lg",children:m.jsx(qp,{children:Kp.map(r=>m.jsxs(Yp,{children:[m.jsxs(Xp,{children:[m.jsx(Xe,{variant:"default-semibold",children:r.name}),m.jsxs(Jn,{size:"small",children:[Vn(r.start)," – ",Vn(r.end)]})]}),m.jsx(Zp,{children:r.characters.map(({char:s,codePoint:i})=>m.jsxs(Qp,{$fontFamily:e,title:`${s} — ${Vn(i)}`,children:[m.jsx(Jp,{$fontFamily:e,children:s}),m.jsx(em,{children:Vn(i)})]},i))})]},r.name))})})]})}function tm(){const[e,t]=wn();return m.jsxs(ic,{keepMounted:!0,trigger:m.jsx(cr,{svg:Pc,assistiveText:"Filters",variant:"tertiary",size:"medium"}),children:[m.jsx(Yo,{label:"Languages",side:"left",leadingElement:m.jsx(ct,{svg:Ec,size:"24"}),children:yn.map(n=>m.jsx(ac,{label:n.name,checked:e.visible.includes(n.code),onCheckedChange:()=>{a.startTransition(()=>t({type:"toggle-visibility",lang:n.code}))}},n.code))}),m.jsx(ds,{}),m.jsxs(lc,{label:"Text transform",side:"left",leadingElement:m.jsx(ct,{svg:Sc,size:"24"}),defaultValue:e.textTransform,onValueChange:n=>{a.startTransition(()=>t({type:"set-text-transform",textTransform:n}))},children:[m.jsx(ln,{value:"normal",label:"Normal"}),m.jsx(ln,{value:"uppercase",label:"Uppercase"}),m.jsx(ln,{value:"lowercase",label:"Lowercase"})]}),m.jsx(ds,{}),m.jsxs(Yo,{label:"Unicode tables",side:"left",leadingElement:m.jsx(ct,{svg:Mc,size:"24"}),keepMounted:!0,children:[m.jsx(Do,{fontFamily:"Platform",children:m.jsx(Et,{label:"Platform"})}),m.jsx(Do,{fontFamily:"Figtree",children:m.jsx(Et,{label:"Figtree"})}),m.jsx(Do,{fontFamily:"Noto Sans",children:m.jsx(Et,{label:"Noto Sans"})})]}),m.jsx(Et,{leadingElement:m.jsx(ct,{svg:Ic,size:"24"}),label:"Expand all",onClick:()=>{a.startTransition(()=>t({type:"expand-all"}))}}),m.jsx(Et,{leadingElement:m.jsx(ct,{svg:kc,size:"24"}),label:"Collapse all",onClick:()=>{a.startTransition(()=>t({type:"collapse-all"}))}}),m.jsx(Et,{leadingElement:m.jsx(ct,{svg:Oc,size:"24"}),label:"Reset",onClick:()=>{a.startTransition(()=>t({type:"reset"}))}})]})}const nm=Be.div`
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: column;
|
|
103
|
+
gap: ${pe(Oe[24])};
|
|
104
|
+
|
|
105
|
+
p {
|
|
106
|
+
margin: 0;
|
|
107
|
+
}
|
|
108
|
+
`,om=Be.div`
|
|
109
|
+
position: sticky;
|
|
110
|
+
top: 0;
|
|
111
|
+
background-color: ${pe(Mt.background.primary)};
|
|
112
|
+
padding: ${pe(Oe[8])} 0;
|
|
113
|
+
display: flex;
|
|
114
|
+
align-items: center;
|
|
115
|
+
gap: ${pe(Oe[8])};
|
|
116
|
+
|
|
117
|
+
[data-preply-ds-component='TextField'] {
|
|
118
|
+
flex: 1;
|
|
119
|
+
}
|
|
120
|
+
`,rm=Be.div`
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
gap: ${pe(Oe[8])};
|
|
124
|
+
`,sm=Cc`
|
|
125
|
+
.sbdocs.sbdocs-content {
|
|
126
|
+
max-width: 1280px;
|
|
127
|
+
}
|
|
128
|
+
`,im=()=>{const[e,t]=wn();return m.jsxs(nm,{lang:"en","data-preply-ds-theme":"tokyo-ui",children:[m.jsx(sm,{}),m.jsxs(om,{children:[m.jsx(fc,{label:"Display text",hideLabel:!0,placeholder:"Enter text to display here...",defaultValue:e.text,onChange:n=>t({type:"set-text",text:n.target.value})}),m.jsx(tm,{})]}),m.jsx(rm,{children:yn.map(n=>m.jsx(Wp,{data:n},n.code))})]})},cm=()=>m.jsx(Bp,{children:m.jsx(im,{})}),am={title:"Guides/Assets/Fonts Explorer",tags:["!autodocs","!dev"]},on=()=>m.jsx(cm,{});var ps,ms,gs;on.parameters={...on.parameters,docs:{...(ps=on.parameters)==null?void 0:ps.docs,source:{originalSource:`() => {
|
|
129
|
+
return <FontsExplorer />;
|
|
130
|
+
}`,...(gs=(ms=on.parameters)==null?void 0:ms.docs)==null?void 0:gs.source}}};const lm=["Default"],Sm=Object.freeze(Object.defineProperty({__proto__:null,Default:on,__namedExportsOrder:lm,default:am},Symbol.toStringTag,{value:"Module"}));export{on as D,Sm as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as i,k as a,l as m}from"./iframe-
|
|
1
|
+
import{h as i,k as a,l as m}from"./iframe-B_74HtSc.js";import"./preload-helper-Dp1pzeXC.js";var t=i(m(),1),p=(0,t.default)(2)(async(e,r)=>e===!1?r:a(r));export{p as formatter};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{T as o}from"./iframe-B_74HtSc.js";function a(r){return`var(--${r[o]})`}export{a as g};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,M as s}from"./iframe-
|
|
1
|
+
import{j as e,M as s}from"./iframe-B_74HtSc.js";import{useMDXComponents as o}from"./index-DWFFXgf1.js";import"./preload-helper-Dp1pzeXC.js";function n(r){const t={a:"a",code:"code",h1:"h1",p:"p",pre:"pre",...o(),...r.components};return e.jsxs(e.Fragment,{children:[e.jsx(s,{title:"Utilities/getTokenVar"}),`
|
|
2
2
|
`,e.jsx(t.h1,{id:"gettokenvartoken",children:"getTokenVar(token)"}),`
|
|
3
3
|
`,e.jsxs(t.p,{children:["This utility allows you to retrieve a token's CSS variable as a string, eg. ",e.jsx(t.code,{children:"var(--abc123)"}),";"]}),`
|
|
4
4
|
`,e.jsx(t.pre,{children:e.jsx(t.code,{className:"language-ts",children:`import { color } from '@preply/ds-core';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,M as p}from"./iframe-
|
|
1
|
+
import{j as e,M as p}from"./iframe-B_74HtSc.js";import{useMDXComponents as l}from"./index-DWFFXgf1.js";import{d as h}from"./styled-components.browser.esm-rrOBirU4.js";import{L as o}from"./LayoutFlex-CTH6ELdm.js";import{g as s}from"./getTokenVar-CVkrm5Qs.js";import{c as d,a as t}from"./tokens-im-qJUCZ.js";import"./preload-helper-Dp1pzeXC.js";import"./emotion-unitless.esm-BZwEwAnk.js";import"./filterAttributesPassedByRadixUIAtRuntime-Bye2JkZ0.js";import"./layout-relative.module-1z75aSwo-Dcy7i8oK.js";import"./componentNames-hc9KR2nX.js";function m(n,r,c=s(d.border.primary)){return{position:"relative",border:`${n} solid ${c}`,"&::before":{content:'""',position:"absolute",inset:0,borderRadius:"inherit",padding:n,margin:`calc(-1 * ${n})`,background:r,mask:"linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",maskComposite:"exclude",pointerEvents:"none"}}}const i=h.div`
|
|
2
2
|
width: ${s(t[48])};
|
|
3
3
|
height: ${s(t[48])};
|
|
4
4
|
background: ${s(d.background.primary)};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,M as t}from"./iframe-
|
|
1
|
+
import{j as e,M as t}from"./iframe-B_74HtSc.js";import{useMDXComponents as r}from"./index-DWFFXgf1.js";import"./preload-helper-Dp1pzeXC.js";function o(s){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...r(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Guides/Custom Components/Less.js/Hover"}),`
|
|
2
2
|
`,e.jsx(n.h1,{id:"lessjs-hover",children:"Less.js: Hover"}),`
|
|
3
3
|
`,e.jsxs(n.p,{children:["Import ",e.jsx(n.code,{children:"hover.less"})," from ",e.jsx(n.code,{children:"@preply/ds-web-core"})," and use the ",e.jsx(n.code,{children:"onHover"})," mixin to show hover only for ",e.jsx(n.strong,{children:"Desktops with mouse"}),":"]}),`
|
|
4
4
|
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-css",children:`@import '@preply/ds-web-core/dist/generated/hover.less';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e,M as t}from"./iframe-
|
|
1
|
+
import{j as e,M as t}from"./iframe-B_74HtSc.js";import{useMDXComponents as r}from"./index-DWFFXgf1.js";import"./preload-helper-Dp1pzeXC.js";function o(s){const n={code:"code",h1:"h1",p:"p",pre:"pre",strong:"strong",...r(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(t,{title:"Guides/Custom Components/Scss/Hover"}),`
|
|
2
2
|
`,e.jsx(n.h1,{id:"scss-hover",children:"SCSS: Hover"}),`
|
|
3
3
|
`,e.jsxs("details",{style:{marginBlock:"24px"},children:[e.jsx("summary",{children:"🚧 SCSS Support is experimental 🚧"}),e.jsx(n.p,{children:"SCSS support was introduced due to the lack of support for LESS in the Next.js app router."}),e.jsx(n.p,{children:"Please avoid using it for other purposes, as the API may change or be removed in the future."})]}),`
|
|
4
4
|
`,e.jsxs(n.p,{children:["Import ",e.jsx(n.code,{children:"hover.scss"})," from ",e.jsx(n.code,{children:"@preply/ds-web-core"})," and use the ",e.jsx(n.code,{children:"onHover"})," mixin to show hover only for ",e.jsx(n.strong,{children:"Desktops with mouse"}),":"]}),`
|